MOUNT(8)

NAME
mount, umount - mount and dismount filesystems

SYNOPSIS
/etc/mount [ -p ]
/etc/mount -a[fv] [ -t type ]
/etc/mount [ -frv ] [ -t type ] [ -o options ] fsname dir
/etc/mount [ -vf ] fsname | dir

/etc/umount [ -t type ] [ -h host ]
/etc/umount -a[v]
/etc/umount [ -v ] [fsname | dir] ...

DESCRIPTION
Mount announces to the system that a filesystem fsname is to be attached to the file tree at the directory 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(4).

Umount announces to the system that the filesystem fsname previously mounted on directory dir should be removed. Either the filesystem name or the mounted-on directory may be used.

mount and umount maintain a table of mounted filesystems in /etc/mtab, described in mtab(5). 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(5)) for an entry whose dir or fsname field matches the given argument. For example, if this line is in /etc/fstab: /dev/xp0g /usr 4.2 rw 1 1 then the commands mount /usr and mount /dev/xp0g are shorthand for mount /dev/xp0g /usr

MOUNT OPTIONS

-p  Print the list of mounted filesystems in a format suitable for use in /etc/fstab.

-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, all of the filesystems in /etc/fstab of that type is mounted. Filesystems are not necessarily mounted in the order listed in /etc/fstab.

-f  Fake a new /etc/mtab entry, but do not actually mount any filesystems.

-v  Verbose. Mount displays a message indicating the filesystem being mounted.

-t  The next argument is the filesystem type. The accepted types are 4.2 and nfs. Refer to fstab(5) for a description of these filesystem types.

-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.

-o  Specify options, a list of comma separated words from the list below. Some options are valid for all filesystem types, while others apply to a specific type only.

    options valid on all file systems (the default is rw, suid):

    rw  read/write.

    ro  read-only.

    suid
        set-uid execution allowed.

    nosuid
        set-uid execution not allowed.

    hide
        ignore this entry during a mount -a command. This allows you to allow you to define fstab(5) entries for commonly used filesystems you don't want to automatically mount.

    options specific to 4.2 file systems (the default is noquota):

    quota
        usage limits enforced.

    noquota
        usage limits not enforced.

    options specific to nfs (NFS) file systems. The defaults are:

    fg,retry=1,timeo=7,retrans=4,port=NFS_PORT,hard

    with defaults for rsize and wsize set by the kernel:

    bg  if the first mount attempt fails, retry in the background.

    fg  retry in foreground.

    retry=n
        set number of mount failure retries to n.

    rsize=n
        set read buffer size to n bytes.

    wsize=n
        set write buffer size to n bytes.

    timeo=n
        set NFS timeout to n tenths of a second.

    retrans=n
        set number of NFS retransmissions to n.

    port=n
        set server IP port number to n.

    soft
        return error if server doesn't respond.

    hard
        retry request until server responds.

    intr
        allow keyboard interrupts on hard mounts.

    The bg option causes mount to run in the background if the server's mountd(8) does not respond. Mount attempts each request retry=n times before giving up. Once the filesystem is mounted, each NFS request made in the kernel waits timeo tenths of a second for a response. If no response arrives, the time-out is multiplied by 2 and the request is retransmitted. When retrans retransmissions have been sent with no reply a soft mounted filesystem returns an error on the request and a hard mounted filesystem retries the request. Filesystems 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.

UMOUNT OPTIONS

-h host
    Unmount all filesystems listed in /etc/mtab that are remote-mounted from host.

-a  Attempt to unmount all the filesystems currently mounted (listed in /etc/mtab). In this case, fsname is taken from /etc/mtab.

-v  Verbose — umount displays a message indicating the filesystem being unmounted.

EXAMPLES
mount /dev/xp0g /usr            	mount a local disk
mount -at 4.2                  	mount all 4.2 filesystems
mount -t nfs serv:/usr/src /usr/src	mount remote filesystem
mount serv:/usr/src /usr/src    	same as above
mount -o hard serv:/usr/src /usr/src	same as above but hard mount
mount -p > /etc/fstab          	save current mount state

FILES
/etc/mtab    mount table
/etc/fstab    filesystem table

SEE ALSO
mount(2), unmount(2), fstab(5), mountd(8c), nfsd(8c)

BUGS
Mounting filesystems full of garbage crashes the system.

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.