1829879 Members
3785 Online
109993 Solutions
New Discussion

Cannot remove VG

 
SOLVED
Go to solution
Jeff Nyberg
Advisor

Cannot remove VG

Hey all-
Neither SAM nor vgremove will allow me to remove a VG stating that a LV exits. None are shown in vgdisplay or sam or anywhere else I've looked. I got down to one PV in the VG in question thinking that's where the LV resides, but after adding another PV to the group and deleting the original the LV still shows up. How/where can a VG hang on to a LV even when disks are switched out?
Thanks much,
Jeff
3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: Cannot remove VG

If you really want to just remove the VG completely use the vgexport command.

# vgexport vg??

This will get rid of all the vg information (ie. the /dev/vg?? directory will be entirely removed).
Kurt Beyers.
Honored Contributor

Re: Cannot remove VG

Jeff,

There is probably some obsolete information in your /etc/lvmtab file.

Have a look at it:
#strings/etc/lvmtab
Remove it (copy the original first to be sure):
#cp /etc/lvmtab /etc/lvmtab.orig
#rm /etc/lvmtan
Recreate the lvmtab file:
#vgscan

Have a look at the contents again and try remove your vg once more.

A vgexport should do the trick as well.

Kurt
Jakes Louw_1
Frequent Advisor

Re: Cannot remove VG

VGSCAN is not a clever command in a clustered environment, so be careful.

VGEXPORT is indeed the way to do it, and it also cleans up after itself (removes dir under /dev)