| United States-English |
|
|
|
![]() |
System Administration Commands: Section 1M (Ref Pages Vol 2) > eexportfs(1M) |
|
NAMEexportfs — export and unexport directories to NFS clients SYNOPSIS/usr/sbin/exportfs [-auv] /usr/sbin/exportfs [-uv] [dir ...] /usr/sbin/exportfs -i [-o options] [-v] [dir ...] DESCRIPTIONThe exportfs command makes a local directory or file available to NFS clients for mounting over the network. Directories and files cannot be NFS-mounted unless they are first exported by exportfs. exportfs is normally invoked at boot time by the /sbin/init.d/nfs.server script, and uses information contained in the /etc/exports file to export the file or file system named by each dir, which must be specified as a full path name. If no options or arguments are specified in the command line, exportfs displays a list of the currently exported directories and files on standard output. A superuser can run exportfs at any time to alter the list or characteristics of exported directories and files. Optionsexportfs recognizes the following options:
DIAGNOSTICSIf an NFS-mounted directory is unexported by exportfs, any access by the client to the directory causes an NFS stale file handle error. However, if exportfs is used to remove a client from the access list of an exported directory, an NFS stale file handle error does not result from any access by the client to the directory. EXAMPLESThe following invocation of exportfs lists currently exported directories and files: exportfs Export entries in /etc/exports exportfs -a Unexport all exported files and directories: exportfs -ua Unexport all exported files and directories and print each directory or file name as it is unexported: exportfs -uav Export /usr to the world, ignoring options in /etc/exports: exportfs -i /usr Export /usr/bin and /var/adm read-only to the world: exportfs -i -o ro /usr/bin /var/adm Export /usr/bin read-write only to systems polk and vanness: exportfs -i -o rw=polk:vanness /usr/bin Export root access on /var/adm only to the system named pine, and mount access to both pine and geary: exportfs -i -o root=pine,access=pine:geary /var/adm WARNINGSYou cannot export a directory that resides within the same file system and is either a parent or sub-directory of a directory that is currently exported. For example, /usr and /usr/local cannot both be exported if they reside in the same disk partition. If you unexport a directory, remove a client from the access list, then export again, the client still has access to the directory until the client unmounts the directory. Removing a client from the root or rw list takes effect immediately. /etc/xtab is a system file that contains a list of currently exported directories and files. This file is maintained by exportfs. To ensure that this file is always synchronous with current system data structures, do not attempt to edit /etc/xtab by hand. |
||||||||||||||||||||||||||||
|
|||||||||||||||