Operating System - HP-UX
1753445 Members
5356 Online
108794 Solutions
New Discussion юеВ

Re: Can't remove abandoned pv!

 
SOLVED
Go to solution
Shane Reber
Occasional Advisor

Can't remove abandoned pv!

I have some pv's that can't be removed. The lv and vg have been removed, but the pv wasn't removed beforehand. If I try to pvcreate -f the pv, it says that it is in use by vgX. If I try to pvremove /dev/rdsk/pvX, it says that it is in use by vgX. The vg and lv are actually gone, however, so a vgreduce simply errors out that vgX can't be found.

How do I make the system understand, nicely, that this disk is no longer in use so that I can free it up for rebuilding of filesystems?
Shane
5 REPLIES 5
Jeff Schussele
Honored Contributor

Re: Can't remove abandoned pv!

Hi Shane,

vgreduce -f /dev/vgX

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Geoff Wild
Honored Contributor

Re: Can't remove abandoned pv!

strings /etc/lvmtab |grep pvX

If not there, then pvcreate -f /dev/rdsk/pvX and answer Yes...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Shane Reber
Occasional Advisor

Re: Can't remove abandoned pv!

Guys, the vgreduce -f complains that the volume group is not active. Of course, it's not active because I removed it in SAM.

If I ignore that, and run vgchange -a y vgX just to test, it complains that a "quorum not present, or some physical volume(s) are missing."

The vg and the pv still show in a strings of lvmtab.

Shane
Geoff Wild
Honored Contributor
Solution

Re: Can't remove abandoned pv!

vgexport /dev/vgX

Then pvcreate.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Shane Reber
Occasional Advisor

Re: Can't remove abandoned pv!

Thanks Geoff! That seems to have done the job.
Shane