Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mount(8) — OSF/1 3.0 αXP

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mountd(8)

nfsd(8)

cddevsuppl(8)

mount(2)

mount(3)

umount(2)

umount(3)

advfs(4)

cdfs(4)

fstab(4)

mount(8)  —  Maintenance

NAME

mount, umount − Mounts and dismounts file systems

SYNOPSIS

/usr/sbin/mount [−el] [−t [no]type]

/usr/sbin/mount −a [−fv] [−t [no]type]

/usr/sbin/mount [−d] [−r|−u|−w] [−o option, ...] [−t [no]type] file-system directory

/usr/sbin/mount [−d] [−r|−u|−w] [−o option, ...] [−t [no]type] file-system | directory

/usr/sbin/umount −a|−A −b [−fv] [−t type] [−h host]

/usr/sbin/umount [−fv] file-system ... | directory ... 

FLAGS

mount Flags

−aAttempts to mount all the file systems described in the /etc/fstab file.  In this case, file-system and directory are taken from the /etc/fstab file.  If −t type is specified, all of the file systems in the /etc/fstab file with that type will be mounted.  Alternatively, if type is prefixed with no, all the file systems in the /etc/fstab file that do not have that type will be mounted.  File systems are not necessarily mounted in the order listed in the /etc/fstab file. 

Note that it is possible to create and mount a file system on a device that is currently part of a logical volume.  This is because physical disks on which the Logical Volume Manager (LVM) creates logical volumes are not protected from access by other programs. 

−dMounts a UNIX File System (UFS) even if it has not been unmounted cleanly or checked by fsck for consistency.  Also used to mount a CD-ROM UFS file system. 

−eLists all mount points.  Normally, mount does not list mount points served by the automount daemon. 

−fPerforms a “fake” mount and does not actually mount the file system.  This flag is used to verify the arguments you plan to use with the mount command. 

−lDisplays the value of all the file system options. 

−o option[, option ...]
Specifies a list of comma-separated options. Every option specified is used. Some options are valid for all file system types, while others apply to a specific type only. See the File System Options section for descriptions of each option.

−rMounts the specified file system with read-only access.  This flag is shorthand for the following:

mount −o ro  file-system  directory

Physically write-protected and magnetic tape file systems must be mounted with read-only access or errors will occur when access times are updated, whether or not any explicit write is attempted.  Note that −r and −w are paired; the default is −w. 

−t [no]type
Specifies the file system type.  The accepted types are:

       •advfs

       •ufs

       •nfs

       •mfs

       •cdfs

See fstab(4) for a description of the legal file system types.  If the no prefix is used, all file types except the one specified are mounted. 

−uRequests that the system remount a file system so that it can update any incore data blocks for ufs type file systems.  This flag works only for ufs file systems that are currently mounted read-only.  For example, the mount -ur command updates incore data and leaves the file system mounted read-only. 

−vDisplays a message indicating which file system is being mounted (verbose). 

−wMounts the specified file system with read/write access.  This flag is equivalent to using the −o rw flag.  Read/write is the default access. 

umount Flags

−AAttempts to unmount all the file systems currently mounted. 

−aAttempts to unmount all the file systems listed in the /etc/fstab file. 

−bBroadcasts a message to all server machines in the subnetwork to remove the client host’s name from the Network File System (NFS) status information. 

−fPerforms a fast unmount operation that causes remote file systems to be unmounted without notifying the server. 

−h hostUnmounts all file systems listed in the /etc/fstab file that are remotely mounted from host. 

−t typeUnmounts all file systems listed in the /etc/fstab file that are of the specified type. 

−vDisplays a message indicating the file system being unmounted (verbose). 

File System Options

The following options are valid on the Advanced File System (AdvFS):

rwAllows read/write access. 

roAllows read-only access. 

The following options are valid on both UFS and NFS file systems.  The defaults are rw,suid, and exec.  Options are specified as a comma-separated string. 

devAllows access to block and character-special devices. 

nodevDisallows access from the file system to either block or character-special devices. 

rwAllows read/write access. 

roAllows read-only access. 

suidAllows set-user-ID execution. 

