Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It shouldnt be mounted, from the discussion we had this new lv got created. Unless it got mounted, which I can't see it from the steps the issue here is likely a file lock or the dmsetup.
See if there are any processes that have a lock on it. You don't have it mounted, so it shouldn't be giving you this error. Did you see anything in the verbose output in regards to the cause of the error? I know the -vvvv gives you alot of output but it should tell us at what point it errors.
Sorry if this might seem dense, is the code you inserted to be followed? It seems that you're creating a 'test' logical volume and mounting it to /mnt then removing it. I'm not sure I understand the purpose (just trying to learn).
When I run df -h, I don't have LogVol01, I only have LogVol00, along with some other partitions. LogVol00 is still at 9.5G in size and is at 100% use.
Also, /dev/loop0 is at 100% of 130M in use. I'm not sure if that matters?
Sorry if this might seem dense, is the code you inserted to be followed? It seems that you're creating a 'test' logical volume and mounting it to /mnt then removing it. I'm not sure I understand the purpose (just trying to learn).
I apologise for the confusion - the commands were not meant to be run (but is good that you questioned it rather than blindly running commands). It was merely to demonstrate that trying to lvremove a volume whilst it was mounted produced the same error you were/are having.
I'll take a step back and allow the thread to continue with Kustom42.
If you don't see any open file locks run the following:
Code:
dmsetup info -c VolGroup00-LogVol01
Code:
Name Maj Min Stat Open Targ Event UUID
VolGroup00-LogVol01 253 1 L--w 1 2 0 LVM-.....
Quote:
If it shows a number "1" for the open status run the following:
Code:
dmsetup remove VolGroup00-LogVol01
Code:
device-mapper: remove ioctl failed: Device or resource busy
Command failed
Now, I suppose I need to know how to check for locked files. I found a few references to 'lsof' and 'lslk', however, being that I'm running on a LiveCD, I cannot install these.
Ok, well since you don't have access to lsof try this:
Code:
ps auxww | grep -i LogVol01
Let us know what the output of that is, something is locking this device and in all honesty it shouldnt unless you mounted it or started a process within that directory. This may be something related to the multipath daemon or udev but I'm not sure at this point. The ps command should show us whats happening.
The ps output you are getting is for the grep process you are running. This is very odd, there are no processes with a file open so you should have no issue removing the logical volume.
I have seen this is in wierd situation before where the device was suspended, not sure if thats the case but its something to try.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.