2

i'm facing difficulties removing a logical volume from my server on SLES11SP3. Checked online for help, tried many things with no success, thus i ask the experts.

# lvscan
├─vg-lv_a (dm-22)    253:22   0   50G  0

# lsblk
ACTIVE            '/dev/vg/lv_a' [50.00 GiB] inherit

# lvremove /dev/mapper/vg-lv_a
Do you really want to remove active logical volume lv_a? [y/n]: y
device-mapper: remove ioctl on  failed: Device or resource busy
device-mapper: remove ioctl on  failed: Device or resource busy
Unable to deactivate vg-lv_a (253:22)
Unable to deactivate logical volume "lv_a"
 
# lvchange -an /dev/mapper/vg-lv_a
device-mapper: remove ioctl on  failed: Device or resource busy
device-mapper: remove ioctl on  failed: Device or resource busy
Unable to deactivate vg-lv_a (253:22)

# dmsetup remove vg-lv_a
device-mapper: remove ioctl on vg-lv_a failed: Device or resource busy
Command failed

No mountpoints on LV.

Other checks:

# dmsetup info -c | grep lv_a
vg-lv_a    253  22 L--w    1    4      0 LVM-LroqO1V0...

# lsof | grep "253,22"
empty

Cannot obtain the evdence of the process that takes the LV busy, if any. Any hints, ideas how to address this?

7
  • Can you edit your post and add code blocks (with tripe backticks). I tried to edit it for you, but I can't tell which blocks go together.
    – Halfgaar
    Jan 21, 2021 at 19:07
  • thanks for the suggestion
    – DanS
    Jan 21, 2021 at 20:05
  • Probably not your case, but what does losetup --list show? Using LV's as loop devices, doesn't show up in lsof, if I recall correctly.
    – Halfgaar
    Jan 22, 2021 at 9:30
  • used losetup -a , empty output
    – DanS
    Jan 28, 2021 at 13:20
  • SP3 is past end of support; you should be on SP4 already. Jan 28, 2021 at 14:55

2 Answers 2

0

I had exactly the same problem and couldn't find any process or mount that was holding the device hostage. It did seem however that in my tmux session in one of the windows I had the mounting folder opened. Navigating to a different folder in all the open panes solved the problem.

-1

If you really know what you are doing, you can just remove it via dmsetup. But it's really interesting what is using that LV.

2
  • 1
    tried with dmsetup remove -f vg-lv_a , but it fails as well [Device or resource busy, command failed]
    – DanS
    Jan 28, 2021 at 13:14
  • To track, was able to resize that incriminated volume after a reboot of the server
    – DanS
    Feb 17, 2021 at 12:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .