Man page of nfssetup
Section: Maintenance Commands (8)
Return to Main Contents
nfssetup - Sets up the network file system (NFS)
The nfssetup facility allows you to interactively set up
your system as an NFS server, an NFS client, or both. It also
allows you to modify NFS on your system. Note that your
system's networking software
must be configured and running before you set up NFS.
Depending on the information you provide to nfssetup, it
appends entries to the /etc/exports file, /etc/fstab file,
To remove entries from the /etc/exports or /etc/fstab you
must edit them by hand. The nfssetup command only appends
entries to these files.
You can run nfssetup while the system is in multiuser mode.
Invoke the nfssetup script by typing the following:
The script prompts you for information about your system.
Indicate whether you want to enable NFS locking.
If you enable locking, the NFS lock manager rpc.lockd and the
status monitor rpc.statd are run. Running these daemons allows
users to use fcntl(2) and lockf(3)
to lock file regions on NFS files (in addition to local files).
Not running the daemons means that users can only use advisory locking
primitives on local files. By default, the script runs the daemons.
Indicate whether your system will export directories.
If you answered yes in step 3, nfssetup asks you whether your system will
allow nonroot mounts.
If you answered yes in step 3,
nfssetup prompts you for the number of
nfsd and proplistd daemons to run.
If access control lists (ACLs)
or other extended attributes (property list) are being used
on your NFS filesystems, you must run the
acl(4), proplist(4), and proplistd(8)
Indicate the number of block I/O nfsiod daemons to run.
Indicate whether you want to run the PC-NFS rpc.pcnfsd daemon.
If you run the PC-NFS daemon, you must export to the client the directories
you want to mount on the PC client. Also, you must export the
/usr/spool/pcnfs directory to the PC client to enable the client
to utilize network printing. For information on exporting directories, see
Indicate whether you want to run the automount daemon.
If you answer yes, go to the next step. If you answer no, go to step 10.
For more information, see
Network Administration .
Specify the argument list to pass to the automount daemon.
You can later change the automount daemon argument list by using
a rcmgr command to set the AUTOMOUNT_ARGS
variable. For more information, see automount(8) and rcmgr(8).
If you choose to export directories, nfssetup prompts you for the full
pathname of the directory to be exported and the names of the hosts or network
groups allowed to import the directory.
If you do not specify individual hosts or network groups, all hosts
on the network can import the file system. Press Return to indicate
that you are finished entering information.
If your system is importing directories, enter the host name of the
system from which you are importing the directory, its full pathname,
the local mount point, and whether it is a read-only mount. If the
local mount point does not exist, nfssetup creates it.
If you place NFS mount points to more than one server in a given directory,
the getwd routine sometimes blocks on an attempt to obtain the
pathname of the current working directory.
When computing the pathname string, the getwd routine moves up
the tree from the current working directory to the root and calls the
readdir routine at each level to obtain a pointer to the next
directory level. When getwd passes through a mount point, the
routine uses the stat system call to process all entries in the
directory until information for the mount point just traversed is returned.
If a directory entry is a mount point to a different
server and that server is hard mounted and down, the stat
system call keeps trying to access the directory until its server is able to
respond. As a result, the calling getwd routine blocks (waits
for return status) until the server is available and can respond to the
stat call. To avoid this problem with the
getwd routine, place mount points to different servers in
separate directory trees. Some directories (such as
/usr) in complex production environments might be too large for
you to adhere strictly to this recommendation. In such cases,
try to minimize the number of mount points
to different servers that occur in any given directory.
If access control lists (ACLs) or other extended attributes
(property list) are in use on the filesystem being
imported, you must edit the fstab entry for
that filesystem and include the proplist option.
See the fstab(4), proplist(4), and acl(4)
Enter c to confirm the information that you entered, if it
is correct. If it is incorrect, enter r and redo it.
The nfssetup script indicates what system files it is updating.
Indicate whether you want to start the NFS daemons immediately.
If you answer yes, nfssetup starts the daemons. If you answer
no, either reboot the system or enter the following command to start
the daemons manually after nfssetup exits and returns you to the
system prompt (#):
# /sbin/init.d/nfs start
# /sbin/init.d/nfsmount start
To mount the remote directories listed in your
/etc/fstab file without rebooting the system, enter the
# mount -a -t nfs
Commands: mountd(8), nfsd(8), nfsiod(8)
Files: fstab(4), proplist(4), acl(4)
- Running nfssetup
- RELATED INFORMATION
This document was created by
using the manual pages.
Time: 02:40:41 GMT, October 02, 2010