1833883 Members
1474 Online
110063 Solutions
New Discussion

vgremove

 
SOLVED
Go to solution
Ong Chin Soon
Occasional Contributor

vgremove

Hi,
Recently I've successfully remove the logical volume and the next step is to remove my volume group (which consists of 2 harddisks). But I get the following error message when I try to remove the vg :

vgremove : Volume group "/dev/vg04" still contains more than one physical volume path
vgremove : Couldn't remove volume group "/dev/vg04"

Any idea ? Thanks!
chin soon
4 REPLIES 4
Animesh Chakraborty
Honored Contributor

Re: vgremove

Hi,
I think best way to remove vgs is to do a vgexport
#vgchange -a v vg04
#vgexport -v /dev/vg04

In your case do
vgreduce /dev/vg05 /dev/dsk/cxtydz
then do vgremove.
Did you take a backup?
Michael Tully
Honored Contributor
Solution

Re: vgremove

Try:

# vgchange -a n /dev/vg04
# vgexport /dev/vg04

If you wish to re-use these disks into a different volume group later on you must 'pvcreate' them.

# pvcreate -f /dev/dsk/c1t2d0 (example)

There is no need to do 'vgreduce' at all.
Anyone for a Mutiny ?
Animesh Chakraborty
Honored Contributor

Re: vgremove

Hi Micheal
The question author talking about vgremove not vgexport
command and
Before removing a volume group, two steps are necessary:

1. Remove all the logical volumes belonging to the group by
using the lvremove command (see lvremove(1M)).

2. Remove all but one physical volume belonging to the volume
group by using the vgreduce command (see vgreduce(1M)).
Did you take a backup?
Michael Tully
Honored Contributor

Re: vgremove

The easiest and quickest method to remove a volume group is using the 'vgexport' command. If you wish to reduce particular volumes and then remove the group, sure use 'vgreduce/vgremove'. The only advantage of this method is that each 'VGID' is removed from the LUN header, 'vgexport' does not.
Anyone for a Mutiny ?