Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

automount(1M)

catsearchd(1M)

exportfs(1M)

mountd(1M)

nfsd(1M)

fsmount(2)

unmount(2)

mount(3)

umount(3)

fstab(4)

mtab(4)




mount(1M) mount(1M)
NAME mount, umount - mount and unmount file systems SYNOPSIS mount [-p] mount -a [-f] [-n] [-r] [-v] [-t type] [-T type] mount [-f] [-n] [-r] [-v] [-t type] [-T type] [-o options] device-file mountpoint umount [-v] -h host umount -a [-v] umount [-v] [device-file]... umount [-v] [mountpoint]... ARGUMENTS -a Attempts to mount all the file systems described in /etc/fstab, when used with mount. In this case, device-file and mountpoint are established by /etc/fstab. If you specify a file-system type with the -t or -T option, all the file systems in /etc/fstab of that type are mounted. When you use the -a option with umount, it attempts to unmount all the file systems currently mounted (listed in /etc/mtab). In this case, device-file is established by /etc/mtab. device-file Specifies the block device file that contains a UNIX file system. The major and minor numbers associated with the device file select a disk with a particular SCSI ID, and a particular partition within the disk. For more information, see gd(7). -f Creates a new entry in /etc/mtab, but does not actually mount a file system. -h host Unmounts all file systems listed in /etc/mtab that are remotely mounted from host. -n Mounts the file system without making an entry in /etc/mtab. mountpoint Specifies the directory to hold the contents of an add-on file system after it is mounted. The previous March 1993 1



mount(1M) mount(1M)
contents of the mount-point directory become hidden and inaccessible for as long as the added-on file system remains mounted. -o options Specifies mount options. The value of options is a list of comma-separated options. Some options are valid for all file-system types; others apply to a specific type only. These options are valid for all file systems: cats Enables the catsearchd daemon to prescan this file system as one step towards improving the speed of file catalog searches in the Macintosh environment. This is the default for file systems other than those remotely mounted through NFS. noauto Suppresses the display of an error if the file system is already mounted. This option makes more sense when entered into the fstab file (see fstab(4)). The /etc/fstab file is used to specify file systems that should be mounted collectively, excepting those for which the noauto option of fstab was specified. nocats Prevents the catsearchd daemon from scanning this file system (see the preceding description of cats). This is the default for file systems that you mount from an NFS server. noquota Prevents enforcement of usage limits. This option is set by default. quota Enforces usage limits. remount Remounts the file system for reading and writing if the file system is currently mounted in read- only mode and if the entry in /etc/fstab specifies the rw option. If the entry in /etc/fstab specifies that the file system is to be mounted for reading only the file system is not remounted. If the file system is not currently mounted, and remount is specified, mount displays an error message. ro Allows reading only. rw Allows reading and writing. This option is set by 2 March 1993



mount(1M) mount(1M)
default. These options are solely applicable to a file system you mount from an NFS server: acdirmax=n Holds cached attributes for no more than n seconds after a directory update. The default is 60 seconds. acdirmin=n Holds cached attributes for at least n seconds after directory update. The default is 30 seconds. acregmax=n Holds cached attributes for no more than n seconds after a file modification. The default is 60 seconds. acregmin=n Holds cached attributes for at least n seconds after a file modification. The default is 3 seconds. actimeo=n Sets the flush time extension to the number of seconds specified by n. bg Retries a mount operation in the background if the first mount attempt fails. fg Retries a mount operation in the foreground if the first mount attempt fails. This option is the default. hard Retries the request until the server responds to a disk read or write request. This option is the default. intr Allows keyboard interrupts to stop a process that would otherwise loop forever while waiting for a response from a file system that is mounted with the hard option. port=n Sets the NFS Internet Protocol (IP) port number to n, which must match the parameter setting for the host's file system that you wish to mount. retrans=n Sets the number of NFS retransmissions to n. The default is 4. March 1993 3



mount(1M) mount(1M)
retry=n Sets number of mount failure retries to n. The default is 10,000. rsize=n Sets the size of the buffer for a read request to n bytes. The default value of n is set by the kernel. soft Returns an error if the server doesn't respond to a disk read or write request. Otherwise, the client continues to retry the request. timeo=n Sets the NFS timeout to n tenths of a second. The default is 7. wsize=n Sets the size of the buffer for a write request to n bytes. The default value of n is set by the kernel. -p Displays the list of mounted file systems in a format suitable for use in /etc/fstab. -r Mounts the specified file system for reading only. This option has the same effect as -o ro. Physically write-protected and magnetic-tape file systems must be mounted for reading only. Otherwise, errors are produced as the system attempts to update ``time of last access'' information inside read-only media. -t type Unmounts all the already-mounted file systems listed in /etc/mtab that are of the type specified by type, when used with umount. The value of type can be 4.2 (UFS), 5.2 (SVFS), or nfs. When used with mount, acts the same as the -T option. -T type Specifies the file-system type for the file system that you reference through device-file. The value of type can be 4.2 (UFS), 5.2 (SVFS), or nfs; see fstab(4) for a complete description of acceptable file-system types. -v Provides verbose output rather than no output upon success - mount displays a status message for each of the file systems successfully mounted. When used with umount, this option causes umount to display the name of each mount point as its file system 4 March 1993



