Operating System - HP-UX
1833777 Members
1935 Online
110063 Solutions
New Discussion

Re: removing volume group with ghost pv

 
Ted Mims
Occasional Advisor

removing volume group with ghost pv

I have a volume group named /dev/oracle
In it I have a pv named /dev/dsk/c2t5d0
A vgdisplay shows that there are two cur pv's and on act pv.
A disk device listing only shows c2t5d0 and nothing else.
When i try to reduce c2t5do, i can't because you must have at least one pv.
When I try to remove /dev/oracle, i can't because it says there are two pv's.
How do i remove the ghost pv?
HELP!!!
4 REPLIES 4

Re: removing volume group with ghost pv

Try:

vgexport /dev/oracle

If that won't work:

cp /etc/lvmtab /etc/lvmtab.old
vgscan

HTH

Duncan

I am an HPE Employee
Accept or Kudo
James R. Ferguson
Acclaimed Contributor

Re: removing volume group with ghost pv

Hi Ted:

Try:

# vgreduce -f /dev/vgxx

Regards!

...JRF...
Helen French
Honored Contributor

Re: removing volume group with ghost pv

Hi Ted:

If you are just going get rid of this VG and this PV, then you can do this:

# vgexport /dev/oracle

This will remove the VG information from the system. Another way is:

# umount - all mounted file systems of /dev/oracle
# lvremove - all LVs
# vgremove /dev/oracle

You won't be able to reduce the VG, if there is only one disk in that !

HTH,
Shiju
Life is a promise, fulfill it!
pap
Respected Contributor

Re: removing volume group with ghost pv

Hi,
Just run command

#vgscan -v

That will recreate your /etc/lvmtab file and will make the entry in it for latest available drives for vg(oracle)

Then you can check using vgdisplay what is wrong.

Hopefully it will resolv your problem.

Thanks,
-pap
"Winners don't do different things , they do things differently"