hpux 10.20 - exportfs (1)



 NAME
      exportfs - 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 ...]

 DESCRIPTION
      The 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.

    Options
      exportfs recognizes the following options:

           -a             Export all directories listed in /etc/exports.  If
                          -u is also specified, unexport all of the
                          currently exported directories.

           -i             Ignore the options in /etc/exports.  Normally,
                          exportfs consults /etc/exports for the options
                          associated with the exported directory.

           -u             Unexport the indicated directories.

           -v             Verbose.  Print each directory or file name as it
                          is exported or unexported.

           -o options     Specify a comma-separated list of optional
                          characteristics for the directory being exported.
                          The list of options can include any of the
                          following:

                          async          All mounts will be asynchronous.
                                         Refer to exports(4) for warnings
                                         when using this option.

                          ro             Export the directory read-only.  If
                                         not specified, the directory is
                                         exported read-write.

                          rw=hostname[:hostname]...
                                         Export the directory "read-mostly".
                                         Read-mostly means exported read-
                                         only to most machines, but read-
                                         write to those specified.  If not
                                         specified, the directory is
                                         exported read-write to all.  Up to
                                         256 hostnames can be specified.

                          anon=uid       If a request comes from an unknown
                                         user, use uid as the effective user
                                         ID.

                                         Root users (user ID 0) are always
                                         treated as user unknown by the NFS
                                         server unless they are included in
                                         the root option below.

                                         If the client is a UNIX system,
                                         only root users are considered
                                         unknown.  All other users are
                                         recognized even if they are not in
                                         /etc/passwd.

                                         The default value for uid is the
                                         user ID of user nobody.  If user
                                         nobody does not exist, the value
                                         65534 is used.  Setting the value
                                         of anon to 65535 disables anonymous
                                         access.

                          root=hostname[:hostname]...
                                         Give root access only to the root
                                         users from a specified hostname.
                                         The default is for no hosts to be
                                         granted root access.  Up to 256
                                         hostnames can be specified.

                          access=client[:client]...
                                         Give mount access to each client
                                         listed.  A client can either be a
                                         host name, or a netgroup (see
                                         netgroup(4)).  exportfs checks for
                                         each client in the list first in
                                         file /etc/hosts, then in
                                         /etc/netgroup.  The default value
                                         allows any machine to mount the

                                         given directory.

 DIAGNOSTICS
      If 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.

 EXAMPLES
      The 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

 WARNINGS
      You 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.

 FILES
      /etc/exports
           Static export information

      /etc/netgroup
           List of network groups

      /etc/xtab
           Current state of exported directories

 SEE ALSO
      showmount(1M), exports(4), netgroup(4).