Operating System - HP-UX
1748171 Members
4216 Online
108758 Solutions
New Discussion

Physical Volume not available, how to remove vg and lv

 
SOLVED
Go to solution
R_Keane
Visitor

Physical Volume not available, how to remove vg and lv

Hi Guru,

 

I have issue when I tried to remove vg and lv. It is because the physical volume is no longer available. The disk was actually external hard drive. It was unplugged and has been formatted now.

When I do vgdisplay -v, it shows the vg is still available, lv still available but the physical volume is not available.

Is there any way to clean up all the vg and lv created in that disk ? I just want to remove vg and lv created in that disk.

Thank you very much.

 

Regards,

 

RK

4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Physical Volume not available, how to remove vg and lv

First, see if you can deactivate the VG with the VGchange command.

 

# vgchange -a n <vgname>

 

Once it has been deactivated you can then export the VG, which will blow everything away.

 

# vgexport <vgname>

R_Keane
Visitor

Re: Physical Volume not available, how to remove vg and lv

Hi Patrick,

 

First of all thank you for your response. I've tried to deactivate the vg, but it wasn't work.

# vgchange -a n vgtest
vgchange: Couldn't deactivate volume group "vgtest":
Device busy

 

If you have any other suggestion .. I really appreciate it.

Thanks in advance.

 

Regards,

 

R Keane

sapoguheman
Frequent Advisor
Solution

Re: Physical Volume not available, how to remove vg and lv

Can you please post vgdispay -v output and (PV name)

 

Try pvchange -a n <pvname>  and then  vgchange -a n <vgname> then vgexport <vgname>

R_Keane
Visitor

Re: Physical Volume not available, how to remove vg and lv

Hi Sapoguheman,

pvchange works great. Now I can do vgchange then vgexport.

Thank you very much for your great help.

Regards,

 

R.Keane