Operating System - HP-UX
1820518 Members
4249 Online
109625 Solutions
New Discussion юеВ

Re: unable to delete a volume group

 
SOLVED
Go to solution
shankar!
Frequent Advisor

unable to delete a volume group

Hi,

some one did something to a test server and now I see Physical volume groups section under vgdisplay -v command, currently we have only one vg(ie vg00).

#vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 11
Open LV 11
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4384
VGDA 2
PE Size (Mbytes) 32
Total PE 4374
Alloc PE 4161
Free PE 213
Total PVG 1
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 1792
Current LE 56
Allocated PE 56
Used PV 1

(removed some out put here)


--- Physical volumes ---
PV Name /dev/dsk/c3t0d0
PV Status available
Total PE 4374
Free PE 213
Autoswitch On
Proactive Polling On


--- Physical volume groups ---
PVG Name vg02
PV Name /dev/dsk/c3t0d0

I would like to delete vg02.

bash-3.2# vgremove vg02
vgremove: Volume group "/dev/vg02" does not exist in the "/etc/lvmtab" file.
vgremove: Couldn't remove volume group "vg02".

bash-3.2# strings /etc/lvmtab | grep -i vg02
bash-3.2# strings /etc/lvmtab | grep -i vg00
/dev/vg00

can someone please help me removing PVG Name vg02 from the system?

Thanks
shankar
8 REPLIES 8
Robert-Jan Goossens
Honored Contributor

Re: unable to delete a volume group

Hi Shankar,

Try

# vgexport /dev/vg02

regards,
Robert-Jan
Ganesan R
Honored Contributor

Re: unable to delete a volume group

Hi,

vgdisplay -v vg00 should not show anything about vg02. Especially this details..

>>>>>
PVG Name vg02
PV Name /dev/dsk/c3t0d0
>>>>>>

Are you sure vg02 exist on the system. confirm with

#vgdisplay -v vg02

You could use this command to entirely remove vg02 from the system

#vgexport -v vg02
Best wishes,

Ganesh.
shankar!
Frequent Advisor

Re: unable to delete a volume group

Hi Robert,

Thanks for quick response,

I did what you suggested, and here is output.

bash-3.2# vgexport /dev/vg02
vgexport: Volume group "/dev/vg02" does not exist in the "/etc/lvmtab" file.
vgexport: Couldn't export volume group "/dev/vg02".


Thanks
shankar
shankar!
Frequent Advisor

Re: unable to delete a volume group

Hi,

vg02 does not seem to be exist.

bash-3.2# vgexport /dev/vg02
vgexport: Volume group "/dev/vg02" does not exist in the "/etc/lvmtab" file.
vgexport: Couldn't export volume group "/dev/vg02".

bash-3.2# vgdisplay -v vg02
vgdisplay: Volume group "/dev/vg02" does not exist in the "/etc/lvmtab" file.
vgdisplay: Cannot display volume group "vg02".

bash-3.2# ls -ld /dev/vg*
drwxr-xr-x 2 root root 8192 Apr 1 19:37 /dev/vg00

Thanks
shankar


Robert-Jan Goossens
Honored Contributor

Re: unable to delete a volume group

I need glasses :)

--- Physical volume groups ---
PVG Name vg02
PV Name /dev/dsk/c3t0d0

You have physical volume group named vg02!

# strings /etc/lvmpvg

Regards,
Robert-Jan
Ganesan R
Honored Contributor
Solution

Re: unable to delete a volume group

Hi,

It is sure that, vg02 is not exist on the system.

I think somebody might have wrongly updated the file /etc/lvmpvg file. That is why you are getting this message

--- Physical volume groups ---
PVG Name vg02
PV Name /dev/dsk/c3t0d0

You can rename this file to get rid out this message from vgdisplay.

#mv /etc/lvmpvg /etc/lvmpvg.old
Best wishes,

Ganesh.
shankar!
Frequent Advisor

Re: unable to delete a volume group

That fixed the problem!!!

Thank you all for your support :)
Sajjad Sahir
Honored Contributor

Re: unable to delete a volume group



vgexport is the command


simply vgexport volume group name


thanks and regards

Sajjad