1e2fsck.conf(5)                File Formats Manual               e2fsck.conf(5)
2
3
4

NAME

6       e2fsck.conf - Configuration file for e2fsck
7

DESCRIPTION

9       e2fsck.conf  is  the configuration file for e2fsck(8).  It controls the
10       default behavior of e2fsck(8) while it is checking ext2, ext3, or  ext4
11       filesystems.
12
13       The  e2fsck.conf  file uses an INI-style format.  Stanzas, or top-level
14       sections, are delimited by square braces: [ ].   Within  each  section,
15       each  line  defines  a  relation, which assigns tags to values, or to a
16       subsection, which contains further relations or subsections.  An  exam‐
17       ple  of  the  INI-style  format used by this configuration file follows
18       below:
19
20            [section1]
21                 tag1 = value_a
22                 tag1 = value_b
23                 tag2 = value_c
24
25            [section 2]
26                 tag3 = {
27                      subtag1 = subtag_value_a
28                      subtag1 = subtag_value_b
29                      subtag2 = subtag_value_c
30                 }
31                 tag1 = value_d
32                 tag2 = value_e
33            }
34
35       Comments are delimited by a semicolon (';') or a hash  ('#')  character
36       at  the beginning of the comment, and are terminated by the end of line
37       character.
38
39       Tags and values must be quoted using double quotes if they contain spa‐
40       ces.   Within  a  quoted string, the standard backslash interpretations
41       apply: "\n" (for the newline character), "\t" (for the tab  character),
42       "\b" (for the backspace character), and "\\" (for the backslash charac‐
43       ter).
44
45       The following stanzas are used in the e2fsck.conf file.  They  will  be
46       described in more detail in future sections of this document.
47
48       [options]
49              This   stanza  contains  general  configuration  parameters  for
50              e2fsck's behavior.
51
52       [problems]
53              This stanza allows the administrator to reconfigure  how  e2fsck
54              handles various filesystem inconsistencies.
55
56       [scratch_files]
57              This  stanza  controls  when  e2fsck will attempt to use scratch
58              files to reduce the need for memory.
59

THE [options] STANZA

