Public bug reported:
I have a volume group named 'vg'.
/dev/mapper/vg-* and /dev/vg/* are symlinks to the same devicemapper
entries:
$ ls -l /dev/vg
lrwxrwxrwx 1 root root 7 Feb 14 21:44 documents -> ../dm-5
lrwxrwxrwx 1 root root 7 Feb 14 21:44 downloads -> ../dm-7
lrwxrwxrwx 1 root root 8 Feb 14 21:44 git -> ../dm-10
lrwxrwxrwx 1 root root 7 Feb 14 21:44 home -> ../dm-3
lrwxrwxrwx 1 root root 7 Feb 14 21:44 music -> ../dm-4
lrwxrwxrwx 1 root root 7 Feb 14 21:44 pictures -> ../dm-6
lrwxrwxrwx 1 root root 7 Feb 14 21:44 root -> ../dm-1
lrwxrwxrwx 1 root root 7 Feb 14 21:44 swap -> ../dm-2
lrwxrwxrwx 1 root root 7 Feb 14 21:44 video -> ../dm-8
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vm -> ../dm-9
$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Feb 14 21:44 control
lrwxrwxrwx 1 root root 7 Feb 14 21:44 sda5_crypt -> ../dm-0
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-documents -> ../dm-5
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-downloads -> ../dm-7
lrwxrwxrwx 1 root root 8 Feb 14 21:44 vg-git -> ../dm-10
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-home -> ../dm-3
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-music -> ../dm-4
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-pictures -> ../dm-6
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-root -> ../dm-1
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-swap -> ../dm-2
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-video -> ../dm-8
lrwxrwxrwx 1 root root 7 Feb 14 21:44 vg-vm -> ../dm-9
/etc/fstab contains /dev/vg versions:
/dev/vg/music /home/swissj74/music ext4
defaults,discard,relatime 1 2
/dev/vg/documents /home/swissj74/documents ext4
defaults,discard,relatime 1 2
/dev/vg/pictures /home/swissj74/pictures ext4
defaults,discard,relatime 1 2
/dev/vg/downloads /home/swissj74/downloads ext4
defaults,discard,relatime 1 2
/dev/vg/video /home/swissj74/video ext4
defaults,discard,relatime 1 2
/dev/vg/vm /home/swissj74/vm ext4 defaults,discard,relatime 1 2
/dev/vg/git /home/swissj74/git ext4 defaults,discard,relatime 1 2
However, something changed in some Ubuntu version since xenial (this is bionic
LTS), and despite the fstab entries, the actual mounts in /proc/mounts are the
/dev/mapper paths according to the kernel:
/dev/mapper/vg-home on /home type ext4 (rw,relatime,discard,data=ordered)
/dev/mapper/vg-pictures on /home/swissj74/pictures type ext4
(rw,relatime,discard,data=ordered)
/dev/mapper/vg-vm on /home/swissj74/vm type ext4
(rw,relatime,discard,data=ordered)
/dev/mapper/vg-documents on /home/swissj74/documents type ext4
(rw,relatime,discard,data=ordered)
/dev/mapper/vg-downloads on /home/swissj74/downloads type ext4
(rw,relatime,discard,data=ordered)
/dev/mapper/vg-git on /home/swissj74/git type ext4
(rw,relatime,discard,data=ordered)
/dev/mapper/vg-music on /home/swissj74/music type ext4
(rw,relatime,discard,data=ordered)
/dev/mapper/vg-video on /home/swissj74/video type ext4
(rw,relatime,discard,data=ordered)
system-config-lvm reads /proc/mounts, looks for the /dev/vg entries from fstab,
concludes the volumes are not mounted, and throws an error on any operation:
"Logical volume is not mounted but is in use. Please close all applications
using this device (eg iscsi)"
It appears that when checking for whether a volume is mounted,
system-config-lvm should, for each volum it's operating on:
1. Resolve symlinks from /etc/fstab until it reaches the real block device
2. Resolve any symlinks in /proc/mounts until the real block devices are reached
3. If the block device from 1 is contained in the set from 2, then it's
considered mounted.
Although, I might suggest abandoning this approach and using lsblk or
findmnt instead.
** Affects: system-config-lvm (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1816214
Title:
Thinks logical volume is not mounted because it's not using
/dev/mapper/vg-* path
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/system-config-lvm/+bug/1816214/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs