diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-06-06 21:54:09 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-06-06 21:54:09 +0000 |
commit | fcba9b43ab1249840ec2b7dd8097145d55d39aaf (patch) | |
tree | 68103f16fb19ebb1939563301aa36679316eec68 /lvm.py | |
parent | ae97caf371ec4d60362199ab28d76e943482d64a (diff) | |
download | anaconda-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.py | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -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" + + |