Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mount_nfs(1M) — Motorola System V 88k Release 4 Version 4.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mountall(1M)

mount(2)

umount(2)

mnttab(4)

mount(1M)  —  ADMINISTRATOR COMMANDS

NAME

mount − mount remote NFS resources

SYNOPSIS

mount [-F nfs] [-r] [-o specific_options] {resource | mountpoint}
mount [-F nfs] [-r] [-o specific_options] resource mountpoint

DESCRIPTION

The mount command attaches a named resource to the file system hierarchy at the pathname location mountpoint, which must already exist. If mountpoint has any contents prior to the mount operation, the contents remain hidden until the resource is once again unmounted. 

If the resource is listed in the vfstab file, the command line can specify either resource or mountpoint, and mount will consult vfstab for more information.  If the −F option is omitted, mount will take the file system type from vfstab. 

mount maintains a table of mounted file systems in /etc/mnttab, described in mnttab(4). 

The following options are available to the mount command:

−r Mount the specified file system read-only. 

−o Specify the nfs file-specific options in a comma-separated list.  The available options are:

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. 

bg|fg If the first attempt fails, retry in the background, or, in the foreground.  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. 

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. 

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 min and max times for regular files and directories to n seconds. 

nohang If nohang is set for a for hard-mounted system and the server is marked as being down, any subsequent requests will fail with EIO until the host is marked up.  Outstanding requests at the time of marking-down are not affected.  nohang with soft has no effect. 

NFS FILE SYSTEMS

Background vs. Foreground

If the mount is initially unsuccessful, mount retries the attempt up to as many times as specified in the retry=n option (default 10000).  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, otherwise the retry will occur in the forground.  Between retry attempts mount sleeps for an interval that begins at 5 seconds and doubles each time until the interval reaches 120 seconds, where it remains until the mount succeeds or the retry count is exhausted. 

NOTE: If you specify that the mount is to occur in the forground and the number of retries is large, your system may hang when attempting to mount file systems on unresponsive servers.  E.g., a retry count of 500 will cause mount to retry for more than 16 hours. 

Once the file system is mounted, each NFS request 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.  The timeout will not increase beyond 20 seconds.  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. 

Read-Write vs. Read-Only

File systems that are mounted rw (read-write) should use the hard option. 

Secure File Systems

The secure option must be given if the server requires secure mounting for the file system. 

File Attributes

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 extends flush time by n seconds for both regular files and directories. 

Nohang

The difference between nohang and soft is subtle.  Essentially, nohang means that a hard-mount NFS file system will become soft after the server is declared down.  Processes already waiting for service are not affected and the semantics of intr and any retransmissions and timeouts are retained.  Under nohang, new requests following a server down declaration fail.  If the server returns, outstanding transfers complete. 

nohang is intended to allow a hard-mounted setup that, if the server goes down, will preserve the the hard paradigm for outstanding request but will prevent the gradual system degradation otherwise caused by path searches that would hang encountering the mount point. 

If your server has intermittent, temporary service interruptions, it may be a good idea to increase the timeo value so that there is less possibilty of failing requests when unnecessary. 

EXAMPLES

To mount a remote file system: mount −F nfs serv:/usr/src /usr/src
To hard mount a remote file system: mount −o hard serv:/usr/src /usr/src

FILES

/etc/mnttab mount table

/etc/dfs/fstypes default distributed file system type

/etc/vfstab table of automatically mounted resources

SEE ALSO

mountall(1M), mount(2), umount(2), mnttab(4). 

NOTES

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. 

  —  NFS

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026