Work in progress

This site is in the process of being reviewed and updated.

Server Setup for Autohomes

We will be exporting the /exports/ahome filesystem. Edit /etc/exports to include this entry:

/exports/ahome    gss/krb5p(rw,fsid=0,insecure,no_subtree_check,sync,anonuid=65534,anongid=65534)

Since you have changed the export configuration and need to re-export, you should use:

[DIRxSRVx10:root@nfs1 ~]# exportfs -rv

exporting gss/krb5p:/exports/ahome
exporting gss/krb5p:/exports/distros
exporting gss/krb5p:/exports/sge
exporting gss/krb5p:/exports/users
Client Setup for Autohomes

On the client, the automounter is configured with the /etc/auto.master file and the associated /etc/auto.mountpoint files. The automounter is started and stopped with the /etc/init.d/autofs init script. When users login, they will be in their their automounted home directories.

Edit the /etc/auto.master config file.

#
# $Id: auto.master,v 1.4 2005/01/04 14:36:54 raven Exp $
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [DIRxSRVx10: -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#

/ahome  /etc/auto.ahome --timeout=90

Now create the /etc/auto.ahome config file:

*   -fstype=nfs4,rw,proto=tcp,port=2049   nfs1:/&

Now, create the mountpoint:

[DIRxSRVx10:root@client ~]# mkdir /ahome

We assume you are using LDAP to store users and that you can change all the home directories there.

Now, let's configure the automounter to start automatically and then start it:

[DIRxSRVx10:root@client ~]# chkconfig autofs on
[DIRxSRVx10:root@client ~]# service autofs restart
[DIRxSRVx10:root@client ~]# mount | grep /ahome
automount(pid8044) on /ahome type autofs (rw,fd=4,pgrp=8044,minproto=2,maxproto=4)

Now, use SSH to login as one of the example users, such as 'hnelson'. If you have completed the Trail for configuring Kerberos authentication with SSHD, you would be able to SSH and login without being prompted for a password.

$ ssh hnelson@client
hnelson@client's password:
$ pwd
/ahome/hnelson

$ mount | grep ahome
automount(pid8044) on /ahome type autofs (rw,fd=4,pgrp=8044,minproto=2,maxproto=4)
nfs1:/hnelson on /ahome/hnelson type nfs4 (rw,proto=tcp,port=2049,addr=10.0.0.1)

$ df -h | grep ahome
nfs1:/hnelson    1.5G   55M  1.4G   2% /ahome/hnelson
Postconditions
  1. After a user logs out, their NFSv4 mount entry will disappear after 90 seconds.
  2. The user on the NFSv4 client will not be able to exceed their quota.
  3. To stop using the automounter, remove relevant entries from the auto.master and restart the service. You must also modify its runlevels with the chkconfig command.
  • No labels