Troubleshooting MergerFS Mounts Not Working Properly on Boot #1364
-
I'm experiencing an issue with my MergerFS mounts not working correctly when my computer starts. Here's my current /etc/fstab configuration for the MergerFS mounts:
The /media and /public mounts aren't properly mounted when the computer starts. To get them working, I have to manually run these commands after booting:
After executing these commands, I can see all the files in the MergerFS mounts as expected. I've already ensured that all the individual drives (/mnt/hdd* and /mnt/*) are successfully mounted before the MergerFS mounts. What could be causing this issue, and how can I modify my fstab or system configuration to ensure these MergerFS mounts work correctly on boot without manual intervention? Any help or suggestions would be greatly appreciated. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Based on your fstab configuration and the issues you're experiencing with the mergerfs mounts for Potential Issues
Recommended SolutionsTo address these issues, consider the following steps: 1. Modify fstab EntriesAdd the
Additionally, add the
2. Create Individual Mount UnitsTo ensure that the mergerfs mounts are only created after the individual drives are mounted, create separate systemd mount units for each of your drives. For example, for # /etc/systemd/system/mnt-hdd0.mount
[Unit]
Description=Mount /mnt/hdd0
[Mount]
What=UUID=5d08116e-8526-463c-a591-c7c28a6cfc97
Where=/mnt/hdd0
Type=auto
Options=nosuid,nodev,nofail,x-gvfs-show
[Install]
WantedBy=multi-user.target Repeat this process for all your drives (e.g., 3. Create MergerFS Mount UnitsNext, create mount units for your mergerfs mounts. For example, for the # /etc/systemd/system/media.mount
[Unit]
Description=MergerFS /media mount
After=mnt-hdd0.mount mnt-hdd1.mount mnt-hdd2.mount mnt-hdd3.mount mnt-A.mount mnt-R.mount mnt-S.mount mnt-T.mount
Requires=mnt-hdd0.mount mnt-hdd1.mount mnt-hdd2.mount mnt-hdd3.mount mnt-A.mount mnt-R.mount mnt-S.mount mnt-T.mount
[Mount]
What=/mnt/*/personal:/mnt/*/public:/run/media/user/*
Where=/media
Type=fuse.mergerfs
Options=allow_other,use_ino,cache.files=partial,dropcacheonclose=true,category.create=eplfs,func.mkdir=epall,x-gvfs-show
[Install]
WantedBy=multi-user.target Create a similar unit for the 4. Enable and Start the UnitsEnable and start all the mount units with the following commands: sudo systemctl enable mnt-hdd0.mount mnt-hdd1.mount mnt-hdd2.mount mnt-hdd3.mount mnt-A.mount mnt-R.mount mnt-S.mount mnt-T.mount media.mount public.mount
sudo systemctl start mnt-hdd0.mount mnt-hdd1.mount mnt-hdd2.mount mnt-hdd3.mount mnt-A.mount mnt-R.mount mnt-S.mount mnt-T.mount media.mount public.mount 5. Reload the Systemd DaemonAfter creating or modifying these unit files, make sure to reload the systemd daemon to apply the changes: sudo systemctl daemon-reload 6. Check System Logs for ErrorsIf you encounter issues after rebooting, you can check the system logs for any error messages related to the mounts. Use the following command to view mount-related messages from the previous boot: journalctl -b -1 | grep -i mount This command will help you identify any specific errors that occurred during the mounting process. SummaryBy implementing these changes, you ensure that:
This structured approach provides a robust solution to manage your mounts effectively, ensuring that the mergerfs filesystems are created only when all necessary components are in place. After making these adjustments, reboot your system and verify if the mounts are successful. If issues persist, continue to review the system logs for any error messages that might provide further insight into the problem. |
Beta Was this translation helpful? Give feedback.
Based on your fstab configuration and the issues you're experiencing with the mergerfs mounts for
/media
and/public
, there are several potential reasons why they may not be functioning correctly at boot:Potential Issues
Mount Order: The mergerfs mounts depend on the individual drives being mounted first. It's crucial to ensure that all the
/mnt/hdd*
and/mnt/*
mounts are successfully completed before the mergerfs mounts are attempted.Dependency Issues: The mergerfs mounts might be trying to start before all necessary components are available, leading to failures.
Timing: The mounts may be initiated too early in the boot process, before all required services are fully operational.