NFS Services Administrator's Guide
Contents
4
How the Automounter Sets Up Direct and Indirect Mounts . . . . . . . . . . . . . . . . . 67
To Mount a Remote Directory Using a Direct Automounter Map . . . . . . . . . . . . . . . 68
Example File Entries for Direct Automounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
To Mount a Remote Directory Using an Indirect Automounter Map . . . . . . . . . . . . 72
Example File Entries for Indirect Automounts. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
To Configure Multiple (Replicated) Servers for An Automounter Directory . . . . . . 76
To Use Environment Variables as Shortcuts in Automounter Maps. . . . . . . . . . . . . 77
To Use Wildcard Characters as Shortcuts in Automounter Maps . . . . . . . . . . . . . . . 78
To Automount Users’ Home Directories with the -passwd Map . . . . . . . . . . . . . . . . 80
Setting up the NFS Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Setting up the NFS Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
To Automount Users’ Home Directories with Wildcard Characters . . . . . . . . . . . . . 83
Example of Automounting a User’s Home Directory . . . . . . . . . . . . . . . . . . . . . . . 84
To Automount Multiple Directories Simultaneously (Hierarchical Mounts) . . . . . . 85
To Improve Automounter Performance with Subdirectory Notation in Indirect Maps
86
To Include an Automounter Map in Another Automounter Map. . . . . . . . . . . . . . . . 88
To Turn Off an Automounter Map with the -null Map. . . . . . . . . . . . . . . . . . . . . . . . 89
To Enable the NFS Automounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
To Verify Your Automounter Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
To Modify or Remove (Unmount) an Automounted Directory . . . . . . . . . . . . . . . . . . 91
To Restart the Automounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Configuring and Administering AutoFS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Advantages of AutoFS Versus Automounter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Migrating From Automounter to AutoFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
To Understand How AutoFS Works. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
To Automount All Exported Directories from Any Host Using the -hosts Map . . . . 99
To Decide Between Direct and Indirect NFS Automounts. . . . . . . . . . . . . . . . . . . . 101
How AutoFS Sets Up Direct and Indirect Mounts . . . . . . . . . . . . . . . . . . . . . . . . 102
To Mount a Remote Directory Using a Direct Automounter Map . . . . . . . . . . . . . . 103
Example File Entries for Direct Automounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
To Mount a Remote Directory Using an Indirect Automounter Map . . . . . . . . . . . 107
Example File Entries for Indirect Automounts. . . . . . . . . . . . . . . . . . . . . . . . . . . 109
To Configure Multiple (Replicated) Servers for an AutoFS Directory. . . . . . . . . . . 111
To Use Environment Variables as Shortcuts in Automounter Maps. . . . . . . . . . . . 113
To Use Wildcard Characters as Shortcuts in Automounter Maps . . . . . . . . . . . . . . 114
To Automount Users’ Home Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116