Solved

Unable to remove Volume

Posted on 2014-08-01
18
236 Views
Last Modified: 2014-08-04
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
0
Comment
Question by:Sandy
  • 10
  • 5
  • 3
18 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40235235
Can you check whether it is in use?

#fuser -cu /dev/myvg/myvol
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 40235581
From dmsetup it looks like there is a partition in this LV (open status of 1), can you confirm and provide lvdisplay?
0
 
LVL 13

Author Comment

by:Sandy
ID: 40235587
In lvdisplay also the status of open is #1
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 21

Expert Comment

by:Mazdajai
ID: 40235594
Can you confirm if there is a partition in this LV?
0
 
LVL 13

Author Comment

by:Sandy
ID: 40235598
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
0
 
LVL 13

Author Comment

by:Sandy
ID: 40238438
Any Suggestions ?

TY/SA
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40238597
>> Any Suggestions ?
What did the fuser command report?
0
 
LVL 13

Author Comment

by:Sandy
ID: 40238650
There was no output.....

TY/SA
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 40238673
Have you tried to reboot the box?
0
 
LVL 13

Author Comment

by:Sandy
ID: 40238706
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
0
 
LVL 13

Author Comment

by:Sandy
ID: 40239211
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..
0
 
LVL 21

Accepted Solution

by:
Mazdajai earned 500 total points
ID: 40238845
Does the reboot cleared the lock?
0
 
LVL 13

Author Comment

by:Sandy
ID: 40239046
yes.. it did.. :)

TY/SA
0
 
LVL 21

Expert Comment

by:Mazdajai
ID: 40239082
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.
0
 
LVL 13

Author Comment

by:Sandy
ID: 40239111
I can paste it aswell need to search output of cmds in logs but believe me there was nothing

ty/sa
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 40239212
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?
0
 
LVL 13

Author Comment

by:Sandy
ID: 40239230
Ok Sir.. I will assign once m back to my desk... Thanks for help

ty/sa
0
 
LVL 13

Author Closing Comment

by:Sandy
ID: 40239234
Let me try...  thanks all
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question