NFS Services Administrator's Guide

Configuring and Administering NFS
Configuring and Administering an NFS Server
Chapter 2 27
2. If your system is already running as an NFS server, issue the
following command to add the directory to your server’s internal list
of exported directories:
/usr/sbin/exportfs directory
You can issue the exportfs -i command to add the directory to your
server’s internal list of exported directories, without adding the directory
to the /etc/exports file. However, it will stop being exported when you
reboot your system or restart NFS, unless you also add it to the
/etc/exports file. (Issuing the exportfs command does not change the
contents of the /etc/exports file.) Type man 1M exportfs for more
information.
You cannot export a directory and its ancestor or descendant, if they are
on the same disk or logical volume. For example, if you are exporting the
root directory (/), you cannot also export /opt, unless / and /opt are on
different disks or logical volumes. Likewise, if you are exporting
/opt/frame, you cannot also export /opt unless /opt/frame and /opt
are on different disks or logical volumes. However, if a directory and its
ancestor or descendant are on different disks or logical volumes, and you
want to export both of them, you must export them using two separate
entries in /etc/exports. Use the bdf(1M) command to determine
whether your file systems are on different disks or logical volumes. Each
line in the bdf output is a separate disk or volume that requires its own
entry in /etc/exports if you want to export it.
The /etc/exports file should be owned by root and have mode 644
(-rw-r--r--).
The export options that restrict access to an exported directory are
applied in addition to the regular HP-UX permissions already in place on
that directory. For example, if only the owner of a file has permission to
write to it, nobody else can write to the file, even if it is exported to the
world with read/write permission.
Access permissions may also be specified on the NFS client when a
directory is mounted. If these permissions are different from the
permissions for the exported directory on the NFS server, the more
restrictive permissions are used.
It is not a good idea to export a directory if it contains a symbolic link
that points outside the exported directory. Once the directory is mounted
on an NFS client, the symbolic link will be resolved locally on the client,
so the destination of the symbolic link must exist on the client as well as