diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-06-07 05:22:15 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-06-07 05:22:15 +0000 |
commit | 8e48ced38cbc27e545964f6aab30eddbe1993480 (patch) | |
tree | 09823d84c7af6f36c69eab0a1fbf66625aa00d93 /partitions.py | |
parent | 8b7ae92532fb49d0a344a3a04738999dcc979b45 (diff) | |
download | anaconda-8e48ced38cbc27e545964f6aab30eddbe1993480.tar.gz anaconda-8e48ced38cbc27e545964f6aab30eddbe1993480.tar.xz anaconda-8e48ced38cbc27e545964f6aab30eddbe1993480.zip |
method to go through and remove the logical volumes and volume groups before we actually repartition so that we don't confuse the lvm code in the kernel
Diffstat (limited to 'partitions.py')
-rw-r--r-- | partitions.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/partitions.py b/partitions.py index 4f6713a92..63eff8fd3 100644 --- a/partitions.py +++ b/partitions.py @@ -970,3 +970,21 @@ class Partitions: part = disk.next_partition(part) return None + + def doMetaDeletes(self): + """Does the removal of all of the non-physical volumes in the delete list.""" + + # have to have lvm on first + lvm.vgactivate() + + # now, go through and delete logical volumes + for delete in self.deletes: + if isinstance(delete, partRequests.DeleteLogicalVolumeSpec): + lvm.lvremove(delete.name, delete.vg) + + # now, go through and delete volume groups + for delete in self.deletes: + if isinstance(delete, partRequests.DeleteVolumeGroupSpec): + lvm.vgremove(delete.name) + + lvm.vgdeactivate() |