'Too many levels of symbolic links' - trying to mount network drive


#1

been screwing with this for way too long and it’s time to solicit some help…

running Manjaro 18.x on a laptop which is wired to network router
running a Raspberry Pi with Kodi on it (LibreELEC, connected to TV) which is wired to router
the Pi has a USB SSD formatted ext4
i can SSH to the Pi, no problem

what i want to is be able to play videos from the Pi on the laptop without the KIO problems and so as i understand i need to mount the drive locally on the laptop

i also want to mount the Pi drive on-demand so i can read/write using Dolphin, so in fstab i have (line breaks for readability):

root@192.168.50.111:/

/home/atom/kodi

fuse.sshfs noauto,
x-systemd.automount,
_netdev,
users,
idmap=user,
IdentityFile=/home/user/.ssh/LibreELEC_root_id_rsa,
allow_other,
reconnect
0
0

if i restart the system and try to cd into /home/atom/kodi, i get “Too many levels of symbolic links”, however there are no symlinks in play so far as i’m aware - /home/atom/kodi is a directory, not a symlink, and there is nothing in it since it’s supposed to be used only as a mount point

note also that i tried the above many different way, including creating the mount point as /mnt/kodi and i always have the same problem - at the start of fstab i also tried the path:

root@192.168.50.111:/media/sda1-ata-SanDisk_SDSSDH32/


#2

Not sure, but should that be

root@192.168.50.111:/

instead?


#3

I use samba to access my raspberry pi (openelec). Works fine for transferring videos to it or even playing from the share directly on my laptop (although I do that very rarely).


#4

the colon actually was in fstab - i deleted it in the post because i thought it wasn’t


#5

still struggling with this - i can use SMB, but i don’t want to and i’d like to figure out why the fstab string isn’t working

this works in terminal:

sshfs root@kodi.lan:/ /home/atom/kodi

i just tried the following in fstab as a test and it didn’t work at all - the drive was never mounted after reboot:

sshfs#root@kodi.lan:/ /home/atom/kodi fuse user,_netdev,reconnect,uid=1000,gid=1000,idmap=user,allow_other 0 0


#6

What I would try is to mount in a terminal as root using the same options you’re using in /etc/fstab and see what happens.


#7

i don’t know how to do that - can you provide the syntax? this is what i’m currently working with…

#root@192.168.50.111:/   /home/atom/kodi  fuse.sshfs   noauto,x-systemd.automount,_netdev,IdentityFile=/home/user/.ssh/LibreELEC_root_id_rsa,allow_other,reconnect 0 0

#8

https://wiki.archlinux.org/index.php/SSHFS#Mounting


#9

options are listed here :https://jlk.fjfi.cvut.cz/arch/manpages/man/sshfs.1

but not all of those options seem to correspond to the options i have in fstab - for instance noauto,x-systemd.automount - hence i don’t see how i can recreate the mount options from the terminal


#10

The idea is you miss out ones which aren’t relevant.

Start with a minimal set of arguments then add them in turn until you find one which stops it working. If they all work then you’ve at least removed them as variables.


#11

i understand what you’re saying, but there’s no counterpart to x-systemd.automount that i’m aware of and that seems to be what’s breaking everything

i can ssh into the server without issue, or manually mount the drive, but i can’t (so far) mount it on-demand


#12

Righty.

Your original fstab line matches exactly what’s in the Arch wiki (https://wiki.archlinux.org/index.php/SSHFS#On_demand) so it “should work”.

Have you tried with a different mount point e.g. /mnt or /media/kodi ?


#13

yes i have - starting to wonder if the problem isn’t on the R-Pi end - i opened a thread in the LibreELEC forum, maybe they can help


#14

starting over, sorta…

so i still can’t mount a network drive via fstab - here is the last fstab entry i tried:

root@192.168.50.111:/var/ /home/atom/kodi ext4 noauto,_netdev,user,idmap=user,identityfile=/home/atom/.ssh/LibreELEC_root_id_rsa,port=22,allow_other 0 0

after saving fstab i run systemctl daemon-reload && systemctl restart home-atom-kodi.mount and the drive is not mounted

then when i run ‘systemctl status home-atom-kodi.mount’…

# systemctl status home-atom-kodi.mount
● home-atom-kodi.mount - /home/atom/kodi
   Loaded: loaded (/etc/fstab; generated)
   Active: failed (Result: exit-code) since Tue 2019-03-05 08:43:31 EST; 3s ago
    Where: /home/atom/kodi
     What: 192.168.50.111:/var/
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)

Mar 05 08:43:31 atom-pc systemd[1]: Mounting /home/atom/kodi...
Mar 05 08:43:31 atom-pc mount[7436]: mount: /home/atom/kodi: special device 192.168.50.111:/var/ does not exist.
Mar 05 08:43:31 atom-pc systemd[1]: home-atom-kodi.mount: Mount process exited, code=exited, status=32/n/a
Mar 05 08:43:31 atom-pc systemd[1]: home-atom-kodi.mount: Failed with result 'exit-code'.
Mar 05 08:43:31 atom-pc systemd[1]: Failed to mount /home/atom/kodi.

so what does ‘special device 192.168.50.111:/var/ does not exist’ mean?

the path ‘192.168.50.111:/’ (the subfolder path doesn’t matter) certainly does exist, as does the mount folder, and i can ssh and sshfs to it from the terminal - for instance, this works (non-root user)…

sshfs root@192.168.50.111:/ /home/atom/kodi -o identityfile=/home/atom/.ssh/LibreELEC_root_id_rsa


#15

It probably means /var/ isn’t accessible on the server.


#16

/var is accessible - the sub directory doesn’t matter - i could’ve used root ‘/’ as the example

i can sshfs/ssh into any directory from the terminal just fine


#17

Maybe try systemd mount units instead: