You are not logged in.

#1 2026-09-29 17:57:13

tehabe
Member
Registered: 2008-10-14
Posts: 84

systemd-tmpfiles and a secondary drive for a home server

I recently set up a little home server for me with a 256 GB drive for the OS and 4 TB drive for the actual data. I use btrfs and honestly it works so far and maybe I should change a thing about it.

I set up the 4 TB drive not in /mnt but in /srv, specifically in /srv/data where I directly mount the subvolumes like "backup", "media", or "music". I also have a subvolume container in /srv which is on the smaller drive and is the home folder of my Podman account.

I also set up udisk2 so external drives I use for backup are mounted in /media instead of /run/media/<user> simply because when I want to access them via ssh, /media is shorter. In the Arch Wiki entry for udisks2 it was recommended to create /media via /etc/tmpfiles.d.

And then I remember, that I created the mountpoints in /srv just with mkdir.

Now I wonder, would it be better to "recreate" the mountpoints with /etc/tmpfiles.d/server.conf. What would be the advantage to use tmpfiles.d instead of just mkdir, what would be the disadvantages?

I tried to search for that answer but all I able to find is the man page for tmpfiles.d

So any help to understand this better would be really helpful.

Offline

Board footer

Powered by FluxBB