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

e
exportfs(1M) exportfs(1M)
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 NFS Protocol Version 2 mounts will be asynchronous. This option is ignored for NFS
PV3. 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. The
ro and rw options cannot be used on the same exportfs command line.
rw=hostname[:hostname]...
Export the directory read-mostly. Read-mostly means read-only to most machines, but
read-write to those specified. If neither ro nor rw is specified, the directory is exported
read-write to all. The ro and rw options cannot be used on the same exportfs com-
mand line. Up to 256 hostnames can be specified. With a server configured for DNS
naming in the nsswitch "hosts" entry, any hostname must be represented as a fully
qualified DNS name. Currently HP-UX will attempt to match a non-fully qualified host-
name; this HP-only feature will be obsoleted in a later release of HP-UX.
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 2 is used. Setting the value of anon to 1 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. hostname s on this
Section 1M168 Hewlett-Packard Company 1 HP-UX 11i Version 2: September 2004