mount_nfs(1M) mount_nfs(1M)
NAME [Toc] [Back]
mount_nfs: mount, umount - mount and unmount NFS file systems
SYNOPSIS [Toc] [Back]
/usr/sbin/mount [-l] [-p|-v]
/usr/sbin/mount -a [-F nfs] [-eQ]
/usr/sbin/mount [-F nfs] [-eQrV] [-o specific_options]
{host:path|directory}
/usr/sbin/mount [-F nfs] [-eQrV] [-o specific_options]
host:path directory
/usr/sbin/umount -a [-f] [-F nfs] [-h host] [-v]
/usr/sbin/umount [-f] [-v] [-V] {host:path|directory}
DESCRIPTION [Toc] [Back]
The mount command mounts file systems. Only a superuser can mount
file systems. Other users can use mount to list mounted file systems.
The mount command attaches host:path to directory. host is a remote
system, path is a directory on this remote system and directory is a
directory on the local file tree. directory must already exist, be
given as an absolute path name and will become the name of the root of
the newly mounted file system. If either host:path or directory is
omitted, mount attempts to determine the missing value from an entry
in the /etc/fstab file. mount can be invoked on any removable file
system, except /.
If mount is invoked without any arguments, it lists all of the mounted
file systems from the file system mount table, /etc/mnttab. The
umount command unmounts mounted file systems. Only a superuser can
unmount file systems.
Options [Toc] [Back]
-r Mount the specified file system read-only.
-o specific_options
Set file system specific options according to a comma-separated
list chosen from words below.
rw|ro resource is mounted read-write or read-only. The
default is rw.
suid|nosuid Setuid execution allowed or disallowed. The
default is suid.
remount If a file system is mounted read-only, remounts
the file system read-write.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: Sep 2004
mount_nfs(1M) mount_nfs(1M)
bg|fg If the first attempt fails, retry in the
background, or, in the foreground. The default is
fg.
quota Enables quota(1M) to check whether the user is
over quota on this file system; if the file system
has quotas enabled on the server, quotas will
still be checked for operations on this file
system.
noquota Prevent quota(1M) from checking whether the user
exceeded the quota on this file system; if the
file system has quotas enabled on the server,
quotas will still be checked for operations on
this file system.
retry=n The number of times to retry the mount operation.
The default is 1.
vers=NFS_version_number
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, then the NFS mount
will use NFS Version 2 .
port=n Set server UDP port number to n (the default is
the port customarily used for NFS servers).
proto=transp Use the transport protocol transp for this mount.
Valid values for transp are tcp (connectionoriented)
and udp (connectionless). The default
behavior is to attempt a tcp connection. If the
tcp connection attempt fails when defaulting to
tcp, a udp connection will be attempted.
grpid By default, the GID associated with a newly
created file will obey the System V semantics;
that is, the GID is set to the effective GID of
the calling process. This behavior may be
overridden on a per-directory basis by setting the
set-GID bit of the parent 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 grpid 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.
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: Sep 2004
mount_nfs(1M) mount_nfs(1M)
rsize=n Set the read buffer size to n bytes. The default
value is set by kernel.
wsize=n Set the write buffer size to n bytes. The default
value is set by kernel.
timeo=n Set the NFS timeout to n tenths of a second. The
default value is set by kernel.
retrans=n Set the number of NFS retransmissions to n. The
default value is 5.
soft|hard Return an error if the server does not respond, or
continue the retry request until the server
responds. The default value is hard.
intr|nointr Allow (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
intr.
noac Suppress attribute caching.
nocto Suppress fresh attributes when opening a file.
forcedirectio If forcedirectio is specified, then for the
duration of the mount, forced direct I/O is used.
If the filesystem is mounted using forcedirectio,
data is transferred directly between client and
server, with no buffering on the client.
forcedirectio is a performance option that is of
benefit only in large sequential data transfers.
Running applications and mapping memory with
mmap() are not supported over forcedirectio mount
points. The default behavior is no forcedirectio.
devs|nodevs Allow (do not allow) access to local devices. The
default is devs.
acdirmax=n Hold cached attributes for no more than n seconds
after directory update. The default value is 60.
acdirmin=n Hold cached attributes for at least n seconds
after directory update. The default value is 30.
acregmax=n Hold cached attributes for no more than n seconds
after file modification. The default value is 60.
acregmin=n Hold cached attributes for at least n seconds
after file modification. The default value is 3.
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: Sep 2004
mount_nfs(1M) mount_nfs(1M)
actimeo=n Set min and max times for regular files and
directories to n seconds. actimeo has no default;
it sets acregmin, acregmax, acdirmin, and acdirmax
to the value specified.
-O 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 device busy.
Options (umount) [Toc] [Back]
umount recognizes the following options:
-a Attempt to unmount all file systems described in
/etc/mnttab. All optional fields in /etc/mnttab
must be included and supported. If -F nfs option
is specified, all NFS file systems in /etc/mnttab
are unmounted. File systems are not necessarily
unmounted in the order listed in /etc/mnttab.
-f Forcibly unmount a file system. Without this
option, umount does not allow a file system to be
unmounted if a file on the file system is busy.
Using this option can cause data loss for open
files; programs which access files after the file
system has been unmounted will get an error (EIO).
-F nfs Specify the NFS file system type (see fstyp(1M)).
-h host Unmount only those file systems listed in
/etc/mnttab that are remote-mounted from host.
-v Verbose mode. Write a message to standard output
indicating which file system is being unmounted.
-V Echo the completed command line, but performs no
other action. The command line is generated by
incorporating the user-specified options and other
information derived from /etc/fstab. This option
allows the user to verify the command line.
NFS File Systems [Toc] [Back]
Background vs. Foreground
File systems mounted with the bg option indicate that mount is to
retry in the background if the server's mount daemon (mountd(1M))
does not respond. mount retries the request up to the count
specified in the retry=n option. Once the file system is
mounted, each NFS request made in the kernel waits timeo=n tenths
of a second for a response. If no response arrives, the time-out
is multiplied by 2 and the request is retransmitted. When the
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: Sep 2004
mount_nfs(1M) mount_nfs(1M)
number of retransmissions has reached the number specified in the
retrans=n option, a file system mounted with the soft option
returns an error on the request; one mounted with the hard option
prints a warning message and continues to retry the request.
Hard vs. Soft [Toc] [Back]
File systems that are mounted read-write or that contain
executable files should always be mounted with the hard option.
Applications using soft mounted file systems may incur unexpected
I/O errors.
To improve NFS read performance, files and file attributes are
cached. File modification times get updated whenever a write
occurs. However, file access times may be temporarily out-ofdate
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.
EXAMPLES [Toc] [Back]
To mount an NFS file system:
mount serv:/usr/src /usr/src
To mount an NFS file system readonly with no suid privileges:
mount -r -o nosuid serv:/usr/src /usr/src
To mount an NFS file system over Version 3:
mount -o vers=3 serv:/usr/src /usr/src
To unmount all file systems imported from a given host, enter the
following command as root:
umount -h mysystem.home.work.com -a
The hostname must match what is in /etc/mnttab exactly (as shown by
the bdf command). For example, if bdf shows:
mysystem:/projects,
the umount command would be
umount -h mysystem -a.
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: Sep 2004
mount_nfs(1M) mount_nfs(1M)
FILES [Toc] [Back]
/etc/mnttab table of mounted file systems.
/etc/fstab list of default parameters for each file system.
SEE ALSO [Toc] [Back]
fsclean(1M), mount(1M), quotaon(1M), mount(2), fstab(4), mnttab(4),
fs_wrapper(5), quota(5).
STANDARDS CONFORMANCE [Toc] [Back]
mount: SVID3
umount: SVID3
Hewlett-Packard Company - 6 - HP-UX 11i Version 2: Sep 2004 [ Back ] |