Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mntent(5) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getmntent, setmntent, addmntent, endmntent, hasmntopt

fsck

mount

quotacheck

quotaon



MNTENT(5,F)                 AIX Technical Reference                 MNTENT(5,F)



-------------------------------------------------------------------------------
mntent, mtab



PURPOSE

Contains information about mounted file systems.

SYNOPSIS

#include <mntent.h>

DESCRIPTION

The file /etc/mtab describes the file systems currently mounted on the local
machine.  It is a symbolic link to a local-only file.  To find out about file
systems mounted on other sites in a TCF cluster, specify a specific site's
<LOCAL>/mtab file to the setmtnent routine.

The file /etc/mtab is created at system-startup time to include the root and
<LOCAL> file systems by the setmnt command.  When run, the mount command adds
entries to the /etc/mtab file, and the umount command removes entries.

The /etc/mtab file consists of a number of lines of the form:

       fsname dir type opts freq passno flags gfs pack time

For example,

       /dev/xy0a/ufs rw,noquota 1 2 40 1 7 604161472

The entries in this file are accessed using the routines in getmntent, 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;     /* ufs, nfs */
             char     *mnt_opts;     /* ro, quota, etc. */
             int      mnt_freq;      /* dump frequency, in days */
             int      mnt_checkno;   /* check number for parallel fsck */
             char     *mnt_flags;    /* file system flags */
             gfs_t    mnt_gfs;       /* global file system numbers */
             pckno_t  mnt_pack;      /* pack number */
             long     mnt_time;      /* time when mounted */
      };

There is one entry per line in the file and the fields are separated by blanks.

The mnt_opts field consists of a string of options separated by commas.  Some
of the options are common to all file system types while others only make sense



Processed November 7, 1990        MNTENT(5,F)                                 1





MNTENT(5,F)                 AIX Technical Reference                 MNTENT(5,F)



for a single file system type.  For more information on the options available
with the mount command, see AIX Operating System Commands Reference.

The mnt_type field determines how the mnt_fsname and mnt_opts fields will be
interpreted.  Below is a list of file system types currently supported and the
way in which each interprets these fields:

+-----------+------------+----------------------------------------------------+
|ufs        | mnt_fsname | Must be a block special device.                    |
+-----------+------------+----------------------------------------------------+
|           | mnt_opts   | Valid options are ro, rw, suid, nosuid, quota,     |
|           |            | noquota.                                           |
+-----------+------------+----------------------------------------------------+
|nfs        | mnt_fsname | The path on the server of the directory to be      |
|           |            | served.                                            |
+-----------+------------+----------------------------------------------------+
|           | mnt_opts   | Valid options are ro, rw, suid, nosuid, hard,      |
|           |            | soft, bg, fg, retry, rsize, wsize, timeo, retrans, |
|           |            | port, intr.                                        |
+-----------+------------+----------------------------------------------------+

The mnt_freq field indicates how often each partition should be dumped by the
dumpbsd command, and also triggers the w option of the dumpbsd command
indicating the file systems that should be dumped.  Most systems set the
mnt_freq field to 1, indicating that the file systems are dumped each day.

The mnt_checkno field is used by the disk consistency check program fsck to
control simultaneous checking of file systems during a reboot.  To avoid having
two file systems checked simultaneously, make sure the values of mnt_checkno
are the same.

The mnt_flags field corresponds to the s_flags field in the file system super
block.  For more information, see "fs."

The mnt_gfs field indicates the global file system number for the file system.

The mnt_pack field indicates the global file system pack number for the file
system.

The mnt_time field indicates the time the file system was mounted by specifying
the number of seconds since Jan 1, 1970 00:00:00 GMT.

FILE

/etc/mtab

RELATED INFORMATION

In this book:  "getmntent, setmntent, addmntent, endmntent, hasmntopt."

The fsck, mount, quotacheck, and quotaon commands in AIX Operating System
Commands Reference.



Processed November 7, 1990        MNTENT(5,F)                                 2



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