Fedora – Union mount options in Fedora

aufsfedoraunion-mount

I've grown up a Debian/Ubuntu guy and I'm learning Fedora by trying to recreate the services my Ubuntu trusty box currently provides. However, I'm trying to recreate a union mount and don't see any obvious way to do it.

Each user on my Ubuntu-based server has a "media" folder, with subfolders for movies, music, etc. Using aufs-tools, I create a (read-only) union mount of userA…userZ's "media" folders at /srv/media. Then using Samba, my Plex box can access that combined media folder over the network.

It appears nothing reasonably resembling aufs-tools is available via the standard repos (nor via rpmfusion). I've seen some mentions online of UnionFS, but I also saw something about it having fallen out of favor. I don't want to use FUSE, because this union mount is based on several users' media folders. What's the preferred solution for creating union mounts on Fedora/RHEL/CentOS servers these days?

Best Answer

Fedora tries to not deviate very far from the "mainline" upstream kernel from kernel.org. AuFS isn't in that kernel, so it isn't in Fedora.

We do, however, have an option: OverlayFS. Upstream documentation is available on kernel.org, and here's some quick examples on Fedora.

And, as pretty much always, the Arch Linux documentation is excellent and (as often the case) is applicable to Fedora as well. From that page, a line like this in /etc/fstab will do it:

overlay /merged overlay noauto,x-systemd.automount,lowerdir=/lower,upperdir=/upper,workdir=/work 0 0
Related Question