Solved

Unable to remove Volume

Posted on 2014-08-01
18
234 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 37

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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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 37

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 37

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

777 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