示例#1
0
    def probe(self):
        """ Probe for any missing information about this format. """
        if not self.exists:
            raise RaidMemberError("format does not exist", self.device)

        info = raid.mdexamine(self.device)
        if self.uuid is None:
            self.uuid = info['uuid']
        if self.raidMinor is None:
            self.raidMinor = info['mdMinor']
示例#2
0
    def probe(self):
        """ Probe for any missing information about this format. """
        if not self.exists:
            raise RaidMemberError("format does not exist", self.device)

        info = raid.mdexamine(self.device)
        if self.uuid is None:
            self.uuid = info['uuid']
        if self.raidMinor is None:
            self.raidMinor = info['mdMinor']
示例#3
0
    def probe(self):
        """ Probe for any missing information about this device.

            I'd like to avoid paying any attention to "Preferred Minor"
            as it seems problematic.
        """
        if not self.exists:
            raise RaidArrayError("device has not been created", self.name)

        try:
            self.devices[0].setup()
        except Exception:
            return

        info = raid.mdexamine(self.devices[0].path)
        if self.level is None:
            self.level = raid.raidLevel(info['level'])
示例#4
0
    def probe(self):
        """ Probe for any missing information about this device.

            I'd like to avoid paying any attention to "Preferred Minor"
            as it seems problematic.
        """
        if not self.exists:
            raise RaidArrayError("device has not been created", self.name)

        try:
            self.devices[0].setup()
        except Exception:
            return

        info = raid.mdexamine(self.devices[0].path)
        if self.level is None:
            self.level = raid.raidLevel(info['level'])