How do I use mergerfs on LibreELEC?

  • I have 4x6TB HDDs in an external box connected to my LibreELEC box with USB 3 cable. I don't want to rely on the box firmware to manage the HDDs so I config them as seperate disks which LibreELEC see 4 HDDs.

    Problem is one of them is almost full and the others have prenty of space left.

    Is there any way I could install mergerfs so I can pool all my HDDs together and not to worry about manually balancing them?

  • You can try download the Mergerfs release Debian package for armhf and extract the binary mergerfs. Copy it to libreelec manually and run the configuration of your union mountpoint. If it works you can automate it at boot with systemd or autostart.sh

    There is no need of kernel module as fuse comes already installed.

  • I test and the help menu got displayed and the ldd didn't report any missing shared libraries. Don't have drives to test a full setup.

    IMO the binary could be included in libreelec by default, there should also be an addon for this.

  • There is no plan or desire to bloat our images with niche-use filesystem tools. We are a simple client OS distro, not a NAS. If the binaries do not have kernel driver dependencies we would entertain a user-contributed add-on. If there are driver dependencies you're best off creating your own custom LE image. If a few others want the same you are welcome to share LE images from these forums as long as sources/changes are pushed back to your own github repo to maintain GPLv2 compliance.

  • I have copy mergerfs debian amd64 binary to system-tools addon bin/ folder, and mounting manually works.

    However I can't get it to mount at boot by systemd, this is systemctl status output:

    If I ran the ExecMount command it mounts correctly, but calling systemctl start storage-pool.mount always failed with the same error.

  • I am not exactly sure at what point /storage is mounted, so since the binary is residing there try to add a dependency to that path so that mergerfs point is mounted after storage is available.

  • mount.mergerfs is a symlink of mergerfs

    I ran this command:

    Code
    usr/bin/mount /var/media/RED\* /storage/pool -t mergerfs -o defaults,allow_other,direct_io,use_ino

    it mounted fine, but somehow systemctl start storage-pool.mount failed while exec the same exact command (without the escaping asterisk of course)

  • I am guessing that the systemd execmount doesn't have the system-tools path. I've tried a script with a service unit file but didn't work (don't know why).

    Your best shot right now would be as nickr says and use autostart.sh

  • this is the systemd unit file

  • Is definitely something with PATH where systemd looks for the mount binary. I just tested by unsquashing SYSTEM and and re-packing it with the binary and the symlink. Now the mount unit works.

  • I want to use mergerfs on my LibreElec box. What I have found is a docker image https://hotio.dev/containers/mergerfs/. This does not support armv7. However using docker addon and a simple dockerfile derived from hotio it's simple to use docker approach documented by them

    Docker
    FROM alpine:latest
    
    ENTRYPOINT ["mergerfs", "-f"]
    
    RUN apk add --no-cache fuse
    
    ARG VERSION
    ADD "https://github.com/trapexit/mergerfs/releases/download/2.39.0/mergerfs-static-linux_armhf.tar.gz" "/tmp"
    RUN tar xzf "/tmp/mergerfs-static-linux_armhf.tar.gz" -C "/" && \
        rm -rf "/tmp/mergerfs-static-linux_armhf.tar.gz"