1753846 Members
8221 Online
108807 Solutions
New Discussion юеВ

Logical Volumes

 
D. Versluis
Occasional Contributor

Logical Volumes

When I want to remove an unused logical volume, I get the following message:
lvremove: Couldn't delete logical volume "/dev/vg00/lvol10":
The specified logical volume is open.

How can I remove this logical volume???
2 REPLIES 2
Jason Luginbuhl_1
Frequent Advisor

Re: Logical Volumes

Doug,

You may want to try to do the following:
# bdf
# mount
check to see if the lvol is mounted. If so, then attempt to umount. If
unsuccessful or not mounted, then try:

# cd /
# fuser -u /dev/vg00/lvol10

If anything is returned then the lvol is being used by a process or processes.
The numerical part of the fuser output is the process id. You can cross
reference these numbers with the output of a 'ps -ef' to see what these
processes are. If none of them are important to you, then you can proceed with:

# fuser -uk /dev/vg00/lvol10
This will attempt to kill anything that is using this lvol. After running this
command, attempt to umount the lvol (if still mounted) and then try to remove
the lvol. If this is still unsucessful then rerun the original "fuser -u" to
see if processes are still out there for that lvol. If so, you may try to kill
these individually with kill -9; however, they are probably zombie processes
that will need a reboot to clear.

If the above steps did not help or if the "fuser -u" reports that the lvol is
not being used, then you may want to boot the system into either single-user or
lvm maintenance mode and attempt to lvremove it there.
Anthony Goonetilleke_1
Regular Advisor

Re: Logical Volumes

You might want to try using

% fuser -cuk /mountpoint

the -c option will display the use of a mount point and all files beneath it.
(aka man page :-)

regards,
AG