O'Reilly - Managing NFS and NIS 2nd Edt.pdf

(1987 KB) Pobierz
Managing NFS and NIS
236784719.001.png
Table of Contents
Preface ..........................................................
Who this book is for ................................................
Versions ........................................................
Organization .....................................................
Conventions used in this book .........................................
Differences between the first edition and second edition ......................
Comments and questions ............................................
Hal's acknowledgments from the first edition ..............................
Acknowledgments for the second edition .................................
1
2
2
3
4
5
5
6
6
1. Networking Fundamentals .........................................
1.1 Networking overview ............................................
1.2 Physical and data link layers ......................................
1.3 Network layer ................................................
1.4 Transport layer ................................................
1.5 The session and presentation layers .................................
9
9
11
12
18
19
2. Introduction to Directory Services ...................................
2.1 Purpose of directory services ......................................
2.2 Brief survey of common directory services ............................
2.3 Name service switch ............................................
2.4 Which directory service to use .....................................
24
24
25
29
29
3. Network Information Service Operation ..............................
3.1 Masters, slaves, and clients .......................................
3.2 Basics of NIS management .......................................
3.3 Files managed under NIS ........................................
3.4 Trace of a key match ............................................
31
31
34
41
52
4. System Management Using NIS .....................................
4.1 NIS network design ............................................
4.2 Managing map files ............................................
4.3 Advanced NIS server administration ................................
4.4 Managing multiple domains ......................................
56
56
58
65
67
5. Living with Multiple Directory Servers ...............................
5.1 Domain name servers ...........................................
5.2 Implementation ...............................................
5.3 Fully qualified and unqualified hostnames ............................
5.4 Centralized versus distributed management ...........................
5.5 Migrating from NIS to DNS for host naming ..........................
5.6 What next? ...................................................
70
70
72
74
76
77
77
6. System Administration Using the Network File System ...................
6.1 Setting up NFS ................................................
6.2 Exporting filesystems ...........................................
6.3 Mounting filesystems ...........................................
6.4 Symbolic links ................................................
6.5 Replication ..................................................
6.6 Naming schemes .............................................
78
79
80
85
96
99
103
7. Network File System Design and Operation ..........................
7.1 Virtual filesystems and virtual nodes ...............................
7.2 NFS protocol and implementation .................................
7.3 NFS components .............................................
7.4 Caching ....................................................
7.5 File locking .................................................
7.6 NFS futures .................................................
108
108
109
117
122
127
129
8. Diskless Clients ................................................
8.1 NFS support for diskless clients ...................................
8.2 Setting up a diskless client ......................................
8.3 Diskless client boot process ......................................
8.4 Managing client swap space .....................................
8.5 Changing a client's name ........................................
8.6 Troubleshooting ..............................................
8.7 Configuration options ..........................................
8.8 Brief introduction to JumpStart administration ........................
8.9 Client/server ratios ............................................
132
132
133
136
140
142
143
147
150
151
9. The Automounter ..............................................
9.1 Automounter maps ............................................
9.2 Invocation and the master map ...................................
9.3 Integration with NIS ...........................................
9.4 Key and variable substitutions ....................................
9.5 Advanced map tricks ..........................................
9.6 Side effects .................................................
153
154
162
167
169
173
182
10. PC/NFS Clients ...............................................
10.1 PC/NFS today ..............................................
10.2 Limitations of PC/NFS ........................................
10.3 Configuring PC/NFS ..........................................
10.4 Common PC/NFS usage issues ..................................
10.5 Printer services ..............................................
184
184
185
188
189
191
11. File Locking .................................................
11.1 What is file locking? ..........................................
11.2 NFS and file locking ..........................................
11.3 Troubleshooting locking problems ................................
192
192
194
196
12. Network Security ..............................................
12.1 User-oriented network security ..................................
12.2 How secure are NIS and NFS? ...................................
12.3 Password and NIS security .....................................
12.4 NFS security ...............................................
12.5 Stronger security for NFS ......................................
12.6 Viruses ...................................................
200
200
206
207
210
223
245
13. Network Diagnostic and Administrative Tools ........................
13.1 Broadcast addresses ..........................................
13.2 MAC and IP layer tools ........................................
13.3 Remote procedure call tools .....................................
13.4 NIS tools ..................................................
13.5 Network analyzers ...........................................
247
248
250
268
276
283
14. NFS Diagnostic Tools ..........................................
14.1 NFS administration tools .......................................
14.2 NFS statistics ...............................................
14.3 snoop .....................................................
14.4 Publicly available diagnostics ...................................
14.5 Version 2 and Version 3 differences ...............................
14.6 NFS server logging ...........................................
14.7 Time synchronization .........................................
295
295
298
307
311
317
318
331
15. Debugging Network Problems ....................................
15.1 Duplicate ARP replies .........................................
15.2 Renegade NIS server .........................................
15.3 Boot parameter confusion ......................................
15.4 Incorrect directory content caching ...............................
15.5 Incorrect mount point permissions ................................
15.6 Asynchronous NFS error messages ...............................
335
335
337
338
339
343
345
16. Server-Side Performance Tuning .................................
16.1 Characterization of NFS behavior ................................
16.2 Measuring performance ........................................
16.3 Benchmarking ..............................................
16.4 Identifying NFS performance bottlenecks ...........................
16.5 Server tuning ...............................................
349
349
351
352
353
357
17. Network Performance Analysis ...................................
17.1 Network congestion and network interfaces .........................
17.2 Network partitioning hardware ..................................
17.3 Network infrastructure ........................................
17.4 Impact of partitioning .........................................
17.5 Protocol filtering ............................................
367
367
369
371
372
374
18. Client-Side Performance Tuning ..................................
18.1 Slow server compensation ......................................
18.2 Soft mount issues ............................................
18.3 Adjusting for network reliability problems ..........................
18.4 NFS over wide-area networks ...................................
18.5 NFS async thread tuning .......................................
18.6 Attribute caching ............................................
18.7 Mount point constructions ......................................
18.8 Stale filehandles .............................................
376
376
381
382
384
385
387
388
390
A. IP Packet Routing .............................................
A.1 Routers and their routing tables ...................................
A.2 Static routing ................................................
392
392
396
B. NFS Problem Diagnosis .........................................
B.1 NFS server problems ..........................................
B.2 NFS client problems ...........................................
B.3 NFS errno values .............................................
397
397
398
399
C. Tunable Parameters ............................................
401
Colophon ......................................................
405
Managing NFS and NIS
Preface
Twenty years ago, most computer centers had a few large computers shared by several
hundred users. The "computing environment" was usually a room containing dozens of
terminals. All users worked in the same place, with one set of disks, one user account
information file, and one view of all resources. Today, local area networks have made
terminal rooms much less common. Now, a "computing environment" almost always refers to
distributed computing, where users have personal desktop machines, and shared resources are
provided by special-purpose systems such as file, computer, and print servers. Each desktop
requires redundant configuration files, including user information, network host addresses,
and local and shared remote filesystem information.
A mechanism to provide consistent access to all files and configuration information ensures
that all users have access to the "right" machines, and that once they have logged in they will
see a set of files that is both familiar and complete. This consistency must be provided in a
way that is transparent to the users; that is, a user should not know that a filesystem is located
on a remote fileserver. The transparent view of resources must be consistent across all
machines and also consistent with the way things work in a non-networked environment. In a
networked computing environment, it's usually up to the system administrator to manage the
machines on the network (including centralized servers) as well as the network itself.
Managing the network means ensuring that the network is transparent to users rather than an
impediment to their work.
The Network File System (NFS) and the Network Information Service (NIS) [1] provide
mechanisms for solving "consistent and transparent" access problems. The NFS and NIS
protocols were developed by Sun Microsystems and are now licensed to hundreds of vendors
and universities, not to mention dozens of implementations from the published NFS and NFS
specifications. NIS centralizes commonly replicated configuration files, such as the password
file, on a single host. It eliminates duplicate copies of user and system information and allows
the system administrator to make changes from one place. NFS makes remote filesystems
appear to be local, as if they were on disks attached to the local host. With NFS, all machines
can share a single set of files, eliminating duplicate copies of files on different machines in the
network. Using NFS and NIS together greatly simplifies the management of various
combinations of machines, users, and filesystems.
[1] NIS was formerly called the "Yellow Pages." While many commands and directory names retain the yp prefix, the formal name of the set of
services has been changed to avoid conflicting with registered trademarks.
NFS provides network and filesystem transparency because it hides the actual, physical
location of the filesystem. A user's files could be on a local disk, on a shared disk on a
fileserver, or even on a machine located across a wide-area network. As a user, you're most
content when you see the same files on all machines. Just having the files available, though,
doesn't mean that you can access them if your user information isn't correct. Missing or
inconsistent user and group information will break Unix file permission checking. This is
where NIS complements NFS, by adding consistency to the information used to build and
describe the shared filesystems. A user can sit down in front of any workstation in his or her
group that is running NIS and be reasonably assured that he or she can log in, find his or her
home directory, and access tools such as compilers, window systems, and publishing
packages. In addition to making life easier for the users, NFS and NIS simplify the tasks of
1
Zgłoś jeśli naruszono regulamin