1838286 Members
3085 Online
110125 Solutions
New Discussion

lvremove hangs

 
SOLVED
Go to solution
Fred Ruffet
Honored Contributor

lvremove hangs

Hi all,

I have some VGs with 2 LV on it. One of the LV has its disks no more on the machine. PVs are marked as unavailable. I run lvremove to remove the LV. It worked for all the VGs, but lvremove hangs on the last one.

I would like not to reboot the server. What is the risk to kill lvremove ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
7 REPLIES 7
Steven E. Protter
Exalted Contributor
Solution

Re: lvremove hangs

Shalom,

No risk at all in killing the lvremove.

It might not due, and it may go zombie which will THEN require a reboot to correct.

Before running the command, run pvdisplay -v on the physical volume, if its still present.

You may need at some point to do this:

vgchange -a n vg_name
mv /etc/lvmtab /etc/lvmtab.old
vgscan -a

vgreduce -f vg_name afterwards precisely following the instructions is also a valid way out of this situation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ganesan R
Honored Contributor

Re: lvremove hangs

Hi Fred,

There is no risk. But I am doubtful it is not going to kill.

You should have reduced the vg from the missing disks using vgreduce -f or lvreduce -k(if it is mirrored) before removing the lv.
Best wishes,

Ganesh.
Fred Ruffet
Honored Contributor

Re: lvremove hangs

SEP, Ganesan,

I also think killing will not make my system unstable. But it will probably go zombie, and I won't be able to launch any other LVM command (such as a vgreduce on the missing disks). As SEP say, it will end on a reboot that I didn't want to do.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Fred Ruffet
Honored Contributor

Re: lvremove hangs

It doesn't go zombie. In fact, it isn't killed at all. Even with "kill -9".

This seriously begins to look like a reboot to schedule...

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
James R. Ferguson
Acclaimed Contributor

Re: lvremove hangs

Hi Fred:

If 'kill -9' doesn't terminate the process then a reboot is probably your only option. A process that doesn't honor a 'kill -9' is one that is waiting on a higher event, often an I/O or a kernel space event.

Regards!

...JRF...
sujit kumar singh
Honored Contributor

Re: lvremove hangs

Hi

In the cases where you do not have the disks present physically on the system thelvreduce and vgreduce to remove the mirror of LVs from that disk mught fail as the LVM keeps retring for that disk and we calll that ghost disk.

As Ganeshan says it is good that we can do a #lveduce -m 0 -k

The PV Key for the ghodt disk yiu can get from the command
#lvdisplay -v -k

You can well judge that with the number appearing instead of the PV nmae as would have appeared in a normal lvdisplay -v O/P without the -k option. This you can judge as those will have a ??? mark in place of the PE status.

To remove that PV from the VG as SEP suggets, you shall need to do
#vgreduce -f /dev/vg00

this shall help you remove the missing PV easily.

OR also you can first of all try a vgscan after renaming the orig /etc/lvmtab.


regards
sujit
Fred Ruffet
Honored Contributor

Re: lvremove hangs

Note that all of this was prepared and has worked for all other VG. My problem is not to get rid of my LV.

Why lvremove has hung is a mystery for me. LV wasn't mounted.

My real problem was to stop this lvremove without going through reboot. For me, such a process blocked on I/O can not be killed. But I thought an old guru may be aware of some ancient magical spell ;) I can't wait anymore and I'm going to bounce the system now.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)