]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/doc/smm/06.nfs/1.t
MFV r348550: 1700 Add SCSI UNMAP support
[FreeBSD/FreeBSD.git] / share / doc / smm / 06.nfs / 1.t
1 .\" Copyright (c) 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" This document is derived from software contributed to Berkeley by
5 .\" Rick Macklem at The University of Guelph.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of the University nor the names of its contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\"     @(#)1.t 8.1 (Berkeley) 6/8/93
32 .\"
33 .\" $FreeBSD$
34 .\"
35 .sh 1 "NFS Implementation"
36 .pp
37 The 4.4BSD implementation of NFS and the alternate protocol nicknamed
38 Not Quite NFS (NQNFS) are kernel resident, but make use of a few system
39 daemons.
40 The kernel implementation does not use an RPC library, handling the RPC
41 request and reply messages directly in \fImbuf\fR data areas. NFS
42 interfaces to the network using
43 sockets via. the kernel interface available in
44 \fIsys/kern/uipc_syscalls.c\fR as \fIsosend(), soreceive(),\fR...
45 There are connection management routines for support of sockets for connection
46 oriented protocols and timeout/retransmit support for datagram sockets on
47 the client side.
48 For connection oriented transport protocols,
49 such as TCP/IP, there is one connection
50 for each client to server mount point that is maintained until an umount.
51 If the connection breaks, the client will attempt a reconnect with a new
52 socket.
53 The client side can operate without any daemons running, but performance
54 will be improved by running nfsiod daemons that perform read-aheads
55 and write-behinds.
56 For the server side to function, the daemons portmap, mountd and
57 nfsd must be running.
58 The mountd daemon performs two important functions.
59 .ip 1)
60 Upon startup and after a hangup signal, mountd reads the exports
61 file and pushes the export information for each local file system down
62 into the kernel via. the mount system call.
63 .ip 2)
64 Mountd handles remote mount protocol (RFC1094, Appendix A) requests.
65 .lp
66 The nfsd master daemon forks off children that enter the kernel
67 via. the nfssvc system call. The children normally remain kernel
68 resident, providing a process context for the NFS RPC servers.
69 Meanwhile, the master nfsd waits to accept new connections from clients
70 using connection oriented transport protocols and passes the new sockets down
71 into the kernel.
72 The client side mount_nfs along with portmap and
73 mountd are the only parts of the NFS subsystem that make any
74 use of the Sun RPC library.
75 .sh 1 "Mount Problems"
76 .pp
77 There are several problems that can be encountered at the time of an NFS
78 mount, ranging from an unresponsive NFS server (crashed, network partitioned
79 from client, etc.) to various interoperability problems between different
80 NFS implementations.
81 .pp
82 On the server side,
83 if the 4.4BSD NFS server will be handling any PC clients, mountd will
84 require the \fB-n\fR option to enable non-root mount request servicing.
85 Running of a pcnfsd\** daemon will also be necessary.
86 .(f
87 \** Pcnfsd is available in source form from Sun Microsystems and many
88 anonymous ftp sites.
89 .)f
90 The server side requires that the daemons
91 mountd and nfsd be running and that
92 they be registered with portmap properly.
93 If problems are encountered,
94 the safest fix is to kill all the daemons and then restart them in
95 the order portmap, mountd and nfsd.
96 Other server side problems are normally caused by problems with the format
97 of the exports file, which is covered under
98 Security and in the exports man page.
99 .pp
100 On the client side, there are several mount options useful for dealing
101 with server problems.
102 In cases where a file system is not critical for system operation, the
103 \fB-b\fR
104 mount option may be specified so that mount_nfs will go into the
105 background for a mount attempt on an unresponsive server.
106 This is useful for mounts specified in
107 \fIfstab(5)\fR,
108 so that the system will not get hung while booting doing
109 \fBmount -a\fR
110 because a file server is not responsive.
111 On the other hand, if the file system is critical to system operation, this
112 option should not be used so that the client will wait for the server to
113 come up before completing bootstrapping.
114 There are also three mount options to help deal with interoperability issues
115 with various non-BSD NFS servers. The
116 \fB-P\fR
117 option specifies that the NFS
118 client use a reserved IP port number to satisfy some servers' security
119 requirements.\**
120 .(f
121 \**Any security benefit of this is highly questionable and as
122 such the BSD server does not require a client to use a reserved port number.
123 .)f
124 The
125 \fB-c\fR
126 option stops the NFS client from doing a \fIconnect\fR on the UDP
127 socket, so that the mount works with servers that send NFS replies from
128 port numbers other than the standard 2049.\**
129 .(f
130 \**The Encore Multimax is known
131 to require this.
132 .)f
133 Finally, the
134 \fB-g=\fInum\fR
135 option sets the maximum size of the group list in the credentials passed
136 to an NFS server in every RPC request. Although RFC1057 specifies a maximum
137 size of 16 for the group list, some servers can't handle that many.
138 If a user, particularly root doing a mount,
139 keeps getting access denied from a file server, try temporarily
140 reducing the number of groups that user is in to less than 5
141 by editing /etc/group. If the user can then access the file system, slowly
142 increase the number of groups for that user until the limit is found and
143 then peg the limit there with the
144 \fB-g=\fInum\fR
145 option.
146 This implies that the server will only see the first \fInum\fR
147 groups that the user is in, which can cause some accessibility problems.
148 .pp
149 For sites that have many NFS servers, amd [Pendry93]
150 is a useful administration tool.
151 It also reduces the number of actual NFS mount points, alleviating problems
152 with commands such as df(1) that hang when any of the NFS servers is
153 unreachable.
154 .sh 1 "Dealing with Hung Servers"
155 .pp
156 There are several mount options available to help a client deal with
157 being hung waiting for response from a crashed or unreachable\** server.
158 .(f
159 \**Due to a network partitioning or similar.
160 .)f
161 By default, a hard mount will continue to try to contact the server
162 ``forever'' to complete the system call. This type of mount is appropriate
163 when processes on the client that access files in the file system do not
164 tolerate file I/O systems calls that return -1 with \fIerrno == EINTR\fR
165 and/or access to the file system is critical for normal system operation.
166 .lp
167 There are two other alternatives:
168 .ip 1)
169 A soft mount (\fB-s\fR option) retries an RPC \fIn\fR
170 times and then the corresponding
171 system call returns -1 with errno set to EINTR.
172 For TCP transport, the actual RPC request is not retransmitted, but the
173 timeout intervals waiting for a reply from the server are done
174 in the same manner as UDP for this purpose.
175 The problem with this type of mount is that most applications do not
176 expect an EINTR error return from file I/O system calls (since it never
177 occurs for a local file system) and get confused by the error return
178 from the I/O system call.
179 The option
180 \fB-x=\fInum\fR
181 is used to set the RPC retry limit and if set too low, the error returns
182 will start occurring whenever the NFS server is slow due to heavy load.
183 Alternately, a large retry limit can result in a process hung for a long
184 time, due to a crashed server or network partitioning.
185 .ip 2)
186 An interruptible mount (\fB-i\fR option) checks to see if a termination signal
187 is pending for the process when waiting for server response and if it is,
188 the I/O system call posts an EINTR. Normally this results in the process
189 being terminated by the signal when returning from the system call.
190 This feature allows you to ``^C'' out of processes that are hung
191 due to unresponsive servers.
192 The problem with this approach is that signals that are caught by
193 a process are not recognized as termination signals
194 and the process will remain hung.\**
195 .(f
196 \**Unfortunately, there are also some resource allocation situations in the
197 BSD kernel where the termination signal will be ignored and the process
198 will not terminate.
199 .)f
200 .sh 1 "RPC Transport Issues"
201 .pp
202 The NFS Version 2 protocol runs over UDP/IP transport by
203 sending each Sun Remote Procedure Call (RFC1057)
204 request/reply message in a single UDP
205 datagram. Since UDP does not guarantee datagram delivery, the
206 Remote Procedure Call (RPC) layer
207 times out and retransmits an RPC request if
208 no RPC reply has been received. Since this round trip timeout (RTO) value
209 is for the entire RPC operation, including RPC message transmission to the
210 server, queuing at the server for an nfsd, performing the RPC and
211 sending the RPC reply message back to the client, it can be highly variable
212 for even a moderately loaded NFS server.
213 As a result, the RTO interval must be a conservation (large) estimate, in
214 order to avoid extraneous RPC request retransmits.\**
215 .(f
216 \**At best, an extraneous RPC request retransmit increases
217 the load on the server and at worst can result in damaged files
218 on the server when non-idempotent RPCs are redone [Juszczak89].
219 .)f
220 Also, with an 8Kbyte read/write data size
221 (the default), the read/write reply/request will be an 8+Kbyte UDP datagram
222 that must normally be fragmented at the IP layer for transmission.\**
223 .(f
224 \**6 IP fragments for an Ethernet,
225 which has a maximum transmission unit of 1500bytes.
226 .)f
227 For IP fragments to be successfully reassembled into
228 the IP datagram at the receive end, all
229 fragments must be received within a fairly short ``time to live''.
230 If one fragment is lost/damaged in transit,
231 the entire RPC must be retransmitted and redone.
232 This problem can be exaggerated by a network interface on the receiver that
233 cannot handle the reception of back to back network packets. [Kent87a]
234 .pp
235 There are several tuning mount
236 options on the client side that can prove useful when trying to
237 alleviate performance problems related to UDP RPC transport.
238 The options
239 \fB-r=\fInum\fR
240 and
241 \fB-w=\fInum\fR
242 specify the maximum read or write data size respectively.
243 The size \fInum\fR
244 should be a power of 2 (4K, 2K, 1K) and adjusted downward from the
245 maximum of 8Kbytes
246 whenever IP fragmentation is causing problems. The best indicator of
247 IP fragmentation problems is a significant number of
248 \fIfragments dropped after timeout\fR
249 reported by the \fIip:\fR section of a \fBnetstat -s\fR
250 command on either the client or server.
251 Of course, if the fragments are being dropped at the server, it can be
252 fun figuring out which client(s) are involved.
253 The most likely candidates are clients that are not
254 on the same local area network as the
255 server or have network interfaces that do not receive several
256 back to back network packets properly.
257 .pp
258 By default, the 4.4BSD NFS client dynamically estimates the retransmit
259 timeout interval for the RPC and this appears to work reasonably well for
260 many environments. However, the
261 \fB-d\fR
262 flag can be specified to turn off
263 the dynamic estimation of retransmit timeout, so that the client will
264 use a static initial timeout interval.\**
265 .(f
266 \**After the first retransmit timeout, the initial interval is backed off
267 exponentially.
268 .)f
269 The
270 \fB-t=\fInum\fR
271 option can be used with
272 \fB-d\fR
273 to set the initial timeout interval to other than the default of 2 seconds.
274 The best indicator that dynamic estimation should be turned off would
275 be a significant number\** in the \fIX Replies\fR field and a
276 .(f
277 \**Even 0.1% of the total RPCs is probably significant.
278 .)f
279 large number in the \fIRetries\fR field
280 in the \fIRpc Info:\fR section as reported
281 by the \fBnfsstat\fR command.
282 On the server, there would be significant numbers of \fIInprog\fR recent
283 request cache hits in the \fIServer Cache Stats:\fR section as reported
284 by the \fBnfsstat\fR command, when run on the server.
285 .pp
286 The tradeoff is that a smaller timeout interval results in a better
287 average RPC response time, but increases the risk of extraneous retries
288 that in turn increase server load and the possibility of damaged files
289 on the server. It is probably best to err on the safe side and use a large
290 (>= 2sec) fixed timeout if the dynamic retransmit timeout estimation
291 seems to be causing problems.
292 .pp
293 An alternative to all this fiddling is to run NFS over TCP transport instead
294 of UDP.
295 Since the 4.4BSD TCP implementation provides reliable
296 delivery with congestion control, it avoids all of the above problems.
297 It also permits the use of read and write data sizes greater than the 8Kbyte
298 limit for UDP transport.\**
299 .(f
300 \**Read/write data sizes greater than 8Kbytes will not normally improve
301 performance unless the kernel constant MAXBSIZE is increased and the
302 file system on the server has a block size greater than 8Kbytes.
303 .)f
304 NFS over TCP usually delivers comparable to significantly better performance
305 than NFS over UDP
306 unless the client or server processor runs at less than 5-10MIPS. For a
307 slow processor, the extra CPU overhead of using TCP transport will become
308 significant and TCP transport may only be useful when the client
309 to server interconnect traverses congested gateways.
310 The main problem with using TCP transport is that it is only supported
311 between BSD clients and servers.\**
312 .(f
313 \**There are rumors of commercial NFS over TCP implementations on the horizon
314 and these may well be worth exploring.
315 .)f
316 .sh 1 "Other Tuning Tricks"
317 .pp
318 Another mount option that may improve performance over
319 certain network interconnects is \fB-a=\fInum\fR
320 which sets the number of blocks that the system will
321 attempt to read-ahead during sequential reading of a file. The default value
322 of 1 seems to be appropriate for most situations, but a larger value might
323 achieve better performance for some environments, such as a mount to a server
324 across a ``high bandwidth * round trip delay'' interconnect.
325 .pp
326 For the adventurous, playing with the size of the buffer cache
327 can also improve performance for some environments that use NFS heavily.
328 Under some workloads, a buffer cache of 4-6Mbytes can result in significant
329 performance improvements over 1-2Mbytes, both in client side system call
330 response time and reduced server RPC load.
331 The buffer cache size defaults to 10% of physical memory,
332 but this can be overridden by specifying the BUFPAGES option
333 in the machine's config file.\**
334 .(f
335 BUFPAGES is the number of physical machine pages allocated to the buffer cache.
336 ie. BUFPAGES * NBPG = buffer cache size in bytes
337 .)f
338 When increasing the size of BUFPAGES, it is also advisable to increase the
339 number of buffers NBUF by a corresponding amount.
340 Note that there is a tradeoff of memory allocated to the buffer cache versus
341 available for paging, which implies that making the buffer cache larger
342 will increase paging rate, with possibly disastrous results.
343 .sh 1 "Security Issues"
344 .pp
345 When a machine is running an NFS server it opens up a great big security hole.
346 For ordinary NFS, the server receives client credentials
347 in the RPC request as a user id
348 and a list of group ids and trusts them to be authentic!
349 The only tool available to restrict remote access to
350 file systems with is the exports(5) file,
351 so file systems should be exported with great care.
352 The exports file is read by mountd upon startup and after a hangup signal
353 is posted for it and then as much of the access specifications as possible are
354 pushed down into the kernel for use by the nfsd(s).
355 The trick here is that the kernel information is stored on a per
356 local file system mount point and client host address basis and cannot refer to
357 individual directories within the local server file system.
358 It is best to think of the exports file as referring to the various local
359 file systems and not just directory paths as mount points.
360 A local file system may be exported to a specific host, all hosts that
361 match a subnet mask or all other hosts (the world). The latter is very
362 dangerous and should only be used for public information. It is also
363 strongly recommended that file systems exported to ``the world'' be exported
364 read-only.
365 For each host or group of hosts, the file system can be exported read-only or
366 read/write.
367 You can also define one of three client user id to server credential
368 mappings to help control access.
369 Root (user id == 0) can be mapped to some default credentials while all other
370 user ids are accepted as given.
371 If the default credentials for user id equal zero
372 are root, then there is essentially no remapping.
373 Most NFS file systems are exported this way, most commonly mapping
374 user id == 0 to the credentials for the user nobody.
375 Since the client user id and group id list is used unchanged on the server
376 (except for root), this also implies that
377 the user id and group id space must be common between the client and server.
378 (ie. user id N on the client must refer to the same user on the server)
379 All user ids can be mapped to a default set of credentials, typically that of
380 the user nobody. This essentially gives world access to all
381 users on the corresponding hosts.
382 .pp
383 As well as the standard NFS Version 2 protocol (RFC1094) implementation, BSD
384 systems can use a variant of the protocol called Not Quite NFS (NQNFS) that
385 supports a variety of protocol extensions.
386 This protocol uses 64bit file offsets
387 and sizes, an \fIaccess rpc\fR, an \fIappend\fR option on the write rpc
388 and extended file attributes to support 4.4BSD file system functionality
389 more fully.
390 It also makes use of a variant of short term
391 \fIleases\fR [Gray89] with delayed write client caching,
392 in an effort to provide full cache consistency and better performance.
393 This protocol is available between 4.4BSD systems only and is used when
394 the \fB-q\fR mount option is specified.
395 It can be used with any of the aforementioned options for NFS, such as TCP
396 transport (\fB-T\fR).
397 Although this protocol is experimental, it is recommended over NFS for
398 mounts between 4.4BSD systems.\**
399 .(f
400 \**I would appreciate email from anyone who can provide
401 NFS vs. NQNFS performance measurements,
402 particularly fast clients, many clients or over an internetwork
403 connection with a large ``bandwidth * RTT'' product.
404 .)f
405 .sh 1 "Monitoring NFS Activity"
406 .pp
407 The basic command for monitoring NFS activity on clients and servers is
408 nfsstat. It reports cumulative statistics of various NFS activities,
409 such as counts of the various different RPCs and cache hit rates on the client
410 and server. Of particular interest on the server are the fields in the
411 \fIServer Cache Stats:\fR section, which gives numbers for RPC retries received
412 in the first three fields and total RPCs in the fourth. The first three fields
413 should remain a very small percentage of the total. If not, it
414 would indicate one or more clients doing retries too aggressively and the fix
415 would be to isolate these clients,
416 disable the dynamic RTO estimation on them and
417 make their initial timeout interval a conservative (ie. large) value.
418 .pp
419 On the client side, the fields in the \fIRpc Info:\fR section are of particular
420 interest, as they give an overall picture of NFS activity.
421 The \fITimedOut\fR field is the number of I/O system calls that returned -1
422 for ``soft'' mounts and can be reduced
423 by increasing the retry limit or changing
424 the mount type to ``intr'' or ``hard''.
425 The \fIInvalid\fR field is a count of trashed RPC replies that are received
426 and should remain zero.\**
427 .(f
428 \**Some NFS implementations run with UDP checksums disabled, so garbage RPC
429 messages can be received.
430 .)f
431 The \fIX Replies\fR field counts the number of repeated RPC replies received
432 from the server and is a clear indication of a too aggressive RTO estimate.
433 Unfortunately, a good NFS server implementation will use a ``recent request
434 cache'' [Juszczak89] that will suppress the extraneous replies.
435 A large value for \fIRetries\fR indicates a problem, but
436 it could be any of:
437 .ip \(bu
438 a too aggressive RTO estimate
439 .ip \(bu
440 an overloaded NFS server
441 .ip \(bu
442 IP fragments being dropped (gateway, client or server)
443 .lp
444 and requires further investigation.
445 The \fIRequests\fR field is the total count of RPCs done on all servers.
446 .pp
447 The \fBnetstat -s\fR comes in useful during investigation of RPC transport
448 problems.
449 The field \fIfragments dropped after timeout\fR in
450 the \fIip:\fR section indicates IP fragments are
451 being lost and a significant number of these occurring indicates that the
452 use of TCP transport or a smaller read/write data size is in order.
453 A significant number of \fIbad checksums\fR reported in the \fIudp:\fR
454 section would suggest network problems of a more generic sort.
455 (cabling, transceiver or network hardware interface problems or similar)
456 .pp
457 There is a RPC activity logging facility for both the client and
458 server side in the kernel.
459 When logging is enabled by setting the kernel variable nfsrtton to
460 one, the logs in the kernel structures nfsrtt (for the client side)
461 and nfsdrt (for the server side) are updated upon the completion
462 of each RPC in a circular manner.
463 The pos element of the structure is the index of the next element
464 of the log array to be updated.
465 In other words, elements of the log array from \fIlog\fR[pos] to
466 \fIlog\fR[pos - 1] are in chronological order.
467 The include file <sys/nfsrtt.h> should be consulted for details on the
468 fields in the two log structures.\**
469 .(f
470 \**Unfortunately, a monitoring tool that uses these logs is still in the
471 planning (dreaming) stage.
472 .)f
473 .sh 1 "Diskless Client Support"
474 .pp
475 The NFS client does include kernel support for diskless/dataless operation
476 where the root file system and optionally the swap area is remote NFS mounted.
477 A diskless/dataless client is configured using a version of the
478 ``swapkernel.c'' file as provided in the directory \fIcontrib/diskless.nfs\fR.
479 If the swap device == NODEV, it specifies an NFS mounted swap area and should
480 be configured the same size as set up by diskless_setup when run on the server.
481 This file must be put in the \fIsys/compile/<machine_name>\fR kernel build
482 directory after the config command has been run, since config does
483 not know about specifying NFS root and swap areas.
484 The kernel variable mountroot must be set to nfs_mountroot instead of
485 ffs_mountroot and the kernel structure nfs_diskless must be filled in
486 properly.
487 There are some primitive system administration tools in the \fIcontrib/diskless.nfs\fR directory to assist in filling in
488 the nfs_diskless structure and in setting up an NFS server for
489 diskless/dataless clients.
490 The tools were designed to provide a bare bones capability, to allow maximum
491 flexibility when setting up different servers.
492 .lp
493 The tools are as follows:
494 .ip \(bu
495 diskless_offset.c - This little program reads a ``kernel'' object file and
496 writes the file byte offset of the nfs_diskless structure in it to
497 standard out. It was kept separate because it sometimes has to
498 be compiled/linked in funny ways depending on the client architecture.
499 (See the comment at the beginning of it.)
500 .ip \(bu
501 diskless_setup.c - This program is run on the server and sets up files for a
502 given client. It mostly just fills in an nfs_diskless structure and
503 writes it out to either the "kernel" file or a separate file called
504 /var/diskless/setup.<official-hostname>
505 .ip \(bu
506 diskless_boot.c - There are two functions in here that may be used
507 by a bootstrap server such as tftpd to permit sharing of the ``kernel''
508 object file for similar clients. This saves disk space on the bootstrap
509 server and simplify organization, but are not critical for correct operation.
510 They read the ``kernel''
511 file, but optionally fill in the nfs_diskless structure from a
512 separate "setup.<official-hostname>" file so that there is only
513 one copy of "kernel" for all similar (same arch etc.) clients.
514 These functions use a text file called
515 /var/diskless/boot.<official-hostname> to control the netboot.
516 .lp
517 The basic setup steps are:
518 .ip \(bu
519 make a "kernel" for the client(s) with mountroot() == nfs_mountroot()
520 and swdevt[0].sw_dev == NODEV if it is to do nfs swapping as well
521 (See the same swapkernel.c file)
522 .ip \(bu
523 run diskless_offset on the kernel file to find out the byte offset
524 of the nfs_diskless structure
525 .ip \(bu
526 Run diskless_setup on the server to set up the server and fill in the
527 nfs_diskless structure for that client.
528 The nfs_diskless structure can either be written into the
529 kernel file (the -x option) or
530 saved in /var/diskless/setup.<official-hostname>.
531 .ip \(bu
532 Set up the bootstrap server. If the nfs_diskless structure was written into
533 the ``kernel'' file, any vanilla bootstrap protocol such as bootp/tftp can
534 be used. If the bootstrap server has been modified to use the functions in
535 diskless_boot.c, then a
536 file called /var/diskless/boot.<official-hostname>
537 must be created.
538 It is simply a two line text file, where the first line is the pathname
539 of the correct ``kernel'' file and the second line has the pathname of
540 the nfs_diskless structure file and its byte offset in it.
541 For example:
542 .br
543         /var/diskless/kernel.pmax
544 .br
545         /var/diskless/setup.rickers.cis.uoguelph.ca 642308
546 .br
547 .ip \(bu
548 Create a /var subtree for each client in an appropriate place on the server,
549 such as /var/diskless/var/<client-hostname>/...
550 By using the <client-hostname> to differentiate /var for each host,
551 /etc/rc can be modified to mount the correct /var from the server.