Closed jmineau closed 5 months ago
Look at your boot logs. You will likely see that those paths don't exist at boot. You are pointing to locations inside a mount point, correct? If mergerfs runs before them then naturally those paths won't exist. As mentioned in the docs the globbing happens at configure/start time. You must either use dependencies to force mergerfs to be mounted last or if your init system mounts things concurrently you can try the branches-mount-timeout
option. The best bet is the former.
Thank you for your dedication to support.
That makes sense and I think you are right. Using journalctl -b
to get my most recent boot without using branches-mount-timeout
, I see that the system tries to mount M-NAS about 2 seconds before the two other drives and I believe fails due to the directories not being MTP devices?
Feb 02 07:20:42 m-pi mtp-probe[337]: bus: 2, device: 2 was not an MTP device Feb 02 07:20:42 m-pi mtp-probe[339]: bus: 1, device: 4 was not an MTP device
However, when I add in a 3 second delay with branches-mount-timeout
, I see mergerfs wait, the system mounts the two external drives, but after 3 seconds I get these messages: boot_3s_delay.log
Feb 02 07:29:55 m-pi mergerfs[323]: /mnt/hdd/*/M-NAS not mounted within timeout Feb 02 07:29:55 m-pi mergerfs[323]: Continuing to mount mergerfs despite 1 branches not being different from the mountpoint filesystem Feb 02 07:29:55 m-pi mergerfs[505]: running basic garbage collection Feb 02 07:29:55 m-pi mergerfs[505]: threadpool (fuse.read): spawning 4 threads w/ max queue depth 4 Feb 02 07:29:55 m-pi mergerfs[505]: read-thread-count=4; process-thread-count=-1; process-thread-queue-depth=-1; pin-threads=false; Feb 02 07:29:55 m-pi systemd[1]: Mounted share-M\x2dNAS.mount - /share/M-NAS.
resulting in the drives not being merged. I tried 1,3,5,10,&20 seconds and got the same 'not mounted within timeout' message.
I have attached both logs. Thank you again so much for your help!
Is this what you mean by dependencies? Where would I put this line?
Oh they're just fstab options, silly me...
It works! I put this in my fstab
x-systemd.requires-mounts-for=/mnt/hdd/M-Drive,x-systemd.requires-mounts-for=/mnt/hdd/MyBook
I don't really understand the difference between x-systemd.requires-mounts-for
& x-systemd.requires
, but this seems to be working.
I will have to play around to see if I can use wildcards with this too rather then having to enter each drive.
Thank you so much again!
if the mount timeout isn't working then something about the setup is waiting for it.
https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html
Details on the settings.
Description
I have a fairly simple setup - two external drives, both with a directory M-NAS, that I want to merge to /share/M-NAS.
This is my fstab:
After boot, running
ls -la /share
returnsHowever, I can
sudo umount /share/M-NAS && sudo mount -a
and everything worksThe command line version works as well:
To Reproduce
sudo apt update && sudo apt upgrade
chown -R
/mnt/hdd/* and /share/M-NAS to my user jamesSystem information:
Linux m-pi 6.1.0-rpi8-rpi-v8 # 1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux mergerfs v2.39.0
I don't know how to strace the boot...
Additional context
This seems similar to #1148 but I am running the latest release. I thought maybe it would be a permissions issue, but since it works outside of the boot, I don't think this is it.