What's the best/most appropriate directory to mount a partition in a custom directories during instalation?

I currently have an issue with Silverblue in a recent thread that, while I haven’t found a direct solution to it, I have an idea to do something different that would suit my needs just as well, if not better. However, I’d like to hear some suggestions, because while I know how to do it, I don’t know the correct/appropriate way to do so.

My goal is to have my user data in a separate partition from root, so I can:

  1. Use a different filesystem for root (Btrfs) and my user data (Ext4), so I can benefit from the advantages of each, Btrfs for copy-on-write (CoW) for system stability, while Ext4 for Case Folding (Case insensitivity) for wine applications, although I’ve also read somewhere that CoW filesystems like Btrfs harm performance for Virtual Machines, which I guess is another indirect bonus for Ext4.
  2. Make my user data persistent, that is, not deleted alongside root when reinstalling the system for whatever reason and saving time from having to move the data to another partition/drive.

Originally I intended to achieve this by having this Ext4 partition mounted as /home, but that gave me errors upon entering their luks2 password (Not the purpose of this thread, see here for talk of this error).

So instead, I plan in mounting this Persistent Ext4 partition somewhere, for example, I could mount it in /home/Ext4 or /home/Persistent inside the Anaconda installer, and it would probably work perfectly for my needs, the question however is, would that be the most appropriate directory to do so?

For example, if I mount it at /home/Ext4, and after installation, I create a user also called Ext4, the system will notice /home/Ext4 already exists, so it will create a new directory located in root at /home/Ext4.00 (or something along those lines) for the user named Ext4, which can cause confusion for that user as their home directory doesn’t exactly match their username. Maybe it is better to put it in a different directory, and there are plenty of directories that were made for all different purposes that I am not 100% familiar with, and I don’t want to blindly mount it anywhere that might cause issues for me in the future.
There’s also the security concern that mounting it elsewhere might make that data visible to unintended users/applications, which is not good. I tried checking other fedora installation medias like Fedora Everything, which allow you to create a user inside anaconda during installation so that the issue I presented with the /home/Ext4 example doesn’t happen, but unfortunately it doesn’t include Silverblue (nor any rpm-ostree options) for installation.
Currently, my best uneducated guess would be to mount it in /run/media/(insert my user name), so it is mounted in a directory with my username, while also having the benefit that it will show in Nautilus as a device, however I’m not aware of potential consequences of this.

Because of this, I’d like to hear your suggestions.

All mount points should go under /var on Atomic Desktops. For the home, it’s /var/home.

1 Like

This sounds like you would mount under /var/home/, but not inside a specific user’s home directory. e.g. /var/home/some-user.

I would suggest mounting either inside the user’s home directory (/var/home/some-user), useful if there is no need to share the partition data with other users, or under /var/mnt/some-mount-point, which can be accessed with the appropriate permissions by multiple users.

If you’re using a LUKS encrypted partition, and would like to mount the partition at system startup (i.e. with /etc/fstab entry), you could use a key-file, userful if the root partition is also encrypted. Be aware though that situations could arise when the data partition gets mounted before the home or var partitions, in which case one of the below mount flags in /etc/fstab could be used to avoid that:

x-systemd.requires-mounts-for=/home     # when mount point under /var/home
x-systemd.requires-mounts-for=/var     # when mount point under /var/mnt

Thanks. I will check the following suggestions, and will try to update later