Operating System - HP-UX
1825766 Members
2030 Online
109687 Solutions
New Discussion

could not remove logical volume

 
SOLVED
Go to solution
Jack_126
Frequent Advisor

could not remove logical volume

Hi,

while giving the following command for removing the logical volume getting the following message:
# lvremove -f /dev/emc4_vg08/S_Pad_log01
lvremove: Couldn't delete logical volume "/dev/emc4_vg08/S_Pad_log01":
The specified logical volume is open.
Volume Group configuration for /dev/emc4_vg08 has been saved in /etc/lvmconf/emc

FYI
this logical volume is used as raw device,there is no file system created on this LV.
8 REPLIES 8
Peter Godron
Honored Contributor

Re: could not remove logical volume

Sandman!
Honored Contributor

Re: could not remove logical volume

You still need to unmount it before you can lvremove it.

# umount /dev/emc4_vg08/S_Pad_log01
Bill Hassell
Honored Contributor

Re: could not remove logical volume

Since it is a raw device, only certain programs can use the data on this lvol and apparently one is still running with that rlvol still open. fuser may be able to tell you the PID of the process:

fuser /dev/emc4_vg08/rS_Pad_log01

Otherwise, shutdown the software that may have used this volume.


Bill Hassell, sysadmin
Sandman!
Honored Contributor

Re: could not remove logical volume

And if that doesn't do it then run lsof on the raw lvol and kill any pids that are using it (aka have it opened).

cheers!
Jack_126
Frequent Advisor

Re: could not remove logical volume

Hi,

while running the following command,getting the following messages:

umount /dev/emc4_vg08/S_Pad_log01
umount: cannot find /dev/emc4_vg08/S_Pad_log01 in /etc/mnttab
cannot unmount /dev/emc4_vg08/S_Pad_log01
# fuser /dev/emc4_vg08/rS_Pad_log01
/dev/emc4_vg08/rS_Pad_log01: 2356o


Yang Qin_1
Honored Contributor

Re: could not remove logical volume

run a "ps -efx | grep 2356 | grep -v grep" to see which application it is.

Yang
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: could not remove logical volume

It is non-sensical to umount a raw device. There is no filesystem; there is nothing to umount.


# fuser /dev/emc4_vg08/rS_Pad_log01
/dev/emc4_vg08/rS_Pad_log01: 2356o

This indicates that process 2356 has the raw device open. You will have to terminate this process; however, this is a very strong indication that the raw device is actually used by an application so exercise great caution before removing this LVOL.
If it ain't broke, I can fix that.
Jack_126
Frequent Advisor

Re: could not remove logical volume


Killing the process is not recommended in my case. So I will ask the application team to stop accessing the volume, and then try to remove the volume.
Thanks for all your help.