How I Fixed My 24 Hour NFS Crash Loop With MergerFS LXC and Proxmox
Turns out telling the kernel to remember everything is a bad idea. Who knew?

Every professional and/or weekend warrior sysadmin has that one issue that haunts them. For me, this week, it was a weird NFS crash loop that kicked in like clockwork. Every 24 hours, like it was on a timer (it was, my backups were running). The server booted, NFS shares mounted fine, and media apps ran smoothly. Looked solid. Then… boom. NFS would stop responding. Containers started throwing stale file handle errors and memory usage shot through the roof.
I spent days chasing ghosts trying to figure it out. If you’re running NFS exports from a MergerFS-backed VM in Proxmox, especially with LXC clients, here’s what fixed it for me and why you should check your setup too.
Stack Snapshot
Before we dig into the fix, here’s what my setup looked like:
- Proxmox host with a ZFS RAIDZ1 pool
- NAS VM with an HBA passing through XFS drives, combined using MergerFS
- MergerFS presenting
/media/Storage
- NFS server inside the NAS VM, exporting that MergerFS mount
- LXC containers (Sonarr, Jellyfin, etc.) mounting those exports as clients
On paper, this setup checks out. But under the hood, it was primed for failure thanks to one small flag: noforget
.
Where Things Went Sideways
It wasn’t obvious at first. But symptoms started stacking:
- VM would freeze after ~24 hours
- LXC clients hit “stale file handle” errors
- Slab memory ballooned, especially
fuse_inode
(Over 110,000 inodes)
That last part was the key. Hundreds of thousands of inodes hanging around with no cleanup.
Wait—What’s an Inode?
Think of an inode as the metadata brain behind every file in a Linux filesystem. It stores everything about the file except its name and contents. That means stuff like:
- File size
- Permissions
- Owner and group
- Timestamps
- Pointers to where the actual data lives on the disk
Every time you create, read, or move a file, the system checks the inode to figure out what it’s dealing with. The inode number is what NFS uses to track files across the network. If those numbers change or pile up, things can get ugly fast, especially with MergerFS and NFS in the mix.
Smoking Gun: noforget
in MergerFS
Here’s what I originally had for my MergerFS entry in /etc/fstab
:
/mnt/Pool0/Disk* /media/Storage fuse.mergerfs direct_io,defaults,allow_other,noforget,dropcacheonclose=true,category.create=mfs,minfreespace=50G,fsname=storage 0 0
The noforget
flag was the root of my problems.
What it does:
Prevents the kernel from purging unused FUSE inodes. Great for certain workloads. Awful for MergerFS over NFS.
What happened:
Every NFS client interaction added more FUSE inodes. The kernel kept them all. Memory usage exploded. Stability collapsed.
You Can Check Your fuse_inode
Run this:
cat /proc/slabinfo | grep fuse_inode
Before the fix, mine hit 100,000+ entries. After? Around 200. Immediate memory relief.
The Fixes That Saved My Sanity and Marriage
1. Replace noforget
with inodecalc=path-hash
I replaced noforget
from my MergerFS options with this instead. This is key for NFS stability. Without it, inode numbers jump around and NFS freaks out. New MergerFS line in /etc/fstab/
:
/mnt/Pool0/Disk* /media/Storage fuse.mergerfs direct_io,defaults,allow_other,dropcacheonclose=true,category.create=mfs,minfreespace=50G,inodecalc=path-hash,fsname=storage 0 0
Now FUSE inodes are purged normally, and NFS clients get consistent inode numbers.
2. Boost vfs_cache_pressure
Force the kernel clean inodes and dentries more aggressively. In /etc/sysctl.conf
:
echo vm.vfs_cache_pressure=200 | sudo tee -a /etc/sysctl.conf
Then reboot or run:
sudo sysctl -p
3. Change Proxmox Disk Cache to writethrough
In the Proxmox VM Hardware settings, switch the disk cache mode to:
cache=writethrough
It forces better consistency between Proxmox, ZFS, and your VM’s disk I/O.
What Stability Looks Like Now
After these changes:
- No more stale handles or NFS hangs
fuse_inode
count is flat — around 8,000 after days of uptime- Memory usage is predictable
- LXC clients mount and run cleanly — even under load
Quick Fix Table
Tweak | Why It Matters |
---|---|
❌ Remove noforget |
Stops memory leaks via inode bloat |
✅ Add inodecalc=path-hash |
Prevents NFS from freaking out |
⚙️ Set vfs_cache_pressure=200 |
Cleans up unused inode/dentry entries |
💽 Use writethrough in Proxmox |
Improves disk I/O behavior with ZFS |
👀 Monitor /proc/slabinfo |
Catch inode bloat before it breaks stuff |
TL;DR
NFS + MergerFS + Proxmox VM + LXC? Check your MergerFS flags.
Specifically:
Ditch noforget
. Add inodecalc=path-hash
. Crank vfs_cache_pressure
. Set Proxmox disk cache to writethrough
.
These four config change saved my server from a daily crashes. If your NFS setup feels haunted, you might want to start here.
Try it. Save your sanity and sleep again.