Link to home
Start Free TrialLog in
Avatar of Sandy
SandyFlag for India

asked on

Unable to remove Volume

Hello,

While removing the Logical Volume i am getting below message

#lvremove /dev/myvg/myvol

Can't remove open logical volume

then i tried..

#dmsetup info -c /dev/myvg/myvol
Name              Maj Min Stat Open Targ Event  UUID                                                                
myvg-myvol  253   5 L--w    1    1      0 LVM-Q9kPfNDXzG5mBFsvrRlXXHaKvw2nsf7M6m9Hd96gnZIAOC8TcmChO8dthaU9FLU5

# dmsetup remove --force /dev/myvg/myvol
device-mapper: resume ioctl failed: Invalid argument
device-mapper: remove ioctl failed: Device or resource busy

I checked in /etc/mtab there is no entry for this but in /proc/mounts it contains entry for this concerned LV apart from this this device is not mounted anywhere in the system.. That i have checked..

Can someone help me in this ?

TY/SA
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Can you check whether it is in use?

#fuser -cu /dev/myvg/myvol
From dmsetup it looks like there is a partition in this LV (open status of 1), can you confirm and provide lvdisplay?
Avatar of Sandy

ASKER

In lvdisplay also the status of open is #1
Can you confirm if there is a partition in this LV?
Avatar of Sandy

ASKER

If I got u correctly...  there is no partition and apart from this it is dm-5 and I had tried that also by removing but no success...

let me know if m understanding it wrong..

TY/SA
Avatar of Sandy

ASKER

Any Suggestions ?

TY/SA
>> Any Suggestions ?
What did the fuser command report?
Avatar of Sandy

ASKER

There was no output.....

TY/SA
Have you tried to reboot the box?
Avatar of Sandy

ASKER

No not yet... having the same idea as reboot should release the lock on FS.. i will give it a try but any solution which i can try on fly will be more preferable..

TY/SA
Avatar of Sandy

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for Sandy's comment #a40238706
Assisted answer: 200 points for Mazdajai's comment #a40238673

for the following reason:

Rebooted the system but still there is no root cause found as why this was happening..
ASKER CERTIFIED SOLUTION
Avatar of Mazdajai
Mazdajai
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sandy

ASKER

yes.. it did.. :)

TY/SA
There is indeed a lock on the FS but seems you have not include output on lsof/fuser (not that we do not trust you :) ), we will not able to verify now.
Avatar of Sandy

ASKER

I can paste it aswell need to search output of cmds in logs but believe me there was nothing

ty/sa
I believe rebooting the machine fixed the issue so  http:#a40238673 is the solution and not  http:#a40238706

Why assign only 200 points instead of the 500 that were in the question?
Avatar of Sandy

ASKER

Ok Sir.. I will assign once m back to my desk... Thanks for help

ty/sa
Avatar of Sandy

ASKER

Let me try...  thanks all