61       The following relations are defined in the [options] stanza.
62
63       allow_cancellation
64              If this relation is set to a boolean value of true, then if  the
65              user  interrupts  e2fsck  using  ^C,  and  the filesystem is not
66              explicitly flagged as containing errors, e2fsck will  exit  with
67              an  exit  status  of  0 instead of 32.  This setting defaults to
68              false.
69
70       accept_time_fudge
71              Unfortunately, due to Windows' unfortunate  design  decision  to
72              configure  the  hardware clock to tick localtime, instead of the
73              more proper and less error-prone UTC time, many users end up  in
74              the  situation  where the system clock is incorrectly set at the
75              time when e2fsck is run.
76
77              Historically this was usually due to some  distributions  having
78              buggy  init  scripts  and/or  installers  that  didn't correctly
79              detect this case and take appropriate countermeasures.  However,
80              it's still possible, despite the best efforts of init script and
81              installer authors to not be able to  detect  this  misconfigura‐
82              tion,  usually  due  to  a buggy or misconfigured virtualization
83              manager or the installer not having access  to  a  network  time
84              server during the installation process.  So by default, we allow
85              the superblock times to be fudged by up to 24 hours.   This  can
86              be disabled by setting accept_time_fudge to the boolean value of
87              false.  This setting defaults to true.
88
89       broken_system_clock
90              The e2fsck(8) program has some heuristics that assume  that  the
91              system clock is correct.  In addition, many system programs make
92              similar assumptions.  For example, the UUID library  depends  on
93              time  not going backwards in order for it to be able to make its
94              guarantees about issuing universally unique ID's.  Systems  with
95              broken  system clocks, are well, broken.  However, broken system
96              clocks, particularly in embedded systems, do exist.  E2fsck will
97              attempt  to  use  heuristics to determine if the time can not be
98              trusted; and to skip time-based checks if this is true.  If this
99              boolean  is set to true, then e2fsck will always assume that the
100              system clock can not be trusted.
101
102       buggy_init_scripts
103              This boolean relation is  an  alias  for  accept_time_fudge  for
104              backwards compatibility; it used to be that the behavior defined
105              by   accept_time_fudge   above   defaulted   to    false,    and
106              buggy_init_scripts  would  enable  superblock  time  field to be
107              wrong by up to 24 hours.  When we changed the default,  we  also
108              renamed this boolean relation to accept_time_fudge.
109
110       clear_test_fs_flag
111              This  boolean  relation  controls  whether or not e2fsck(8) will
112              offer to clear the test_fs flag if the ext4 filesystem is avail‐
113              able on the system.  It defaults to true.
114
115       defer_check_on_battery
116              This  boolean  relation  controls  whether  or  not the interval
117              between filesystem checks (either based on  time  or  number  of
118              mounts)  should  be doubled if the system is running on battery.
119              This setting defaults to true.
120
121       indexed_dir_slack_percentage
122              When e2fsck(8) repacks a indexed directory, reserve  the  speci‐
123              fied  percentage of empty space in each leaf nodes so that a few
124              new entries can be added to the directory without splitting leaf
125              nodes,  so  that  the  average  fill ratio of directories can be
126              maintained at a higher, more  efficient  level.   This  relation
127              defaults to 20 percent.
128
129       log_dir
130              If  the log_filename relation contains a relative pathname, then
131              the log file will be  placed  in  the  directory  named  by  the
132              log_dir relation.
133
134       log_dir_fallback
135              This  relation contains an alternate directory that will be used
136              if the directory specified by log_dir is not available or is not
137              writeable.
138
139       log_dir_wait
140              If this boolean relation is true, them if the directories speci‐
141              fied by log_dir or log_dir_fallback are not available or are not
142              yet  writeable,  e2fsck will save the output in a memory buffer,
143              and a child process will periodically test to  see  if  the  log
144              directory  has  become  available  after  the  boot sequence has
145              mounted the requiste filesytem for reading/writing.  This imple‐
146              ments  the  functionality  provided by logsave(8) for e2fsck log
147              files.
148
149       log_filename
150              This relation specifies the file name where a copy  of  e2fsck's
151              output  will  be  written.   If certain problem reports are sup‐
152              pressed using the max_count_problems relation,  (or  on  a  per-
153              problem  basis  using  the  max_count relation), the full set of
154              problem reports will be written to the log file.   The  filename
155              may contain various percent-expressions (%D, %T, %N, etc.) which
156              will be expanded so that the file name  for  the  log  file  can
157              include  things like date, time, device name, and other run-time
158              parameters.  See the LOGGING section for more details.
159
160       max_count_problems
161              This relation specifies the maximum number of problem reports of
162              a particular type will be printed to stdout before further prob‐
163              lem reports of that type are squelched.  This can be  useful  if
164              the  console is slow (i.e., connected to a serial port) and so a
165              large amount of output could end up delaying  the  boot  process
166              for a long time (potentially hours).
167
168       report_features
169              If  this  boolean  relation  is true, e2fsck will print the file
170              system features as part of its verbose reporting (i.e.,  if  the
171              -v option is specified)
172
173       report_time
174              If  this  boolean  relation  is  true, e2fsck will run as if the
175              options -tt are always specified.  This  will  cause  e2fsck  to
176              print  timing  statistics  on a pass by pass basis for full file
177              system checks.
178
179       report_verbose
180              If this boolean relation is true, e2fsck  will  run  as  if  the
181              option  -v is always specified.  This will cause e2fsck to print
182              some additional information at the end of each full file  system
183              check.
184

THE [problems] STANZA

186       Each tag in the [problems] stanza names a problem code specified with a
187       leading "0x" followed by six hex digits.  The value of  the  tag  is  a
188       subsection  where the relations in that subsection override the default
189       treatment of that particular problem code.
190
191       Note that inappropriate settings in this stanza  may  cause  e2fsck  to
192       behave  incorrectly,  or even crash.  Most system administrators should
193       not be making changes to this section without referring to source code.
194
195       Within each problem code's subsection, the following tags may be used:
196
197       description
198              This relation allows the message  which  is  printed  when  this
199              filesystem inconsistency is detected to be overridden.
200
201       preen_ok
202              This boolean relation overrides the default behavior controlling
203              whether this filesystem problem should  be  automatically  fixed
204              when e2fsck is running in preen mode.
205
206       max_count
207              This integer relation overrides the max_count_problems parameter
208              (set in the options section) for this particular problem.
209
210       no_ok  This boolean relation overrides the default behavior determining
211              whether  or not the filesystem will be marked as inconsistent if
212              the user declines to fix the reported problem.
213
214       no_default
215              This boolean relation overrides whether the default  answer  for
216              this problem (or question) should be "no".
217
218       preen_nomessage
219              This boolean relation overrides the default behavior controlling
220              whether or not  the  description  for  this  filesystem  problem
221              should be suppressed when e2fsck is running in preen mode.
222
223       no_nomsg
224              This boolean relation overrides the default behavior controlling
225              whether or not  the  description  for  this  filesystem  problem
226              should  be  suppressed  when  a  problem forced not to be fixed,
227              either because e2fsck is run with the -n option or  because  the
228              force_no flag has been set for the problem.
229
230       force_no
231              This  boolean  option, if set to true, forces a problem to never
232              be fixed.  That is, it will be as if the user  problem  responds
233              'no'  to  the  question of 'should this problem be fixed?'.  The
234              force_no option even overrides the -y option given on  the  com‐
235              mand-line (just for the specific problem, of course).
236

