BSD 4_3_Reno development
[unix-history] / usr / share / man / cat5 / fstab.0
CommitLineData
3922de1d
C
1
2
3
4FSTAB(5) 1990 FSTAB(5)
5
6
7
8N\bNA\bAM\bME\bE
9 fstab - static information about the filesystems
10
11S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
12 #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<f\bfs\bst\bta\bab\bb.\b.h\bh>\b>
13
14D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
15 The file /_\be_\bt_\bc/_\bf_\bs_\bt_\ba_\bb contains descriptive information about
16 the various file systems. /_\be_\bt_\bc/_\bf_\bs_\bt_\ba_\bb is only read by pro-
17 grams, and not written; it is the duty of the system
18 administrator to properly create and maintain this file.
19 Each filesystem is described on a separate line; fields on
20 each line are separated by tabs or spaces. The order of
21 records in /_\be_\bt_\bc/_\bf_\bs_\bt_\ba_\bb is important because _\bf_\bs_\bc_\bk, _\bm_\bo_\bu_\bn_\bt, and
22 _\bu_\bm_\bo_\bu_\bn_\bt sequentially iterate through /_\be_\bt_\bc/_\bf_\bs_\bt_\ba_\bb doing their
23 thing.
24
25 The first field, (_\bf_\bs__\bs_\bp_\be_\bc), describes the block special dev-
26 ice or remote filesystem to be mounted. For filesystems of
27 type u\buf\bfs\bs, the special file name is the block special file
28 name, and not the character special file name. If a program
29 needs the character special file name, the program must
30 create it by appending a ``r'' after the last ``/'' in the
31 special file name.
32
33 The second field, (_\bf_\bs__\bf_\bi_\bl_\be), describes the mount point for
34 the filesystem. For swap partitions, this field should be
35 specified as ``none''.
36
37 The third field, (_\bf_\bs__\bv_\bf_\bs_\bt_\by_\bp_\be), describes the type of the
38 filesystem. The system currently supports four types of
39 filesystems:
40
41 u\buf\bfs\bs a local UNIX filesystem
42
43 m\bmf\bfs\bs a local memory-based UNIX filesystem
44
45 n\bnf\bfs\bs a Sun Microsystems compatible ``Network File Sys-
46 tem''
47
48 s\bsw\bwa\bap\bp a disk partition to be used for swapping
49
50 The fourth field, (_\bf_\bs__\bm_\bn_\bt_\bo_\bp_\bs), describes the mount options
51 associated with the filesystem. It is formatted as a comma
52 separated list of options. It contains at least the type of
53 mount (see _\bf_\bs__\bt_\by_\bp_\be below) plus any additional options
54 appropriate to the filesystem type.
55
56 If the options ``userquota'' and/or ``groupquota'' are
57 specified, the filesystem is automatically processed by the
58 _\bq_\bu_\bo_\bt_\ba_\bc_\bh_\be_\bc_\bk(8) command, and user and/or group disk quotas are
59 enabled with _\bq_\bu_\bo_\bt_\ba_\bo_\bn(8). By default, filesystem quotas are
60
61
62
63Printed 7/27/90 June 1
64
65
66
67
68
69
70FSTAB(5) 1990 FSTAB(5)
71
72
73
74 maintained in files named _\bq_\bu_\bo_\bt_\ba._\bu_\bs_\be_\br and _\bq_\bu_\bo_\bt_\ba._\bg_\br_\bo_\bu_\bp which
75 are located at the root of the associated filesystem. These
76 defaults may be overridden by putting an equal sign and an
77 alternative absolute pathname following the quota option.
78 Thus, if the user quota file for /tmp is stored in
79 /var/quotas/tmp.user, this location can be specified as:
80
81 userquota=/var/quotas/tmp.user
82
83 The type of the mount is extracted from the _\bf_\bs__\bm_\bn_\bt_\bo_\bp_\bs field
84 and stored separately in the _\bf_\bs__\bt_\by_\bp_\be field (it is not
85 deleted from the _\bf_\bs__\bm_\bn_\bt_\bo_\bp_\bs field). If _\bf_\bs__\bt_\by_\bp_\be is ``rw'' or
86 ``ro'' then the filesystem whose name is given in the
87 _\bf_\bs__\bf_\bi_\bl_\be field is normally mounted read-write or read-only on
88 the specified special file. If _\bf_\bs__\bt_\by_\bp_\be is ``sw'' then the
89 special file is made available as a piece of swap space by
90 the _\bs_\bw_\ba_\bp_\bo_\bn(8) command at the end of the system reboot pro-
91 cedure. The fields other than _\bf_\bs__\bs_\bp_\be_\bc and _\bf_\bs__\bt_\by_\bp_\be are
92 unused. If _\bf_\bs__\bt_\by_\bp_\be is specified as ``xx'' the entry is
93 ignored. This is useful to show disk partitions which are
94 currently unused.
95
96 The fifth field, (_\bf_\bs__\bf_\br_\be_\bq), is used for these filesystems by
97 the _\bd_\bu_\bm_\bp(8) command to determine which filesystems need to
98 be dumped. If the fifth field is not present, a value of
99 zero is returned and _\bd_\bu_\bm_\bp will assume that the filesystem
100 does not need to be dumped.
101
102 The sixth field, (_\bf_\bs__\bp_\ba_\bs_\bs_\bn_\bo), is used by the _\bf_\bs_\bc_\bk(8) program
103 to determine the order in which filesystem checks are done
104 at reboot time. The root filesystem should be specified
105 with a _\bf_\bs__\bp_\ba_\bs_\bs_\bn_\bo of 1, and other filesystems should have a
106 _\bf_\bs__\bp_\ba_\bs_\bs_\bn_\bo of 2. Filesystems within a drive will be checked
107 sequentially, but filesystems on different drives will be
108 checked at the same time to utilize parallelism available in
109 the hardware. If the sixth field is not present or zero, a
110 value of zero is returned and _\bf_\bs_\bc_\bk will assume that the
111 filesystem does not need to be checked.
112
113 #define FSTAB_RW "rw" /* read-write device */
114 #define FSTAB_RO "ro" /* read-only device */
115 #define FSTAB_SW "sw" /* swap device */
116 #define FSTAB_XX "xx" /* ignore totally */
117
118 struct fstab {
119 char *fs_spec; /* block special device name */
120 char *fs_file; /* filesystem path prefix */
121 char *fs_vfstype; /* type of filesystem */
122 char *fs_mntops; /* comma separated mount options */
123 char *fs_type; /* rw, ro, sw, or xx */
124 int fs_freq; /* dump frequency, in days */
125 int fs_passno; /* pass number on parallel dump */
126
127
128
129Printed 7/27/90 June 2
130
131
132
133
134
135
136FSTAB(5) 1990 FSTAB(5)
137
138
139
140 };
141
142 The proper way to read records from /_\be_\bt_\bc/_\bf_\bs_\bt_\ba_\bb is to use the
143 routines getfsent(), getfsspec(), getfstype(), and getfs-
144 file().
145
146F\bFI\bIL\bLE\bES\bS
147 /etc/fstab
148
149S\bSE\bEE\bE A\bAL\bLS\bSO\bO
150 getfsent(3)
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195Printed 7/27/90 June 3
196
197
198