MNTENT(5) UNIX Programmer’s Manual MNTENT(5) NAME mntent, fstab - static information about filesystems SYNOPSIS #include <mntent.h> DESCRIPTION NOTE: Unless NetInfo is disabled, /etc/fstab is accessed only at boot time, when it’s used to mount all file systems of type 4.3. The file /etc/fstab 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.3 rw,noquota 1 2 The entries in this file are accessed using the routines in getmntent(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.3, nfs, dos, macintosh, cfs, or ignore */ char *mnt_opts; /* ro, etc. */ int mnt_freq; /* dump frequency, in days */ int mnt_passno; /* pass number on parallel fsck */ }; There is one entry per line in the file, and the fields are separated by white space. A ‘‘#’’ as the first non-white character indicates a comment. The mnt_opts field consists of a string of comma separated options. Some of the options are common to all filesystem types, and others only make sense for a single filesystem type. It is important to specify that a removable filesys- tem (such as floppy disk) is removable, or ro if a filesys- tem is read-only. See mount(8) for a more complete descrip- tion of the options available. The mnt_type field determines how the mnt_fsname, and mnt_opts fields will be interpreted. Below is a list of the file system types currently supported and the way each of them interprets these fields. See /NextDeveloper/Headers/bsd/mntent.h for additional, though unsupported, file system types. 4.3 mnt_fsname Must be a block special device. mnt_opts Valid opts are: ro, rw, suid, nosuid. nfs mnt_fsname servername:volumename to be mounted mnt_opts Valid opts are: ro, rw, nosuid, hard, soft, bg, fg, retry, rsize, wsize, timeo, retrans, port, intr, net, secure, grpid, nosub, multi, acregmin, acregmax, noac, acdirmin, acdirmax. dos mnt_fsname Must be a raw device. mnt_opts Ignored. NOTE: This file system does not support SCSI hard disks, CD-ROMs, or 2.88 MB floppies; it supports only 720KB and 1.4 MB floppies. To mount a dos volume, the appropriate loadable kernel server must already be loaded into the system. macintosh mnt_fsname Must be a raw device. mnt_opts Ignored. NOTE: To mount a macintosh volume, the appropriate loadable kernel server must already be loaded into the system. cfs (CD-ROM file system) mnt_fsname Must be a raw device. mnt_opts Ignored. NOTE: To mount a cfs volume, the appropriate loadable kernel server must already be loaded into the system. If the mnt_type is specified as ‘‘ignore’’ the entry is ignored. This is useful to show disk partitions which are currently not used. Disks that are specified as as ‘‘ignore’’ are also not automounted by the Workspace in NEXTSTEP. This is useful when your disk has data in a for- mat that NEXTSTEP doesn’t recognize, and you want it to ignore the disk. The field mnt_freq indicates how often each partition should be dumped by the dump(8) command (and triggers that command’s w option which tells which file systems should be dumped). Most systems set the mnt_freq field to 1, indicating that the file systems are dumped each day. The final field mnt_passno is used by the disk consistency check program fsck(8) to allow overlapped checking of file systems during a reboot. All file systems with mnt_passno of 1 are first checked simultaneously, then all file systems with mnt_passno of 2, and so on. It is usual to make the mnt_passno 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 parti- tions. /etc/fstab is only read 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 /etc/fstab is important because fsck, mount, and umount process the file sequentially; file systems must appear after file systems they are mounted within. FILES /etc/fstab SEE ALSO fsck(8), getmntent(3), mount(8), quotacheck(8), quotaon(8), umount(8).
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages3 Page
-
File Size-