![]() |
![]() |
| ||||||||||||||||||||||||||
Using the shareall CommandThis command shares all file systems that are listed in a local file:
unshareall CommandThis command makes all currently shared resources unavailable. The -F FSType option selects a list of file-system types that are defined in /etc/dfs/fstypes. This flag enables you to choose only certain types of file systems to be unshared. The default file system type is defined in /etc/dfs/fstypes. To choose specific file systems, use the unshare command. Using the unshareall CommandThis example should unshare all NFS-type file systems:
showmount CommandThis command displays one of the following:
The command syntax is as follows: showmount [ -ade ] [ hostname ]
If hostname is not specified the local host is queried. Using the showmount CommandThis command lists all clients and the local directories that the clients have mounted.
This command lists the directories that have been mounted.
This command lists file systems that have been shared.
setmnt CommandThis command creates an /etc/mnttab table. The mount and umount commands consult the table. Generally, you do not have to run this command manually, as this command runs automatically when a system is booted. Other Useful CommandsThese commands can be useful when troubleshooting NFS problems. nfsstat CommandYou can use this command to gather statistical information about NFS and RPC connections. The syntax of the command is as follows: nfsstat [ -cmnrsz ]
If no options are supplied on the command line, the -cnrs options are used. Gathering server-side statistics can be important for debugging problems when new software or new hardware is added to the computing environment. Running this command a minimum of once a week, and storing the numbers, provides a good history of previous performance. Using the nfsstat Command
The previous listing is an example of NFS server statistics. The first five lines relate to RPC and the remaining lines report NFS activities. In both sets of statistics, knowing the average number of badcalls or calls and the number of calls per week can help identify a problem. The badcalls value reports the number of bad messages from a client. This value can point out network hardware problems. Some of the connections generate write activity on the disks. A sudden increase in these statistics could indicate trouble and should be investigated. For NFS version 2 statistics, the connections to note are setattr, write, create, remove, rename, link, symlink, mkdir, and rmdir. For NFS version 3 statistics, the value to watch is commit. If the commit level is high in one NFS server as compared to another almost identical server, check that the NFS clients have enough memory. The number of commit operations on the server grows when clients do not have available resources. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||