summaryrefslogtreecommitdiffstats
path: root/lvm.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-12-03 22:03:34 +0000
committerJeremy Katz <katzj@redhat.com>2004-12-03 22:03:34 +0000
commitc24d5decb0f77dd608d2d7887c528e0a1c060281 (patch)
tree441430b98edd2baa8b1f5f45e979695360baba32 /lvm.py
parent94fe2cc68f6d007752f83bc103c81756a75231ec (diff)
downloadanaconda-c24d5decb0f77dd608d2d7887c528e0a1c060281.tar.gz
anaconda-c24d5decb0f77dd608d2d7887c528e0a1c060281.tar.xz
anaconda-c24d5decb0f77dd608d2d7887c528e0a1c060281.zip
2004-12-03 Jeremy Katz <katzj@redhat.com>
* lvm.py (partialvgs): Detect partial volume groups.
Diffstat (limited to 'lvm.py')
-rw-r--r--lvm.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/lvm.py b/lvm.py
index ef4b879d6..954783afe 100644
--- a/lvm.py
+++ b/lvm.py
@@ -227,6 +227,26 @@ def vglist():
return vgs
+def partialvgs():
+ global lvmDevicePresent
+ if lvmDevicePresent == 0:
+ return []
+
+ vgs = []
+ args = ["lvm", "vgdisplay", "-C", "--noheadings", "--units", "b"]
+ scanout = iutil.execWithCapture(args[0], args, searchPath = 1,
+ stderr = "/dev/tty6")
+ for line in scanout.split("\n"):
+ try:
+ (vg, numpv, numlv, numsn, attr, size, free) = line.strip()[:-1].split()
+ except:
+ continue
+ if attr.find("p") != -1:
+ log("vg %s, attr is %s" %(vg, attr))
+ vgs.append(vg)
+
+ return vgs
+
# FIXME: this is a hack. we really need to have a --force option.
def unlinkConf():
lvmroot = "/etc/lvm"