Installing and Administering NFS Services
Total Page:16
File Type:pdf, Size:1020Kb
Installing and Administering NFS Services HP 9000 Networking Manufacturing Part Number: B1031-90048 E0601 U.S.A. © Copyright 2001 Hewlett-Packard Company. Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material. Warranty. A copy of the specific warranty terms applicable to your Hewlett- Packard product and replacement parts can be obtained from your local Sales and Service Office. Restricted Rights Legend. Use, duplication or disclosure by the U.S. Government is subject to restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 for DOD agencies, and subparagraphs (c) (1) and (c) (2) of the Commercial Computer Software Restricted Rights clause at FAR 52.227-19 for other agencies. Hewlett-Packard Co. 19420 Homestead Road Cupertino, CA 95014 USA Use of this manual and CD(s) supplied for this pack is restricted to this product only. Additional copies of the programs may be made for security and back-up purposes only. Resale of the programs in their present form or with alterations, is expressly prohibited. Copyright Notices ©copyright 1983-2000 Hewlett-Packard Company, all rights reserved. Reproduction, adaptation, or translation of this document without prior written permission is prohibited, except as allowed under the copyright laws. ©copyright 1979, 1980, 1983, 1985-94 Regents of the University of California This software is based in part on the Fourth Berkeley Software Distribution under license from the Regents of the University of California. 2 ©copyright 1986-1997 Sun Microsystems, Inc. ©copyright 1985-86, 1988 Massachusetts Institute of Technology ©copyright 1989-93 The Open Software Foundation, Inc. ©copyright 1986 Digital Equipment Corporation ©copyright 1990 Motorola, Inc. ©copyright 1990, 1991, 1992 Cornell University ©copyright 1989-1991 The University of Maryland ©copyright 1988 Carnegie Mellon University Trademark Notices UNIX is a registered trademark of The Open Group. X Window System is a trademark of the Massachusetts Institute of Technology. OSF/Motif is a trademark of the Open Software Foundation, Inc. in the U.S. and other countries. NFS® is a registered trademark of Sun Microsystems, Inc. NIS™ and NIS+™ are trademarks of Sun Microsystems, Inc. NOTE The Network Information Service (NIS) was formerly known as Yellow Pages (YP). The functionality is the same; only the name has changed. “Yellow Pages” is a registered trademark in the United Kingdom of British Telecommunications plc. 3 4 Contents 1. Installing the NFS Services Installing the NFS Services Software. 15 Overview of the NFS Services . 16 2. Configuring and Administering NFS Preparing for NFS Configuration . 21 To Check the Network Connections. 21 To Set User IDs and Group IDs (if neither NIS nor NIS+ is used) . 21 To Ensure that No User is a Member of Too Many Groups . 22 Configuring and Administering an NFS Server. 24 To Make Directories Available to NFS Clients (Export Directories) . 24 To Enable NFS Server Capability . 28 To Remove (Unexport) an Exported Directory . 28 To Enable PC NFS Server Capability . 30 To Disable NFS Server Capability. 31 Configuring and Administering an NFS Client . 34 Deciding Between Automounter and AutoFS . 34 Deciding Between Standard-Mounted Directories and Automounted Directories . 35 To Mount a Remote Directory Using a Standard NFS Mount . 40 To Enable NFS Client Capability . 42 To Verify Your NFS Client Configuration . 43 To Change the Default Mount Options . 43 To Ensure Data Integrity Between the Client and Server . 49 To Remove (Unmount) a Mounted Directory . 50 To Disable NFS Client Capability . 51 NFS Client and Server Transport Connections . 52 NFS Client TCP Connections. 52 Specifying TCP or UDP Connections. 52 NFS Server TCP Connections . 53 Configuring and Administering the NFS Automounter . 55 To Automount All Exported Directories from Any Host Using the -hosts Map . 56 To Decide Between Direct and Indirect NFS Automounts. 58 To Mount a Remote Directory Using a Direct Automounter Map . 61 To Mount a Remote Directory Using an Indirect Automounter Map . 64 To Configure Multiple (Replicated) Servers for an Automounted Directory . 68 To Use Environment Variables as Shortcuts in Automounter Maps. 69 To Use Wildcard Characters as Shortcuts in Automounter Maps . 69 To Automount Users’ Home Directories with the -passwd Map . 71 5 Contents To Automount Users’ Home Directories with Wildcard Characters . 74 To Automount Multiple Directories Simultaneously (Hierarchical Mounts) . 77 To Improve Automounter Performance with Subdirectory Notation in Indirect Maps 77 To Include an Automounter Map in Another Automounter Map. 79 To Turn Off an Automounter Map with the -null Map. 80 To Enable the NFS Automounter. 81 To Verify Your Automounter Configuration . 81 To Modify or Remove (Unmount) an Automounted Directory . 83 To Restart the Automounter . 83 Configuring and Administering AutoFS. 86 Advantages of AutoFS Versus Automounter. 87 Migrating From Automounter to AutoFS . 88 To Understand How AutoFS Works. 89 To Automount All Exported Directories from Any Host Using the -hosts Map . 90 To Decide Between Direct and Indirect NFS Automounts. 92 To Mount a Remote Directory Using a Direct Automounter Map . 95 To Mount a Remote Directory Using an Indirect Automounter Map . 99 To Configure Multiple (Replicated) Servers for an Automounted Directory . 102 To Use Environment Variables as Shortcuts in Automounter Maps. 103 To Use Wildcard Characters as Shortcuts in Automounter Maps . 104 To Automount Users’ Home Directories . 106 To Automount Multiple Directories Simultaneously (Hierarchical Mounts) . 108 To Include an Automounter Map in Another Automounter Map. 109 To Create a Hierarchy of Automounter Maps . 110 To Turn Off an Automounter Map with the -null Map. 111 To Enable AutoFS . 111 To Disable AutoFS . 112 To Verify Your AutoFS Configuration . 112 To Modify or Remove (Unmount) an Automounted Directory . 114 Configuring and Using NFS Netgroups . 115 To Create Netgroups in the /etc/netgroup File . 115 To Create Netgroups in the NIS+ netgroup Table . 117 To Use Netgroups in Configuration Files . 118 Configuring the Other NFS Daemons and Services. 122 To Enable the Other NFS Services . 122 To Restrict Access to the Other NFS Services. 124 6 Contents 3. Configuring the Cache File System (CacheFS) The Cache File System . 128 CacheFS Terms . 129 Configuring CacheFS . 130 To Configure a Local File System as Cache. 131 To Mount an NFS File System Using CacheFS . 132 To Automount a File System Using CacheFS . 133 4. Configuring and Administering NIS Overview of NIS . 137 Information Managed by NIS . 137 Structure of the NIS Network . 138 Planning the NIS Network . 140 To Determine the Number of NIS Domains You Need . 140 To Determine the Number of NIS Servers You Need . 141 To Determine Which Hosts Will Be NIS Servers . 141 To Draw an NIS Network Map . 142 Configuring and Administering an NIS Master Server. 143 To Create the Master passwd File . 144 To Create the Master group File . ..