FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-27-2009, 02:56 PM
Joel Granados
 
Default storage-branch vgreduce before vgremove.

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",
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 02-27-2009, 08:53 PM
David Lehman
 
Default storage-branch vgreduce before vgremove.

On Fri, 2009-02-27 at 16:56 +0100, Joel Granados wrote:
> Hey list. This patch is needed to ensure that vgremove succeeds.
>

Good one. I was mistakenly thinking it would be taken care of by
destroying the format on the pvs, but we won't necessarily do that in
every case. This allows the pvs to still be formatted as such.


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 04:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org