I recently migrated form OpenRC to systemd, and everything went smoothly except my computer has developed a race condition during boot where /var/tmp/portage is not mounted properly as tmpfs.
I use ZFS with two pools: / is on an NVME SSD and both /home and /var are on spinning disks. The mounts are managed though ZFS, but in my fstab I also specify /var/tmp/portage should be mounted as tmpfs (see below).
I found the option of `x-systemd.after=<service>` and tried using zfs-mount to get systemd to mount it afterwards. But this doesn't seem to work. I can mount /var/tmp/portage manually without any issues.
Anyone have any ideas to force systemd to mount in a specific order?
/etc/fstab
Code: Select all
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
# filesystems. This just tells the kernel to use the ext4 driver.
#
# NOTE: You can use full paths to devices like /dev/sda3, but it is often
# more reliable to use filesystem labels or UUIDs. See your filesystem
# documentation for details on setting a label. To obtain the UUID, use
# the blkid(8) command.
UUID=F357-EDC4 /boot/efi vfat defaults,noatime,noauto 1 2
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
tmpfs /var/tmp/portage tmpfs size=20G,uid=portage,gid=portage,mode=775,nosuid,noatime,nodev,x-systemd.after=zfs-mount 0 0

