summaryrefslogtreecommitdiffstats
path: root/lvm.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-06-07 03:41:15 +0000
committerJeremy Katz <katzj@redhat.com>2002-06-07 03:41:15 +0000
commit5d237c27a8bada998a2d13ce656763b9037e06bd (patch)
tree16308b6a8c3bc31fd308daf7b3dc4b1824b56e94 /lvm.py
parentc857e3987c2002e63ac149d5ef01964639c86717 (diff)
downloadanaconda-5d237c27a8bada998a2d13ce656763b9037e06bd.tar.gz
anaconda-5d237c27a8bada998a2d13ce656763b9037e06bd.tar.xz
anaconda-5d237c27a8bada998a2d13ce656763b9037e06bd.zip
add lvm.vgdeactivate()
Diffstat (limited to 'lvm.py')
-rw-r--r--lvm.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lvm.py b/lvm.py
index 3e1cf6eee..a052c2b2e 100644
--- a/lvm.py
+++ b/lvm.py
@@ -36,5 +36,16 @@ def vgactivate():
searchPath = 1)
if rc:
raise SystemError, "vgchange failed"
+
+def vgdeactivate():
+ """Deactivate volume groups by running vgchange -an."""
+
+ rc = iutil.execWithRedirect("/usr/sbin/vgchange",
+ ["vgchange", "-an"],
+ stdout = "/tmp/lvmout",
+ stderr = "/tmp/lvmout",
+ searchPath = 1)
+ if rc:
+ raise SystemError, "vgchange failed"