Operating System - HP-UX
1826580 Members
3699 Online
109695 Solutions
New Discussion

Re: Couldn't remove volume group

 
sfgroups
Advisor

Couldn't remove volume group

Hi all,

I have removed all logical volume form this volume group, now I want to remove volume group vg06, but I am getting this message.

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

Here is vgdisplay ouptut:

vgdisplay -v vg06
--- Volume groups ---
VG Name /dev/vg06
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 7
Act PV 7
Max PE per PV 10239
VGDA 14
PE Size (Mbytes) 4
Total PE 71666
Alloc PE 0
Free PE 71666
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


--- Physical volumes ---
PV Name /dev/dsk/c16t1d7
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

PV Name /dev/dsk/c16t2d1
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

PV Name /dev/dsk/c16t1d5
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

PV Name /dev/dsk/c16t2d0
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

PV Name /dev/dsk/c16t2d2
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

PV Name /dev/dsk/c16t1d3
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

PV Name /dev/dsk/c16t1d6
PV Status available
Total PE 10238
Free PE 10238
Autoswitch On

How will I remove this volume group?

Thanks

8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: Couldn't remove volume group

You have a couple of options:

1) Do a vgreduce on ALL physical volumes in the VG.

# vgreduce /dev/dsk/c16t1d6 /dev/dsk/c16t1d3, etc.

when that is done:

# vgremove vg06

2) Deactivate and export the VG.

# vgchange -a n vg06
# vgexport vg06

The 2nd option is definitely faster and easier.
Robert-Jan Goossens
Honored Contributor

Re: Couldn't remove volume group

take the easier route

# vgchange -a n vg06
# vgexport vg06

Regards,
Robert-Jan
DCE
Honored Contributor

Re: Couldn't remove volume group



You have to remove the disks from the volume group with vgreduce.

Once the disks are removed, then you can remove the volume group.

HTH
Dave
Shahul
Esteemed Contributor

Re: Couldn't remove volume group

Hi,

Remove all the physical volumes from VG by using vgreduce command. Then you should be able to remove the volume group.

Best of luck
Shahul

sysadm_1
Valued Contributor

Re: Couldn't remove volume group


Hi,

Do a vgexport instead of vgremove.Vgexport removes all information about the vg from system with single command.

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


cheers!!
sysadm
Sivakumar TS
Honored Contributor

Re: Couldn't remove volume group


Hi,

vgexport is the best method to remove all traces of a VG frm the system

#vgexport VGname

Regards,

Siva.
Nothing is Impossible !
Patrice Le Guyader
Respected Contributor

Re: Couldn't remove volume group

Hi,

Nothing to add except a little advise, when you make you vgchange and vgexport use -f option with a filename. So after you can directly make the pvcreate -f on the disks which are in it and that will avoid a lot of questions the next time you'll have to use them; "Is it still used ?"

Hope this helps
Kenavo
Pat
Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
Devender Khatana
Honored Contributor

Re: Couldn't remove volume group

Hi,

The message is self explainary, as it says it can not remove VG as it is extended to more than one physical volume.

For vgremove to work the VG should be limited to only one physical volume and this does not allow even multiple paths to same disk.

A better option will be to use vgexport which will do the same job for you and will avaoid additional steps of vgreduce from any six disks which are there.

HTH,
Devender
Impossible itself mentions "I m possible"