nosuidProhibits set-user-ID execution. 

syncCauses all writes to be written immediately to disk as well as to the buffer cache. 

nosyncSpecifies that writes may return before data is written to disk. 

execAllows binary execution. 

noexecProhibits binary execution. 

grpidNew files inherit the parent directory’s group ID.  This is the default and matches BSD’s semantics. 

nogrpidSVID III semantics applied.  For example, if the parent directory’s mode bits include IS_GID, then the new file will inherit the parent’s group ID.  If IS_GID is off, then it inherits the process group ID. 

The following options are specific to NFS file systems:

bgRetries in the background, if the first mount attempt fails. 

fgRetries in the foreground. 

retry=n
Sets the number of mount failure retries to n. 

rsize=nSets the read buffer size to n bytes. 

wsize=n
Sets the write buffer size to n bytes. 

timeo=n
Sets the NFS timeout period to n tenths of a second. 

retrans=n
Sets the number of NFS retransmissions to n. 

intrAllows hard mounted file system operations to be interrupted. 

nintrPrevents hard mounted file system operations from being interrupted. 

softReturns an error if the server does not respond. 

hardRetries the request until the server responds. 

nfsv2Normally, the mount command tries to use Version 3 of the NFS protocol.  If the server does not support Version 3, then the mount command retries the mount using Version 2.  Specifying -o nfsv2 forces the mount command to use NFS Version 2.  NFS Version 3 is an enhanced version of the NFS protocol that provides 64 bit file access, as well as features designed to improve performance and correctness.  See the Technical Overview for a description of NFS Version 3. 

nfsv3Tries to use Version 3 of the NFS protocol.  If the server does not support it, Version 2 is used.  This is the default. 

port=nSet the server IP port number to the value of n.  The default is to query the portmap daemon on the server for the port number (which is almost always 2049).  This option is useful only when the server is not running the portmap daemon or is running multiple NFS servers.  Both of these situations are very rare. 

The defaults are fg, retry=10000, timeo=11, retrans=4, hard, and intr.  Defaults for rsize and wsize are set by the kernel. 

The bg option causes mount to run in the background if the server’s mountd does not respond. The mount command attempts each request retry times before giving up.  Once the file system is mounted, each NFS request made in the kernel waits timeo tenths of a second for a response.  If no response arrives, the timeout period is multiplied by 2 and the request is retransmitted.  When retrans retransmissions have been sent with no reply, a soft mounted file system returns an error on the request and a hard mounted file system retries the request.  File systems that are mounted rw (read/write) should use the hard option.  The number of bytes in a read or write request can be set with the rsize and wsize options. 

Update Visibility Options

The following options affect how quickly you see updates to a file or directory that has been modified by another host.  Increasing these values gives you slightly better performance.  Decreasing the values decreases the time it takes for you to see modifications made on the other host.  If you are the only person modifying files under this mount point, you should increase these values. 

acdirmin=nHolds cached directory attributes for at least n seconds. 

acdirmax=nHolds cached directory attributes for no more than n seconds.  The maximum value you can specify is 3600. 

acregmin=nHolds cached file attributes for at least n seconds. 

acregmax=nHolds cached file attributes for no more than n seconds.  The maximum value you can specify is 3600. 

actimeo=nSets all four attributes’ cache timeout values to n. 

noacDoes not set attribute caching.  This option is equivalent to actimeo=0. 

noctoDoes not get a fresh attribute when opening a file. 

The defaults are acdirmin=30, acdirmax=60, acregmin=3, and acregmax=60. 

The following options are specific to CD-ROM File System (CDFS):

defpermIgnores the permission bits, if present, and defaults all file and directory permissions to the value 0555, with a zero User ID (UID) (owned by root).  Files and directories recorded on an ISO 9660-formatted file system might or might not have permission bits.  This setting is a default option since the permissions on most existing ISO 9660-formatted CD-ROMs do not map to the UID scheme that is used. 

nodefpermUses the on-disk permission bits, if present.  If a file or directory is not recorded with permission bits, the default 0555 is used. 

