mount(1M)
mount, umount - mount and unmount filesystems
As shipped in IRIX 6.5.7. Last changed in IRIX 6.5.5.
NAME mount, umount - mount and unmount filesystems SYNOPSIS mount mount [ -M altmtab ] [ -P prefix ] -p mount [ -h host ] [ -fnrv ] mount -a[cfnvC] [ -t type ] [ -T list ] [-m numprocs ] mount [ -cfnvC ] [ -t type ] [ -T list ] [ -b list ] mount [ -cfnrvC ] [ -t type ] [ -T list ] [ -o options ] fsname dir mount [ -cfnrvC ] [ -o options ] fsname | dir umount -a[kv] [ -t type ] [-m numprocs ] [ -T list ] umount -h host [ -kv ] [-m numprocs ] [ -b list ] umount [ -kv ] fsname | dir [ fsname | dir ] ... DESCRIPTION mount attaches a named filesystem fsname to the filesystem hierarchy at the pathname location dir. The directory dir must already exist. It becomes the name of the newly mounted root. The contents of dir are hidden until the filesystem is unmounted. If fsname is of the form host:path, the filesystem type is assumed to be nfs. umount unmounts a currently mounted filesystem, which can be specified either as a mounted-on directory or a filesystem. mount and umount maintain a table of mounted filesystems in /etc/mtab, described in mtab(4). If invoked without an argument, mount displays the table. If invoked with only one of fsname or dir, mount searches the file /etc/fstab (see fstab(4)) for an entry whose dir or fsname field matches the given argument. For example, if this line is in /etc/fstab: /dev/usr /usr xfs rw 0 0 then the commands mount /usr and mount /dev/usr are shorthand for mount /dev/usr /usr. MOUNT OPTIONS -a Attempt to mount all the filesystems described in /etc/fstab. (In this case, fsname and dir are taken from /etc/fstab.) If a type is specified with -t, all of the filesystems in /etc/fstab with that type are mounted. Multiple types may be specified with the -T option. Filesystems are not necessarily mounted in the order listed in /etc/fstab. If the -m option is specified, its argument is used to limit the number of processes used to mount all of the file systems in parallel. -b list (all-but) Attempt to mount all of the filesystems listed in /etc/fstab except for those associated with the directories contained in list. list consists of one or more directory names separated by commas. -c Invoke fsstat(1M) on each filesystem being mounted, and if it indicates that the filesystem is dirty, call fsck(1M) to clean the filesystem. fsck is passed the -y option. This option applies only to EFS filesystems, not to XFS filesystems. -f Fake a new /etc/mtab entry, but do not actually mount any filesystems. -h host Mount all filesystems listed in /etc/fstab that are remote- mounted from host. -m numprocs Use no more than numprocs processes to mount the specified file systems in parallel. The default number of processes used is 16. This option is only meaningful when used in conjunction with the -a option. -n Mount the filesystem without making an entry in /etc/mtab. -o options Specify options, a list of comma-separated words, described in fstab(4). -p Print the list of mounted filesystems in a format suitable for use in /etc/fstab. -r Mount the specified filesystem read-only. This is a shorthand for: mount -o ro fsname dir Physically write-protected and magnetic tape filesystems must be mounted read-only, or errors occur when access times are updated, whether or not any explicit write is attempted. -t type The next argument is the filesystem type. The accepted types are proc, efs, xfs, nfs, fd, cachefs, dos, hfs and iso9660; see fstab(4) and the filesystems(4) man page for more information on the supported filesystem types. for a description of these filesystem types. When this option is used, mount calls another program of the form mount_typename, where typename is one of the above types. This program must be on the default path. -T list The next argument is a comma-separated list of filesystem types. This option is usually used in combination with -a or -b. -v (verbose) mount displays a message indicating the filesystem being mounted and any problems encountered. -M altmtab Instead of /etc/mtab, use the mtab or fstab altmtab. -P prefix Used with the -p option, prepends prefix to the emitted filesystem and directory paths. Doesn't alter pathnames embedded in the options, such as the filesystem's raw=path raw device pathname. UMOUNT OPTIONS -a Attempt to unmount all the filesystems currently mounted (listed in /etc/mtab). In this case, fsname is taken from /etc/mtab. NOTE: The use of umount -a is NOT symmetric with mount -a, because the first is based on the mtab file, while the second is based on the fstab file. Typical differences are the /proc, /hw, and /dev/fd filesystems. -b list (all-but) Attempt to unmount all of the filesystems currently mounted except for those associated with the directories contained in list. list consists of one or more directory names separated by commas. Using umount -a itself is not usually a good idea, because it can not be reversed by the command mount -a since a number of filesystems are often not in the /etc/fstab file. Among these are the proc and fd filesystems. Instead, use a command similar to umount -T xfs,efs -h host Unmount all filesystems listed in /etc/mtab that are remote- mounted from host. -m numprocs Use no more than numprocs processes to unmount the specified file systems in parallel. The default number of processes used is 16. This option is only meaningful when used in conjunction with the -a, -t or -h options. -k Attempt to kill processes that have open files or current directories in the appropriate filesystems and then unmount them. -t type Unmount all filesystems of a given filesystem type. The accepted types are proc, efs, xfs, nfs, fd, cachefs, dos, hfs, and iso9660. -T list Unmount all filesystems whose type is in the comma-separated list given. -v (verbose) umount displays a message indicating the filesystem being unmounted and any problems encountered. -C Disable overlapping partition/volume checks. By default mount checks to see if the destination partition or logical volume overlaps any mounted or reserved partitions in the system. If an overlap or mount conflict is found, the user will be notified and prevented from potentially corrupting the existing data. For systems with a large number of disks, this additional checking may add noticable overhead to the command's execution time. For situations where command performance is necessary, this switch may be used to disable the safeguards. Due to the potential for user-error causing corrupted filesystems or other on-disk data corruption, we strongly discourage use of this switch in normal operation. EXAMPLES mount /dev/usr /usr mount a local disk mount -avt xfs mount all xfs filesystems; be verbose mount -t nfs server:/d /net/d mount remote filesystem mount server:/d /net/d same as above mount -o soft server:/d /net/d same as above but soft mount mount -p > /etc/fstab save current mount state mount -t dos /dev/rdsk/fds0d2.3.5 /floppy mount a MS-DOS floppy mount -t hfs /dev/rdsk/fds0d3.3.5hi /floppy mount a Macintosh HFS floppy mount -t hfs /dev/rdsk/dks0d7vol /cdrom mount an HFS CD-ROM mount -t iso9660 /dev/rdsk/dks0d7vol /cdrom mount an ISO 9660 CD-ROM mount server:/cdrom /net/cdrom mount remote iso9660 filesystem mount -M /root/etc/fstab -P /root -p | sed 's;raw=/;raw=/root/' >> /etc/fstab append /root/etc/fstab with /root prefix to currently active fstab. umount -t nfs -b /foo unmount all nfs filesystems except /foo ERROR MESSAGES From mount: mount: device on mountdir: Invalid argument This message appears for a wide variety of problems. It doesn't usually indicate that you have specified the command line incorrectly; rather that there is something wrong with the disk partition, the filesystem in the disk partition, or the mount directory. For example, this error message occurs if you try to mount a device that doesn't contain a valid filesystem. From umount: mountdir: Resource busy Possible causes of a this message are: open files in the filesystem, programs being executed from the filesystems, and users whose current directory is in the filesystem. Usually it is not possible to unmount the /usr filesystem because many daemons, such as /usr/lib/lpsched, /usr/etc/ypbind, and /usr/etc/syslogd, execute from the /usr filesystem. The simplest way to make sure the /usr filesystem is not busy is to bring the system down to single-user mode with the single(1M) command. You can force all filesystems except the root filesystem to be unmounted with the umount -k option (note that this kills processes). To unmount the root filesystem, you must be running the miniroot. FILES /etc/fstab filesystem table /etc/mtab mount table /etc/mntproc script to mount /proc SEE ALSO fsck(1M), mountd(1M), nfsd(1M), mount(2), umount(2), filesystems(4), fstab(4), mtab(4). BUGS umount can mismanage the /etc/mtab mount table if another mount or umount call is in progress at the same time. Mount calls another "helper" program of the form mount_typename, where typename is one of the accepted mount types. If this program is not on the default path, then mount returns with an error message about unknown filesystem. The user must make sure that the helper mount program is in the path. For example, /usr/etc must be in the path to mount an iso9660 CD. NOTE If the directory on which a filesystem is to be mounted is a symbolic link, the filesystem is mounted on the directory to which the symbolic link refers, rather than being mounted on top of the symbolic link itself. The helper program mount_iso9660 is in the optional package eoe.sw.cdrom. This package must be installed in order to mount iso9660 filesystems. The mount command attempts to assure that the blocksize of the device matches that specified in the device volume header.