I'm desperetely trying to auto mount my distant folder using autofs & sshfs, but I can't make it work. (I'm under Fedora 16)
This works :
sshfs [email protected]:/my/data /home/cx42net/data-distant -o uid=1000 -o gid=1000
So I defined a RSA key to use with ssh, tried a ssh
connect, it worked without asking my password. Then I tried again the previous sshfs
command, and it worked well (yay!)
So now, I want to use autofs
, and that's where the problem starts :
Content of my /etc/auto.master file :
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
/misc /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
# options are explicitly given.
#
/net -hosts
#
# Include /etc/auto.master.d/*.autofs
#
+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
/net /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost
(1000:1000) is my local user uid/gid, not the distant (the SSH folder I'm trying to get)
My /etc/auto.sshfs :
data-distant -fstype=fuse,port=22,rw,allow_other :sshfs\#[email protected]\:/mnt/data/dev
When I start autofs, here's what I've got in the /var/log/messages
:
Oct 28 23:59:30 pc-maison autofs[3318]: Starting automount: [ OK ]
So everything seems fine.
But I sometimes got this kind of messages:
Oct 28 23:41:01 pc-maison automount[2453]: create_udp_client: hostname lookup failed: Name or service not known
Oct 28 23:41:01 pc-maison automount[2453]: create_tcp_client: hostname lookup failed: Name or service not known
Oct 28 23:41:01 pc-maison automount[2453]: lookup_mount: exports lookup failed for data-distant
The folder /net/data-distant
have rights of my user "cx42net" (1000:1000)
What am I missing to make this works ?