/usr under LVM has unexpected df/findmnt output

Bug #1908754 reported by Joe Prostko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
New
Undecided
Unassigned

Bug Description

Hello,

I have been utilizing the autoinstall functionality of Ubuntu Server, and notice that when I utilize a custom LVM setup to provide different mount points that for whatever reason, /usr is not displaying concisely in df and findmnt output like it does for the other mount points. I have tried both ext4 and xfs as the filesystem, and it happens with both. I also found a forum post about this problem with other people experiencing this, and it seems to be specific to /usr. While it is mostly a cosmetic problem, I'd prefer to have things be consistent. I have tested with the live server ISO for Ubuntu 20.04, 20.10, as well as the nightly from 20201217 for hirsute hippo, all with the same result. I will provide some light information below, but will attach a tarball including a typescript with some relevant commands (like fstab output explicitly mentioning curtin), as well as relevant curtin files. I should be able to provide any other files from the build as requested.

Here is example output to show what I am talking about:

root@abc123:~# df -Th -x tmpfs
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg01-root xfs 2.0G 52M 2.0G 3% /
/dev/disk/by-id/dm-uuid-LVM-Uh7xPJmOyUynq6TsmsB6AFfezHrpjyKlb3jmaS35PKR0pBpa3PmPojAN2qduw7vN xfs 6.0G 1.9G 4.2G 31% /usr
/dev/mapper/vg01-home xfs 10G 104M 9.9G 2% /home
/dev/mapper/vg01-opt xfs 10G 104M 9.9G 2% /opt
/dev/mapper/vg01-var xfs 3.0G 438M 2.6G 15% /var
/dev/mapper/vg01-tmp xfs 2.0G 47M 2.0G 3% /tmp
/dev/vda1 xfs 726M 147M 580M 21% /boot

Relevant forum post showing the problem arising with Ubuntu 20.04:

https://ubuntuforums.org/showthread.php?t=2442012

Thank you.

Tags: curtin lvm usr uuid
Revision history for this message
Joe Prostko (joe-prostko) wrote :
Revision history for this message
Joe Prostko (joe-prostko) wrote :

Digging into this a bit myself, it seems like this is due to a change in initramfs-tools. From my understanding of reading associated tickets and the NEWS item below, it was suggested to not use a separate /usr under LVM, or if you do, you must specify it by kernel name descriptor instead of by UUID or label.

https://sources.debian.org/src/initramfs-tools/0.139/debian/NEWS/#L43

While I never noticed the problem until Ubuntu 20.04, given the time of the change, it must have been something that was a part of previous Ubuntu versions as well for some time.

In any case, by changing /etc/fstab to reference /dev/mapper/vg01-usr in the Filesystem column, df and findmnt give the desired output. Both utilize /proc/self/mountinfo according to strace output, so naturally they all now have the desired information present. If instead /dev/vg01/usr is used in /etc/fstab, then that is shown in the df/findmnt output instead for /usr.

I think we can close this ticket, as this is outside of the scope of curtin itself.

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.