[ILUG] automounting /home from nfs

Cormac McClean cormac.mcclean at gmail.com
Wed Oct 12 20:28:51 IST 2005


Hi,

Continuing my attempts to configure NIS/NFS for our Linux lab, I switched to
using the automounter to mount the shared home directories from the NIS/NFS
server. It actually worked - for one PC. However, when I tried to replicate
this on the other PCs I'm getting a problem with the automounting.

Here's how I did the client configuration:
/etc/auto.master
/mnt/auto /etc/automount.sh --timeout=2
/.autofs /etc/auto.home --timeout=600

/etc/auto.home
home -fstype=nfs 192.168.120.253:/home

mv /home /home.orig
ln -s /.autofs/home /
/etc/init.d/autofs restart

The only differences I can see between the PC that works, and the ones that
don't (all the rest) - apart from /mnt/mtab and moutn output, is the
automount status out.

For the one that works:
Configured Mount Points:
------------------------
/usr/sbin/automount --timeout=2 /mnt/auto program /etc/automount.sh
/usr/sbin/automount --timeout=600 /.autofs file /etc/auto.home
 ^^^^^

Active Mount Points:
--------------------
/usr/sbin/automount --pid-file=/var/run/autofs/_:mnt_:auto.pid --timeout=2
/mnt/auto program /etc/automount.sh
/usr/sbin/automount --pid-file=/var/run/autofs/_:.autofs.pid --timeout=600
/.autofs file /etc/auto.home


And for the ones that don't:
Configured Mount Points:
------------------------
/usr/sbin/automount --timeout=2 /mnt/auto program /etc/automount.sh
/usr/sbin/automount --timeout=600 /.autofs program /etc/auto.home
 ^^^^^

Active Mount Points:
--------------------
/usr/sbin/automount --pid-file=/var/run/autofs/_:mnt_:auto.pid --timeout=2
/mnt/auto program /etc/automount.sh
/usr/sbin/automount --pid-file=/var/run/autofs/_:.autofs.pid --timeout=600
/.autofs program /etc/auto.home

A significant difference (in the output, at least) is the "file" versus
"program" part.

I've spent most of today trying to sort this out and I'm giving it a break
til the morning... at worst, I'll have to manually run
mount 192.168.120.253:/home /home
for each PC before the students login!

(Incidentally, in previous years I would have simply added a line to the
/etc/fstab such as:
192.168.120.253:/home /home nfs defauls 0 0
but Knoppix (hd-install) - which is what we're running on the clients -
doesn't seem to take any heed of this, perhaps because it automatically
edits /etc/fstab?)

Anyway, any advice or suggestions on how to solve this or what I'm doing
wrong would be appreciated. In the meantime, I'm taking home my copy of
O'Reilly's "Managing NFS and NIS" for some bedtime reading.

Regards,
Cormac.
--
Cormac McClean.
Lecturer, Athlone IT Software Engineering
Free/Open Source Software Enthusiast

Please avoid sending me Microsoft Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the ILUG mailing list