1

I have created a volume group webserver with volumes home and usr

They were created identically, in /etc/fstab listed as

/dev/webserver/home    /home  /ext4   rw,noatime   0 0
/dev/webserver/usr     /usr   /ext4   rw,noatime   0 0

However, mount shows them as

/dev/mapper/webserver-usr on /usr
/dev/mapper/webserver-home on /home

and df as

/dev/webserver/usr   999 999 999 99% /usr
/dev/mapper/webserver-home 999 999 999 99% /home

(not real numbers, can't copy/paste and numbers are not relevant anyway)

Why is mapper shown some places and not others?

It seems to be working perfectly fine anyway, just confused about the differences.

2

The difference between /usr (or /) and /home usually is that the rootfs (including /usr) has to be mounted early at boot. This is done by initramfs.

On the other hand /home, /var/www, and other regular partitions you might have, should be mounted later, outside of initramfs, in the course of the regular boot process by the full init system.

So the behavior in mounting can be different in some details.

For example, on my system, the rootfs shows up as /dev/dm-34 instead of /dev/SSD/root or /dev/mapper/SSD-root. That's simply because the partition is identified by UUID, and the findfs utility is just implemented differently in initramfs / busybox vs. full system / util-linux:

# busybox findfs UUID=fa15678f-7e7e-4a47-8ed2-7cea7a5d037d
/dev/dm-34
# findfs UUID=fa15678f-7e7e-4a47-8ed2-7cea7a5d037d
/dev/mapper/SSD-root

This command might just as well return /dev/SSD/root, depending on how /dev was populated with device names vs. symlinks. After changing symlink direction /dev/SSD/root -> /dev/mapper/SSD-root to /dev/mapper/SSD-root -> /dev/SSD/root, the result is identical:

# busybox findfs UUID="fa15678f-7e7e-4a47-8ed2-7cea7a5d037d"
/dev/SSD/root
# findfs UUID="fa15678f-7e7e-4a47-8ed2-7cea7a5d037d"
/dev/SSD/root

I haven't looked at the code how it decides which name to pick as the canonical one.

In the end it doesn't really matter, as long as the correct filesystem is mounted, this is at most a cosmetical issue.

  • Having discovered the magic of lvm, is it possible to convert a partition to lvm without copying the data? Especially the root... – Lenne Sep 15 '18 at 11:10
  • @Lenne there's lvmify or manual process described wiki.ubuntuusers.de/Archiv/Howto/… (in German). In-place conversions always come with a risk, so if your LVM isn't full, copying might be preferable actually. – frostschutz Sep 15 '18 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.