THE [scratch_files] STANZA

238       The following relations are defined in the [scratch_files] stanza.
239
240       directory
241              If the directory named by this relation exists and is writeable,
242              then e2fsck will attempt to use this directory to store  scratch
243              files instead of using in-memory data structures.
244
245       numdirs_threshold
246              If  this relation is set, then in-memory data structures be used
247              if the number of directories in the filesystem  are  fewer  than
248              amount specified.
249
250       dirinfo
251              This relation controls whether or not the scratch file directory
252              is used instead of an in-memory  data  structure  for  directory
253              information.  It defaults to true.
254
255       icount This relation controls whether or not the scratch file directory
256              is used instead of an in-memory  data  structure  when  tracking
257              inode counts.  It defaults to true.
258

LOGGING

260       E2fsck has the facility to save the information from an e2fsck run in a
261       directory so that a system administrator can review its output at their
262       leisure.   This allows information captured during the automatic e2fsck
263       preen run, as well as a manually started e2fsck run, to  be  saved  for
264       posterity.   This  facility is controlled by the log_filename, log_dir,
265       log_dir_fallback, and log_dir_wait relations in the [options] stanza.
266
267       The filename in log_filename may contain the following  percent-expres‐
268       sions that will be expanded as follows.
269
270       %d     The current day of the month
271
272       %D     The current date; this is a equivalent of %Y%m%d
273
274       %h     The hostname of the system.
275
276       %H     The current hour in 24-hour format (00..23)
277
278       %m     The current month as a two-digit number (01..12)
279
280       %M     The current minute (00..59)
281
282       %N     The  name  of  the block device containing the file system, with
283              any directory pathname stripped off.
284
285       %p     The pid of the e2fsck process
286
287       %s     The current time  expressed  as  the  number  of  seconds  since
288              1970-01-01 00:00:00 UTC
289
290       %S     The current second (00..59)
291
292       %T     The current time; this is equivalent of %H%M%S
293
294       %u     The name of the user running e2fsck.
295
296       %U     This percent expression does not expand to anything, but it sig‐
297              nals that any following  date  or  time  expressions  should  be
298              expressed in UTC time instead of the local timzeone.
299
300       %y     The last two digits of the current year (00..99)
301
302       %Y     The current year (i.e., 2012).
303

EXAMPLES

305       The  following recipe will prevent e2fsck from aborting during the boot
306       process when a filesystem contains orphaned files.  (Of course, this is
307       not  always  a  good idea, since critical files that are needed for the
308       security of the system could potentially  end  up  in  lost+found,  and
309       starting  the  system without first having a system administrator check
310       things out may be dangerous.)
311
312            [problems]
313                 0x040002 = {
314                      preen_ok = true
315                      description = "@u @i %i.  "
316                 }
317
318       The following recipe will cause an e2fsck logfile to be written to  the
319       directory  /var/log/e2fsck,  with  a  filename that contains the device
320       name, the hostname of the system, the date, and  time:  e.g.,  "e2fsck-
321       sda3.server.INFO.20120314-112142".    If   the   directory   containing
322       /var/log is located on the root file system which is initially  mounted
323       read-only, then the output will be saved in memory and written out once
324       the root file system has been remounted read/write.   To avoid too much
325       detail  from  being  written  to the serial console (which could poten‐
326       tially slow down the  boot  sequence),  only  print  no  more  than  16
327       instances of each type of file system corruption.
328
329            [options]
330                 max_count_problems = 16
331                 log_dir = /var/log/e2fsck
332                 log_filename = e2fsck-%N.%h.INFO.%D-%T
333                 log_dir_wait = true
334

FILES

336       /etc/e2fsck.conf
337              The configuration file for e2fsck(8).
338

SEE ALSO

340       e2fsck(8)
341
342
343
344E2fsprogs version 1.42.9         December 2013                  e2fsck.conf(5)
Impressum