MergerFS neat tricks

Trapexit’s MergerFS is awesome. He has some great documentation on the README, but I just wanted to share a couple of quick examples I use all the time. Let’s say you have a MergerFS pool mounted at /storage. You can view the current setup by using xattrs to view the pseudo .mergerfs file.

It will output something like this. Note that there are currently 5 disks shown under the srcmounts value.

All of these options above can be set in realtime without unmounting and re-mounting the mergerfs pool via the runtime options.

Removing Disks
The first example could be removing a couple of disks from the pool.

This modifies the pool in realtime (no need to unmount, or stop services like samba/plex). It just works. Afterwards, we are left with this. Note that disk04 and disk05 have been removed from the pool.

Adding Disks
Now, let’s show you an example to add a couple disks. Let’s say you got some nice shiny 8TB data disks that you’d like to add to your pool. You can get them all setup and mounted via /etc/fstab (including adding them to the mergerfs line there), but you don’t want to have to offline your pool right now because your kids are watching a movie in Plex. No problem, mergerfs pseudo file to the rescue!

The above will append disk04 and disk05 onto the end of the current srcmounts.

You can also do all sorts of other things like change the create mode, or the moveonenospc value, or even the minfreespace option all without remounting.



I love learning new things and trying out the latest technology.

You may also like...

6 Responses

  1. codgedodger says:

    Question – I have three drives (more on the way) and I’m trying out the snapRAID with MergerFS. I have disk1 and disk2 my data drive and disk3 parity. When I see how much space /storage (where it is merging it all) it shows the total some of ALL disks which is 18TB. It should only be 10TB with the parity factored in. Is this expected?

    • Zack Zack says:

      Hello, thanks for the comment. Can you provide a copy of your /erc/fstab? Your parity drive should not be included in the Mergerfs pool and it sounds like it is being included as result of your mount string.

  2. codgedodger says:

    This is my code in /etc/fstab I was curious about the snapRAID tutorial on the parity mounting disk. I can just remount it to /media/parity1 or something since I’ll eventually have two parity drives.

    • Zack Zack says:

      I would suggest you create separate mountpoints for your parity and data disks.

      and umount and remount your disks there.

      Update your /etc/fstab

      Mount everything back.

      Remember… If you are using SnapRAID, you will need to update your /etc/snapraid.conf to point to these new locations.

  3. codgedodger says:

    Amazing! Thank you! Works great now!

Leave a Reply