Ostree filesystem in Silverblue


#1

Hello all,

I’ve been running Silverblue for a while in virtual machines and I now feel ready to take the step of replacing Fedora Workstation with Silverblue on my machine. There is just one thing that I cannot get my head around, and that is the filesystem. On all my production machines I split the filesystem over a couple of logical volumes and doing this for Silverblue turned out to be a bit more challenging than I thought. Not technically, but when it comes to my own understanding.
To start off, in the ostree documentation which is quoted in First Login it’s stated that /tmp will be mounted to /sysroot/tmp. This is not correct for Silverblue 29, since systemd is taking care of the /tmp mount and makes it a tmpfs. This was an easy discovery and it’s becoming more and more standard. But the thing that is really confusing to me and that I cannot get my head around is the way /, /sysroot, and /usr are mounted. Running mount | grep lvRoot (where lvRoot is the name of my logical volume for the /) gives me the following:
/dev/mapper/vgRoot-lvRoot on /sysroot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/vgRoot-lvRoot on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/vgRoot-lvRoot on /usr type xfs (ro,relatime,seclabel,attr2,inode64,noquota)
To me this looks like the logical volume is mounted to three different places, but when I look at the content of these three different paths, the content is different.

Can someone spare some time and try to explain this to me? I’m saying try since I don’t know if I will understand it. Hopefully I do… And when I do understand this I’ll make a contribution to the documentation about this subject.

Thanks in advance!


#2

I’m not using the exact setup, but I think the output from mount isn’t telling the entire story.

In my setup, I have two logical volumes (LV), one for for swap and the other for my entire filesystem. And they happen to be LUKS volumes. So when I grep the output of mount for the volume used for the filesystem, I see similar output:

$ mount | grep /dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8
/dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8 on /sysroot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8 on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8 on /usr type xfs (ro,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8 on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8 on /var/lib/containers/storage/overlay type xfs (rw,relatime,seclabel,attr2,inode64,noquota)

But if I inspect the output of findmnt for each one of those mount points, I can see that a directory under that root volume is the actual destination being used:

$ findmnt -u /sysroot
TARGET   SOURCE                                                FSTYPE OPTIONS
/sysroot /dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8 xfs    rw,relatime,seclabel,attr2,inode64,noquota

$ findmnt -u /
TARGET SOURCE                                                                                                                                                         FSTYPE OPTIONS
/      /dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8[/ostree/deploy/fedora-workstation/deploy/b825ee13071008f08f03b30161748bed5f6aff279ab4fc2fae25562b3a0c6c8b.0]
                                                                                                                                                                      xfs    rw,relatime,seclabel,attr2,inode64,noquota

$ findmnt -u /usr
TARGET SOURCE                                                                                                                                                           FSTYPE OPTIONS
/usr   /dev/mapper/luks-2b0f39b7-fd41-4cb9-84b5-1ae361ce4ea8[/ostree/deploy/fedora-workstation/deploy/b825ee13071008f08f03b30161748bed5f6aff279ab4fc2fae25562b3a0c6c8b.0/usr]
                                                                                                                                                                        xfs    ro,relatime,seclabel,attr2,inode64,noquota

I believe the mounting of these filesystems is handled by the ostree-remount service, but I’ll defer to others for the exact answer.


#3

First of all - Thank you very much! Now it all makes sense to me. I read OSTree: Adapting existing mainstream distributions about 20 times yesterday. As reference I read it again and it’s crystal clear. To be honest, I didn’t know about findmnt. Now I can continue with my installation and try to contribute to making the documentation more clear.

Once again, thank you very much!