Hi,
I installed mandrake8.1 on intel. I want to use autofs to mount points
which
are exported on remote hosts when I access them.
my :"auto_master" (default one)
-----------------
[root@localhost stephb]# cat /etc/auto.master
# $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/misc /etc/auto.misc --timeout=60
/net /etc/auto.net --timeout=60
=> We can see that autofs follows what is written in "auto_master":
[root@localhost stephb]# ps auxww | grep automount
root 944 0.0 0.2 1540 668 ? S 09:42 0:00
/usr/sbin/automount --timeout 60 /misc file /etc/auto.misc
root 959 0.0 0.2 1540 672 ? S 09:42 0:00
/usr/sbin/automount --timeout 60 /net program /etc/auto.net
my auto.net:
------------
[root@localhost stephb]# cat /etc/auto.net
#!/bin/sh
# $Id: //depot/autofs-4.0/samples/auto.net#6 $
# Look at what a host is exporting to determine what we can mount.
# This is very simple, but it appears to work surprisingly well
key="$1"
# add "nosymlink" here if you want to suppress symlinking local
filesystems
# add "nonstrict" to make it OK for some filesystems to not mount
opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict"
# Showmount comes in a number of names and varieties. "showmount" is
# typically an older version which accepts the '--no-headers' flag
# but ignores it. "kshowmount" is the newer version installed with
knfsd,
# which both accepts and acts on the '--no-headers' flag.
#SHOWMOUNT="kshowmount --no-headers -e $key"
#SHOWMOUNT="showmount -e $key | tail +2"
# Newer distributions get this right
SHOWMOUNT="showmount --no-headers -e $key"
$SHOWMOUNT | sort +0 | \
awk -v key="$key" -v opts="$opts" -- '
BEGIN { ORS=""; first=1 }
{ if (first) { print opts; first=0 }; print "
\\\n\t" $1, key ":" $1 }
END { if (!first) print "\n"; else exit 1 }
'
=> If I try "manually" to see what happens when I try to contact the
host "myrtille" which exports "export".
it seems to me I have the expected reuslt:
[root@localhost stephb]# sh /etc/auto.net myrtille
-fstype=nfs,hard,intr,nodev,nosuid,nonstrict \
/export myrtille:/export
=> Also if I look at what is mounted I can see "/net".
[root@localhost stephb]# df -ak
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda1 1597004 140624 1375256 10% /
none 0 0 0 - /proc
devfs 0 0 0 - /dev
none 0 0 0 - /dev/pts
none 127620 0 127620 0% /dev/shm
/dev/hda9 8380704 18880 7936104 1% /home
/dev/hda8 6720216 122656 6256184 2% /tmp
/dev/hda6 10381004 2282744 7570928 24% /usr
/dev/hda7 12096724 8512 11473728 1% /usr/local
automount(pid959) 0 0 0 - /net
automount(pid944) 0 0 0 - /misc
Here is the problem:
--------------------
=> When I try to acces "/net/myrtille/export", I get the follwoing
error:
[root@localhost stephb]# ls /net/myrtille/export
ls: /net/myrtille/export: No such file or directory
=> Looking at /var/log/messages I can see the following error:
Nov 19 09:42:25 localhost automount[959]: starting automounter version
4.0.0, path = /net, maptype = program, mapname = /etc/auto.net
Nov 19 09:42:25 localhost automount[959]: using kernel protocol version
3
Nov 19 09:42:25 localhost automount[959]: using timeout 60 seconds; freq
15 secs
Nov 19 09:42:25 localhost automount[944]: using kernel protocol version
3
Nov 19 09:42:25 localhost automount[944]: using timeout 60 seconds; freq
15 secs
Nov 19 09:54:39 localhost automount[959]: attempting to mount entry
/net/myrtille
Nov 19 09:54:39 localhost automount[3269]: mount(nfs): mkdir_path
myrtille/export failed: Operation not permitted
I wanted to look at the source code for "automount" but I could not find
that in Mandrake8.1 distribution. I tried rpmfind.net without more
success.
Do you know where can I find the source package for autofs?
Do you have any idea what the problem is?
Thanks,
Steph.
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com