diff options
author | David Lehman <dlehman@redhat.com> | 2012-08-23 14:12:09 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2012-08-30 11:09:30 -0500 |
commit | c3d0fb5fc320ce7ea52aa20f18bcff84b8034711 (patch) | |
tree | 1b237d7a03e87c89d7ee3b95be83f5bef7affbf1 /pyanaconda/storage/formats | |
parent | feedc97e2332df6df969ae2765a91cb0aa83a02e (diff) | |
download | anaconda-c3d0fb5fc320ce7ea52aa20f18bcff84b8034711.tar.gz anaconda-c3d0fb5fc320ce7ea52aa20f18bcff84b8034711.tar.xz anaconda-c3d0fb5fc320ce7ea52aa20f18bcff84b8034711.zip |
Add support for named md devices.
With the following exception, this marks the end of us using array
super-minor as the basis for its name: For preexisting devices with
no name, we'll treat the super-minor as a name since that's really
all we have to work with.
Diffstat (limited to 'pyanaconda/storage/formats')
-rw-r--r-- | pyanaconda/storage/formats/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pyanaconda/storage/formats/__init__.py b/pyanaconda/storage/formats/__init__.py index 12ca5bf1c..838ad26ce 100644 --- a/pyanaconda/storage/formats/__init__.py +++ b/pyanaconda/storage/formats/__init__.py @@ -29,6 +29,7 @@ from pyanaconda.iutil import execWithRedirect from pyanaconda.anaconda_log import log_method_call from ..errors import * from ..devicelibs.dm import dm_node_from_name +from ..devicelibs.mdraid import md_node_from_name from ..udev import udev_device_get_major, udev_device_get_minor import gettext @@ -257,6 +258,12 @@ class DeviceFormat(object): except DMError: log.warning("failed to get dm node for %s" % self.device) return + elif self.device.startswith("/dev/md/"): + try: + name = md_node_from_name(os.path.basename(self.device)) + except MDRaidError: + log.warning("failed to get md node for %s" % self.device) + return else: name = self.device |