summaryrefslogtreecommitdiffstats
path: root/lvm.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-06-06 21:54:09 +0000
committerJeremy Katz <katzj@redhat.com>2002-06-06 21:54:09 +0000
commitfcba9b43ab1249840ec2b7dd8097145d55d39aaf (patch)
tree68103f16fb19ebb1939563301aa36679316eec68 /lvm.py
parentae97caf371ec4d60362199ab28d76e943482d64a (diff)
downloadanaconda-fcba9b43ab1249840ec2b7dd8097145d55d39aaf.tar.gz
anaconda-fcba9b43ab1249840ec2b7dd8097145d55d39aaf.tar.xz
anaconda-fcba9b43ab1249840ec2b7dd8097145d55d39aaf.zip
start reading in preexisting volume group information and logical volumes
Diffstat (limited to 'lvm.py')
-rw-r--r--lvm.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/lvm.py b/lvm.py
new file mode 100644
index 000000000..3e1cf6eee
--- /dev/null
+++ b/lvm.py
@@ -0,0 +1,40 @@
+# lvm.py - lvm probing control
+#
+# Jeremy Katz <katzj@redhat.com>
+#
+# Copyright 2002 Red Hat, Inc.
+#
+# This software may be freely redistributed under the terms of the GNU
+# general public license.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+import iutil
+import os,sys
+import string
+
+def vgscan():
+ """Runs vgscan."""
+
+ rc = iutil.execWithRedirect("/usr/sbin/vgscan",
+ ["vgscan", "-v"],
+ stdout = "/tmp/lvmout",
+ stderr = "/tmp/lvmout",
+ searchPath = 1)
+ if rc:
+ raise SystemError, "vgscan failed"
+
+def vgactivate():
+ """Activate volume groups by running vgchange -ay."""
+
+ rc = iutil.execWithRedirect("/usr/sbin/vgchange",
+ ["vgchange", "-ay"],
+ stdout = "/tmp/lvmout",
+ stderr = "/tmp/lvmout",
+ searchPath = 1)
+ if rc:
+ raise SystemError, "vgchange failed"
+
+