• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

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
0
Sandy
Asked:
Sandy
  • 10
  • 5
  • 3
1 Solution
 
Gerwin Jansen, EE MVETopic Advisor Commented:
Can you check whether it is in use?

#fuser -cu /dev/myvg/myvol
0
 
MazdajaiCommented:
From dmsetup it looks like there is a partition in this LV (open status of 1), can you confirm and provide lvdisplay?
0
 
SandyAuthor Commented:
In lvdisplay also the status of open is #1
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
MazdajaiCommented:
Can you confirm if there is a partition in this LV?
0
 
SandyAuthor Commented:
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
 
SandyAuthor Commented:
Any Suggestions ?

TY/SA
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
>> Any Suggestions ?
What did the fuser command report?
0
 
SandyAuthor Commented:
There was no output.....

TY/SA
0
 
MazdajaiCommented:
Have you tried to reboot the box?
0
 
SandyAuthor Commented:
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
 
SandyAuthor Commented:
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
 
MazdajaiCommented:
Does the reboot cleared the lock?
0
 
SandyAuthor Commented:
yes.. it did.. :)

TY/SA
0
 
MazdajaiCommented:
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
 
SandyAuthor Commented:
I can paste it aswell need to search output of cmds in logs but believe me there was nothing

ty/sa
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
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
 
SandyAuthor Commented:
Ok Sir.. I will assign once m back to my desk... Thanks for help

ty/sa
0
 
SandyAuthor Commented:
Let me try...  thanks all
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 10
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now