summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-07-07 18:21:25 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-07-08 04:15:26 -1000
commit8ae7be3e524fa52ad8f56e998a32559d73144a3b (patch)
tree281da58037c5d54c0b3c433a7604df0c19c7712e /storage
parent39ef8dffb658e7186e25303b03ce1cd28b950c3d (diff)
downloadanaconda-8ae7be3e524fa52ad8f56e998a32559d73144a3b.tar.gz
anaconda-8ae7be3e524fa52ad8f56e998a32559d73144a3b.tar.xz
anaconda-8ae7be3e524fa52ad8f56e998a32559d73144a3b.zip
Include lv_attr in lvm.lvs() return value.
Include the lv_attr field in the lvm.lvs() hash table returned. Needed to tell if the logical volume is active or not.
Diffstat (limited to 'storage')
-rw-r--r--storage/devicelibs/lvm.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
index a5eb59d8a..671113a92 100644
--- a/storage/devicelibs/lvm.py
+++ b/storage/devicelibs/lvm.py
@@ -319,7 +319,7 @@ def vginfo(vg_name):
def lvs(vg_name):
args = ["lvs", "--noheadings", "--nosuffix"] + \
["--units", "m"] + \
- ["-o", "lv_name,lv_uuid,lv_size"] + \
+ ["-o", "lv_name,lv_uuid,lv_size,lv_attr"] + \
config_args + \
[vg_name]
@@ -332,9 +332,10 @@ def lvs(vg_name):
line = line.strip()
if not line:
continue
- (name, uuid, size) = line.split()
+ (name, uuid, size, attr) = line.split()
lvs[name] = {"size": size,
- "uuid": uuid}
+ "uuid": uuid,
+ "attr": attr}
if not lvs:
raise LVMError(_("lvs failed for %s" % vg_name))