1752681 Members
5263 Online
108789 Solutions
New Discussion юеВ

Re: lvol question

 
navin
Super Advisor

lvol question

Hi i cant seem to remove one of the volume group with the following error - how would i force the vg remove.
thanks

vgremove: Volume group "/dev/vg02" still contains a logical volume(s).
vgremove: Couldn't remove volume group "/dev/vg02".
# lvremove -f /dev/vg02/lvol100
lvremove: Couldn't delete logical volume "/dev/vg02/lvol100":
The supplied lv number refers to a non-existent logical volume.
Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.conf
#



Learning ...
6 REPLIES 6
Tim Nelson
Honored Contributor

Re: lvol question

If you simply wish to trash/delete the VG and start over then

vgchange -a n /dev/vg02
vgexport /dev/vg02

if you are going to use the same disk for a new VG then force the pvcreate after ensuring that you are using the correct disk.

navin
Super Advisor

Re: lvol question

but i need to use it with B option - can it be used with f option

pvcreate -fB /dev/rdsk/c1t1d0

thanks
Learning ...
navin
Super Advisor

Re: lvol question

or just i would like to remove the pv from the volume group vg01

thanks
Learning ...
Tim Nelson
Honored Contributor

Re: lvol question

>>or just i would like to remove the pv from the volume group vg01

two different things here.

If you simply wish to destroy the VG then vgexport ( I suggested this option because your first post looked to me like it had a corrupt volume.) and I assume that it is unusable.

if you wish to release a physical device from a VG then you must resolve all the conflicts ( e.g. any physical extents that are in use ) and then a simple vgreduce /dev/vgxx /dev/dsk/cxtxdx

Which one are you really looking to do.
navin
Super Advisor

Re: lvol question

i simple would like to remove th ephysical device out of vg02
thanks
Learning ...
Tim Nelson
Honored Contributor

Re: lvol question

ok..

could you post a vgdisplay -v /dev/vg02

I want to see if /dev/vg02/lvol100 really exists.