You are not logged in.
Pages: 1
Hi,
I'm trying to set up automount on an sshfs drive. From other posts I already concluded this line for my /etc/fstab:
schnitzl@prokyon.math.rwth-aachen.de:/users/schnitzl /home/ben/data/mnt/uni/ fuse.sshfs noauto,x-systemd.automount,users,idmap=user,IdentityFile=/home/ben/.ssh/id_rsa,allow_other,reconnect 0 0
But yet it does not work. Whilst logging into the remote Host from command line is no problem:
ssh schnitzl@prokyon.math.rwth-aachen.de,
automounting fails:
-- cd uni/
bash: cd: uni/: No such device.
journalctl -b | grep uni tells me:
Nov 15 16:31:31 mario systemd[1]: Mounting /home/ben/data/mnt/uni...
Nov 15 16:31:31 mario systemd[1]: Mounted /home/ben/data/mnt/uni.
Nov 15 16:31:31 mario systemd[1]: home-ben-data-mnt-uni.mount mount process exited, code=exited status=1
Nov 15 16:31:31 mario systemd[1]: Unit home-ben-data-mnt-uni.mount entered failed state.
Any Ideas?
Benjamin
Edit: Which services do I have to restart, in order to let systemd reload the /etc/fstab configuartion?
Last edited by Lord Bo (2012-11-15 17:06:55)
Offline
You need to add the mount option _netdev - otherwhise it tries to mount it before the network is available.
EDIT: sorry, I oversaw the noauto. So you want on-demand, right? https://bbs.archlinux.org/viewtopic.php?id=146674
Last edited by teekay (2012-11-15 16:46:38)
Offline
Thank you very much! That was the right option! I already had it there, but as it did not work yet, I altered the line and forgot to add this option... . However: one last thing: Which services do I have to restart, after having altered /etc/fstab in order to take changes into effect? It is a bit annoying always having to restart the whole system.
Edit:
EDIT: sorry, I oversaw the noauto. So you want on-demand, right? https://bbs.archlinux.org/viewtopic.php?id=146674
Well it is now mounted on demand (as soon, as I try to access the directory).
And the link you provided: I already found that during my researches, but the crucial point was, as you mentioned, the missing _netdev option. However: Thanks again .
Last edited by Lord Bo (2012-11-15 16:54:52)
Offline
(Forget my EDIT above, _netdev is needed also for noauto ondemand mounting)
Check that you do not have any stale .automount links in /etc/systemd/system/remote-fs.target.wants
and run:
systemctl --system daemon-reload
Offline
Check that you do not have any stale .automount links in /etc/systemd/system/remote-fs.target.wants
and run:
systemctl --system daemon-reload
That works great! Thank you for your great help !
Offline
Great it worked. I updated the wiki a bit: https://wiki.archlinux.org/index.php/Sshfs#Automounting (still quite messy, though)
Offline
I updated the wiki a bit: https://wiki.archlinux.org/index.php/Sshfs#Automounting (still quite messy, though)
Very good Idea indeed!
Offline
Pages: 1