[PATCH] Use a different method to get the sysfs_path for device-mapper devices (#665643).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/storage/formats/__init__.py |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/storage/formats/__init__.py b/pyanaconda/storage/formats/__init__.py
index f5377c6..6c71042 100644
--- a/pyanaconda/storage/formats/__init__.py
+++ b/pyanaconda/storage/formats/__init__.py
@@ -396,7 +396,15 @@ class DeviceFormat(object):
     @property
     def majorminor(self):
         """A string suitable for using as a pseudo-unique ID in kickstart."""
-        sysfs_path = get_sysfs_path_by_name(self.device)
+
+        # If this is a device-mapper device, we have to get the DM node and
+        # build the sysfs path from that.
+        try:
+            device = dm_node_from_name(self.device)
+        except:
+            device = self.device
+
+        sysfs_path = get_sysfs_path_by_name(device)
         dev = udev_get_device(sysfs_path[4:])
         return "%03d%03d" % (udev_device_get_major(dev), udev_device_get_minor(dev))
 
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux