I built a mergerfs pool on Proxmox to replace a single 14 TB media disk with two used 18 TB enterprise drives: no RAID, no ZFS, no striping. 🗄️ This post covers what mergerfs does, when it beats RAID for a media library, the exact fstab line I run, and the traps I only found by moving 7.6 TB of real data into it.
The setup: a Proxmox host with Jellyfin, qBittorrent and Radarr running in Docker inside an LXC container.
What mergerfs is (and what it is not)
mergerfs is a FUSE union filesystem. It shows several ordinary filesystems, called branches, as one directory tree. Every file lives whole on one disk. There is no parity and no striping: each disk stays plain ext4 that any Linux machine can read.
That is the whole point. A mergerfs pool on Proxmox gives you one big /mnt/media without chaining the disks together. If one disk dies, you lose the files on that disk, and only those.
Pros and cons of a mergerfs pool on Proxmox ⚖️
What you get:
- Any disk sizes, any time. Add a disk by adding one path to fstab. No rebuild.
- Every disk is readable on its own. Plug it into any Linux box and the files are there.
- Easy to undo. Unmount the pool and you have plain disks again.
What you give up:
- No redundancy. It is not RAID and not a backup. Keep anything you can’t download again on RAID or in a backup.
- Single-disk speed. One file is read from one disk.
- FUSE overhead. Fine for big media files, bad for databases and millions of tiny files.
- Hardlinks stay inside one disk. Check yours with
find /path -type f -links +1 | wc -l. Mine returned 0.
If those trade-offs fit, a mergerfs pool on Proxmox is the simplest way to grow a media library.
Prerequisites 🧰
Before you build a mergerfs pool on Proxmox, you need:
- A Proxmox VE host with a root shell (my install notes).
- Empty, tested disks. Mine were used, about three years of power-on hours each, so I compared the SMART hours with the drive’s internal FARM log and ran a destructive
badblockspass first: 47 hours, 0 bad blocks. On 18 TB disksbadblocksneeds-b 8192, because 4096-byte blocks exceed its 2^32 block limit. - The shape of your data:
df -ifor inodes anddu -shfor each top-level folder.
Step 1: Prepare the disks for a mergerfs pool on Proxmox 💽
⚠️ This wipes both disks. Use
/dev/disk/by-id/paths and check the serials in thelsblkoutput first./dev/sdXletters can change between reboots.
D1=/dev/disk/by-id/ata-MODEL_SERIAL1
D2=/dev/disk/by-id/ata-MODEL_SERIAL2
lsblk -o NAME,SIZE,MODEL,SERIAL,MOUNTPOINT $D1 $D2
sgdisk -Z $D1 && sgdisk -Z $D2
sgdisk -n1:0:0 -t1:8300 -c1:media1 $D1
sgdisk -n1:0:0 -t1:8300 -c1:media2 $D2
udevadm settle
mkfs.ext4 -m 0 -i 262144 -L media1 -E lazy_itable_init=0,lazy_journal_init=0 ${D1}-part1
mkfs.ext4 -m 0 -i 262144 -L media2 -E lazy_itable_init=0,lazy_journal_init=0 ${D2}-part1
-m 0drops the 5% root reserve, about 900 GB per 18 TB disk. You can change it later withtune2fs -m.-i 262144gives one inode per 256 KiB. The default for 18 TB is one per 64 KiB: 275 million inodes and about 70 GB of tables. My library used 31,771 inodes. I skipped-T largefilebecause the inode count is fixed forever at mkfs, and 68,665,344 inodes per disk leave room for music later. Details are in the mke2fs man page.lazy_itable_init=0writes the inode tables now instead of during your first big copy.
When df -h shows 17T for an 18 TB disk, that is TiB against TB; the Byte and Storage Converter shows the math.
Step 2: Mount the mergerfs pool on Proxmox 🔧
apt install -y mergerfs
mkdir -p /mnt/disk1 /mnt/disk2 /mnt/media
chattr +i /mnt/disk1 /mnt/disk2 /mnt/media
cp -a /etc/fstab /root/fstab.bak
⚠️ Make the empty mountpoints immutable before mounting.
chattr +idoes not block mounting, but if a disk fails to mount at boot, nothing can write into the empty directory on your OS disk. Without it, a container will happily fill your boot NVMe.
Add three lines to /etc/fstab, with UUIDs from blkid -s UUID -o value ${D1}-part1:
UUID=<disk1-uuid> /mnt/disk1 ext4 defaults,noatime,nofail 0 2
UUID=<disk2-uuid> /mnt/disk2 ext4 defaults,noatime,nofail 0 2
/mnt/disk1:/mnt/disk2 /mnt/media fuse.mergerfs allow_other,cache.files=partial,dropcacheonclose=true,category.create=mspmfs,minfreespace=200G,moveonenospc=true,fsname=media,nofail,x-systemd.after=mnt-disk1.mount,x-systemd.after=mnt-disk2.mount 0 0
systemctl daemon-reload
mount /mnt/disk1 && mount /mnt/disk2 && mount /mnt/media
df -h /mnt/disk1 /mnt/disk2 /mnt/media
I got two 17T disks and one 33T pool. The Debian build of mergerfs 2.40.2 prints vunknown for mergerfs --version; that is packaging, not a broken install.
Why these options matter for a mergerfs pool on Proxmox
cache.files=partial: qBittorrent with libtorrent 2.x uses mmap, which needs page caching. Neverofffor a torrent client.dropcacheonclose=true: avoids caching the same data twice.minfreespace=200Gandmoveonenospc=true: skip nearly full disks for new files, and move a file if a write still hits a full disk.allow_other: lets your app’s UID use the pool, not only root.x-systemd.after=: mounts the pool after both disks. Ordering, notrequires, so one dead disk does not take the pool down.
Step 3: Pick a policy that keeps folders whole 📁
The create policy decides which disk gets each new file or folder. Many guides use mfs (most free space), which decides per file: the .mkv, .srt and .nfo of one movie can land on different disks. Lose a disk and dozens of movies are partly broken.
mspmfs (most shared path, most free space) puts a new folder on the emptiest disk and keeps its contents there, spilling over only when that disk is full. Lose a disk and you lose whole movies, while the other disk stays complete. For a mergerfs pool on Proxmox that holds a media library, that is the behavior you want.
⚠️ The trap: create the top-level folders on every disk first. Path-preserving policies only consider disks where the parent path exists. If
Torrent/moviesexists only on disk1, every new movie goes to disk1.
SRC=/mnt/olddisk/Torrent
for b in /mnt/disk1 /mnt/disk2; do
rsync -a --include='/movies/' --include='/tv-shows/' --include='/cartoons/' --include='/documentary/' --exclude='*' $SRC/ $b/Torrent/
done
This copies only the empty category folders, with their original owner and permissions.
Step 4: What filling the mergerfs pool on Proxmox taught me 📊
rsync -aH --numeric-ids --info=progress2 --no-inc-recursive /mnt/olddisk/Torrent/ /mnt/media/Torrent/
I ran it in a detached tmux session while the stack kept working: about 8.34 TB in 14 h 46 min, about 157 MB/s, limited by the old disk, not by FUSE. Exit code 0, zero errors, 1,786 files on both sides.
The good news: not one folder was split between disks. The surprise: disk1 got 5.2 TB and disk2 only 2.5 TB. Movie folder counts were close (252 against 217), but sizes were not, and all TV shows landed on disk1.
My best guess: rsync creates directories well ahead of the data, so mspmfs placed most folders while both disks still looked equally empty, and ties go to the first branch. I can’t prove it, but the lesson stands: if you fill a fresh mergerfs pool on Proxmox with one big copy, mspmfs does not balance by size. msppfrd keeps folders together but picks a disk at random, weighted by free space; I have not tested it. I left mine as it is, because new downloads go to the emptier disk.
Step 5: Use the mergerfs pool on Proxmox inside an LXC 🐳
Proxmox passes a host directory into a container with a bind mount point. One command, with the container stopped (set CTID to your container ID):
pct set $CTID -mp0 /mnt/media,mp=/mnt/media
Docker inside the container maps its folders from /mnt/media as before. My qBittorrent writes incomplete downloads to a separate NVMe volume (how I set that up), so the pool only gets finished files.
⚠️ Proxmox never backs up bind mounts. My Jellyfin, Radarr, Prowlarr and qBittorrent configs sat on the media disk, so they had no backup, even though the container itself was backed up daily (Proxmox Backup Server). I moved them to the container’s NVMe root disk, which also keeps their SQLite databases off FUSE.
The cutover itself, including the docker compose down trap, gets its own post. To move only torrent data, this guide keeps seeding and Jellyfin indexing intact.
How to verify your mergerfs pool on Proxmox ✅
pct exec $CTID -- df -h /mnt/media
pct exec $CTID -- docker exec -u 1000:100 qbittorrent sh -c 'touch /downloads/.t && rm /downloads/.t && echo OK'
mkdir /mnt/media/Torrent/movies/.p && ls -d /mnt/disk*/Torrent/movies/.p; rmdir /mnt/media/Torrent/movies/.p
for c in movies tv-shows cartoons documentary; do comm -12 <(ls /mnt/disk1/Torrent/$c) <(ls /mnt/disk2/Torrent/$c); done
These check the mergerfs pool on Proxmox from both sides: they show the pool size inside the container, prove the app’s UID can write through FUSE, show which disk gets a new folder (disk2 for me), and print nothing when no folder is split. Add the new disks to your SMART monitoring too: Scrutiny picks them up on its own.
Troubleshooting a mergerfs pool on Proxmox 🛠️
- Everything lands on one disk: the parent folder exists only there. Create it on every disk.
- “Permission denied” for the app user:
allow_otheris missing. - Torrent client errors: check that
cache.filesis notoff. - Empty pool after a reboot: check
systemctl status mnt-media.mountand both disk mounts.chattr +ikept the OS disk clean meanwhile. - Changed mergerfs options: remount the pool and restart the containers that bind-mount it.
Conclusion
A mergerfs pool on Proxmox is not RAID and not a backup; it makes independent disks look like one while each stays readable alone. Four rules made mine work: keep folders whole with mspmfs, create the top-level folders on every disk, keep app configs off the pool, and make empty mountpoints immutable. My old disk stays untouched for two weeks as a rollback, and if your mergerfs pool on Proxmox holds anything you can’t download again, add a real backup.
