You are not logged in.

#1 2012-07-28 18:56:02

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

sshfs won't mount at boot

Hi there,

I have a home server running Arch and have also just installed Arch onto my main desktop.

I would like to automount a shared folder (on home server) at boot (onto main desktop).
I have sshfs installed, keys generated and copied (both my user and root).

ssfhs mounts fine when done manually:

[kaipee@zoostorm-arch ~]$ sudo sshfs -o sshfs_debug root@kphmsrv:/mnt/Files /mnt/Files -p 44
SSHFS version 2.4
Server version: 3
Extension: posix-rename@openssh.com <1>
Extension: statvfs@openssh.com <2>
Extension: fstatvfs@openssh.com <2>
Extension: hardlink@openssh.com <1>
[kaipee@zoostorm-arch ~]$ sudo ls -al /mnt/Files
total 96
drwxrwx--- 1 http http  4096 Jul 22 06:34 .
drwxr-xr-x 6 root root  4096 Jul 28 19:29 ..
drwxrwx--- 1 http http  4096 Jul 13 02:50 Backups
drwxrwx--- 1 http http  4096 Jul 13 03:20 Design Resources
drwxrwx--- 1 http http  4096 Jul 22 14:19 Documents
drwxrwx--- 1 http http  4096 Jul 24 23:36 Downloads
drwxrwx--- 1 http http  4096 Jul 13 03:29 Games
drwxrwx--- 1 http http  4096 Jul 13 14:48 Images
drwxrwx--- 1 http http 16384 Jul 13 01:57 lost+found
drwxrwx--- 1 http http 12288 Jul 13 21:21 Music
drwxrwx--- 1 http http  4096 Jul 13 03:48 OS
drwxrwx--- 1 http http  4096 Jul 25 18:15 owncloud
drwxrwx--- 1 http http  4096 Jul 13 22:58 Playlists
drwxrwx--- 1 http http  4096 Jul 13 19:58 Podcasts
drwxrwx--- 1 http http  4096 Jul 13 13:46 Projects
drwxrwx--- 1 http http  4096 Jul 24 10:56 Software
drwx------ 1 root root  4096 Jul 17 23:46 .Trash-1000
drwxrwx--- 1 http http  4096 Jul 13 23:00 Videos
drwxrwx--- 1 http http  4096 Jul 13 13:53 Websites
[kaipee@zoostorm-arch ~]$ 

However nothing happens when I configure it in my /etc/fstab:

sshfs#root@192.168.0.10:/mnt/Files /mnt/Files fuse port=44,defaults,noauto,users,uid=1000,gid=1000,reconnect,follow_symlinks,comment=sshfs   0    0

/etc/rc.conf

MODULES=(fuse vboxdrv)
DAEMONS=(hwclock syslog-ng netfs dbus networkmanager sshd xinetd crond alsa gdm)

Does anybody have any ideas?

Offline

#2 2012-07-28 19:22:21

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: sshfs won't mount at boot

use fuse.sshfs for the fstype. The syntax you're using is old and no longer accepted.

Last edited by falconindy (2012-07-28 19:22:36)

Offline

#3 2012-07-28 19:25:53

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: sshfs won't mount at boot

Thanks falconcandy,

You mean at the start of the fstab?

Is there an updated wiki page or info I can find this?

Offline

#4 2012-07-28 19:53:49

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: sshfs won't mount at boot

Yes, in fstab.

user@host  /mount/it/here fuse.sshfs options 0 0

No idea if its documented anywhere. I recall this coming up on the util-linux mailing list.

Last edited by falconindy (2012-07-28 19:54:28)

Offline

#5 2012-07-28 21:34:45

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: sshfs won't mount at boot

Mentioned in man fstab:

mount(8)  and umount(8) support filesystem subtypes.  The subtype is defined by '.subtype' suffix.  For example 'fuse.sshfs'. It's recommended to use subtype notation rather than add any prefix to the first fstab field (for example 'sshfs#example.com' is deprecated).

man fuse also deals with subtypes, but not as applied in fstab.

Offline

#6 2012-07-29 17:46:52

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: sshfs won't mount at boot

OK so I have edited my /etc/fstab to look like this:

root@192.168.0.10:/mnt/Files /mnt/Files fuse.sshfs port=44,defaults,noauto,users,uid=1000,gid=1000,reconnect,follow_symlinks,comment=sshfs   0    0

And still not working. Any other ideas?
Could something else be needing configured?
Would any other logs be of use?

Offline

#7 2012-07-29 18:34:45

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: sshfs won't mount at boot

"not working" is far too vague for anyone to give you an answer. At a glance, I notice two things:

- I'd say its always wrong to put defaults anywhere but first as an option.
- Using "noauto" will certainly inhibit this from being automounted at boot.

Offline

#8 2012-07-29 19:28:06

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: sshfs won't mount at boot

Well is there any more information that I can give like any log files or anything?
'not working' is all I know because it's not working, this works without a hitch in my Ubuntu setup

Also I remember reading somewhere that the port number needs to be defined before the other options when using fuse

Offline

#9 2012-07-30 17:44:56

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: sshfs won't mount at boot

OK so I just checked with a running system using

sudo mount-a

and using fstab

root@192.168.0.10:/mnt/Files /mnt/Files fuse.sshfs -p44,defaults,allow_other,uid=1000,gid=1000,reconnect,follow_symlinks,comment=sshfs   0    0

Everything mounts perfectly with the right permissions, etc.

So how do I go about checking why it doesn't work at boot?
Would it be a networking issue - if so how do I check?
Would it be down to me using WPA wireless connection, in that it takes time to connect with fstab not waiting for the connection - doesn't the 'reconnect' option fix this?

Any advice would be great

Offline

#10 2012-09-09 11:39:31

kaipee
Member
From: Belfast, UK
Registered: 2012-07-07
Posts: 214

Re: sshfs won't mount at boot

Well, that was a long month without internet. Think I survived lol

So now that I'm back online I will be going back to getting a working Arch system and following up on any outstanding problems - starting with this one.

Has anybody got any idea about why I can successfully mount my sshfs once the system is running (using the above fstab), but cannot seem to get it working during boot?
Using netcfg to connect to a wireless network (WPA2) - if it helps

Offline

Board footer

Powered by FluxBB