Whamcloud - gitweb
Allow default inode_size to be specified in mke2fs.conf and document mke2fs -I
[tools/e2fsprogs.git] / misc / mke2fs.conf.5.in
1 .\" -*- nroff -*-
2 .\" Copyright 2006 by Theodore Ts'o.  All Rights Reserved.
3 .\" This file may be copied under the terms of the GNU Public License.
4 .\" 
5 .TH mke2fs.conf 5 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6 .SH NAME
7 mke2fs.conf \- Configuration file for mke2fs
8 .SH DESCRIPTION
9 .I mke2fs.conf
10 is the configuration file for 
11 .BR mke2fs (8).  
12 It controls the default parameters used by 
13 .BR mke2fs (8)
14 when it is creating ext2 or ext3 filesystems.
15 .PP
16 The
17 .I mke2fs.conf
18 file uses an INI-style format.  Stanzas, or top-level sections, are 
19 delimited by square braces: [ ].  Within each section, each line 
20 defines a relation, which assigns tags to values, or to a subsection,
21 which contains further relations or subsections.   
22 .\" Tags can be assigned multiple values
23 An example of the INI-style format used by this configuration file 
24 follows below:
25 .P
26         [section1]
27 .br
28                 tag1 = value_a
29 .br
30                 tag1 = value_b
31 .br
32                 tag2 = value_c
33 .P
34         [section 2]
35 .br
36                 tag3 = {
37 .br
38                         subtag1 = subtag_value_a
39 .br
40                         subtag1 = subtag_value_b
41 .br
42                         subtag2 = subtag_value_c
43 .br
44                 }
45 .br
46                 tag1 = value_d
47 .br
48                 tag2 = value_e
49 .br
50         }
51 .P
52 Comments are delimited by a semicolon (';') or a hash ('#') character 
53 at the beginning of the comment, and are terminated by the end of 
54 line character.
55 .P
56 Tags and values must be quoted using double quotes if they contain
57 spaces.  Within a quoted string, the standard backslash interpretations 
58 apply: "\en" (for the newline character), 
59 "\et" (for the tab character), "\eb" (for the backspace character), 
60 and "\e\e" (for the backslash character).
61 .P
62 The following stanzas are used in the 
63 .I mke2fs.conf
64 file.  They will be described in more detail in future sections of this
65 document.
66 .TP 
67 .I [defaults]
68 Contains relations which define the default parameters 
69 used by
70 .BR mke2fs (8).
71 In general, these defaults may be overridden by a definition in the
72 .B fs_types
73 stanza, or by an command-line option provided by the user.
74 .TP 
75 .I [fs_types]
76 Contains relations which define defaults that should be used for specific
77 filesystem types.  The filesystem type can be specified explicitly using
78 the 
79 .B -T
80 option to
81 .BR mke2fs (8).
82 If no filesystem type is specified, 
83 .BR mke2fs (8)
84 will use the filesystem type 
85 .I floppy
86 if the filesystem size is less than or equal to 3 megabytes.  
87 If the filesystem size is greater than 3 but less than or equal to 
88 512 megabytes, 
89 .BR mke2fs (8)
90 will use the filesystem
91 .IR small .
92 Otherwise, 
93 .BR mke2fs (8)
94 will use the default filesystem type
95 .IR default .
96 .SH THE [defaults] STANZA
97 The following relations are defined in the 
98 .I [defaults]
99 stanza.
100 .TP
101 .I base_features
102 This relation specifies the filesystems features which are enabled in
103 newly created filesystems.  It may be overridden by the
104 .I base_features
105 relation found in the filesystem-type-specific subsection of
106 the
107 .I [fs_types] 
108 stanza.
109 .TP
110 .I default_features
111 This relation specifies a set of features that should be added or
112 removed to the features listed in the
113 .I base_features
114 relation.  It may be overridden by the filesystem-specific 
115 .I default_features
116 in the filesystem-type subsection of
117 .IR [fs_types] ,
118 and by the 
119 .B -O
120 command-line option
121 to 
122 .BR mke2fs (8).
123 .TP
124 .I blocksize
125 This relation specifies the default blocksize if the user does not
126 specify a blocksize on the command line, and the filesystem-type
127 specific section of the configuration file does not specify a blocksize.
128 .TP
129 .I inode_ratio
130 This relation specifies the default inode ratio if the user does not
131 specify one on the command line, and the filesystem-type
132 specific section of the configuration file does not specify a default
133 inode ratio.
134 .TP
135 .I inode_size
136 This relation specifies the default inode size if the user does not
137 specify one on the command line, and the filesystem-type
138 specific section of the configuration file does not specify a default
139 inode size.
140 .SH THE [fs_types] STANZA
141 Each tag in the
142 .I [fs_types] 
143 stanza names a filesystem type which can be specified via the 
144 .B -T
145 option to
146 .BR mke2fs (8).
147 The value of the tag is a subsection where the relations in that
148 subsection define the defaults for that filesystem type. For
149 example:
150 .P
151 [fs_types]
152 .br
153         small = {
154 .br
155                 blocksize = 1024
156 .br
157                 inode_ratio = 4096
158 .br
159         }
160 .br
161         floppy = {
162 .br
163                 blocksize = 1024
164 .br
165         }
166 .P
167 For each filesystem type, the following tags may be used in that 
168 fs_type's subsection:
169 .TP
170 .I base_features
171 This relation specifies the features which are enabled for this
172 filesystem type.
173 .TP
174 .I default_features
175 This relation specifies set of features which should be enabled or 
176 disabled to the features listed in the
177 .I base_features
178 relation.  It may be overridden by the 
179 .B -O
180 command-line option to
181 .BR mke2fs (8).
182 .TP
183 .I blocksize
184 This relation specifies the default blocksize if the user does not
185 specify a blocksize on the command line.
186 .TP
187 .I inode_ratio
188 This relation specifies the default inode ratio if the user does not
189 specify one on the command line.
190 .TP
191 .I inode_size
192 This relation specifies the default inode size if the user does not
193 specify one on the command line.
194 .SH FILES
195 .TP
196 .I /etc/mke2fs.conf
197 The configuration file for 
198 .BR mke2fs (8).
199 .SH SEE ALSO
200 .BR mke2fs (8)