Add automatic mount of nfs Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 38896 [details] auto.net script to mount nfs with autofs
Created attachment 38897 [details, diff] patch for auto.master to include auto.net
Created attachment 38898 [details, diff] include in ebuild the copy of auto.net
auto.net is actually included in the autofs distribution under the samples directory. The options in this one are somewhat stripped down: opts="-fstype=nfs,hard,intr,nodev,nosuid" but they work good for defaults and people who need to can manually modify them. FYI, applications like clearcase are much simpler to get up and running when autofs works with /net.
What else did you have to do to enable /net to work? I have added the auto.net to /etc/autofs dir and added /net entry to my auto.master per the patch. What else needs to be done? I'm getting errors: in my /var/log/daemon.log of: Nov 15 10:54:08 oho automount[10832]: attempting to mount entry /net/sins-afara-perforce Nov 15 10:54:08 oho automount[13382]: lookup(file): looking up sins-afara-perforce Nov 15 10:54:08 oho automount[13382]: lookup(file): lookup for sins-afara-perforce failed nslookup resolves sins-afara-perforce, no problem, running auto.net with seems to work: oho autofs # sh auto.net sins-afara-perforce -fstype=nfs,hard,intr,nodev,nosuid \ /RAID sins-afara-perforce:/RAID oho autofs # I know amd still works... I would just like to use autofs
Does your auto.net have the executable bit set? Your manual run via sh would ignore that problem.
You have to make a symlink to /net with your remote hostname, example. ln -s /net/sins-afra-perforce/raid in your mnt directory , for example. the file auto.net will not be changed. have you make /net in your root filesystem?
Sym-links should not be created. The automounter creates and removes the directories as required.
Great!!! so, I needed to chmod the auto.net... that done now from the daemon.log file it looks like everything is okay but nothing is being mounted still. Daemon log Nov 16 08:57:22 oho automount[8255]: attempting to mount entry /net/sins-nap Nov 16 08:57:22 oho automount[9117]: lookup(program): looking up sins-nap Nov 16 08:57:22 oho automount[9117]: lookup(program): sins-nap -> -fstype=nfs,hard,intr,nodev,nosuid \ Nov 16 08:57:22 oho automount[9117]: expanded entry: -fstype=nfs,hard,intr,nodev,nosuid Nov 16 08:57:22 oho automount[9117]: parse(sun): gathered options: fstype=nfs,hard,intr,nodev,nosuid /etc/autofs/auto.net sins-nap qarce@oho qarce $ /etc/autofs/auto.net sins-nap -fstype=nfs,hard,intr,nodev,nosuid \ /vol/vol1 sins-nap:/vol/vol1 \ /vol/vol1/build1 sins-nap:/vol/vol1/build1 \ qarce@oho qarce $ qarce@oho qarce $ cd /net/sins-nap bash: cd: /net/sins-nap: No such file or directory qarce@oho qarce $ Any other ideas why this still is not working? I use autofs for mounting my home dir w/o problems. Thanks, Quentin
Okay... Problem solved. THANK YOU Kate!!! version 3.x of autofs does not seem to support auto.net very well. version 4.x seems to work perfectly. On an ACCEPT_KEYWORDS="x86" (mostly stable) system run the following: ACCEPT_KEYWORDS="~x86" emerge autofs Then add the above patches as needed. And last of all enjoy. Q
Hey Ryan, I think this bug can be closed with the addition of auto.net to the 4.x ebuild for autofs and the adding of the auto.master patch... well with the /net auto.net line commented out by default. Just my $0.02 Q
in autofs-4.1.3-r1.