Whamcloud - gitweb
Change mke2fs to use /etc/mke2fs.conf as a configuration file
[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.  Sections are delimited by 
19 square braces: [ ].  Within each section, each line defines a 
20 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 The following sections are used in the 
53 .I mke2fs.conf
54 file.  They will be described in more detail in future sections of this
55 document.
56 .TP 
57 .I [defaults]
58 Contains relations which define the default parameters 
59 used by
60 .BR mke2fs (8).
61 In general, these defaults may be overridden by a definition in the
62 .B fs_types
63 section, or by an command-line option provided by the user.
64 .TP 
65 .I [fs_types]
66 Contains relations which define defaults that should be used for specific
67 filesystem types.  The filesystem type can be specified explicitly using
68 the 
69 .B -T
70 option to
71 .BR mke2fs (8).
72 If no filesystem type is specified, 
73 .BR mke2fs (8)
74 will use the filesystem type 
75 .I floppy
76 if the filesystem size is less than or equal to 3 megabytes.  
77 If the filesystem size is greater than 3 but less than or equal to 
78 512 megabytes, 
79 .BR mke2fs (8)
80 will use the filesystem
81 .IR small .
82 Otherwise, 
83 .BR mke2fs (8)
84 will use the default filesystem type
85 .IR default .
86 .SH THE [defaults] SECTION
87 The following relations are defined in the 
88 .I [defaults]
89 section.
90 .TP
91 .I base_features
92 This relation specifies the filesystems features which are enabled in
93 newly created filesystems.  It may be overriden by the
94 .I base_features
95 relation found in the filesystem-type-specific subsection of
96 the
97 .I [fs_types] 
98 section.
99 .TP
100 .I default_features
101 This relation specifies a set of features that should be added or
102 removed to the features listed in the
103 .I base_features
104 relation.  It may be overriden by the filesystem-specific 
105 .I default_features
106 in the filesystem-type subection of
107 .IR [fs_types] ,
108 and by the 
109 .B -O
110 command-line option
111 to 
112 .BR mke2fs (8).
113 .TP
114 .I blocksize
115 This relation specifies the default blocksize if the user does not
116 specify a blocksize on the command line, and the filesystem-type
117 specific section of the configuration file does not specify a blocksize.
118 .TP
119 .I inode_ratio
120 This relation specifies the default inode ratio if the user does not
121 specify one on the command line, and the filesystem-type
122 specific section of the configuration file does not specify a default
123 inode ratio.
124 .SH THE [fs_types] SECTION
125 Each tag in the
126 .I [fs_types] 
127 section names a filesystem type which can be specified via the 
128 .B -T
129 option to
130 .BR mke2fs (8).
131 The value of the tag is a subsection where the relations in that
132 subsection define the defaults for that filesystem type. For
133 example:
134 .P
135 [fs_types]
136 .br
137         small = {
138 .br
139                 blocksize = 1024
140 .br
141                 inode_ratio = 4096
142 .br
143         }
144 .br
145         floppy = {
146 .br
147                 blocksize = 1024
148 .br
149         }
150 .P
151 For each filesystem type, the following tag may be used in that 
152 fs_type's subsection:
153 .TP
154 .I base_features
155 This relation specifies the features which are enabled for this
156 filesystem type.
157 .TP
158 .I default_features
159 This relation specifies set of features which should be enabled or 
160 disabled to the features listed in the
161 .I base_features
162 relation.  It may be overriden by the 
163 .B -O
164 command-line option to
165 .BR mke2fs (8).
166 .TP
167 .I blocksize
168 This relation specifies the default blocksize if the user does not
169 specify a blocksize on the command line.
170 .TP
171 .I inode_ratio
172 This relation specifies the default inode ratio if the user does not
173 specify one on the command line.
174 .SH FILES
175 .TP
176 .I /etc/mke2fs.conf
177 The configuration file for 
178 .BR mke2fs (8).
179 .SH SEE ALSO
180 .BR mke2fs (8)