Problem mounting server via sshfs

I’ve had my unRaid server automounted by my OSMC pi2and it has worked flawlessly for about a year.

This week, none of my media is seen, and the remote volume is not mounted.

I can connect to the server from my Mac using Macfusion via sshfs, so the server seems OK, and I can log into the server from the Pi using vanilla SSH with a public/private key, so that seems OK.

The /etc/fstab on the Pi has this command:
sshfs#root@*****.***:/mnt/user /mnt/tower fuse comment=sshfs,noauto,users,exec,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,BatchMode=yes 0 0

That used to mount the volume at boot but now doesn’t. Re-issuing the command
sudo mount -a
silenty proceeds but the volume is not mounted.

Mounting manually with this:
sshfs -o allow_other,reconnect,transform_symlinks,BatchMode=yes root@***.***:/ /mnt/tower
works fine.

I haven’t changed my fstab and the lack of errors on mount -a suggest it’s not broken.

I haven’t upgraded the server, but did update the OSMC/Pi recently. I’m out of options other than Fuse might have changed in the last version of OSMC.

Any advice is appreciated

You may want to try the more modern style of sshfs mounting in fstab:

root@****.***:/mnt/usr  /mnt/tower  fuse.sshfs x-systemd.automount,_netdev,user,transform_symlinks,identityfile=/home/osmc/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000 0 0

(You will need to change identityfile= to point to the correct id_rsa file.)

Just a comment here, you should avoid using root to mount if possible.

Thanks Brian;

I updated fstab using your instructions (I had gotten the other syntax from Digital Ocean’s otherwise very helpful instructions on making/using ssh keys). Your syntax works, thought the old one likely does too.

The problem was unrelated to the fstab, and has to do with the way unRaid stores and loads ssh data (including keys) from the boot flash drive; essentially the /home/.ssh contents are not persistent. I had rebooted the server just before the fail. It is unimportant for OSMC, but I had forgotten to load the public key into the boot directory when I loaded a revised public key. Problem solved, though.

Oh, I would have figured this out if I had used the verbose flag on mount, e.g. mount -av .