Information Technology Reference
In-Depth Information
The following entry from
/etc/dfs/dfstab
is used to share the
/export/home
directory:
share -F nfs -d “home directories” /export/home
You might be wondering why some of the directories, files, and even commands
associated with NFS use the phrase
dfs
or
df
. This comes from the System V (5) ver-
sion of the Unix operating system. Originally, Distributed File Systems (DFS) had two
variations: NFS and the Remote File System (RFS). Directories, files, and commands
that used the
dfs
phrase were used to manage and configure both types of file sys-
tems. Since then, RFS has disappeared, leaving behind the DFS legacy.
The shareall and unshareall Commands
The
shareall
command is used to share one or more resources. If the
-F nfs
command-line argument is not specified, the default file system type (NFS)
is assumed. If the name of a file (that contains one or more
share
commands)
is not specified as a command-line argument, the
/etc/dfs/dfstab
file is
used by default.
The
unshareall
command is used to unshare all currently shared resources.
If the
-F nfs
command-line argument is not specified, the default file system
type (NFS) is assumed.
The dfshares Command
The
dfshares(1M)
command is used to list shared resources on either the
local or a remote system. If the hostname (or IP address) of a remote system
is specified as a command-line argument, the resources shared on that sys-
tem are listed.
In addition, two other command-line arguments are supported. The
-F nfs
command-line argument is used to specify the type of file system. If not spec-
ified, the default file system type listed in the
/etc/dfs/fstypes
file (NFS) is
assumed. If the
-h
command-line argument is specified, the header describ-
ing the columns of the resource listing is not displayed.
In addition, information on locally shared resources can be obtained from the
/etc/dfs/sharetab
file. This file is updated by the
share
,
shareall
,
unshare
,
and
unshareall
commands to reflect the currently shared resources.
Mounting NFS Resources
NFS resources that have been shared by an NFS server can be mounted by
an NFS client using the
mount(1M)
command and unmounted using
the
umount(1M)
command. In addition, any NFS resources identified in the
/etc/vfstab
file are automatically mounted at system boot or when