After installing the LibreELEC network-tools addon, I am able to successfully use the sshfs command in the CLI to mount a remote media directory. However, when attempting to use a systemd unit file to automatically mount the remote folder at boot, I receive an error. I am currently using the same options in unit files on several of my other machines, although they are using slightly newer versions of systemd.
/storage/.config/system.d/storage-videos-Movies.mount
Display Spoiler
Code
[Unit]
Description=Mount remote fs with sshfs
Requires=network-online.service
After=network-online.service
Before=kodi.service
[Install]
WantedBy=multi-user.target
[Mount]
[email protected]:/files/Videos/Movies
Where=/storage/videos/Movies
Type=fuse.sshfs
Options=defaults,x-systemd.automount,_netdev,uid=1000,gid=1000,allow_other,default_permissions,reconnect,ServerAliveInterval=5,ServerAliveCountMax=3,IdentityFile=/storage/.ssh/id_ed25519_sshfs_user
Display More
systemctl start storage-videos-Movies.mount
systemctl status storage-videos-Movies.mount
Display Spoiler
Code
● storage-videos-Movies.mount - Mount remote fs with sshfs
Loaded: loaded (/storage/.config/system.d/storage-videos-Movies.mount; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2019-09-03 16:43:33 CDT; 4min 51s ago
Where: /storage/videos/Movies
What: [email protected]:/files/Videos/Movies
Sep 03 16:43:33 LibreELEC systemd[1]: Mounting Mount remote fs with sshfs...
Sep 03 16:43:33 LibreELEC mount[803]: mount: mounting [email protected]:/files/Videos/Movies on /storage/videos/Movies failed: Invalid argument
Sep 03 16:43:33 LibreELEC systemd[1]: storage-videos-Movies.mount: Mount process exited, code=exited status=255
Sep 03 16:43:33 LibreELEC systemd[1]: storage-videos-Movies.mount: Failed with result 'exit-code'.
Sep 03 16:43:33 LibreELEC systemd[1]: Failed to mount Mount remote fs with sshfs.
Display More
Running the following command is successful:
Display Spoiler
Code
sshfs -o reconnect,ServerAliveInterval=5,ServerAliveCountMax=3,IdentityFile=/storage/.ssh/id_ed25519_sshfs_user [email protected]:/files/Videos/Movies /storage/videos/Movies