HP-UX Reference (11i v1 05/09) - 1M System Administration Commands A-M (vol 3)

e
exportfs(1M) exportfs(1M)
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
or
exportfs -i -o access= /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, when using DNS as the name ser-
vice:
exportfs -i -o rw=polk.myd.myc.com:vanness.myd.myc.com /usr/bin
Export /usr/bin read-write only to systems, polk and vanness, when using NIS or NIS+ as the
name services:
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 when using DNS as the name services:
exportfs -i -o \
root=pine.myd.myc.com,access=pine.myd.myc.com:geary.myd.myc.com \
/var/adm
Export access to /var/adm for all hosts in the myd.myc.com domain.
exportfs -i -o access=.myd.myc.com /var/adm
Export access to /var/adm for all hosts in the same NIS domain, but deny access to all hosts in the DNS
name space:
exportfs -i -o access=. /var/adm
Export access to /var/adm using a network submask that is a dotted address:
exportfs -i -o access=@192.144 /var/adm
or
exportfs -i -o access=@192.144.0.0 /var/adm
or using a name where mynetwork is defined in /etc/networks as follows:
mynetwork 192.144.0.0 mount_144 #allow mounts using this mask
exportfs -i -o access=@mynetwork /var/adm
Export access to /var/adm where the network prefixes are not byte aligned:
HP-UX 11i Version 1: September 2005 3 Hewlett-Packard Company Section 1M209