Eduardo has uploaded a new change for review. Change subject: Add lvm.lvPhysDev() to get the physical LV device. ......................................................................
Add lvm.lvPhysDev() to get the physical LV device. Change-Id: I6d3286589ea02025713d10d85a9892024f586b73 Signed-off-by: Eduardo <[email protected]> --- M vdsm/storage/lvm.py 1 file changed, 10 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/8751/1 diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py index 78c846a..094569d 100644 --- a/vdsm/storage/lvm.py +++ b/vdsm/storage/lvm.py @@ -1156,6 +1156,16 @@ def lvPath(vgName, lvName): return os.path.join("/dev", vgName, lvName) +def lvPhysDev(vgName, lvName): + """Return the LV physical device. + + returns: dm-X + The LV should be active. + """ + + lvp = lvPath(vgName, lvName) + return os.path.basename(os.readlink(lvp)) + def _isLVActive(vgName, lvName): """Active volumes have a mp link. -- To view, visit http://gerrit.ovirt.org/8751 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d3286589ea02025713d10d85a9892024f586b73 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
