Logical volume is not mounted but is in use. Please close all applications using this device (eg iscsi)

10,858

Solution 1

Increasing the size of a logical volume that's being used is indeed possible. That's one of the major advantages of using LVM in the first place.

It's just these gui tools ... meh ... forget about 'em.

  1. (optional) Check how much space you've got left on your Volume Group with sudo vgdisplay

  2. Find the name of your Logical Volume with sudo lvdisplay

  3. Extend the volume by 5GB: sudo lvextend -L+5GB /dev/ssd/sysLV

  4. Increase the filesystem size to match the LV: sudo resize2fs /dev/ssd/sysLV (ext4 only, see this link for other filesystems)

  5. df -h should now report the correct size. Be happy, praise the command line!

Solution 2

As I can see Thunderbird running, you obviously missed an important step:

  • Boot from a live CD.

What you're trying to do would be the real life equivalent of asking a surgeon to operate on himself, at home... ;-)

So prepare the operating room (boot the live CD so that the volume is not locked) and start operating, doctor! (follow the instructions in https://askubuntu.com/a/489909/45156)

Solution 3

You can try another GUI tool - KVPM. It helped in my case. I successfully extended a logical volume that was mounted as /home on the fly.

Solution 4

This seems to be a bug in the system-config-lvm tool.
Instead you can use the command lines:

lvextend -L +nnG /device 
resizet2fs /devic

This works even if the partition is the live /

Share:
10,858

Related videos on Youtube

Alexey Ce
Author by

Alexey Ce

Updated on September 18, 2022

Comments

  • Alexey Ce
    Alexey Ce over 1 year

    How do I resize a LVM partition using system-config-lvm? As per this Ask Ubuntu answer

    I clicked on the partition and tried to resize, but got a pop-up error from system-config-lvm.

    Logical volume is not mounted but is in use. Please close all applications using this device (eg iscsi).

    What's the problem and how can I fix it?

    Screenshot of LVM management dialog with popup error

    See also this Ask Ubuntu answer.

    • steeldriver
      steeldriver about 9 years
      Have you tried deactivating it from the command line (something like sudo vgchange -an /dev/ubuntu-vg/root)? Sorry I am not familiar with the GUI tool.
    • mirams
      mirams over 8 years
      You should be able to do this on the fly - that's the main advantage of LVM as I understand it. This is a bug: bugzilla.redhat.com/show_bug.cgi?id=672475
  • user48956
    user48956 over 7 years
    I thought the point of LVM was that this could be done on a live system.
  • user48956
    user48956 over 7 years
    Is the best answer. kvpm doesn't require shutting down.
  • panepeter
    panepeter over 7 years
    "LVM can expand a partition while it is mounted, if the filesystem used on it also supports that ( like the usual ext3/4 )." LVM sure is one badass surgeon! See my answer for a working command line alternative.
  • Fabby
    Fabby over 7 years
    +1 as you provide a solution that works... ;-) I answered original question which was with a GUI and to the procedure OP was following...
  • mpromonet
    mpromonet over 6 years
    Often I need to extends with the free space, I just add, then I use sudo lvextend -l +100%FREE /dev/ssd/sysLV