Operating System - HP-UX
1753670 Members
5244 Online
108799 Solutions
New Discussion юеВ

Re: Unable to remove a LV with out PV from vg00

 
raghin
New Member

Unable to remove a LV with out PV from vg00

Hi All,

I am facing a issue with removal of a LV from the VG00. while we were migarting to a different h/w we mirrored the vg00 to a EMC disk and booted from that disk in the new server. while doing the same we missed out mirroring one LV ( lvswp2) to the EMC disk. After doing export import in the LVM maintatinenece mode we booted the system to multi user mode. the LV is now showing 0 pv as it don't have physical disk. I want to remove that LV. we have tried removing teh disk using vgreduce -f and tried to remove the using lvremove -f both are not working.
Please let me know if this cane be done online as the next reboot schedule for the same server is after quite some time.

LV Name /dev/vg00/lvswp2
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 1024
Allocated PE 1024
Used PV 0
7 REPLIES 7
SKR_1
Trusted Contributor

Re: Unable to remove a LV with out PV from vg00

Do
1. umount FS
2. Remove the entry from /etc/fstab
3. Try to lvremove -f lvname

If no luck

4. Take reboot and then delete.

Thanks

SKR
raghin
New Member

Re: Unable to remove a LV with out PV from vg00

HI SKR,

this filesystem is not mounted, Also as i mentyioned above we have already tried lvremove -f
SKR_1
Trusted Contributor

Re: Unable to remove a LV with out PV from vg00

Reboot is the last option.

Thanks

SKR
AwadheshPandey
Honored Contributor

Re: Unable to remove a LV with out PV from vg00

Hi Raghin,

Looks like this is swap lv. check and delete FS entry in /etc/fstab if present and reboot the system. then only you can delete the lv.
pls paste swapinfo -tam o/p.

also paste lvdisplay -v /dev/vg00/lvswp2|more ( 1st page)

Cheers,

Awadhesh
It's kind of fun to do the impossible
Adam W.
Valued Contributor

Re: Unable to remove a LV with out PV from vg00

I am with SKR on this one. Reboot seems to be the only option left. I would perform a reboot.
There are two types of people in the world, Marines and those who wish they were.
Sagar Sirdesai
Trusted Contributor

Re: Unable to remove a LV with out PV from vg00

Hi Raghin

Please send the output of
swapinfo -tam

Sagar
Steve Post
Trusted Contributor

Re: Unable to remove a LV with out PV from vg00

Perhaps I should not write off the cuff....oh well....

If it has no impact, maybe you should just leave it until the next schedule downtime. Or perhaps you could have a short scheduled "emergency" reboot. In either case, you can make up your plan for fixing it when you CAN reboot. You can do that now.

There is a pdf file buried in the HP's webpages called "when good disks go bad." It mentions a similar problem. You need to change something in the configuration of the volume groups but a disk is missing. From this some of the commands lock up.

Run the man page on vgreduce. You'll see something called "-A n". This is an option to not automatically back up configuration changes. This MIGHT get the command to work. But then config data changes are not backed up in /etc/lvmconf and they should be.

Run lvdisplay -v -k /dev/vgxx/lvyy. The k gives a number for the missing disk. If the disk goes away, you can use this k number instead of the actual disk. But this is only good for lvreduce if this physical volume is a mirror. (Ah. run man page on lvreduce too).

Be careful. You might not be able to make ignite tapes properly because of this error.