On a debian 10 GNU with Linux kernel system the following line does not - as expected - mount /dev/dm-8
but (imho incorreclty) /dev/dm-37
:
mount /dev/dm-8 /mnt
I am puzzled really now the reason and/or how to I further investigate this issue, I assume to be in lay inside the UUID associated with filesystem on block devices within the linux kernel.
Background info and own research:
general info:
root@ada:/# which mount /usr/bin/mount root@ada:/# file /usr/bin/mount /usr/bin/mount: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNd root@ada:/# uname -a Linux ada 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux
Logical Volume Manager is used. The one and only volume group is named
vg
.The two volumes linked to the block devices contain a
btrfs
and since they resulted from snapshots they share the samefsid
(UUID). Both logical volumes are set active.the block devices
/dev/dm-8
and/dev/dm-37
are connected to those logical volumes:/dev/dm-8
->/dev/vg/vm_docu
/dev/dm-37
->/dev/vg/vm_mail
root@ada:/# realpath /dev/vg/vm_docu ; file -s /dev/dm-8 ; /dev/dm-8 /dev/dm-8: BTRFS Filesystem sectorsize 4096, nodesize 16384, leafsize 16384, UUID=d8709bb6-8278-431a-95dd-211ceaf35c3d, 951652352/214748364800 bys root@ada:/# realpath /dev/vg/vm_mail ; file -s /dev/dm-37 ; /dev/dm-37 /dev/dm-37: BTRFS Filesystem sectorsize 4096, nodesize 16384, leafsize 16384, UUID=d8709bb6-8278-431a-95dd-211ceaf35c3d, 1599131648/21474836480 bys
- via looking at
/usr/bin/mount
withstrace
I can see this mount(8) system call be issued:
mount("/dev/mapper/vg-vm_mail", "/mnt", "btrfs", 0, NULL) = 0
which would suggest that /dev/dm-8
while not literally forwared to the system call by /usr/bin/mount
yet was not misconcepted eiter since
root@ada:/# realpath /dev/mapper/vg-vm_mail /dev/dm-8
In the list of suspects of tools/software involved that would stumple over the duplicate UUID
here I include:
- udev
- linux kernel - btrfs code
- linux kernel - device mapper
- linux kernel - lvm (if that is not already device mapper internally)
- systemd