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

[PATCH rhel6-branch 2/2] Handle dm-N devices pointed to by /dev/disk/ paths (#605312)



Related: rhbz#605312
---
 storage/devicetree.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/storage/devicetree.py b/storage/devicetree.py
index 728191e..f4e960d 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -2307,6 +2307,11 @@ class DeviceTree(object):
             if devspec.startswith("/dev/disk/"):
                 devspec = os.path.realpath(devspec)
 
+                if devspec.startswith("/dev/dm-"):
+                    dm_name = devicelibs.dm.name_from_dm_node(devspec[5:])
+                    if dm_name:
+                        devspec = "/dev/mapper/" + dm_name
+
             # device path
             device = self.getDeviceByPath(devspec)
             if device is None:
-- 
1.7.3.2


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