4.3BSD-UWisc/man/cat5/mntent.5

Compare this file to the similar file:
Show the results in this format:




MNTENT(5)           UNIX Programmer's Manual            MNTENT(5)



NAME
     mntent - static information about filesystems

SYNOPSIS
     #include <mntent.h>

DESCRIPTION
     The file /_e_t_c/_f_s_t_a_b describes the file systems and swapping
     partitions used by the local machine.  It is created by the
     system administrator using a text editor and processed by
     commands which mount, unmount, check consistency of, dump
     and restore file systems, and by the system in providing
     swap space.

     It consists of a number of lines of the form:

          fsname dir type opts freq passno

     an example of which would be:

          /dev/xy0a / 4.2 rw,noquota 1 2

     The entries from this file are accessed using the routines
     in _g_e_t_m_n_t_e_n_t(3), which returns a structure of the following
     form:


          struct mntent {
                 char  *mnt_fsname;  /* file system name */
                 char  *mnt_dir;     /* file system path prefix */
                 char  *mnt_type;    /* 4.2, nfs, swap, or ignore */
                 char  *mnt_opts;    /* ro, quota, etc. */
                 int   mnt_freq;     /* dump frequency, in days */
                 int   mnt_passno;   /* pass number on parallel fsck */
          };

     The fields are separated by white space, and a `#' as the
     first non-white character indicates a comment.

     The _m_n_t__t_y_p_e field determines how the _m_n_t__f_s_n_a_m_e, and
     _m_n_t__o_p_t_s fields will be interpreted.  Below is a list of the
     file system types currently supported and the way each of
     them interprets these fields.

     4.2

     mnt_fsname  Must be a block special device.

     mnt_opts    Valid opts are ro, rw, quota, noquota.

     NFS




Printed 12/27/86         21 August 1985                         1






MNTENT(5)           UNIX Programmer's Manual            MNTENT(5)



     mnt_fsname  The path on the server of the directory to be
                 served.

     mnt_opts    Valid opts are ro, rw, quota, noquota, hard,
                 soft.

     SWAP

     mnt_fsname  Must be a block special device swap partition.

     mnt_opts    Ignored.

     If the _m_n_t__t_y_p_e is specified as ``ignore'' the entry is
     ignored.  This is useful to show disk partitions which are
     currently not used.

     The field _m_n_t__f_r_e_q indicates how often each partition should
     be dumped by the _d_u_m_p(8) command (and triggers that commands
     w option which tells which file systems should be dumped).
     Most systems set the _m_n_t__f_r_e_q field to 1 indicating that the
     file systems are dumped each day.

     The final field _m_n_t__p_a_s_s_n_o is used by the disk consistency
     check program _f_s_c_k(8) to allow overlapped checking of file
     systems during a reboot.  All file systems with _m_n_t__p_a_s_s_n_o
     of 1 are first checked simultaneosly, then all file systems
     with _m_n_t__p_a_s_s_n_o of 2, and so on.  It is usual to make the
     _m_n_t__p_a_s_s_n_o of the root file system have the value 1 and then
     check one file system on each available disk drive in each
     subsequent pass to the exhaustion of file system partitions.

     /_e_t_c/_f_s_t_a_b is only _r_e_a_d by programs, and not written; it is
     the duty of the system administrator to properly create and
     maintain this file.  The order of records in /_e_t_c/_f_s_t_a_b is
     important because _f_s_c_k, _m_o_u_n_t, and _u_m_o_u_n_t process the file
     sequentially; file systems must appear _a_f_t_e_r file systems
     they are mounted within.

FILES
     /etc/fstab

SEE ALSO
     fsck(8), getmntent(3), mount(8), quotacheck(8), quotaon(8),
     umount(8)











Printed 12/27/86         21 August 1985                         2