February 1, 20251 yr I have a script that runs at array start (using the user scripts plugin) that is meant to mount 6 remote shares split between two different protocols. My issue is, despite the commands all working individually, when they are combined together in a script I will have a single random rclone mount just not run for some reason. I know it isn't running because you can see the rclone mount calls in the syslog and there are only 3 when there should be 4. When it was just rclone for years I don't recall ever having any issues with mounts getting missed but due to problems with rclone dir caching and lidarr getting upset about the files not being there when the download completes I had to switch a few mounts to a "live" filesystem. I don't think it's the addition of the SSHFS calls since they all occur after the rclone mounts... Here is the script with sensitive bits removed: #! /bin/bash logger "Mounting remote shares via rclone..." rclone mount --daemon --allow-other --copy-links --dir-cache-time=1m --max-read-ahead=200M --syslog -v --uid 99 --gid 100 --umask 002 server:/remote/path /mnt/cache/.watch/movies sleep 2 rclone mount --daemon --allow-other --copy-links --dir-cache-time=1m --max-read-ahead=200M --syslog -v --uid 99 --gid 100 --umask 002 server:/remote/path /mnt/cache/.watch/tv-remote sleep 2 rclone mount --daemon --allow-other --copy-links --dir-cache-time=1m --max-read-ahead=200M --syslog -v --uid 99 --gid 100 --umask 002 server:/remote/path /mnt/cache/.watch/4k-remote sleep 2 rclone mount --daemon --allow-other --copy-links --dir-cache-time=1m --max-read-ahead=200M --syslog -v --uid 99 --gid 100 --umask 002 server:/remote/path /mnt/cache/.watch/misc-remote sleep 2 logger "rclone mounting complete!" logger "Mounting remote shares via sshfs..." sshfs user@server:/server/path/ /mnt/cache/.watch/books-remote/ -o StrictHostKeyChecking=no -o allow_other -o Compression=no -o IdentityFile=/mnt/cache/.watch/AutomationSetup sshfs user@server:/server/path/ /mnt/cache/.watch/music-remote/ -o StrictHostKeyChecking=no -o allow_other -o Compression=no -o IdentityFile=/mnt/cache/.watch/AutomationSetup logger "Mounting SSHFS shares complete!" I've rebooted 4 times this morning and the rclone mount that gets skipped is random. Sometimes it's the same mount, sometimes it changes with each run. It's always only a single rclone mount that fails to run. When I go to run the failed mount command it completes without issue though so it's not like there is a problem with the commands itself. I've already tried increasing the sleeps (from 2 to 5) between the mount commands and that had no effect. As you can see in the attached syslog (syslog.txt)the script only ran 3 of the rclone mount commands and the two SSHFS commands. The final rclone command at the end of the log file is me running the last mount manually over ssh. What gives? node-diagnostics-20250201-0714.zip Edited February 1, 20251 yr by weirdcrap
February 1, 20251 yr Author Solution Oh interesting, it seems like removing the sleeps between the rclone mount commands might have actually made it better? I don't recall why I added them all those years ago, I assume to try and resolve a similar issue. I'm going to do some more testing but it seems I'm on the right track. EDIT: Yeah apparently sleep was my problem. Edited February 2, 20251 yr by weirdcrap
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.