[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] storage-branch vgreduce before vgremove.
- From: Joel Granados <jgranado redhat com>
- To: anaconda-devel-list redhat com
- Subject: [PATCH] storage-branch vgreduce before vgremove.
- Date: Fri, 27 Feb 2009 16:56:59 +0100
Hey list. This patch is needed to ensure that vgremove succeeds.
regards.
--
Joel Andres Granados
Brno, Czech Republic, Red Hat.
commit 87375b2caf5557a3002e65ead326bb9fca3aefe6
Author: Joel Granados Moreno <jgranado redhat com>
Date: Fri Feb 27 16:36:39 2009 +0100
Do a vgreduce before the vgremove.
This takes care of any lingering metadata that might be present in the
PVs of the VG to be removed.
diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py
index cd39707..afb7256 100644
--- a/storage/devicelibs/lvm.py
+++ b/storage/devicelibs/lvm.py
@@ -181,6 +181,16 @@ def vgcreate(vg_name, pvs, pe_size):
raise LVMError("vgcreate failed for %s" % vg_name)
def vgremove(vg_name):
+ rc = iutil.execWithRedirect("lvm", ["vgreduce",
+ "--removemissing",
+ "--force",
+ vg_name] ,
+ stdout = "/dev/tty5",
+ stderr = "/dev/tty5",
+ searchPath = 1)
+ if rc:
+ raise LVMError("vgreduce failed %s" % vg_name)
+
rc = iutil.execWithRedirect("lvm", ["vgremove", vg_name],
stdout = "/dev/tty5",
stderr = "/dev/tty5",
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]