ZFS Installation - system not properly mounting ext4 partition

Hey,

I run ZFS on root on an nvme drive, with an ext4 partition on SATA SSD mounted for my Steam Games and other errata.

Ever since I added the ext4 partition to fstab, I’ve had issues where the drive reports fully mounted in fastfetch and lsblk, but is not available for file access. Instead, the folder in question is mounted within ZFS. When in this state, I cannot run umount on the ext4 drive, as it reports an error, and my current workaround is to comment out my ext4 partition in fstab, reboot, remove the comment in fstab, then run systemctl daemon-reload and sudo mount -a. Then, the ext4 partition shows up correctly in my system and Steam can access its installed game data.

If I reboot from that successful state, it reverts to having a mounting issue again with the same symptoms.

Is the ext4 partition being mounted before ZFS mounts the home dataset, and as a result, is having its folder structure overridden by ZFS’s?

— Contents of /etc/fstab —


/dev/nvme0n1p1 /boot vfat defaults 0 2
UUID=d17e5c1b-b7e8-4534-87db-f75f0c587865 /home/red/SteamDrive ext4 defaults,discard,relatime 0 2

Maybe you could remove that filepath first before mounting it, to make sure that the ext4 drive completely owns that folder. You should also give permissions to your user to own that folder.

sudo chown -R $USER:$USER /home/red/SteamDrive

I rebooted with fstab commenting out the ext4 partition. I deleted /home/red/SteamDrive. I removed the comment, restoring the entry, and ran systemctl daemon-reload followed by mount -a, and I get a mount error saying the mountpoint doesn’t exist. I recreated the /home/red/SteamDrive folder, ran the above chown command, and then ran mount -a, and the partition works for that session.

The original issue still presents on reboot though. I’m not sure I correctly carried out precisely what you wanted me to do.

Hmmm, I’m not sure then. What if you choose a different mountpoint? e.g. /mnt or /media?

Different mountpoint worked. I chose /SteamDrive, and it mounted the ext4 partition correctly on boot.

My guess here is that ZFS’ home dataset is being loaded after mounting from fstab, and is messing up file paths.