FSTAB(5)

NAME
fstab, mtab - static file system mounting table, mounted file systems table

SYNOPSIS
/etc/fstab

/etc/mtab

DESCRIPTION

The /etc/fstab file contains entries for file systems and disk partitions to mount using the mount(8) command, which is normally invoked by the rc.boot script at boot time. This file is used by various utilities that mount, unmount, check the consistency of, dump, and restore file systems. It is also used by the system itself when locating the swap partition.

The /etc/mtab file contains entries for file systems currently mounted, and is read by programs using the routines described in getmntent(3). umount(8) removes entries from this file; mount adds entries to this file.

Each entry consists of a line of the form:

    filesystem directory type options freq pass

filesystem
    is the pathname of a block-special device, the name of a remote file system in host:pathname form, or the name of a “swap file” made with mkfile(8).

directory
    is the pathname of the directory on which to mount the file system.

type
    is the file system type, which can be one of:
        4.2 to mount a block-special device
        lo  to loopback-mount a file system
        nfs to mount an exported NFS file system
        swap
            to indicate a swap partition
        ignore
            to have the mount command ignore the current entry (good for noting disk partitions that are not being used)
        rfs to mount an RFS file system
        tmp file system in virtual memory
        hsfs
            to mount an ISO 9660 Standard or High Sierra Standard with Rock Ridge extensions CD-ROM file system

options
    contains a comma-separated list (no spaces) of mounting options, some of which can be applied to all types of file systems, and others which only apply to specific types.

    4.2 options:

        quota|noquota
            Disk quotas are enforced or not enforced. The default is noquota.

    nfs options:
        bg|fg
            If the first attempt fails, retry in the background, or, in the foreground.
        noquota
            Prevent quota(1) from checking whether the user is over quota on this file system; if the file system has quotas enabled on the server, quotas will still be checked for operations on this file system.
        retry=n
            The number of times to retry the mount operation.
        rsize=n
            Set the read buffer size to n bytes.
        wsize=n
            Set the write buffer size to n bytes.
        timeo=n
            Set the NFS timeout to n tenths of a second.
        retrans=n
            The number of NFS retransmissions.
        port=n
            The server IP port number.
        soft|hard
            Return an error if the server does not respond, or continue the retry request until the server responds.
        intr
            Allow keyboard interrupts on hard mounts.
        secure
            Use a more secure protocol for NFS transactions.
        acregmin=n
            Hold cached attributes for at least n seconds after file modification.
        acregmax=n
            Hold cached attributes for no more than n seconds after file modification.
        acdirmin=n
            Hold cached attributes for at least n seconds after directory update.
        acdirmax=n
            Hold cached attributes for no more than n seconds after directory update.
        actimeo=n
            Set min and max times for regular files and directories to n seconds.
        noac
            Suppress attribute caching.

        Regular defaults are:
            fg,retry=10000,timeo=7,retrans=3,port=NFS_PORT,hard,\
            acregmin=3,acregmax=60,acdirmin=30,acdirmax=60

        actimeo has no default; it sets acregmin, acregmax, acdirmin and acdirmax

        Defaults for rsize and wsize are set internally by the system kernel.

    rfs options:
        bg|fg
            If the first attempt fails, retry in the background, or, in the foreground.
        retry=n
            The number of times to retry the mount operation.

        Defaults are the same as for NFS.

    hsfs options:
        norrip
            Disable processing of Rock Ridge extensions for the file system.

    Common options:

        ro|rw
            mount either read-only or read-write
        suid|nosuid
            setuid execution allowed or disallowed
        grpid
            Create files with BSD semantics for propagation of the group ID. With this option, files inherit the group ID of the directory in which they are created, regardless of the directory's setgid bit.
        noauto
            Do not mount this file system automatically (using `mount -a').

freq
    is the interval (in days) between dumps.

pass
    indicates whether fsck(8) should check the partition. File systems with pass 0 are not checked. When preening the file systems in /etc/fstab, fsck(8) automatically overlaps file system checks by simultaneously running one process per disk. If run in ``force'' mode (-f), fsck checks file systems with pass 1 sequentially, then overlaps the remainder of the file systems checks. In general, only the root (/) and /usr file systems need to be checked in pass 1, with others checked in the second pass.

A hash-sign (#) as the first character indicates a comment line which is ignored by routines that read this file. The order of records in /etc/fstab is important because fsck, mount, and umount process the file sequentially; an entry for a file system must appear after the entry for any file system it is to be mounted on top of.

EXAMPLES

In this example, two partitions on the local disk are 4.2 mounted. Several /export directories are loopback mounted to appear in the traditional file system locations on the local system. The /home/user directory is hard mounted read-write over the NFS, along with additional swap space in the form of a mounted swap file (see System and Network Administration for details on adding swap space):

    /dev/xy0a / 4.2 rw,noquota 1 1
    /dev/xy0b /usr 4.2 rw,noquota 1 1
    /export/tmp/localhost /tmp lo rw 0 0
    /export/var/localhost /var lo rw 0 0
    /export/cluster/sun386.sunos4.0.1 /usr/cluster lo rw 0 0
    /export/local/sun386 /usr/local lo rw 0 0
    example:/home/user /home/user nfs rw,hard,fg 0 0
    /export/swap/myswap swap swap rw 0 0

FILES
/etc/fstab
/etc/mtab

SEE ALSO
swapon(2), getmntent(3), lofs(4S), fsck(8), mkfile(8), mount(8), quotacheck(8), quotaon(8), swapon(8)

System and Network Administration