 |
Index for Section 7 |
|
 |
Alphabetical listing for N |
|
 |
Bottom of page |
|
nfs_manual_setup(7)
NAME
nfs_manual_setup - Describes how to manually set up the Network File System
(NFS)
DESCRIPTION
This reference page describes how to manually set up the Network File
System (NFS). Setting up NFS includes configuring the following:
· Servers
· Clients, using /etc/fstab
· Clients, using automount
Setting Up Servers
Use the following procedure to set up an NFS server:
1. Create the /etc/exports file and add the appropriate entries to it.
The entries that you add are site-specific but their syntax should be
as follows:
pathname [-root=0] [-root=hostlist [-anon=uid] [-rw=hostlist [-ro]
identifier_1 ... identifier_n
You can use the number sign (#) as a delimiter to add comments. For
more information, see the exports(4) reference page and the Network
Administration manual.
2. Add the following information to the /etc/rc.config.common file by
using the /usr/sbin/rcmgr command, which has the following syntax:
/usr/sbin/rcmgr set variable value
a.
Indicate that this system is a server, by entering the following
command:
# /usr/sbin/rcmgr set NFSSERVING 1
(A zero (0) in place of the 1 indicates that this system is not a
server.)
b.
Specify the number of nfsd server threads you want to run on the
system. Separate symbols are used for UDP threads and TCP threads.
For example, to run 8 TCP threads and 4 UDP threads, enter the
following commands:
# /usr/sbin/rcmgr set NUM_TCPD 8
# /usr/sbin/rcmgr set NUM_UDPD 4
You can run up to 128 server threads for both transports combined.
Although 8 server threads for each transport is usually adequate, if
NFS client performance is slow, a possible solution is to increase
the number of server threads.
c.
Set the NONROOTMOUNTS parameter. Setting this parameter to 0
specifies that only root users on the client systems can mount file
systems. Setting it to 1 specifies that anyone on the client
systems can mount file systems.
The following command specifies that users must be running as root
to mount file systems from the server:
# /usr/sbin/rcmgr set NONROOTMOUNTS 0
d.
Specify whether you want to run the PC-NFS daemon. PC-NFS software
provides personal computers on your network with the same
capabilities as NFS. PC-NFS is based on the client/server model. The
client software runs on the personal computer. The server software
runs on the Tru64 UNIX server. Instructions for setting up the PC-
NFS client software is provided with the PC-NFS software
documentation.
To specify that you want to run the PC-NFS daemon, enter the
following command:
# /usr/sbin/rcmgr set PCNFSD 1
You must then export the directories you want to mount on the PC
client to the client. Also, you must export the /usr/spool/pcnfs
directory to the PC client for the client to be able to utilize
network printing. For information on exporting directories, see the
Network Administration manual.
e.
Specify whether you want to run the NFS locking service to allow
clients to set advisory record locks on files exported to them.
To specify that you want to run the NFS locking service, enter the
following command:
# /usr/sbin/rcmgr set NFSLOCKING 1
Note, by default, 7 nfsiod daemons are run on all NFS systems. To
turn this client service off, enter the following command:
# /usr/sbin/rcmgr set NUM_NFSIOD 0
The /usr/sbin/rcmgr command appends the information to the end of the
/etc/rc.config.common file. For more information on the rcmgr utility, see
the rcmgr(8) reference page.
3. Make sure that one of the following is true for client systems to
which you are exporting file systems:
·
They have an entry in the /etc/hosts file of the server.
·
Their host information is in the hosts database, if the network is
serving host information with NIS or DNS.
·
The server specifies the client's Internet address instead of its
host name in its /etc/exports file and the mountd daemon is not
configured to run with Internet address checking turned on.
4. Start the NFS daemons by entering the following command:
# /sbin/init.d/nfs start
# /sbin/init.d/nfsmount start
To stop the NFS daemons, enter the following command:
# /sbin/init.d/nfs stop
Using the /etc/fstab File to Set Up Clients
Use the following procedure to set up an NFS client, using the /etc/fstab
file:
1. Edit the /etc/fstab file.
Unless you are using automount, edit the /etc/fstab file to contain an
entry for each file system that you want to mount on your system if
you want it mounted automatically. Specify the file system you are
mounting, the server you are mounting it from, the permissions with
which it is mounted, and the local mount point for it. The syntax for
entries in the /etc/fstab file is as follows:
fs_spec@server fs_file fs_vfstype fs_mntopts fs_freq fs_passno
For more information, see fstab(4).
The following is a sample /etc/fstab file:
/usr/dist@host1 /usr/dist nfs ro,bg 0 0
share/man@host2 /usr/share/man nfs ro,bg 0
/usr/staff/h0@host3 /nfs/host3/usr/staff/h rw,bg 0
/usr/staff/h1@host3 /nfs/host3/usr/staff/h1 nfs rw,bg 0 0
2. Create a local mount point for each remote file system that you
specified in the /etc/fstab file. The local mount points must
correspond exactly to the fs_file field in the /etc/fstab file. In
the preceding example, the client system uses the /etc/fstab file to
mount the remote file system /usr/share/man from host2. The
/etc/fstab entry specifies that the local mount point is also called
/usr/share/man on the client system. While this is the easiest way to
name the local mount point, it can have any name. To create the
/usr/share/man mount point, enter the following command:
# mkdir /usr/share/man
3. Make sure that one of the following is true for server systems from
which you are importing file systems:
·
They have an entry in the /etc/hosts file of the client.
·
Their host information is in the hosts database, if the network is
serving host information with NIS or DNS.
4. Edit the /etc/rc.config.common file by using the /usr/sbin/rcmgr
utility. Add the following information to the /etc/rc.config.common
file:
a.
Whether this system is an NFS server (a system can be both a client
and a server).
b.
The number of nfsiod daemons that you want the system to run.
To specify that you want this system to run 7 nfsiod daemons, enter
the following command:
# /usr/sbin/rcmgr set NUM_NFSIOD 7
You can run up to 64 nfsiod daemons. Although 7 nfsiod daemons is
usually adequate, if NFS read and write performance is slow, you can
increase the number of nfsiod daemons.
c.
Optionally, you can turn on the NFS locking service, if you want to
be able to set advisory record locks on NFS-mounted files. To do
this, enter the following command:
# /usr/sbin/rcmgr set NFSLOCKING 1
Note that the NFS locking service must also be running on the
server.
The /usr/sbin/rcmgr command appends the information to the end of
the /etc/rc.config.common file. For more information on the rcmgr
utility, see rcmgr(8).
5. Start the NFS daemons by entering the following command:
# /sbin/init.d/nfs start
# /sbin/init.d/nfsmount start
Note
If you are using automount on this system, you should
complete the steps in the Network Administration manual
before starting the NFS daemons.
If you need to stop the NFS daemons, enter the following command:
# /sbin/init.d/nfs stop
Administering Automount Maps
You can customize automount maps to suit your environment and either
administer them locally, distribute them using NIS, or both.
For information on creating and administering automount maps, see the
Network Administration manual.
RELATED INFORMATION
Commands: automount(8), mountd(8), nfsconfig(8), nfsd(8), nfsiod(8),
rpc.lockd(8), rpc.statd(8)
Files: advfs(4), cdfs(4), fstab(4)
Network Information: nfs_intro(4)
Network Administration, Technical Overview
 |
Index for Section 7 |
|
 |
Alphabetical listing for N |
|
 |
Top of page |
|