Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Configuring AutoFS Module 11 H3065S.

Similar presentations


Presentation on theme: "© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Configuring AutoFS Module 11 H3065S."— Presentation transcript:

1 © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Configuring AutoFS Module 11 H3065S F.00

2 © 2005 Hewlett-Packard Development Company, L.P. 2 AutoFS Concepts I only want to NFS mount users’ home directories when they actually log in... NFS Clients NFS Server AutoFS is an NFS client-side service that  Automatically mounts NFS file systems when needed  Automatically unmounts NFS file systems that are no longer being accessed  May be configured to provide load balancing across multiple NFS servers

3 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 3 AutoFS Maps Q: Which file systems are managed by AutoFS? Q: Which servers should AutoFS query to mount those file systems? Q: Are any NFS mount options required? A: The AutoFS map files have the answers!

4 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 4 AutoFS Commands and Daemons AutoFS map files mount table: /stand HFS /net AutoFS /drawings AutoFS /home AutoFS umount requests autofs_proc automount file access requests users and processes mount requests autofs NFS Server /net /drawings /home Kernel mount/umount requests automountd

5 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 5 Starting and Stopping AutoFS # /etc/rc.config.d/nfsconf # /sbin/init.d/nfs.client start # /sbin/init.d/nfs.client stop NFS_CLIENT=1 AUTOMOUNT=1 # 11i v1 only AUTOFS=1 AUTOMOUNT_OPTIONS="" AUTOMOUNTD_OPTIONS="" # ps -ef | grep automountd # ps -ef | grep autofs_proc # mount -v Enable AutoFS Start/Stop AutoFS Check AutoFS

6 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 6 Configuring the AutoFS Master Map /etc/auto_master /net -hosts -soft,nosuid /drawings /etc/auto.drawings /home /etc/auto.home /- /etc/auto.direct / net drawings home opt autofs Which maps should AutoFS consult? Which mount point directories are managed by AutoFS? The master map tells AutoFS where to find all other AutoFS maps!

7 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 7 Configuring the AutoFS -hosts Map /etc/auto_master /net -hosts -soft,nosuid # ll /net/svr1 Configuring the -hosts map allows users to automatically mount file systems from any NFS server just by accessing /net/servername ! No need to issue a mount command! No need to modify /etc/fstab ! svr1 AutoFS mounts all NFS file systems from svr1!

8 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 8 Configuring the AutoFS Direct Map /etc/auto_master /- /etc/auto.direct /etc/auto.direct /usr/contrib/games -ro gamesvr:/usr/contrib/games /opt/tools -ro toolsvr:/opt/tools /var/mail -rw mailsvr:/var/mail Mount optionsClient-side mount pointsNFS server sources Use the direct map to automatically mount NFS file systems on multiple unrelated mount points.

9 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 9 Configuring the AutoFS Indirect Maps /etc/auto_master /drawings /etc/auto.drawings /etc/auto.drawings gizmos -ro gizmosvr:/drawings/gizmos gadgets -ro gadgetsvr:/drawings/gadgets widgets -ro widgetsvr:/drawings/widgets Mount optionsMount pointsNFS server sources Use indirect maps to automatically mount multiple file systems under a common parent directory. Parent Directory

10 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 10 Comparing Direct versus Indirect Maps Direct mounted and local file systems may co-exist in the same parent directory Large direct maps quickly lead to cluttered mount tables The automount command must be executed every time the direct map changes Indirect mounted and local file systems may not coexist in the same parent directory Each indirect map yields just one entry in the mount table AutoFS automatically recognizes indirect map changes Direct Maps Indirect Maps

11 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 11 Mounting Home Directories with AutoFS user1:x:101:101::/home/sales/user1:/usr/bin/sh user2:x:102:101::/home/sales/user2:/usr/bin/sh user3:x:103:101::/home/accts/user3:/usr/bin/sh user4:x:104:101::/home/accts/user4:/usr/bin/sh /etc/passwd /home /etc/auto.home /etc/auto_master sales sales:/home/sales accts accts:/home/accts /etc/auto.home /home/sales user1user2 sales /home/accts user3user4 accts

12 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 12 user1:x:101:101::/home/sales/user1:/usr/bin/sh user2:x:102:101::/home/sales/user2:/usr/bin/sh user3:x:103:101::/home/accts/user3:/usr/bin/sh user4:x:104:101::/home/accts/user4:/usr/bin/sh /etc/passwd /home /etc/auto.home /etc/auto_master * &:/home/& /etc/auto.home /home/sales user1user2 sales /home/accts user3user4 accts Mounting Home Directories with AutoFS Key Substitution

13 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 13 /etc/auto_master /- /etc/auto.direct /etc/auto.direct /opt/tools -ro toolsvr1:/opt/tools \ toolsvr2:/opt/tools \ toolsvr3:/opt/tools Replicated servers provide load balancing and high availability for read-only file systems! toolsvr1toolsvr2toolsvr3 I'll poll all three servers and mount /opt/tools from the first server that responds! Configuring AutoFS to Access Replicated Servers

14 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 14 Troubleshooting AutoFS Verify that /etc/rc.config.d/nfsconf is configured properly. Verify that the AutoFS daemons are running. Verify that the AutoFS maps are configured properly. Verify that DNS resolves the NFS server's hostname properly. Verify that you have network connectivity to the NFS server. Verify that the NFS server daemons are running. Verify that the NFS server has exported the file systems in question. Consider stopping and restarting AutoFS. Consider enabling AutoFS logging. Determine if the NFS server is overloaded.

15 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 15 Comparing AutoFS with Automounter Automounter is the predecessor to AutoFS Automounter is available on 11.00 and 11i v1, but not on 11i v2 Automounter's purpose and maps are identical to AutoFS Automounter is inferior to AutoFS in several ways: Automounter isn’t supported in 11i v2 or any future releases Automounter doesn't support NFSv3 Automounter direct maps may cause "mount storms" Automounter mounts file systems in /tmp_mnt Automounter must be restarted when the master or direct maps change

16 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 16 Lab activity

17 H3065S F.00© 2005 Hewlett-Packard Development Company, L.P. 17


Download ppt "© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Configuring AutoFS Module 11 H3065S."

Similar presentations


Ads by Google