Information Technology Reference
In-Depth Information
Table 15.4
Fields of an NFS Resource /etc/vfstab Entry
Field
Description
Device To Mount
Uses the
system
:
resource
format, where
system
is a hostname
or IP address and
resource
is the full pathname of the shared
NFS resource
Device To
fsck
Uses a hyphen (-) to indicate no entry, as NFS clients should not
check remote NFS resources with the
fsck
command
Mount Point
Specifies the subdirectory where the NFS resource should be
mounted
FS Type
Uses
nfs
to indicate an NFS resource
fsck
Pass
Uses a hyphen (-) to indicate no entry
Mount At Boot
Uses
yes
to indicate that the resource should be mounted at boot
or when the
mountall
command is executed; otherwise,
no
Mount Options
Specifies any desired NFS mount options; see Table 15.3 or the
manual page for the
mount
command
NFS supports
client-side failover
. That is, if an NFS resource becomes
unavailable, the client can switch to another NFS server that provides a
“replicated” copy of the resource. This failover capability can be enabled by
adding an entry in the
/etc/vfstab
for the resource. In the
Device to Mount
field, list the systems that provide the replicated resource separated by com-
mas. Also, the read-only option (
-o ro
) is specified in the
Mount Options
field.
For example, to provide client-side failover for the
/export/local
resource
that is available from either the “alpha” or the “beta” NFS servers and
mounted at
/usr/local
, add the following entry to the
/etc/vfstab
file:
alpha,beta:/export/local - /usr/local nfs - no -o ro
Note that read-only resources (
-o ro
mount option) can be configured for
client-side failover. Also be certain that the system names are valid and sep-
arated by commas.
The mountall and umountall Commands
The
mountall
command is used to mount one or more local file systems
and/or remote (NFS) shared file systems or directories. If the name of a file
(containing information on one or more resources) is not specified as a
command-line argument, the
/etc/vfstab
is used by default. The
mountall
command will mount only the resources in the file system table (or specified
file) that have the Mount At Boot column set to
yes
.
If a file system type is specified using the
-F
command-line option, only file
systems of that type are mounted. If the
-l
command-line argument is