Error when starting MergerFs

What is the problem you are having with rclone?

Running into the following error when I try to start Mergerfs

● mergerfs@pluto.service - MergerFS Service
     Loaded: loaded (/etc/systemd/system/mergerfs@.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2023-07-23 04:23:44 UTC; 2min 11s ago
    Process: 19314 ExecStart=/root/bin/mergerfs -o use_ino,func.getattr=newest,category.action=all -o category.create=ff,cache.files=auto-full,threads=8 /root/home/pluto/Stuff/Local:/root/home/pluto/St>
        CPU: 664us

My mergerFs config file

[Unit]
Description = MergerFS Service
After=rclone@.service
RequiresMountsFor=%h/home/%i/Stuff/Local
RequiresMountsFor=%h%h/home/%i/Stuff/Mount

[Service]
Type=forking
TimeoutStopSec=60
ExecStart=%h/bin/mergerfs \
    -o use_ino,func.getattr=newest,category.action=all \
    -o category.create=ff,cache.files=auto-full,threads=8 \
    %h/home/%i/Stuff/Local:%h/home/%i/Stuff/Mount %h/home/%i/MergerFS

StandardOutput=file:%h/home/%i/scripts/mergerfs_mount.log
ExecStop=/bin/fusermount -uz %h/home/%i/MergerFS
Restart=on-failure

[Install]
WantedBy=default.target

What is your rclone version (output from rclone version)

rclone v1.63.1
- os/version: debian 11.7 (64 bit)
- os/kernel: 5.10.0-23-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.6
- go/linking: static
- go/tags: none

Are you on the latest version of rclone? Yes

Which cloud storage system are you using?

The command you were trying to run (eg rclone copy /tmp remote:tmp)

sudo systemctl start mergerfs@pluto

The rclone config contents with secrets removed.

Note: Rclone is running fine.

[Unit]
Description=rclonemount
After=network.target

[Service]
Type=simple
User=%i
Group=%i
ExecStartPre=-/bin/mkdir -p /home/%i/Stuff/Mount/
ExecStart=/usr/bin/rclone mount crypt: /home/%i/cloud/   --user-agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36'   --config /home/%i/.config/rclone/rclone.conf   --use-mmap   --dir-cache-time 5m0s   --timeout 30s   --umask 002   --vfs-cache-max-size 5G   --vfs-fast-fingerprint   --allow-other   --poll-interval=15s   --vfs-cache-mode full   --vfs-read-chunk-size 1024M  --vfs-write-back 1h --vfs-cache-max-age 9999h  --vfs-read-chunk-size-limit 10G   --tpslimit 10
ExecStop=/bin/fusermount -u /home/%i/Stuff/Mount
Restart=on-failure
RestartSec=30
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

A log from the command with the -vv flag >> Unable to retrieve it unfortunately

● mergerfs@pluto.service - MergerFS Service
     Loaded: loaded (/etc/systemd/system/mergerfs@.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2023-07-23 04:23:44 UTC; 2min 11s ago
    Process: 19314 ExecStart=/root/bin/mergerfs -o use_ino,func.getattr=newest,category.action=all -o category.create=ff,cache.files=auto-full,threads=8 /root/home/pluto/Stuff/Local:/root/home/pluto/St>
        CPU: 664us

Jul 23 04:23:44 10925252 systemd[1]: mergerfs@pluto.service: Scheduled restart job, restart counter is at 5.
Jul 23 04:23:44 10925252 systemd[1]: Stopped MergerFS Service.
Jul 23 04:23:44 10925252 systemd[1]: mergerfs@pluto.service: Start request repeated too quickly.
Jul 23 04:23:44 10925252 systemd[1]: mergerfs@pluto.service: Failed with result 'exit-code'.
Jul 23 04:23:44 10925252 systemd[1]: Failed to start MergerFS Service.

If your rclone mount works then I would suggest you bring this issue to MergerFs community. Or you have some issue with rclone itself?

1 Like

Where I can find it please?

I have no idea as I am not using it. Maybe some rclone users use the same software as well so hopefully somebody can point you into the right direction.

You should also look at what is the reason of MergerFS not starting - you have to capture some logs and errors.

The only thing I can extract with journalctl -xe is the following, not sure if this would help.
Thank You

Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
¦¦ Subject: A start job for unit UNIT has finished successfully
¦¦ Defined-By: systemd
¦¦ Support: https://www.debian.org/support
¦¦
¦¦ A start job for unit UNIT has finished successfully.
¦¦
¦¦ The job identifier is 5.
Jul 23 04:12:26 10925252 systemd[1307]: Reached target Basic System.
¦¦ Subject: A start job for unit UNIT has finished successfully
¦¦ Defined-By: systemd
¦¦ Support: https://www.debian.org/support
¦¦
¦¦ A start job for unit UNIT has finished successfully.
¦¦
¦¦ The job identifier is 2.
Jul 23 04:12:26 10925252 systemd[1307]: Reached target Main User Target.
¦¦ Subject: A start job for unit UNIT has finished successfully
¦¦ Defined-By: systemd
¦¦ Support: https://www.debian.org/support
¦¦
¦¦ A start job for unit UNIT has finished successfully.
¦¦
¦¦ The job identifier is 1.
Jul 23 04:12:26 10925252 systemd[1307]: Startup finished in 1.008s.
¦¦ Subject: User manager start-up is now complete
¦¦ Defined-By: systemd
¦¦ Support: https://www.debian.org/support
¦¦
¦¦ The user manager instance for user 1000 has been started. All services queued
¦¦ for starting have been started. Note that other services might still be starting
¦¦ up or be started at any later time.
¦¦
¦¦ Startup of the manager took 1008135 microseconds.
Jul 23 04:12:41 10925252 sudo[1332]: pluto : TTY=pts/2 ; PWD=/home/pluto ; USER=root ; COMMAND=/usr/bin/systemctl start rclone@pluto
Jul 23 04:12:41 10925252 sudo[1332]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:12:41 10925252 sudo[1332]: pam_unix(sudo:session): session closed for user root
Jul 23 04:12:53 10925252 sudo[1337]: pluto : TTY=pts/2 ; PWD=/home/pluto ; USER=root ; COMMAND=/usr/bin/systemctl status rclone@pluto
Jul 23 04:12:53 10925252 sudo[1337]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:12:57 10925252 sudo[1337]: pam_unix(sudo:session): session closed for user root
Jul 23 04:13:13 10925252 sudo[1342]: pluto : TTY=pts/2 ; PWD=/home/pluto ; USER=root ; COMMAND=/usr/bin/systemctl enable mergerfs@pluto
Jul 23 04:13:13 10925252 sudo[1342]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:13:13 10925252 sudo[1342]: pam_unix(sudo:session): session closed for user root
Jul 23 04:13:32 10925252 sudo[1361]: pluto : TTY=pts/2 ; PWD=/home/pluto ; USER=root ; COMMAND=/usr/bin/systemctl start mergerfs@pluto
Jul 23 04:13:32 10925252 sudo[1361]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:13:32 10925252 sudo[1361]: pam_unix(sudo:session): session closed for user root
Jul 23 04:16:05 10925252 sudo[2844]: pluto : TTY=pts/2 ; PWD=/home/pluto ; USER=root ; COMMAND=/usr/bin/systemctl status mergerfs@pluto
Jul 23 04:16:05 10925252 sudo[2844]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:16:34 10925252 sudo[2844]: pam_unix(sudo:session): session closed for user root
Jul 23 04:20:55 10925252 sudo[12475]: pluto : TTY=pts/2 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/usr/bin/nano mergerfs@.service
Jul 23 04:20:55 10925252 sudo[12475]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:22:23 10925252 sudo[12475]: pam_unix(sudo:session): session closed for user root
Jul 23 04:22:40 10925252 sudo[16717]: pluto : TTY=pts/2 ; PWD=/etc/systemd/system ; USER=root ; COMMAND=/usr/bin/systemctl restart mergerfs
Jul 23 04:22:40 10925252 sudo[16717]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:22:40 10925252 sudo[16717]: pam_unix(sudo:session): session closed for user root
Jul 23 04:23:42 10925252 sudo[19272]: pluto : TTY=pts/2 ; PWD=/home/pluto ; USER=root ; COMMAND=/usr/bin/systemctl restart mergerfs@pluto
Jul 23 04:23:42 10925252 sudo[19272]: pam_unix(sudo:session): session opened for user root(uid=0) by pluto(uid=1000)
Jul 23 04:23:42 10925252 sudo[19272]: pam_unix(sudo:session): session closed for user root

Looking at your rclone mount.

Why you set:

--vfs-read-chunk-size 1024M 
--vfs-read-chunk-size-limit 10G

when your cache is tiny:

--vfs-cache-max-size 5G

Does not mean it is wrong if you have some special requirements. But otherwise it is better to use default values.

I upload to it frequently and also using it for plex scanning often.
I have enterprise plan, the maximum is 50g should I change them?

These flags have no impact on writing to remote.

I would remove:

--vfs-read-chunk-size 1024M 
--vfs-read-chunk-size-limit 10G

and increase --vfs-cache-max-size if you have space.

All details in docs.

1 Like

Do you think my mergerfs.service file is not working because it doesn't have allow other, if so how do I add it in the mergerfs config file?
Thank You

I do not use mergerfs so can't help you but definitely you can try.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.