mount_nfs(1M)mount_nfs(1M)NAME
mount_nfs: mount, umount - mount and unmount remote NFS resources
SYNOPSIS
specific_options] resource mount_point
{resource|mount_point}
DESCRIPTION
This manpage describes only the NFS-specific and commands. See
mount(1M) for the description of the non-NFS commands.
The utility attaches a named resource to the file system hierarchy at
the pathname location mount_point, which must already exist. If
mount_point has any contents prior to the operation, the contents
remain hidden until the resource is once again unmounted.
Only a superuser can mount file systems.
The utility unmounts mounted file systems.
Only a superuser can unmount file systems.
resource can be of the form:
The host can be the name of the NFS server host, or an IPv4 or
IPv6 address string. As IPv6 addresses already contain
colons, enclose host in a pair of square brackets when speci‐
fying an IPv6 address string. Otherwise, the first occur‐
rence of a colon can be interpreted as the separator between
the host name and path; for example:
See IPv6(7P).
pathname is the path name of the directory on the server
being mounted. The path name is interpreted according to the
server's path name parsing rules, and the path name is not
necessarily slash-separated. However, on most servers, the
path name is slash-separated.
Specify an NFS URL and follow the standard convention for
NFS URL as described in See the discussion of URL's and the
option under section below for a more detailed discussion.
A comma-separated list of:
or See the discussion on under for a more detailed discus‐
sion.
A comma-separated list of:
hosts followed by a suffix. See the discussion on under for
a more detailed discussion.
Options (mount)
See mount(1M) for the description of the options. Note that the option
only accepts either or forces the use of NFS Version 3 unless the
option is used.
The options are as follows:
Print debug messages to stderr.
This option is to be used by HP support engineers.
These
specific_options are NFS-specific only.
Set file system specific options according to a comma-separated
list with no intervening spaces. are defined as follows:
Hold cached attributes for no more than n seconds after directory
update. The default value is
Hold cached attributes for at least
n seconds after directory update. The default value is
Hold cached attributes for no more than
n seconds after file modification. The default value is
Hold cached attributes for at least
n seconds after file modification. The default value is
Set min and max times for regular files and directories to n
seconds. has no default; it sets and to the value speci‐
fied by n.
If the first attempt fails, retry in the background
or in the foreground The default is
If is specified, then for the duration of the mount, forced
direct is used. If the file system is mounted using data
is transferred directly between client and server, with no
buffering on the client. If the file system is mounted
using data is buffered on the client. is a performance
option that is of benefit only in large sequential data
transfers. The default behavior is
By default, the
GID associated with a newly created file obeys the System V
semantics; that is, the GID is set to the effective GID of
the calling process. This behavior can be overridden on a
per-directory basis by setting the set-GID bit of the par‐
ent directory; in this case, the GID of a newly created
file is set to the GID of the parent directory (see open(2)
and mkdir(2)). Files created on file systems that are
mounted with the option will obey BSD semantics independent
of whether the set-GID bit of the parent directory is set;
that is, the GID is unconditionally inherited from that of
the parent directory.
Continue to retry requests until the server responds
or give up and return an error The default value is
Allow or do not allow keyboard interrupts to kill a process that
is hung while waiting for a response on a hard-mounted file
system. The default is which allows clients to interrupt
applications that can be waiting for a remote mount.
By default, lock/unlock requests are sent to the server's
which enforces the requests. With this option set, the
lock/unlock requests are not sent to the remote and are
enforced locally. These local locks are enforced much
faster, but if other NFS clients access the same data on
the server, there is a risk of data corruption. Conse‐
quently, this option must be used when only one NFS client
accesses the data on the server.
Suppress data and attribute caching.
The data caching that is suppressed is the write-behind.
The local page cache is still maintained, but data copied
into it is immediately written to the server.
Do not perform the normal close-to-open consistency.
When a file is closed, all modified data associated with
the file is flushed to the server and not held on the
client. When a file is opened the client sends a request
to the server to validate the client's local caches. This
behavior ensures a file's consistency across multiple NFS
clients. When is in effect, the client does not perform
the flush on close and the request for validation, allowing
the possibility of differences among copies of the same
file as stored on multiple clients.
This option can be used in situations that guarantee that
accesses to a specified file system are made from only one
client and only that client. Under such a condition, the
effect of can be a slight performance gain.
The server IP port number.
The default is If the option is specified, and if the
resource includes one or more NFS URLs, and if any of the
include a number, then the number in the option and in the
URL must be the same.
Request
semantics for the file system. Requires a mount NFS Ver‐
sion 2 on the server. See mountd(1M).
netid is a value of network_id field from entry in the file. By
default, the transport protocol used for the NFS mount will
be first available connection-oriented transport supported
on both the client and the server. If no connection-ori‐
ented transport is found, then the first available connec‐
tionless transport is used. This default behavior can be
overridden with the option.
The option forces the use of the public file handle when con‐
necting to the NFS server. The resource specified might
not have an NFS URL. See the discussion on under for a
more detailed discussion.
Enable or prevent the command to check whether the user is over
quota on this file system. If the file system has quotas
enabled on the server, quotas are still checked for opera‐
tions on this file system. See quota(1).
Disable the
functionality, which is used by default on an NFS Version 3
mount point, and use the NFS Version 2 functionality
instead. The performance of applications that read huge
directories over NFS will vary between NFS Version 2 and
NFS Version 3 depending on the type of information that the
applications need. The command will be faster using NFS
Version 3 while the command will be faster using NFS Ver‐
sion 2 The option must be used on a case by case basis
depending upon the application. There is no effect on an
NFS Version 2 mount point.
Remount a read-only file system as read-write (using the
option).
Set the number of NFS retransmissions to
n. The default value is For connection-oriented trans‐
ports, this option has no effect because it is assumed that
the transport performs retransmissions on behalf of NFS.
The number of times to retry the
operation. The default for the command is
resource
is mounted read-write or read-only The default is
Set the read buffer size to
n bytes. The default value is when using Version 3 of the
NFS protocol. The default can be negotiated down if the
server prefers a smaller transfer size. When using Version
2, the default value is
Set the security
mode for NFS transactions. See nfssec(5) for the available
security mode options.
If is not specified, then the default action is to use over
NFS Version 2 mounts, or to negotiate a security mode over
NFS Version 3 mounts. NFS Version 3 mounts negotiate a
security mode when the server returns an array of security
modes. The client picks the first mode in the array that
is supported on the client.
Only one mode can be specified with the option.
This option is equivalent to the
option (Diffie-Hellman public key system).
Setuid execution is allowed
or disallowed The default is
Set the
NFS timeout to n tenths of a second. The default value is
tenths of a second for connectionless transports, and
tenths of a second for connection-oriented transports.
By default, the version of
NFS protocol used between the client and the server is the
highest one available on both systems. If the NFS server
does not support NFS Version 3 protocol, then the NFS mount
will use NFS Version 2 protocol.
To specify NFS Version 2, set NFS_version_number to be 2.
To specify NFS Version 3, set NFS_version_number to be 3.
If the option and are both specified, overrides the option.
Set the write buffer size to
n bytes. The default value is when using Version 3 of the
NFS protocol. The default can be negotiated down if the
server prefers a smaller transfer size. When using Version
2, the default value is
Prevent printing a warning message for unknown
specific_option. If the option is not specified, and an unknown
specific_option is encountered, the utility prints a warning mes‐
sage and processes the next one. The option prevents printing the
warning message.
Overlay mount.
Allow the file system to be mounted over an existing mount point,
making the underlying file system inaccessible. If a mount is
attempted on a pre-existing mount point without setting this flag,
the mount will fail, producing the error
Options (umount)
The options are as follows:
Attempt to unmount all NFS file systems described in
Print debug messages to stderr.
This option is to be used by HP support engineers.
Forcibly unmount a file system.
If this option is not specified, the utility does not allow a file
system to be unmounted if a file on the file system is busy.
Using the option can cause data loss for open files; programs
which access files after the file system has been unmounted will
get an error (EIO).
NFS FILE SYSTEMS
Background versus Foreground
File systems mounted with the option indicate that is to retry in the
background if the server's mount daemon does not respond. See
mountd(1M). retries the request up to the count specified in the
option. Once the file system is mounted, each NFS request made in the
kernel waits tenths of a second for a response. If no response
arrives, the time-out is multiplied by and the request is retransmit‐
ted. When the number of retransmissions has reached the number speci‐
fied in the option, a file system mounted with the option returns an
error on the request; one mounted with the option prints a warning mes‐
sage and continues to retry the request.
Hard versus Soft
File systems that are mounted read-write or that contain executable
files should always be mounted with the option. Applications using
mounted file systems can incur unexpected I/O errors, file corruption,
unexpected program core dumps, and delays in system reboot/shutdown.
The option is not recommended.
Authenticated requests
The server can require authenticated NFS requests from the client. The
authentication (Diffie-Hellman public key system) might be required.
See nfssec(5).
URLs and the public Option
If the option is specified, or if the resource includes an NFS URL,
attempts to connect to the server using the public file handle lookup
protocol. See If the server supports the public file handle, the
attempt is successful; does not need to contact the server's and the
daemons to get the port number of the server and the initial file han‐
dle of pathname, respectively. See rpcbind(1M) and mountd(1M). If the
NFS client and server are separated by a firewall that allows all out‐
bound connections through specific ports, such as then these ports
enable NFS operations through the firewall. The option and the NFS URL
can be specified independently or together. They interact as specified
in the following matrix:
┌──────────────┬───────────────────────────────────────────┐
│ │ Resource Style │
│ ├─────────────────────┬─────────────────────┤
│ │ host:pathname │ NFS URL │
├──────────────┼─────────────────────┼─────────────────────┤
│public option │ Force public file │ Force public file │
│ │ handle and fail │ handle and fail │
│ │ mount if not sup‐ │ mount if not sup‐ │
│ │ ported. Use Native │ ported. Use Canon‐ │
│ │ paths. │ ical paths. │
├──────────────┼─────────────────────┼─────────────────────┤
│Default │ Use MOUNT protocol. │ Try public file │
│ │ │ handle with Canoni‐ │
│ │ │ cal paths. Fall │
│ │ │ back to MOUNT pro‐ │
│ │ │ tocol if not sup‐ │
│ │ │ ported. │
└──────────────┴─────────────────────┴─────────────────────┘
A Native path is a path name that is interpreted according to conven‐
tions used on the native operating system of the NFS server. A Canoni‐
cal path is a path name that is interpreted according to the URL rules.
See See for uses of Native and Canonical paths.
Replicated File Systems and Failover
resource can list multiple read-only file systems to be used to provide
data. These file systems should contain equivalent directory struc‐
tures and identical files. HP also recommends creating the file system
directory structure with a utility such as (see rdist(1)). The file
systems can be specified either with a comma-separated list of entries
and/or NFS URL entries, or with a comma-separated list of hosts, if all
file system names are the same. If multiple file systems are named and
the first server in the list is down, failover uses the next alternate
server to access files. If the read-only option is not chosen, fails.
Note that the option is always used for replicated servers.
File Attributes
To improve NFS read performance, files and file attributes are cached.
File modification times get updated whenever a write occurs. However,
file access times can be temporarily out-of-date until the cache gets
refreshed.
The attribute cache retains file attributes on the client. Attributes
for a file are assigned a time to be flushed. If the file is modified
before the flush time, then the flush time is extended by the time
since the last modification (under the assumption that files that
changed recently are likely to change soon). There is a minimum and
maximum flush time extension for regular files and for directories.
Setting sets flush time to n seconds for both regular files and direc‐
tories.
Setting disables attribute caching on the client. Then every reference
to attributes is satisfied directly from the server though file data is
still cached. Although the client is guaranteed to always have the
latest file attributes from the server, performance is affected
adversely through additional latency, network load, and server load.
Setting the option also disables attribute caching, but has the further
effect of disabling client write caching. Although this situation
guarantees that an application can write data directly to a server so
that the data can be viewed immediately by other clients, a significant
adverse effect on client write performance can occur. Data written
into memory-mapped file pages are not written directly to this server.
See mmap(2).
RETURN VALUE
returns the following values:
Successful completion.
An error occurred.
See the section.
ERRORS
If error code 157 is returned, has reached the process thread limit.
Increase the value of nkthread. See nkthread(5) for more details.
EXAMPLES
Example 1: Mounting an NFS File System
To mount an NFS file system:
Example 2: Mounting NFS File System Read-Only With No suid Privileges
To mount an NFS file system read-only with no suid privileges:
Example 3: Mounting NFS File System Over NFS Version 2 with the UDP Trans‐
port
To mount an NFS file system over NFS Version 2 with the UDP transport:
Example 4: Mounting NFS File System Using An NFS URL
To mount an NFS file system using an NFS URL (a canonical path):
Example 5: Mounting With Forcing Use Of The Public File Handle
To mount an NFS file system and force the use of the public file handle
and an NFS URL (a canonical path) that has a non 7-bit ASCII escape
sequence:
Example 6: Mounting an NFS File System Using a Native Path
To mount an NFS file system using a native path (where the server uses
colons as the component separator) and the public file handle:
Example 7: Mounting a Replicated Set with Same Pathnames
To mount a replicated set of NFS file systems with the same pathnames:
Example 8: Mounting a Replicated Set with Different Pathnames
To mount a replicated set of NFS file systems with different pathnames:
WARNINGS
If the directory on which a file system is to be mounted is a symbolic
link, the file system is mounted on the directory to which the symbolic
link refers, rather than being mounted on top of the symbolic link
itself.
FILES
Table of mounted file systems
Default distributed file system type
Table of automatically mounted resources
SEE ALSOquota(1), rdist(1), fstyp(1M), lockd(1M), mountall(1M), mountd(1M),
statd(1M), mkdir(2), mmap(2), mount(2), open(2), umount(2), mnttab(4),
nfssec(5), quota(5), inet(7F), IPv6(7P).
Callaghan, Brent, RFC 2054, October 1996.
Callaghan, Brent, RFC 2224, October 1997.
Berners-Lee, Masinter & McCahill , RFC 1738, December 1994.
mount_nfs(1M)