mount_nfs.1m (2010 09)

m
mount_nfs(1M) mount_nfs(1M)
Resource Style
host:pathname NFS URL
Force public file handle and fail
mount if not supported.
Use Native paths.
Force public file handle and fail
mount if not supported.
Use Canonical paths.
public option
Try public file handle with
Canonical paths. Fall back to
MOUNT protocol if not sup-
ported.
Default Use MOUNT protocol.
A Native path is a path name that is interpreted according to conventions used on the native operating
system of the NFS server. A Canonical path is a path name that is interpreted according to the URL
rules. See Uniform Resource Locators (URL), RFC 1738 . See EXAMPLES for uses of Native and Canoni-
cal paths.
Replicated File Systems and Failover
resource can list multiple read-only file systems to be used to provide data. These file systems should con-
tain equivalent directory structures and identical files. HP also recommends creating the file system
directory structure with a utility such as
rdist (see rdist (1)). The file systems can be specified either
with a comma-separated list of host :/pathname 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, mount fails. Note that the llock 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
actimeo=n sets flush time to n seconds for both regular files and directories.
Setting
actimeo=0 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 addi-
tional latency, network load, and server load.
Setting the
noac 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 perfor-
mance can occur. Data written into memory-mapped file pages are not written directly to this server.
See mmap(2).
Using mount() System Call to Mount
User applications which require mounting NFS share can do so using
mount() system call.
To mount an NFS share, the
mount() system call need to be supplied with the nfs_args structure.
The nfs_args structure is used to provide the NFS mount information and mount options necessary to
mount the remote NFS share. The nfs_args and sizeof(nfs_args ) corresponds to the dataptr and
datalen parameter to the mount() call. The NFS mount version need to be specified through the fstype
parameter of the mount() system call. The NFS mount version types are defined in the
/usr/include/sys/mount.h header file. The NFS fstype can be any of the below mentioned values.
MNTTYPE_NFS Mount using NFS v2 protocol
MNTTYPE_NFS3 Mount using NFS v3 protocol
MNTTYPE_NFS4 Mount using NFS v4 protocol
The
nfs_args structure is defined in the /usr/include/nfs/mount.h header file. The details of
the structure members are as below:
HP-UX 11i Version 3: September 2010 5 Hewlett-Packard Company 5