mount(1M) mount(1M)
is unmounted. DESCRIPTION mount makes accessible the files and directories in a file system contained on the disk or on the disk partition indicated by device-file. The topmost directory of the add-on file system is attached to the file hierarchy at mountpoint. The directory mountpoint must already exist. It serves as the entry point for the newly mounted file system for as long as the file system remains mounted. If any files or directories were located within the mountpoint directory, they become hidden. If the mount-point directory is really a symbolic link, the mount command mounts the add-on file system at the directory to which the symbolic link refers. If you specify device-file as host:mountpoint, mount assumes the file-system type is nfs, indicating a remote file system that can be reached across an TCP/IP network (see exports(4)). umount disables access to the files and directories in the add-on file system indicated by mountpoint or device-file. If a shell program is running that has its current directory set to a directory in the file system you wish to unmount, umount displays a device-busy error and leaves the file system mounted. If the file system you are unmounting is a remote file system mounted with the soft option, you may receive this error message repeatedly even after you made sure that the file system isn't busy. After a minute, when the retry-timeout period has elapsed, you will be able to run umount without receiving the error again. The mount and umount commands maintain a table of mounted file systems in /etc/mtab, described in mtab(4). If run without an argument, mount displays a table of currently mounted file systems. Note that since /etc/mtab can be modified by commands other than mount and umount, its contents may not accurately reflect what is actually mounted. If invoked with only the argument device-file or mountpoint, mount and umount search /etc/fstab for an entry whose device-file or mountpoint value matches the given argument. For example, mount /mnt and mount /dev/floppy0 March 1993 5



mount(1M) mount(1M)
are equivalent to mount /dev/floppy0 /mnt if the following line is in fstab: /dev/floppy0 /mnt 5.2 rw 1 1 Default Options for Local File Systems The default mount options for a System V File System (SVFS) or a Berkeley UNIX File System (UFS) are rw, cats, and noquota. Note that the cats and rw options may be undesirable or incompatible when they are applied to file systems residing on a CD-ROM. The cats option can interfere with your ability to quickly mount and unmount such file systems. You should specify the nocats and ro options on the command line (or in fstab) to override those defaults when mounting file systems on a CD-ROM. Default Options for Remote File Systems These are the mounting options that are established by default when a remote file system is being mounted using NFS: rw,fg,nocats,retry=10000,timeo=7,retrans=4, port=NFS_PORT,hard, acregmin=3,acregmax=60, acdirmin=30,acdirmax=60 (The default values for rsize and wsize are set by the kernel.) When mount attempts to mount a file system with the fg option and fails, mount retries the mount in the foreground (preventing you from running other commands within the same CommandShell window). If the failure occurs while A/UX is starting up, the system appears to ``freeze.'' An alternative to the fg option is the bg option, which causes mount to retry the mount in the background (allowing you to execute other commands). In either case, mount attempts each mount request the number of times specified by the retry option before giving up. Once the file system is mounted, each NFS request made in the kernel waits the amount of time specified by timeo for a response. If no response arrives, the timeout is multiplied by 2, and the request is retransmitted. When the number of retransmissions specified by retrans have been sent with no reply, a soft-mounted file system (see the description of the soft mount option) returns an error message and quits. 6 March 1993



mount(1M) mount(1M)
File systems that are mounted rw (read/write) should use the hard option to try to avoid the possibility of data loss due to a severed connection that would have been recovered by nonstop retries. The acdirmax, acdirmin, acregmax, and acregmin options specify the timeouts for flushing the attribute cache. If the file is modified before the flush time, the minimum time until flushing is extended (held off) to avoid the frequent writing of old attributes. The actimeo option extends the interval of time before the attribute cache must be flushed for regular files and directories. EXAMPLES This command mounts a local disk: mount /dev/dsk/c0d0s2 /usr This command mounts all System V file systems: mount -at 5.2 This command mounts a remote file system: mount -t nfs serv:/usr/src /usr/src This command performs a hard mount of a remote file system: mount -o hard serv:/usr/src /usr/src This command saves the state of the current mount table in /etc/fstab, so that it can serve as the basis for more automated mounting and unmounting of file systems (see fstab(4)): mount -p > /etc/fstab The preceding command will overwrite the previous contents of fstab, so you probably do not want to use this command before you make a backup of your old version of the file. WARNINGS If you mount a file system that is corrupt, the system may crash, and the corruption of data may become more widespread (see fsck(1M) for more information about repairing file systems). FILES /etc/catsearchd Executable daemon that prescans file systems (see cats March 1993 7



mount(1M) mount(1M)
option) /etc/fstab File that specifies how file systems are to be mounted /etc/mount Executable file /etc/mtab File that reflects the file systems that are currently mounted /etc/umount Executable file SEE ALSO automount(1M), catsearchd(1M), exportfs(1M), mountd(1M), nfsd(1M) fsmount(2), unmount(2), mount(3), umount(3), fstab(4), mtab(4) in A/UX Programmer's Reference 8 March 1993

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