Operating System - HP-UX
1753781 Members
7801 Online
108799 Solutions
New Discussion юеВ

Re: Cant remove a logical volume

 
SOLVED
Go to solution
Ian Foster
Advisor

Re: Cant remove a logical volume

All good suggestions. I have tried them all (except booting to LVM maintenance mode - this will have to wait until I can get on-site with the machine and schedule an outage on the server). Problem still remains so I am inclined to think maybe there might be a patching issue as suggested. I have checked that volume is not mirrored. The output is attached FYI.

Great, another box to fill in
Robert-Jan Goossens
Honored Contributor

Re: Cant remove a logical volume

Hi Ian,

Just a thought, why not remove the volume group, noticed that you have only one lvol in this group.

# vgexport testvg

Robert-Jan.
Armin Feller
Honored Contributor

Re: Cant remove a logical volume

Check who keeps the lvol open:

# fuser /dev/testvg/rlvol1
# ps -fp
end the process which keeps the file open

Please also check if the newest VxFS patch is installed on the system, for HP-UX 11.00 min. PHKL_27212

Ian Foster
Advisor

Re: Cant remove a logical volume

Nice idea, Robert-Jan. Unfortunately this wouldn't work either :

# vgexport /dev/testvg
vgexport: Volume group "/dev/testvg" is still active.
vgexport: Couldn't export volume group "/dev/testvg".

# vgchange -a n /dev/testvg
vgchange: Couldn't deactivate volume group "/dev/testvg":
Device busy

Good, isn't it ?!

It would certainly appear that despite the fact the filesystem is not mounted and I can make the only remaining logical volume unavailable, the system thinks that testvg or the underlying disk is busy, though I'll be damned if I can see why ! Maybe a reboot will cure it ?
Great, another box to fill in
Juan Manuel L├│pez
Valued Contributor

Re: Cant remove a logical volume

Use fuser command over lv name to get the proccess running on it.
Then you can kill the process on lv.

I hope this help you.

Juanma.
I would like to be lie on a beautiful beach spending my life doing nothing, so someboby has to make this job.
Armin Feller
Honored Contributor

Re: Cant remove a logical volume

Yes, a reboot will help here, but in my mind you should find the process which keeps the lvol open with fuser command and if you stop/kill this process you should be able to remove the lvol without reboot.

Regards ...
Armin
Ian Foster
Advisor

Re: Cant remove a logical volume

Armin, output as suggested :

# fuser /dev/testvg/lvol1
/dev/testvg/lvol1:

# fuser /dev/testvg
/dev/testvg:

# fuser /dev/dsk/c2t4d0
/dev/dsk/c2t4d0:

#

ie. no output.

It looks more like a case for a reboot or some LVM patches.

Cheers,
Ian.
Great, another box to fill in
Armin Feller
Honored Contributor

Re: Cant remove a logical volume

Please use the raw lvol

# fuser /dev/testvg/rlvol1

to find the process. Also you should check for the newest VxFS patch, I know a problem without having this patch.

If fuser didn't find the process, you have to reboot ;-(((
Ian Foster
Advisor

Re: Cant remove a logical volume

Shiju,

The thread for the upgrade/mirroring question looks useful, thanks.

I have a question relating to this though :

When rebooting from the mirror disk (assuming the mirror has been split prior to the shutdown) is there an issue with /etc/fstab or will all the filesystems mount as normal ?

Cheers,
Ian.
Great, another box to fill in
Ian Foster
Advisor

Re: Cant remove a logical volume

Armin,

The fuser did not find anything on the raw device either unfortunately :

# fuser /dev/testvg/rlvol1
/dev/testvg/rlvol1:

#

Time to check patches and possibly reboot, I think.

Thanks for all your suggestions.

Ian.
Great, another box to fill in