noversionStrips off the extension (;#) from the version string if a file recorded on an ISO 9660-formatted file system or a file system formatted by the High Sierra Group contains a version string.  Files and directory names are displayed in lowercase letters and name matching is performed in a case-insensitive manner.  Use this option if you are mounting a CD-ROM containing MS-DOS applications. 

rripUses the Rock Ridge Interchange Protocol (RRIP) extensions to ISO 9660 (if present on the file system) to provide mixed-case file names, device special files, and other attributes for files on the file system.  If there are no RRIP extensions on the file system, the file system will be mounted and the option will be ignored. 

The defaults are ro, nodev, and defperm. 

DESCRIPTION

The mount command announces to the system that file system file-system is to be attached to the file tree at directory, which must already exist.  The file tree, directory, becomes the name of the newly mounted root.  The contents of directory are hidden until the file system is unmounted. 

For the Advanced File System (AdvFS), the file-system argument has the following form:

filedomain#fileset

For the Network File System (NFS), the file-system argument can have one of the following forms:

host:path
path@host

The form used in the mount command determines the form returned by getfsstat(2) and getmntinfo(3). 

The umount command announces to the system that file system file-system previously mounted on directory should be removed.  Either the file system name or the mounted-on directory can be used. 

To use the mount and unmount commands, you must be root. 

If mount is invoked with only one of file-system or directory, it searches the /etc/fstab file for an entry whose directory or file-system field matches the given argument.  For example, mount /usr and mount /dev/rz0g are shorthand for mount /dev/rz0g /usr if the following line is in the /etc/fstab file:

/dev/rz0g /usr ufs rw 1 1

The mount command also lets you mount an ISO 9660- or HSG-formatted file system onto a directory. 

NOTES

No more than one user should mount a disk partition with read/write access or the file system might become corrupted. 

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. 

When you boot to single-user mode, the root file system is mounted with read-only access. If you want to modify a file, you must change the options on the root file system to read/write. You can do this with the following command:

# mount −u /

If your /etc/fstab file is corrupted, you can mount the root file system with the following command:

# mount −u /dev/rz?? /

Refer to cdfs(4) for information on the correct system configuration options to set before using CDFS if you get the following message when mounting an ISO 9660 or HSG volume:

cdfs_mount: Operation Not Supported

General users cannot mount UFS file systems.  Mounting UFS file systems requires superuser privilege.  By default, the maximum number of UFS mounts is 1,000.  However, you can modify this value by using the sysconfig command.  For example:

sysconfig -r vfs max-ufs-mounts=1100

The default for CDFS is to not allow access to device special files (option nodev) since the device numbers recorded on a disc using RRIP extensions might not match the device numbers used by the operating system. If you wish to allow device access, mount the file system with the dev option and use the cddevsuppl(8) command to map the device numbers of the device special files on the disc to new device numbers used by the operating system. 

EXAMPLES

     1.To mount a local disk, enter:

% mount /dev/rz0g /usr

     2.To mount an AdvFS fileset, enter:

% mount -t advfs usr_dmn#user1 /usr/user1

     3.To mount all ufs file systems, enter:

% mount −at ufs

     4.To mount a remote file system, enter:

% mount −t nfs serv:/usr/src /usr/src

     5.To mount a remote file system with a hard mount, enter:

% mount −o hard serv:/usr/src /usr/src

     6.To mount an ISO 9660- or HSG-formatted file system from block device /dev/rz3c onto the local directory /cdfs with the file version strings stripped off, enter:

% mount −t cdfs −o noversion /dev/rz3c /cdfs

     7.To mount a UFS CD-ROM (for example, the installation CD-ROM) from block device /dev/rz3c onto the local directory cdrom, enter:

% mount −r /dev/rz3c /cdrom

FILES

/usr/sbin/mountSpecifies the command path. 

/usr/sbin/umountSpecifies the command path. 

/etc/fstabContains static information about file systems. 

RELATED INFORMATION

Commands:  mountd(8), nfsd(8), cddevsuppl(8)

Functions:  mount(2), mount(3), umount(2), umount(3)

Files:  advfs(4), cdfs(4), fstab(4)

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