version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
TUNE2FS |
|
|
2 |
!!!TUNE2FS |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
BUGS |
|
|
8 |
AUTHOR |
|
|
9 |
AVAILABILITY |
|
|
10 |
SEE ALSO |
|
|
11 |
---- |
|
|
12 |
!!NAME |
|
|
13 |
|
|
|
14 |
|
|
|
15 |
tune2fs - adjust tunable filesystem parameters on second extended filesystems |
|
|
16 |
!!SYNOPSIS |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
__tune2fs__ [[ __-l__ ] [[ __-c__ |
|
|
20 |
''max-mount-counts'' ] [[ __-e__ ''errors-behavior'' |
|
|
21 |
] [[ __-f__ ] [[ __-i__ ''interval-between-checks'' ] |
|
|
22 |
[[ __-j__ ] [[ __-J__ ''journal-options'' ] [[ |
|
|
23 |
__-m__ ''reserved-blocks-percentage'' ] [[ __-r__ |
|
|
24 |
''reserved-blocks-count'' ] [[ __-s__ |
|
|
25 |
''sparse-super-flag'' ] [[ __-u__ ''user'' ] [[ |
|
|
26 |
__-g__ ''group'' ] [[ __-C__ ''mount-count'' ] [[ |
|
|
27 |
__-L__ ''volume-name'' ] [[ __-M__ |
|
|
28 |
''last-mounted-directory'' ] [[ __-O__ |
|
|
29 |
[[^]''feature''[[,...] ] [[ __-T__ |
|
|
30 |
''time-last-checked'' ] [[ __-U__ ''UUID'' ] |
|
|
31 |
device |
|
|
32 |
!!DESCRIPTION |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
__tune2fs__ adjusts tunable filesystem parameters on a |
|
|
36 |
Linux second extended filesystem. |
|
|
37 |
!!OPTIONS |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
__-c__ ''max-mount-counts'' |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
Adjust the maximal mounts count between two filesystem |
|
|
44 |
checks. If ''max-mount-counts'' is 0 then the number of |
|
|
45 |
times the filesystem is mounted will be disregarded by |
2 |
perry |
46 |
e2fsck(8) and the kernel. |
1 |
perry |
47 |
|
|
|
48 |
|
|
|
49 |
Staggering the mount-counts at which filesystems are |
|
|
50 |
forcibly checked will avoid all filesystems being checked at |
|
|
51 |
one time when using journaled filesystems. |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
You should strongly consider the consequences of disabling |
|
|
55 |
mount-count-dependent checking entirely. Bad disk drives, |
|
|
56 |
cables, memory, and kernel bugs could all corrupt a |
|
|
57 |
filesystem without marking the filesystem dirty or in error. |
|
|
58 |
If you are using journaling on your filesystem, your |
|
|
59 |
filesystem will __never__ be marked dirty, so it will not |
|
|
60 |
normally be checked. A filesystem error detected by the |
|
|
61 |
kernel will still force an fsck on the next reboot, but it |
|
|
62 |
may already be too late to prevent data loss at that |
|
|
63 |
point. |
|
|
64 |
|
|
|
65 |
|
|
|
66 |
See also the __-i__ option for time-dependent |
|
|
67 |
checking. |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
__-C__ ''mount-count'' |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
Set the number of times the filesystem has been mounted. Can |
|
|
74 |
be used in conjunction with -c to force an fsck on the |
|
|
75 |
filesystem at the next reboot. |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
__-e__ ''error-behavior'' |
|
|
79 |
|
|
|
80 |
|
|
|
81 |
Change the behavior of the kernel code when errors are |
|
|
82 |
detected. In all cases, a filesystem error will cause |
2 |
perry |
83 |
e2fsck(8) to check the filesystem on the next boot. |
1 |
perry |
84 |
''error-behavior'' can be one of the |
|
|
85 |
following: |
|
|
86 |
|
|
|
87 |
|
|
|
88 |
__continue__ |
|
|
89 |
|
|
|
90 |
|
|
|
91 |
Continue normal execution. |
|
|
92 |
|
|
|
93 |
|
|
|
94 |
__remount-ro__ |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
Remount filesystem read-only. |
|
|
98 |
|
|
|
99 |
|
|
|
100 |
__panic__ |
|
|
101 |
|
|
|
102 |
|
|
|
103 |
Cause a kernel panic. |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
__-f__ |
|
|
107 |
|
|
|
108 |
|
|
|
109 |
Force the tune2fs operation to complete even in the face of |
|
|
110 |
errors. This option is useful when removing the |
|
|
111 |
__has_journal__ filesystem feature from a filesystem |
|
|
112 |
which has an external journal (or is corrupted such that it |
|
|
113 |
appears to have an external journal), but that external |
|
|
114 |
journal is not available. |
|
|
115 |
|
|
|
116 |
|
|
|
117 |
__WARNING:__ Removing an external journal from a |
|
|
118 |
filesystem which was not cleanly unmounted without first |
|
|
119 |
replaying the external journal can result in severe data |
|
|
120 |
loss and filesystem corruption. |
|
|
121 |
|
|
|
122 |
|
|
|
123 |
__-g__ ''group'' |
|
|
124 |
|
|
|
125 |
|
|
|
126 |
Set the group which can use reserved filesystem blocks. The |
|
|
127 |
''group'' parameter can be a numerical gid or a group |
|
|
128 |
name. If a group name is given, it is converted to a |
|
|
129 |
numerical gid before it is stored in the |
|
|
130 |
superblock. |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
__-i__ |
|
|
134 |
''interval-between-checks''[[__d__|__m__|__w__] |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
Adjust the maximal time between two filesystem checks. No |
|
|
138 |
postfix or __d__ result in days, __m__ in months, and |
|
|
139 |
__w__ in weeks. A value of zero will disable the |
|
|
140 |
time-dependent checking. |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
It is strongly recommended that either __-c__ |
|
|
144 |
(mount-count-dependent) or __-i__ (time-dependent) |
2 |
perry |
145 |
checking be enabled to force periodic full e2fsck(8) |
1 |
perry |
146 |
checking of the filesystem. Failure to do so may lead to |
|
|
147 |
filesystem corruption due to bad disks, cables, memory, or |
|
|
148 |
kernel bugs to go unnoticed until they cause data loss or |
|
|
149 |
corruption. |
|
|
150 |
|
|
|
151 |
|
|
|
152 |
__-j__ |
|
|
153 |
|
|
|
154 |
|
|
|
155 |
Add an ext3 journal to the filesystem. If the __-J__ |
|
|
156 |
option is not specified, the default journal parameters will |
|
|
157 |
be used to create an appropriately sized journal (given the |
|
|
158 |
size of the filesystem) stored within the filesystem. Note |
|
|
159 |
that you must be using a kernel which has ext3 support in |
|
|
160 |
order to actually make use of the journal. |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
__-J__ journal-options |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
Override the default ext3 journal parameters. Journal |
|
|
167 |
options are comma separated, and may take an argument using |
|
|
168 |
the equals ('=') sign. The following journal options are |
|
|
169 |
supported: |
|
|
170 |
|
|
|
171 |
|
|
|
172 |
__size=__''journal-size'' |
|
|
173 |
|
|
|
174 |
|
|
|
175 |
Create a journal stored in the filesystem of size |
|
|
176 |
''journal-size'' megabytes. The size of the journal must |
|
|
177 |
be at least 1024 filesystem blocks (i.e., 1MB if using 1k |
|
|
178 |
blocks, 4MB if using 4k blocks, etc.) and may be no more |
|
|
179 |
than 102,400 filesystem blocks. There must be enough free |
|
|
180 |
space in the filesystem to create a journal of that |
|
|
181 |
size. |
|
|
182 |
|
|
|
183 |
|
|
|
184 |
__device=__''external-journal'' |
|
|
185 |
|
|
|
186 |
|
|
|
187 |
Attach the filesystem to the journal block device located on |
|
|
188 |
''external-journal''. The external journal must have been |
|
|
189 |
already created using the command |
|
|
190 |
|
|
|
191 |
|
|
|
192 |
__mke2fs -O journal_dev__ |
|
|
193 |
''external-journal'' |
|
|
194 |
|
|
|
195 |
|
|
|
196 |
Note that ''external-journal'' must be formatted with the |
|
|
197 |
same block size as filesystems which will be using |
|
|
198 |
it. |
|
|
199 |
|
|
|
200 |
|
|
|
201 |
Instead of specifying a device name directly, |
|
|
202 |
''external-journal'' can also be specified by either |
|
|
203 |
__LABEL=__''label'' or __UUID=__''UUID'' to |
|
|
204 |
locate the external journal by either the volume label or |
|
|
205 |
UUID stored in the ext2 superblock at the start of the |
2 |
perry |
206 |
journal. Use dumpe2fs(8) to display a journal |
1 |
perry |
207 |
device's volume label and UUID. See also the __-L__ |
2 |
perry |
208 |
option of tune2fs(8). |
1 |
perry |
209 |
|
|
|
210 |
|
|
|
211 |
Only one of the __size__ or __device__ options can be |
|
|
212 |
given for a filesystem. |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
__-l__ |
|
|
216 |
|
|
|
217 |
|
|
|
218 |
List the contents of the filesystem superblock. |
|
|
219 |
|
|
|
220 |
|
|
|
221 |
__-L__ ''volume-label'' |
|
|
222 |
|
|
|
223 |
|
|
|
224 |
Set the volume label of the filesystem. Ext2 filesystem |
|
|
225 |
labels can be at most 16 characters long; if |
|
|
226 |
''volume-label'' is longer than 16 characters, |
|
|
227 |
__tune2fs__ will truncate it and print a warning. The |
|
|
228 |
volume label can be used by mount(8), fsck(8), |
2 |
perry |
229 |
and /etc/fstab(5) (and possibly others) by specifying |
1 |
perry |
230 |
__LABEL=__''volume_label'' instead of a block special |
|
|
231 |
device name like __/dev/hda5__. |
|
|
232 |
|
|
|
233 |
|
|
|
234 |
__-m__ ''reserved-blocks-percentage'' |
|
|
235 |
|
|
|
236 |
|
|
|
237 |
Set the percentage of reserved filesystem |
|
|
238 |
blocks. |
|
|
239 |
|
|
|
240 |
|
|
|
241 |
__-M__ ''last-mounted-directory'' |
|
|
242 |
|
|
|
243 |
|
|
|
244 |
Set the last-mounted directory for the |
|
|
245 |
filesystem. |
|
|
246 |
|
|
|
247 |
|
|
|
248 |
__-O__ [[^]''feature''[[,...] |
|
|
249 |
|
|
|
250 |
|
|
|
251 |
Set or clear the indicated filesystem features (options) in |
|
|
252 |
the filesystem. More than one filesystem feature can be |
|
|
253 |
cleared or set by separating features with commas. |
|
|
254 |
Filesystem features prefixed with a caret character ('^') |
|
|
255 |
will be cleared in the filesystem's superblock; filesystem |
|
|
256 |
features without a prefix character or prefixed with a plus |
|
|
257 |
character ('+') will be added to the |
|
|
258 |
filesystem. |
|
|
259 |
|
|
|
260 |
|
|
|
261 |
The following filesystem features can be set or cleared |
|
|
262 |
using __tune2fs__: |
|
|
263 |
|
|
|
264 |
|
|
|
265 |
__sparse_super__ |
|
|
266 |
|
|
|
267 |
|
|
|
268 |
Limit the number of backup superblocks to save space on |
|
|
269 |
large filesystems. |
|
|
270 |
|
|
|
271 |
|
|
|
272 |
__filetype__ |
|
|
273 |
|
|
|
274 |
|
|
|
275 |
Store file type information in directory |
|
|
276 |
entries. |
|
|
277 |
|
|
|
278 |
|
|
|
279 |
__has_journal__ |
|
|
280 |
|
|
|
281 |
|
|
|
282 |
Create an ext3 journal (as if using the __-j__ |
|
|
283 |
option). |
|
|
284 |
|
|
|
285 |
|
|
|
286 |
After setting or clearing __sparse_super__ and |
2 |
perry |
287 |
__filetype__ filesystem features, e2fsck(8) must |
1 |
perry |
288 |
be run on the filesystem to return the filesystem to a |
|
|
289 |
consistent state. __Tune2fs__ will print a message |
|
|
290 |
requesting that the system administrator run |
2 |
perry |
291 |
e2fsck(8) if necessary. |
1 |
perry |
292 |
|
|
|
293 |
|
|
|
294 |
__Warning:__ Linux kernels before 2.0.39 and many 2.1 |
|
|
295 |
series kernels do not support the filesystems that use any |
|
|
296 |
of these features. Enabling certain filesystem features may |
|
|
297 |
prevent the filesystem from being mounted by kernels which |
|
|
298 |
do not support those features. |
|
|
299 |
|
|
|
300 |
|
|
|
301 |
__-r__ ''reserved-blocks-count'' |
|
|
302 |
|
|
|
303 |
|
|
|
304 |
Set the number of reserved filesystem blocks. |
|
|
305 |
|
|
|
306 |
|
|
|
307 |
__-s__ [[__0__|__1__] |
|
|
308 |
|
|
|
309 |
|
|
|
310 |
Turn the sparse super feature off or on. Turning this |
|
|
311 |
feature on saves space on really big filesystems. This is |
|
|
312 |
the same as using the __-O sparse_super__ |
|
|
313 |
option. |
|
|
314 |
|
|
|
315 |
|
|
|
316 |
__Warning:__ Linux kernels before 2.0.39 do not support |
|
|
317 |
this feature. Neither do all Linux 2.1 kernels; please don't |
|
|
318 |
use this unless you know what you're doing! You need to run |
2 |
perry |
319 |
e2fsck(8) on the filesystem after changing this |
1 |
perry |
320 |
feature in order to have a valid filesystem. |
|
|
321 |
|
|
|
322 |
|
|
|
323 |
__-T__ ''time-last-checked'' |
|
|
324 |
|
|
|
325 |
|
|
|
326 |
Set the time the filesystem was last checked using |
|
|
327 |
__e2fsck__. This can be useful in scripts which use a |
|
|
328 |
Logical Volume Manager to make a consistent snapshot of a |
|
|
329 |
filesystem, and then check the filesystem during off hours |
|
|
330 |
to make sure it hasn't been corrupted due to hardware |
|
|
331 |
problems, etc. If the filesystem was clean, then this option |
|
|
332 |
can be used to set the last checked time on the original |
|
|
333 |
filesystem. The format of ''time-last-checked'' is the |
|
|
334 |
international date format, with an optional time specifier, |
|
|
335 |
i.e. YYYYMMDD[[[[HHMM]SS]. The keyword __now__ is also |
|
|
336 |
accepted, in which case the last checked time will be set to |
|
|
337 |
the current time. |
|
|
338 |
|
|
|
339 |
|
|
|
340 |
__-u__ ''user'' |
|
|
341 |
|
|
|
342 |
|
|
|
343 |
Set the user who can use the reserved filesystem blocks. |
|
|
344 |
''user'' can be a numerical uid or a user name. If a user |
|
|
345 |
name is given, it is converted to a numerical uid before it |
|
|
346 |
is stored in the superblock. |
|
|
347 |
|
|
|
348 |
|
|
|
349 |
__-U__ ''UUID'' |
|
|
350 |
|
|
|
351 |
|
|
|
352 |
Set the universally unique identifier (UUID) of the |
|
|
353 |
filesystem to ''UUID''. The format of the UUID is a |
|
|
354 |
series of hex digits separated by hypthens, like this: |
|
|
355 |
''UUID'' parameter may also be one of the |
|
|
356 |
following: |
|
|
357 |
|
|
|
358 |
|
|
|
359 |
''clear'' |
|
|
360 |
|
|
|
361 |
|
|
|
362 |
clear the filesystem UUID |
|
|
363 |
|
|
|
364 |
|
|
|
365 |
''random'' |
|
|
366 |
|
|
|
367 |
|
|
|
368 |
generate a new randomly-generated UUID |
|
|
369 |
|
|
|
370 |
|
|
|
371 |
''time'' |
|
|
372 |
|
|
|
373 |
|
|
|
374 |
generate a new time-based UUID |
|
|
375 |
|
|
|
376 |
|
|
|
377 |
The UUID may be used by mount(8), fsck(8), and |
2 |
perry |
378 |
/etc/fstab(5) (and possibly others) by specifying |
1 |
perry |
379 |
__UUID=__''uuid'' instead of a block special device |
|
|
380 |
name like __/dev/hda1__. |
|
|
381 |
|
|
|
382 |
|
|
|
383 |
See uuidgen(8) for more information. If the system |
|
|
384 |
does not have a good random number generator such as |
|
|
385 |
''/dev/random'' or ''/dev/urandom'', __tune2fs__ |
|
|
386 |
will automatically use a time-based UUID instead of a |
|
|
387 |
randomly-generated UUID. |
|
|
388 |
!!BUGS |
|
|
389 |
|
|
|
390 |
|
|
|
391 |
We haven't found any bugs yet. That doesn't mean there |
|
|
392 |
aren't any... |
|
|
393 |
!!AUTHOR |
|
|
394 |
|
|
|
395 |
|
|
|
396 |
__tune2fs__ was written by Remy Card |
|
|
397 |
__tune2fs__ uses the ext2fs |
|
|
398 |
library written by Theodore Ts'o |
|
|
399 |
__ |
|
|
400 |
!!AVAILABILITY |
|
|
401 |
|
|
|
402 |
|
|
|
403 |
__tune2fs__ is part of the e2fsprogs package and is |
|
|
404 |
available from |
|
|
405 |
http://e2fsprogs.sourceforge.net. |
|
|
406 |
!!SEE ALSO |
|
|
407 |
|
|
|
408 |
|
2 |
perry |
409 |
dumpe2fs(8), __e2fsck__(8), |
|
|
410 |
mke2fs(8) |
1 |
perry |
411 |
---- |