mount(1M_NFS) (NFS) mount(1M_NFS)
NAME
mount, umount - mount or unmount remote NFS resources
SYNOPSIS
mount [-F nfs] [-r] [-o specific_options] {server:path | mountpoint}
mount [-F nfs] [-r] [-o specific_options] server:path mountpoint
umount [-o specific_options] {server:path | mountpoint}
DESCRIPTION
The NFS-specific mount command attaches a named path residing
on machine server to the file system hierarchy at the pathname
location mountpoint, which must already exist. mount
maintains a table of mounted file systems in /etc/mnttab,
described in mnttab(4).
The NFS-specific umount command is located in
/usr/lib/fs/nfs/umount and is called by the generic umount
[see mount(1M)] command. umount unmounts a file system and
removes the appropriate entry from /etc/mnttab.
Files
/etc/mnttab table of mounted file systems
/etc/dfs/fstypes default distributed file system type
/etc/vfstab table of automatically mounted resources
Exit Codes
The following values are returned by the NFS-specific mount
command:
0 Successful exit
32 Usage error
47 Could not open mnttab
48 Could not lock mnttab
70 Retry mount operation
71 Gave up retrying mount operation
72 Specify host:path
73 Invalid option
74 Server not responding
75 Could not get nfs service addr
76 Could not negotiate secure protocol
77 Access denied
78 No such directory
The following values are returned by the NFS-specific umount
command:
Copyright 1994 Novell, Inc. Page 1
mount(1M_NFS) (NFS) mount(1M_NFS)
0 Successful exit
33 Usage error
34 Permission denied
35 Directory/Resource not mounted
36 Mount point busy
USAGE
If mountpoint has any contents prior to the mount operation,
the contents remain hidden until the server:path is once again
unmounted. If server:path is listed in the vfstab file, the
command line can specify either server:path or mountpoint, and
mount will consult vfstab for more information.
Note that, 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.
Only a privileged user can execute these commands.
Options
The following options are available to the mount command:
-F Specifies the File System Type (FSType). If the
-F option is omitted, mount will take the file
system type from /etc/vfstab if an entry exists in
/etc/vfstab for the file system being mounted.
-r Mount the specified file system read-only.
-o Specify file system specific options in a comma-
separated list of words from the list below.
pre4.0 Allow mounting from pre-SVR4.0
systems or other older NFS
implementations. This option
should be used when the NFS server
does not allow a client user to
belong to more than eight groups.
If the pre4.0 option is not used
with such a server, the mount
command will fail on the client and
the following message will display:
Copyright 1994 Novell, Inc. Page 2
mount(1M_NFS) (NFS) mount(1M_NFS)
nfs mount: server:path server not
responding:
RPC: Authentication error; why =
Invalid client credential.
rw|ro server:path is mounted read-write
or read-only. The default is rw.
suid|nosuid Execution of setuid allowed or
disallowed. The default is suid.
remount If a file system is mounted read-
only, remounts the file system
read-write.
bg|fg If the first attempt fails, retry
as a background process, or, as a
foreground process. The default is
fg.
retry=n The number of times to retry the
mount operation. The default is
10000.
port=n The server IP port number. The
default is NFS_PORT.
grpid Create a file with its GID 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 is set to the GID of the parent
directory [see open(2) and
mkdir(2)]. Files created on file
systems that are not mounted with
the grpid option will obey BSD
semantics; that is, the GID is
unconditionally inherited from that
of the parent directory.
rsize=n Set the read buffer size to n
bytes.
Copyright 1994 Novell, Inc. Page 3
mount(1M_NFS) (NFS) mount(1M_NFS)
wsize=n Set the write buffer size to n
bytes.
timeo=n Set the NFS timeout to n tenths of
a second.
retrans=n Set the number of NFS
retransmissions to n.
soft|hard Return an error if the server does
not respond, or continue the retry
request until the server responds.
The default is hard.
intr Allow keyboard interrupts to kill a
process that is hung while waiting
for a response on a hard-mounted
file system.
secure Use a more secure protocol for NFS
transactions.
noac Suppress attribute caching.
acregmin=n Hold cached attributes for at least
n seconds after file modification.
acregmax=n Hold cached attributes for no more
than n seconds after file
modification.
acdirmin=n Hold cached attributes for at least
n seconds after directory update.
acdirmax=n Hold cached attributes for no more
than n seconds after directory
update.
actimeo=n Set minimum and maximum times for
regular files and directories to n
seconds.
maxthreads=n Set the maximum number of
asynchronous I/O threads for this
mount point to n threads.
Copyright 1994 Novell, Inc. Page 4
mount(1M_NFS) (NFS) mount(1M_NFS)
The following options are available to the NFS-specific mount
and umount commands:
server:path Where server is the machine that has the remote
resource and path is the pathname of the resource.
mountpoint The name of the local directory where the remote
resource has been mounted.
Background vs. Foreground
NFS File systems mounted with the bg option indicate that
mount is to retry as a background process 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.
Hard vs. Soft
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 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. If an NFS server
is down, a process trying to access a file system from that
server mounted with the hard option will hang until the server
comes up again.
Read-Write vs. Read-Only
NFS File systems that are mounted rw (read-write) should use
the hard option. If the server goes down when a user is
writing a file, the write will continue when the serve comes
back up, and the data being written will not be lost.
Secure File Systems
The secure option must be given if the server requires secure
mounting for the NFS file system.
File Attributes
The attribute cache retains file attributes on the client.
Attributes for a file are assigned a time to be flushed
(updated). 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
Copyright 1994 Novell, Inc. Page 5
mount(1M_NFS) (NFS) mount(1M_NFS)
directories. Setting actimeo=n extends flush time by n
seconds for both regular files and directories.
Examples
To mount a remote file system:
mount -F nfs serv:/usr/src /usr/src
To soft mount a remote file system:
mount -F nfs -o soft serv:/usr/src /usr/src
To hard mount a remote file system:
mount -F nfs -o hard serv:/usr/src /usr/src
To mount a file system with rsize set to 1024 bytes:
mount -F nfs -o rsize=1024 serv:/usr/src /usr/src
To mount a file system and allow the mount command to only be
retried 3 times:
mount -F nfs -o retry=3 serv:/usr/src /usr/src
To unmount a remote file system with server:path
umount serv:/usr/src
where serv is the name of the server and /usr/src is the name
of the path.
To unmount a remote file system with mountpoint
umount /usr/src
where /usr/src is the mountpoint of the mounted resource.
Warnings
If you are mounting resources from a fast server, it is
advised that you use rsize=1024,wsize=1024 mount options.
This should be used because fast servers cause data overruns
on the Ethernet driver on slow client machines. One symptom
of this problem has the following message being written to the
console of the client machines:
RPC: Timed out
Another symptom of this problem may be that the client machine
appears to be hung, with the following message being written
to the console of the client machine:
NFS server hostname not responding, still trying
Copyright 1994 Novell, Inc. Page 6
mount(1M_NFS) (NFS) mount(1M_NFS)
Note also that, when a single file is mounted over NFS, it
cannot be opened with the O_CREAT flag. See open(2) for
information on O_CREAT.
REFERENCES
mnttab(4), mount(1M), mount(2), mountall(1M), open(2),
umount(2), vfstab(4)
Copyright 1994 Novell, Inc. Page 7