Content-type: text/html Man page of mount

mount

Section: Maintenance Commands (8)
Index Return to Main Contents
 

NAME

mount, umount - Mounts and dismounts file systems  

SYNOPSIS

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

/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/umount -a|-A -b [-fv] [-t type] [-h host]

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

PARAMETERS

Specifies one or more file systems. How you specify a file system depends on whether it is UFS or NFS or AdvFS.

To specify a UFS, enter the name of its block device special file. For example: /dev/rz3c. The mount command returns an error if you try to mount file system on a partition that is already in use.
To specify a NFS, specify the host and path name in either of these formats: host:path or [email protected].
To specify an AdvFS fileset, enter the name of the file domain, a pound-sign(#) character, and the name of the fileset. For example: root_domain#root. Specifies one or more directories. The directory must exist before you use the mount command. When the command is successful, the directory becomes the name of the newly mounted root directory, its mount point.
 

FLAGS

There are flags for the mount command and for the umount commands.  

Flags for mount:

Attempts 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 an LVM 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. (Note that LVM is no longer supported on Digital UNIX systems. See the vollvmencap(8) reference page for information on migrating LVM volumes to the Logical Storage Manager (LSM).) Mounts 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.
Although you can employ the -d option to mount an AdvFS fileset, Digital recommends that you do not. When an AdvFS fileset is mounted with the -d option, AdvFS subsequently skips domain recovery (which could cause data corruption). Lists all mount points. Normally, mount does not list mount points served by the automount daemon. Performs 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. Displays the value of all the file system options. Specifies a list of comma-separated options. Every option specified is used. Some options are valid for all file system types, while others apply only to a specific type. See the mount -o Flag Options section that is specific to your file system type for a description of the options supported by that file system. Mounts the specified file system with read-only access. This flag is the equivalent of the following command: 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. Specifies the file system type. The supported file systems are as follows:
advfs - Advanced File System (AdvFS)
ufs - UNIX File System (UFS)
nfs - Network File System (NFS)
mfs - Memory file system (See mfs(8).)
cdfs - CD-ROM (Compact Disc Read Only Memory) File System (See cdfs(4). This file system is often used on CD-ROMs that contain system firmware.)
dvdfs - DVD-ROM (Digital Versatile Disk, Read-only) File System (See dvdfs(4). This file system enables reading disks that are formated in the Universal Disk Format (UDF).
See fstab(4) for a description of file system types. If the no prefix is used, all file types except the one specified are mounted. Requests that the system remount a file system so that it can update any incore data blocks for ufs and AdvFS type file systems. This flag works only for ufs and AdvFS file systems that are currently mounted read-only and updates the file systems from read-only to read-write. For example, the mount -u / command updates the root file system from read-only to read-write. Displays a message indicating which file system is being mounted (verbose). Mounts the specified file system with read/write access. This flag is equivalent to the -o rw flag. Read/write is the default access.
 

Flags for umount:

Attempts to unmount all the file systems currently mounted. Attempts to unmount all the file systems listed in the /etc/fstab file. Broadcasts a message to all server machines in the subnetwork to remove the client host's name from their NFS mountdtab files. Performs a fast unmount operation that causes remote file systems to be unmounted without notifying the server. This option is supported only by NFS file systems. Unmounts all file systems listed in the /etc/fstab file that are remotely mounted from host. Unmounts all file systems listed in the /etc/fstab file that are of the specified type. Note, the -a flag must be used together with the -t flag. Displays a message indicating the file system is being unmounted (verbose).  

mount -o Flag Options

There are many options for the -o flag; they are discussed in the following paragraphs.  

AdvFS Options

The following options are valid for the Advanced File System (AdvFS): Flushes to disk file access time changes for reads of regular files. [Default behavior when neither atimes or noatimes is specified.] Marks file access time changes made for reads of regular files in memory, but does not flush them to disk until other file modifications occur. This behavior does not comply with industry standards and is used to reduce disk writes for applications with no dependencies on file access times. Allows read/write access. Allows read-only access. Allows read/write access. Enables an AdvFS fileset to be mounted as a domain volume even though it has the same AdvFS domain ID as a fileset that is already mounted. Causes all writes to be written immediately to disk as well as to the buffer cache.  

UFS Option

The following option is valid only for UFS: Allows a file system to be mounted even if it was not cleanly unmounted.  

UFS and NFS Options

The following options are valid for UFS and NFS: Allows access to block and character-special devices. Disallows access from the file system to either block or character-special devices. Allows read/write access. Allows read-only access. Allows set-user-ID execution. Prohibits set-user-ID execution. Causes all writes to be written immediately to disk as well as to the buffer cache. Specifies that writes may return before data is written to disk. Allows binary execution. Prohibits binary execution. New files inherit the parent directory's group ID. This is the default and matches BSD's semantics. SVID 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.

For UFS and NFS file systems, the file system option defaults are rw,suid, and exec.  

NFS-Specific Options

The following options are valid for NFS file systems: Retries in the background, if the first mount attempt fails. Retries in the foreground. Sets the number of mount failure retries to n. Sets the read buffer size to n bytes. Sets the write buffer size to n bytes. Sets the initial NFS timeout period for UDP mounts to n tenths of a second. NFS continually adjusts the timing as a function of network response time. Sets the maximum time value, in seconds, allowed between request transmissions [UDP mounts only]. Sets the number of NFS retransmissions to n. Allows hard mounted file system operations to be interrupted. Prevents hard mounted file system operations from being interrupted. Returns an error if the server does not respond. Retries the request until the server responds. Normally, 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.
Alternatively, you can use the vers=2 flag. Tries to use Version 3 of the NFS protocol. If the server does not support it, Version 2 is used. This is the default.
Alternatively, you can use the vers=3 flag. Specifies the network transport: udp or tcp.
Specify udp to use UDP as the network transport. This is supported by all known NFS servers. UDP works best in local, fast, and reliable environments. The mount will fail if the server does not support NFS over UDP. proto=udp is the default.
Specify tcp to use TCP as the network transport. This is supported by some vendors, but not all. TCP works better than UDP in high-loss, congested networks, and is the only way to use NFS over the Internet. The mount will fail if the server does not support NFS over TCP.
The -o tcp syntax is compatible with 4.4BSD syntax, while the proto=tcp syntax is compatible with Solaris 2.4 syntax. Set 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. Allows the use of extended attributes (property list) including access control lists (ACLs) on this filesystem. The NFS server exporting this filesystem must be running the proplistd daemon. See the proplist(4), acl(4), and proplistd(8) reference pages Specifies the version of the NFS protocol. You can specify either Version 3 or Version 2.
Normally, 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 vers=2 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.
Alternatively, you can use the nfsv2 or nfsv3 flag.

For NFS, 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.  

NFS Update Visibility Options

These options control 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. Holds cached directory attributes for at least n seconds. Holds cached directory attributes for no more than n seconds. The maximum value you can specify is 3600. Holds cached file attributes for at least n seconds. Holds cached file attributes for no more than n seconds. The maximum value you can specify is 3600. Sets all four attributes' cache timeout values to n. Does not set attribute caching. This option is equivalent to actimeo=0. Does not get a fresh attribute when opening a file.

The NFS Update Visibility Option defaults are acdirmin=30, acdirmax=60, acregmin=3, and acregmax=60.  

CDFS Options

The following options are valid for the CD-ROM File System (CDFS): Ignores 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. Uses the on-disk permission bits, if present. If a file or directory is not recorded with permission bits, the default 0555 is used. Strips 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. File 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.
This option does not work correctly if file names contain multibyte characters, such as those in the SJIS and BIG-5 codesets that are commonly used in Japan and Taiwan, respectively. When file names contain multibyte characters, using the noversion option is likely to corrupt the display of some characters in the name. Uses 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 for CDFS are ro, nodev, and defperm.  

DESCRIPTION

Use the mount command to make a file system available for use, or mounted. Use the umount command to make a file system unavailable for use, or unmounted.

The format used in the mount command determines the format returned by getfsstat and getmntinfo.

If the mount command is invoked with only a file-system or directory specified, the command searches the /etc/fstab file for an entry whose file-system or directory field matches the argument specified with the command.

For example, if the line /dev/rz0g /usr ufs rw 1 1 is specified in the /etc/fstab file, both of these two commands, mount /usr and mount /dev/rz0g are equivalent to the following command: # mount /dev/rz0g /usr

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 directory mount point can be specified in the command line.

To use the mount and unmount commands, you must be the root user. An exception to this restriction is made when NFS file systems have been explicitly exported to allow nonroot users to mount the file system. Refer to the -n option of mountd(8) for more information.

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

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?? / 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 not to 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 command to map the device numbers of the device special files on the disc to new device numbers used by the operating system.

message The mount command attempts to dynamically load the cdfs kernel modules if they are not statically built into the running kernel. However, you must be the root user to dynamically load the cdfs kernel modules. Other users receive the following error should they attempt the operation:

mount: super user priviliges required to load cdfs module

All other errors that could occur as the cdfs kernel modules are being dynamically loader produce the following error message:

mount: Can't load cdfs module

Refer to cdfs(4) for information on the correct system configuration options to set before using CDFS.

NFS mounts can fail due to authentication requirements on the server. For example, a Client credential too weak message is returned if a normal user attempts to mount and the server only allows root user mounting. A Server rejected credential message is returned if the server is not able to resolve the client's IP address.

If your workstation has multiple network interfaces, the server must be able to resolve all IP addresses from which it might receive mount requests. See the mountd(8) reference page or the Network Administration manual for more information.

When you mount the first fileset in an AdvFS domain, AdvFS determines whether or not it can access all data in all volumes of that domain. If AdvFS determines that the size of any volume in the domain is actually smaller than the size recorded for that volume in the domain's metadata, there are two possible outcomes: The mount succeeds, but in read-only mode. In this case, AdvFS is able to read the last currently in-use block on the volume. A message similar to the following is displayed: Actual size of virtual disk /dev/vol/vol01 is 100352 blocks but recorded size is 102400 blocks. Mounting fileset staff#grads in read-only mode. The mount fails. In this case, AdvFS cannot read the last currently in-use block on the volume. A message similar to the following is displayed: Actual size of virtual disk /dev/vol/vol01 is 100352 blocks but recorded size is 102400 blocks. Cannot read essential data on /dev/vol/vol01. Corrupted volume found; failing mount of staff#grads. staff#grads on /grads: I/O error

When you attempt to mount an AdvFS fileset in an AdvFS domain, the number of volumes pointed to by the /etc/fdmns/dmn_name links must equal the number of volumes in the domain. If you attempt to mount an AdvFS file system with an incorrect number of volumes, the following message will appear on the console: # Volume count mismatch for domain dmn_name. dmn_name expects 2 volumes, /etc/fdmns/dmn_name has 1 links. To correct the problem , you must match the number of volumes and then mount them. See advscan(8) for more information.  

RESTRICTIONS

The mount and umount commands support mount point argument pathnames of up to MNAMELEN, which includes the null terminating character. MNAMELEN can be up to 90 characters long, including the null terminating character.  

ERRORS

The following warning messages are displayed only if you use the -v option. Warning: partition special-device and overlapping partition(s) are marked in use in the disklabel.

The specified partition overlaps with another partition or partitions that have the fstype field set. Warning: partition(s) which overlap special-device are marked in use in the disklabel.
The partition overlaps another partition or partitions that have the fstype field set. Warning: the disklabel for special-device does not exist or is corrupted.
The device specified either does not have a disklabel or the disklabel has been corrupted. Warning: unable to check special-device against active AdvFS domains because the directory /etc/fdmns seems to be missing or wrong.
There was a failure when checking the overlap with AdvFS domains. The failure is with /etc/fdmns or /etc/fdmns/dom, or and active domain does not exist. Warning: unable to check special-device against active swap devices because special swap files are missing.
A failure occurred when checking the overlap with active swap devices. The special device files associated with active swap devices are invalid. Warning: unknown overlap condition errno encountered for partition special-device.
An unknown overlap condition was encountered for the specified device.

The following are fatal error messages. Error: an overlapping partition is open.

A partition that overlaps the specified partition is open. Error: special-device is an invalid device or cannot be opened.
The specified device is invalid and an overlapping partition is open. Error: special-device contains a fstype file system.
The specified partition and overlapping partitions have the fstype field set. Error: Unknown severe error errno encountered for partition special-device.
An unknown overlap condition was encountered for the specified device.
 

EXAMPLES

To mount a local disk, enter:

% mount /dev/rz0g /usr To mount an AdvFS fileset, enter:
% mount -t advfs usr_dmn#user1 /usr/user1 or
% mount usr_dmn#user1 /usr/user1 To mount all ufs file systems, enter:
% mount -at ufs To mount a remote file system, enter:
% mount -t nfs serv:/usr/src /usr/src To mount a remote file system with a hard mount, enter:
% mount -o hard serv:/usr/src /usr/src 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 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

Specifies the command path. Specifies the command path. Contains static information about file systems.  

RELATED INFORMATION

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

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

Files: advfs(4), cdfs(4), fstab(4), mountdtab(4), proplist(4), acl(4) delim off


 

Index

NAME
SYNOPSIS
PARAMETERS
FLAGS
Flags for mount:
Flags for umount:
mount -o Flag Options
AdvFS Options
UFS Option
UFS and NFS Options
NFS-Specific Options
NFS Update Visibility Options
CDFS Options
DESCRIPTION
RESTRICTIONS
ERRORS
EXAMPLES
FILES
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:40:37 GMT, October 02, 2010