[Yum-devel] [PATCH 1/2] fs snapshot plugin: fix inspect_volume_lvm to use supported dmsetup splitname options

Mike Snitzer msnitzer at fedoraproject.org
Sun Mar 10 16:18:09 UTC 2013


dmsetup splitname -o vg_name,lv_name no longer works (fails with "Option
not recognised").  An additional -c argument is required by newer lvm2;
this is an lvm2 regression but moving forward -c -o vg_name,lv_name will
work as intended.

Signed-off-by: Mike Snitzer <msnitzer at fedoraproject.org>
---
 plugins/fs-snapshot/fs-snapshot.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/fs-snapshot/fs-snapshot.py b/plugins/fs-snapshot/fs-snapshot.py
index ef4afe8..2a7c65d 100644
--- a/plugins/fs-snapshot/fs-snapshot.py
+++ b/plugins/fs-snapshot/fs-snapshot.py
@@ -80,7 +80,7 @@ def inspect_volume_lvm(conduit, volume):
         # convert /dev/mapper name to /dev/vg/lv for use with LVM2 tools
         # - 'dmsetup splitname' will collapse any escaped characters
         p = Popen(["/sbin/dmsetup", "splitname", "--separator", "/",
-                   "--noheadings",
+                   "--noheadings", "-c",
                    "-o", "vg_name,lv_name", device], stdout=PIPE, stderr=PIPE)
         err = p.wait()
         if err:
-- 
1.8.1



More information about the Yum-devel mailing list