MergerFS neat tricks4 min read

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...

15 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!

  4. oxzhor says:


    How is it possible to setup an ftp account? i try to create an account on /mnt/storage but this not work.

    Thanks for your feedback.

    • Zack Zack says:

      I would suggest using SFTP or SSH instead of FTP. Both are FAR more secure than FTP. That being said, I don’t use FTP on my mergerFS pool, but SFTP should work fine (I use SSH all the time without issue).

      • oxzhor says:

        I totally agree with you that it is less secure but the problem is, i have some devices that not support sftp / ssh.
        So that is why i needed some ftp connections.

        • oxzhor says:

          I created an ftp account with vsftpd and set the path to /mnt/storage but i cannot ftp files or created any folder.

          • Zack Zack says:

            Do you have a copy of the directions you followed? Also, what errors do you see in the logs? This is likely either a permissions issue or a misconfiguration. Have you tried setting up an FTP path not on the mergerFS pool to see if that works?

  5. shag00 says:

    Had some issues with the mergerfs options as some of them are not listed in the github write-up until I realised some of the options are in fact fuse options. Once I understood that, everything worked perfectly. I was not able to detect any noticeable improvement over mhddfs but there were certainly no drawbacks and being currently maintained is always a big advantage.

    • Zack Zack says:

      Hello, thanks for the comment!

      What options did you have issues with? I can’t see any options in my tutorial that are not explained in the Github Readme page.

      Other things that are nice over mhddfs: the lack of an readonly volume occasionally (without patched mhddfs. Requiring the pool to be unmounted and re-mounted to remedy), many write policies vs. one with mhddfs, and faster read/write speed on decent hardware.

  6. bugs181 says:

    I know this post is kind of old but I’d really love to get this to work on OpenMediaVault 5. After doing an apt install for python-xattr, I try running the xattr command it says command not found. How do I use it now?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.