Re: [gentoo-user] Re: LVM and the /usr Logical Volume
On 25/04/2022 14:36, dhk wrote: After reinstalling Gentoo with a new liveusb, my system still looks similar to the way it was before. I started with the existing partition schema and wiped everything and performed a separate independent install. I am still not sure why the /dev/dm-1 block device is mounted on /usr which is not what the fstab is instructing. First of all, I notice you haven't said anything about /home, /opt etc. Missing context is important ... Secondly, vg0-usr is a symlink to dm-1, so I would not be suprised for df to resolve it. In fact, looking at both the output of mount, and df, on my system they are inconsistent. mount tells me /dev/mapper/vg-root-lv-gentoo is mounted on /, while df tells me /dev/dm-1 is mounted on /. My guess is that anything to do with initial boot may or may not link to /dev/dm-x, anything after that links to vg as you expect. Either way it doesn't really make any difference imho. Cheers, Wol
[gentoo-user] Re: LVM and the /usr Logical Volume
Having /dev/dm-1 mounted on /usr would not be an issue if it was supposed to be that way; however, nothing in the handbook or anything else I have read says that is correct. In addition, every other system I have setup or used always had /usr as the mount point in the fstab. My primary questions are: * Why is it different this time? * What changed to make /usr mount the block device? * Why is the /usr record in the fstab being ignored and being handled differently that /var, /opt, /home and /vm ? Even though everything seems to be work correctly, without a good and authoritative explanation my confidence level in the stability is not too high and is preventing me from relying on it as primary host. My concerns about not having a good explanation for why df -h shows /dev/dm-1 on /usr instead of /dev/mapper/vg0-usr are: * There could be problems interfacing directly with the block device (/dev/dm-1) and not the link (/dev/mapper/vg0-usr). * When it comes time to extend the /usr logical volume and use commands like lvextend, resize2fs, lvresize and some others it may cause problems. * The documentation does not say this is correct, in fact the documentation specifically says the opposite that the fstab is used for the mount points. * It looks like the initramfs is not letting go of the temporary /usr mount and mounting /usr in the vg0-usr volume group correctly. After reinstalling Gentoo with a new liveusb, my system still looks similar to the way it was before. I started with the existing partition schema and wiped everything and performed a separate independent install. I am still not sure why the /dev/dm-1 block device is mounted on /usr which is not what the fstab is instructing. UUIDs are not being used because the handbook says: *Important:* UUIDs of the filesystem on a LVM volume and its LVM snapshots are identical, therefore using UUIDs to mount LVM volumes should be avoided. /etc/fstab: /dev/nvme0n1p6 /boot ext2 defaults,noatime 0 2 /dev/nvme0n1p7 none swap sw 0 0 /dev/nvme0n1p8 / ext4 defaults,noatime,discard 0 1 /dev/nvme0n1p9 /lib/modules ext4 defaults,noatime,discard 0 1 /dev/nvme0n1p10 /tmp ext4 defaults,noatime,discard 0 1 /dev/mapper/vg0-usr /usr ext4 defaults,noatime,discard 0 0 /dev/mapper/vg0-home /home ext4 defaults,noatime,discard 0 1 /dev/mapper/vg0-opt /opt ext4 defaults,noatime,discard 0 1 /dev/mapper/vg0-var /var ext4 defaults,noatime,discard 0 1 /dev/mapper/vg1-vm /vm ext4 noauto,noatime,discard 0 1 /dev/cdrom /mnt/cdrom auto rw,exec,noauto,user 0 0 /etc/initramfs.mounts has: /usr # ls -l /dev/mapper/vg0-usr lrwxrwxrwx 1 root root 7 Apr 23 05:56 /dev/mapper/vg0-usr -> ../dm-1 # mount /usr mount: /usr: /dev/mapper/vg0-usr already mounted or mount point busy. # df -h /usr Filesystem Size Used Avail Use% Mounted on /dev/dm-1 25G 3.2G 20G 14% /usr Thank you
Re: [gentoo-user] Re: LVM and the /usr Logical Volume
On 07/04/2022 05:00, John Covici wrote: Are you using systemd or openrc? What are you using for your initrd, dracut or something else? I also wonder if dm1 is the same thing as your/dev/mapper/... by another name -- check where the link points to. If it isn't, then there's something wrong. You should be using /dev/mapper/..., which should be a link to whatever device is underlying it. /dev/dm-1 will be whatever devicemapper brought up as the first device it found. Cheers, Wol
Re: [gentoo-user] Re: LVM and the /usr Logical Volume
On Wed, 06 Apr 2022 19:38:16 -0400, dhk wrote: > > So it sounds like /usr being under /dev/dm-1 instead of > /dev/mapper does not look right. > > The UUID was tried in the fstab and the same results occurred, > same as with LABEL and mount points. > > Since /usr is mounted temporarily at boot it almost looks as if > there is something wrong with the way the initramfs is handling > it. The tmpfs is built into the kernel and the > /etc/initramfs.mounts looks correct with only /usr in it, but > /lib/modules was tried also and did not make a difference. > > Could this be a bug with genkernel or udev? Are you using systemd or openrc? What are you using for your initrd, dracut or something else? I also wonder if dm1 is the same thing as your /dev/mapper/... by another name -- check where the link points to. -- Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici wb2una cov...@ccs.covici.com
[gentoo-user] Re: LVM and the /usr Logical Volume
So it sounds like /usr being under /dev/dm-1 instead of /dev/mapper does not look right. The UUID was tried in the fstab and the same results occurred, same as with LABEL and mount points. Since /usr is mounted temporarily at boot it almost looks as if there is something wrong with the way the initramfs is handling it. The tmpfs is built into the kernel and the /etc/initramfs.mounts looks correct with only /usr in it, but /lib/modules was tried also and did not make a difference. Could this be a bug with genkernel or udev? Thanks