MOUNT_NFS(1M) | Maintenance Commands | MOUNT_NFS(1M) |
mount [-F nfs] [generic_options] [-o specific_options] [-O] mount_point
mount [-F nfs] [generic_options] [-o specific_options]
[-O] resource mount_point
mount_nfs starts the lockd(1M) and statd(1M) daemons if they are not already running.
If the resource is listed in the /etc/vfstab file, the command line can specify either resource or mount_point, and mount consults /etc/vfstab for more information. If the -F option is omitted, mount takes the file system type from /etc/vfstab.
If the resource is not listed in the /etc/vfstab file, then the command line must specify both the resource and the mount_point.
host can be an IPv4 or IPv6 address string. As IPv6 addresses already contain colons, enclose host in a pair of square brackets when specifying an IPv6 address string. Otherwise the first occurrence of a colon can be interpreted as the separator between the host name and path, for example, [1080::8:800:200C:417A]:tmp/file. See inet(7P) and inet6(7P).
The mount command maintains a table of mounted file systems in /etc/mnttab, described in mnttab(4).
mount_nfs supports both NFSv3 and NFSv4 mounts. The default NFS version is NFSv4.
host:pathname NFS URL
public option Force public file Force public file
handle and fail handle and fail
mount if not supported. mount if not supported.
Use Native paths. Use Canonical paths.
default Use MOUNT protocol. Try public file handle
with Canonical paths.
Fall back to MOUNT
protocol if not
supported.
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 actimeo=n sets flush time to n seconds for both regular files and directories.
Setting actimeo=0 disables attribute caching on the client. This means that every reference to attributes is satisfied directly from the server though file data is still cached. While this guarantees that the client always has the latest file attributes from the server, it has an adverse effect on performance through additional latency, network load, and server load.
Setting the noac option also disables attribute caching, but has the further effect of disabling client write caching. While this guarantees that data written by an application is written directly to a server, where it can be viewed immediately by other clients, it has a significant adverse effect on client write performance. Data written into memory-mapped file pages ( mmap(2)) are not written directly to this server.
Because actimeo is the last duration option in the command line, its value ( 1000) becomes the setting for all of the duration options, including acdirmax. Now consider:
Because the acdirmax option follows actimeo on the command line, it is assigned the value specified ( 10). The remaining duration options are set to the value of actimeo (1000).
To mount an NFS file system:
Example 2 Mounting An NFS File System Read-Only With No suid Privileges
To mount an NFS file system read-only with no suid privileges:
Example 3 Mounting An NFS File System Over Version 2, with the UDP Transport
To mount an NFS file system over Version 2, with the UDP transport:
Example 4 Mounting an NFS File System Using An NFS URL
To mount an NFS file system using an NFS URL (a canonical path):
Example 5 Mounting An NFS File System 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 of NFS File Systems with the Same Pathnames
To mount a replicated set of NFS file systems with the same pathnames:
Example 8 Mounting a Replicated Set of NFS File Systems with Different Pathnames
To mount a replicated set of NFS file systems with different pathnames:
Callaghan, Brent, WebNFS Client Specification, RFC 2054, October 1996.
Callaghan, Brent, NFS URL Scheme, RFC 2224, October 1997.
Berners-Lee, Masinter & McCahill , Uniform Resource Locators (URL), RFC 1738, December 1994.
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.
SunOS 4.x used the biod maintenance procedure to perform parallel read-ahead and write-behind on NFS clients. SunOS 5.x made biod obsolete with multi-threaded processing, which transparently performs parallel read-ahead and write-behind.
Since the root (/) file system is mounted read-only by the kernel during the boot process, only the remount option (and options that can be used in conjunction with remount) affect the root (/) entry in the /etc/vfstab file.
mount_cachefs cannot be used with replicated NFS mounts or any NFS Version 4 mount.
The NFS client service is managed by the service management facility, smf(5), under the service identifier:
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The service's status can be queried using the svcs(1) command.
June 3, 2015 |