Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | .\" Revision 1.0 93/06/3 23:00 chk |
| 2 | .\" Initial revision |
| 3 | .\" |
| 4 | .\" |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 5 | .TH TUNE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 6 | .SH NAME |
Theodore Ts'o | a7ac1df | 2003-08-24 17:56:41 -0400 | [diff] [blame] | 7 | tune2fs \- adjust tunable filesystem parameters on ext2/ext3 filesystems |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 8 | .SH SYNOPSIS |
| 9 | .B tune2fs |
| 10 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 11 | .B \-l |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 12 | ] |
| 13 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 14 | .B \-c |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 15 | .I max-mount-counts |
| 16 | ] |
| 17 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 18 | .B \-e |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 19 | .I errors-behavior |
| 20 | ] |
| 21 | [ |
Theodore Ts'o | 177ab2b | 2002-01-27 18:23:49 -0500 | [diff] [blame] | 22 | .B \-f |
| 23 | ] |
| 24 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 25 | .B \-i |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 26 | .I interval-between-checks |
| 27 | ] |
| 28 | [ |
Theodore Ts'o | 08dd830 | 2001-01-14 16:25:58 +0000 | [diff] [blame] | 29 | .B \-j |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 30 | ] |
| 31 | [ |
| 32 | .B \-J |
Theodore Ts'o | 08dd830 | 2001-01-14 16:25:58 +0000 | [diff] [blame] | 33 | .I journal-options |
| 34 | ] |
| 35 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 36 | .B \-m |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 37 | .I reserved-blocks-percentage |
| 38 | ] |
| 39 | [ |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 40 | .B \-o |
Theodore Ts'o | c65e54b | 2003-12-11 11:31:48 -0500 | [diff] [blame] | 41 | .RI [^]mount-options [,...] |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 42 | ] |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 43 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 44 | .B \-r |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 45 | .I reserved-blocks-count |
| 46 | ] |
| 47 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 48 | .B \-s |
| 49 | .I sparse-super-flag |
Theodore Ts'o | 521e368 | 1997-04-29 17:48:10 +0000 | [diff] [blame] | 50 | ] |
| 51 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 52 | .B \-u |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 53 | .I user |
| 54 | ] |
| 55 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 56 | .B \-g |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 57 | .I group |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 58 | ] |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 59 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 60 | .B \-C |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 61 | .I mount-count |
| 62 | ] |
| 63 | [ |
Theodore Ts'o | 6cb2740 | 2008-01-26 19:06:35 -0500 | [diff] [blame] | 64 | .B \-E |
| 65 | .I extended-options |
| 66 | ] |
| 67 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 68 | .B \-L |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 69 | .I volume-name |
| 70 | ] |
| 71 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 72 | .B \-M |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 73 | .I last-mounted-directory |
| 74 | ] |
| 75 | [ |
Theodore Ts'o | 896938d | 1999-10-23 01:04:50 +0000 | [diff] [blame] | 76 | .B \-O |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 77 | .RI [^] feature [,...] |
Theodore Ts'o | 896938d | 1999-10-23 01:04:50 +0000 | [diff] [blame] | 78 | ] |
| 79 | [ |
Theodore Ts'o | d4de4aa | 2001-12-26 08:58:01 -0500 | [diff] [blame] | 80 | .B \-T |
| 81 | .I time-last-checked |
| 82 | ] |
| 83 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 84 | .B \-U |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 85 | .I UUID |
| 86 | ] |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 87 | device |
| 88 | .SH DESCRIPTION |
| 89 | .BI tune2fs |
Theodore Ts'o | a7ac1df | 2003-08-24 17:56:41 -0400 | [diff] [blame] | 90 | allows the system administrator to adjust various tunable filesystem |
| 91 | parameters on Linux ext2/ext3 filesystems. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 92 | .SH OPTIONS |
| 93 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 94 | .BI \-c " max-mount-counts" |
Theodore Ts'o | e0f72cf | 2006-05-14 18:09:12 -0400 | [diff] [blame] | 95 | Adjust the number of mounts after which the filesystem will be checked by |
| 96 | .BR e2fsck (8). |
| 97 | If |
Theodore Ts'o | 45d9e2f | 2000-07-07 03:12:54 +0000 | [diff] [blame] | 98 | .I max-mount-counts |
Theodore Ts'o | 7b921b9 | 2005-05-06 12:04:10 -0400 | [diff] [blame] | 99 | is 0 or \-1, the number of times the filesystem is mounted will be disregarded |
Theodore Ts'o | 66cf2f6 | 2001-06-14 06:42:44 +0000 | [diff] [blame] | 100 | by |
| 101 | .BR e2fsck (8) |
| 102 | and the kernel. |
| 103 | .sp |
| 104 | Staggering the mount-counts at which filesystems are forcibly |
| 105 | checked will avoid all filesystems being checked at one time |
| 106 | when using journaled filesystems. |
| 107 | .sp |
| 108 | You should strongly consider the consequences of disabling |
| 109 | mount-count-dependent checking entirely. Bad disk drives, cables, |
| 110 | memory, and kernel bugs could all corrupt a filesystem without |
| 111 | marking the filesystem dirty or in error. If you are using |
| 112 | journaling on your filesystem, your filesystem will |
| 113 | .B never |
| 114 | be marked dirty, so it will not normally be checked. A |
| 115 | filesystem error detected by the kernel will still force |
| 116 | an fsck on the next reboot, but it may already be too late |
| 117 | to prevent data loss at that point. |
| 118 | .sp |
| 119 | See also the |
| 120 | .B \-i |
| 121 | option for time-dependent checking. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 122 | .TP |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 123 | .BI \-C " mount-count" |
| 124 | Set the number of times the filesystem has been mounted. |
Theodore Ts'o | e0f72cf | 2006-05-14 18:09:12 -0400 | [diff] [blame] | 125 | If set to a greater value than the max-mount-counts parameter |
| 126 | set by the |
| 127 | .B \-c |
| 128 | option, |
| 129 | .BR e2fsck (8) |
| 130 | will check the filesystem at the next reboot. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 131 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 132 | .BI \-e " error-behavior" |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 133 | Change the behavior of the kernel code when errors are detected. |
Theodore Ts'o | 66cf2f6 | 2001-06-14 06:42:44 +0000 | [diff] [blame] | 134 | In all cases, a filesystem error will cause |
| 135 | .BR e2fsck (8) |
| 136 | to check the filesystem on the next boot. |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 137 | .I error-behavior |
| 138 | can be one of the following: |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 139 | .RS 1.2i |
| 140 | .TP 1.2i |
| 141 | .B continue |
| 142 | Continue normal execution. |
| 143 | .TP |
| 144 | .B remount-ro |
| 145 | Remount filesystem read-only. |
| 146 | .TP |
| 147 | .B panic |
| 148 | Cause a kernel panic. |
| 149 | .RE |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 150 | .TP |
Theodore Ts'o | 6cb2740 | 2008-01-26 19:06:35 -0500 | [diff] [blame] | 151 | .BI \-E " extended-options" |
| 152 | Set extended options for the filesystem. Extended options are comma |
Theodore Ts'o | 0c17cb2 | 2008-02-18 22:56:25 -0500 | [diff] [blame] | 153 | separated, and may take an argument using the equals ('=') sign. |
| 154 | The following extended options are supported: |
Theodore Ts'o | 6cb2740 | 2008-01-26 19:06:35 -0500 | [diff] [blame] | 155 | .RS 1.2i |
| 156 | .TP |
Theodore Ts'o | 0c17cb2 | 2008-02-18 22:56:25 -0500 | [diff] [blame] | 157 | .BI stride= stride-size |
| 158 | Configure the filesystem for a RAID array with |
| 159 | .I stride-size |
| 160 | filesystem blocks. This is the number of blocks read or written to disk |
| 161 | before moving to next disk. This mostly affects placement of filesystem |
| 162 | metadata like bitmaps at |
| 163 | .BR mke2fs (2) |
| 164 | time to avoid placing them on a single disk, which can hurt the performanace. |
| 165 | It may also be used by block allocator. |
| 166 | .TP |
| 167 | .BI stripe-width= stripe-width |
| 168 | Configure the filesystem for a RAID array with |
| 169 | .I stripe-width |
| 170 | filesystem blocks per stripe. This is typically be stride-size * N, where |
| 171 | N is the number of data disks in the RAID (e.g. RAID 5 N+1, RAID 6 N+2). |
| 172 | This allows the block allocator to prevent read-modify-write of the |
| 173 | parity in a RAID stripe if possible when the data is written. |
| 174 | .TP |
Theodore Ts'o | 6cb2740 | 2008-01-26 19:06:35 -0500 | [diff] [blame] | 175 | .B test_fs |
| 176 | Set a flag in the filesystem superblock indicating that it may be |
| 177 | mounted using experimental kernel code, such as the ext4dev filesystem. |
| 178 | .TP |
| 179 | .B ^test_fs |
| 180 | Clear the test_fs flag, indicating the filesystem should only be mounted |
| 181 | using production-level filesystem code. |
| 182 | .RE |
| 183 | .TP |
Theodore Ts'o | 177ab2b | 2002-01-27 18:23:49 -0500 | [diff] [blame] | 184 | .B \-f |
| 185 | Force the tune2fs operation to complete even in the face of errors. This |
| 186 | option is useful when removing the |
| 187 | .B has_journal |
| 188 | filesystem feature from a filesystem which has |
| 189 | an external journal (or is corrupted |
| 190 | such that it appears to have an external journal), but that |
| 191 | external journal is not available. |
| 192 | .sp |
| 193 | .B WARNING: |
| 194 | Removing an external journal from a filesystem which was not cleanly unmounted |
| 195 | without first replaying the external journal can result in |
| 196 | severe data loss and filesystem corruption. |
| 197 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 198 | .BI \-g " group" |
Theodore Ts'o | febac23 | 2007-07-11 23:20:17 -0400 | [diff] [blame] | 199 | Set the group which can use the reserved filesystem blocks. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 200 | The |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 201 | .I group |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 202 | parameter can be a numerical gid or a group name. If a group name is given, |
Theodore Ts'o | e1c6b2f | 2000-12-02 06:19:33 +0000 | [diff] [blame] | 203 | it is converted to a numerical gid before it is stored in the superblock. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 204 | .TP |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 205 | .B \-i " \fIinterval-between-checks\fR[\fBd\fR|\fBm\fR|\fBw\fR]" |
| 206 | Adjust the maximal time between two filesystem checks. |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 207 | No postfix or |
| 208 | .B d |
| 209 | result in days, |
| 210 | .B m |
| 211 | in months, and |
| 212 | .B w |
Theodore Ts'o | 66cf2f6 | 2001-06-14 06:42:44 +0000 | [diff] [blame] | 213 | in weeks. A value of zero will disable the time-dependent checking. |
| 214 | .sp |
| 215 | It is strongly recommended that either |
| 216 | .B \-c |
| 217 | (mount-count-dependent) or |
| 218 | .B \-i |
| 219 | (time-dependent) checking be enabled to force periodic full |
| 220 | .BR e2fsck (8) |
| 221 | checking of the filesystem. Failure to do so may lead to filesystem |
Theodore Ts'o | 9a85c2a | 2006-09-12 02:33:08 -0400 | [diff] [blame] | 222 | corruption (due to bad disks, cables, memory, or kernel bugs) going |
| 223 | unnoticed, ultimately resulting in data loss or corruption. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 224 | .TP |
Theodore Ts'o | 66cf2f6 | 2001-06-14 06:42:44 +0000 | [diff] [blame] | 225 | .B \-j |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 226 | Add an ext3 journal to the filesystem. If the |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 227 | .B \-J |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 228 | option is not specified, the default journal parameters will be used to create |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 229 | an appropriately sized journal (given the size of the filesystem) |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 230 | stored within the filesystem. Note that you must be using a kernel |
| 231 | which has ext3 support in order to actually make use of the journal. |
Theodore Ts'o | 91d71c4 | 2004-09-19 07:34:35 -0400 | [diff] [blame] | 232 | .IP |
| 233 | If this option is used to create a journal on a mounted filesystem, an |
| 234 | immutable file, |
| 235 | .BR .journal , |
| 236 | will be created in the top-level directory of the filesystem, as it is |
| 237 | the only safe way to create the journal inode while the filesystem is |
| 238 | mounted. While the ext3 journal is visible, it is not safe to |
| 239 | delete it, or modify it while the filesystem is mounted; for this |
| 240 | reason the file is marked immutable. |
| 241 | While checking unmounted filesystems, |
| 242 | .BR e2fsck (8) |
| 243 | will automatically move |
| 244 | .B .journal |
| 245 | files to the invisible, reserved journal inode. For all filesystems |
| 246 | except for the root filesystem, this should happen automatically and |
| 247 | naturally during the next reboot cycle. Since the root filesystem is |
| 248 | mounted read-only, |
| 249 | .BR e2fsck (8) |
| 250 | must be run from a rescue floppy in order to effect this transition. |
| 251 | .IP |
| 252 | On some distributions, such as Debian, if an initial ramdisk is used, |
| 253 | the initrd scripts will automatically convert an ext2 root filesystem |
| 254 | to ext3 if the |
| 255 | .BR /etc/fstab |
| 256 | file specifies the ext3 filesystem for the root filesystem in order to |
| 257 | avoid requiring the use of a rescue floppy to add an ext3 journal to |
| 258 | the root filesystem. |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 259 | .TP |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 260 | .BR \-J " journal-options" |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 261 | Override the default ext3 journal parameters. Journal options are comma |
Theodore Ts'o | 08dd830 | 2001-01-14 16:25:58 +0000 | [diff] [blame] | 262 | separated, and may take an argument using the equals ('=') sign. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 263 | The following journal options are supported: |
| 264 | .RS 1.2i |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 265 | .TP |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 266 | .BI size= journal-size |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 267 | Create a journal stored in the filesystem of size |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 268 | .I journal-size |
| 269 | megabytes. The size of the journal must be at least 1024 filesystem blocks |
| 270 | (i.e., 1MB if using 1k blocks, 4MB if using 4k blocks, etc.) |
| 271 | and may be no more than 102,400 filesystem blocks. |
| 272 | There must be enough free space in the filesystem to create a journal of |
Theodore Ts'o | dc2ec52 | 2001-01-18 01:51:15 +0000 | [diff] [blame] | 273 | that size. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 274 | @JDEV@.TP |
| 275 | @JDEV@.BI device= external-journal |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 276 | @JDEV@Attach the filesystem to the journal block device located on |
| 277 | @JDEV@.IR external-journal . |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 278 | @JDEV@The external |
| 279 | @JDEV@journal must have been already created using the command |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 280 | @JDEV@.IP |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 281 | @JDEV@.B mke2fs -O journal_dev |
Theodore Ts'o | e9a2d07 | 2001-06-14 07:15:02 +0000 | [diff] [blame] | 282 | @JDEV@.I external-journal |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 283 | @JDEV@.IP |
| 284 | @JDEV@Note that |
| 285 | @JDEV@.I external-journal |
| 286 | @JDEV@must be formatted with the same block |
| 287 | @JDEV@size as filesystems which will be using it. |
Theodore Ts'o | 3024d88 | 2006-03-27 11:53:00 -0500 | [diff] [blame] | 288 | @JDEV@In addition, while there is support for attaching |
| 289 | @JDEV@multiple filesystems to a single external journal, |
| 290 | @JDEV@the Linux kernel and |
| 291 | @JDEV@.BR e2fsck (8) |
| 292 | @JDEV@do not currently support shared external journals yet. |
Andreas Dilger | 2d15576 | 2001-08-17 03:48:11 -0600 | [diff] [blame] | 293 | @JDEV@.IP |
| 294 | @JDEV@Instead of specifying a device name directly, |
| 295 | @JDEV@.I external-journal |
| 296 | @JDEV@can also be specified by either |
| 297 | @JDEV@.BI LABEL= label |
| 298 | @JDEV@or |
| 299 | @JDEV@.BI UUID= UUID |
| 300 | @JDEV@to locate the external journal by either the volume label or UUID |
| 301 | @JDEV@stored in the ext2 superblock at the start of the journal. Use |
| 302 | @JDEV@.BR dumpe2fs (8) |
| 303 | @JDEV@to display a journal device's volume label and UUID. See also the |
| 304 | @JDEV@.B -L |
| 305 | @JDEV@option of |
| 306 | @JDEV@.BR tune2fs (8). |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 307 | .RE |
| 308 | @JDEV@.IP |
| 309 | @JDEV@Only one of the |
| 310 | @JDEV@.BR size " or " device |
| 311 | @JDEV@options can be given for a filesystem. |
Theodore Ts'o | 08dd830 | 2001-01-14 16:25:58 +0000 | [diff] [blame] | 312 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 313 | .B \-l |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 314 | List the contents of the filesystem superblock. |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 315 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 316 | .BI \-L " volume-label" |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 317 | Set the volume label of the filesystem. |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 318 | Ext2 filesystem labels can be at most 16 characters long; if |
| 319 | .I volume-label |
| 320 | is longer than 16 characters, |
| 321 | .B tune2fs |
Andreas Dilger | 2d15576 | 2001-08-17 03:48:11 -0600 | [diff] [blame] | 322 | will truncate it and print a warning. The volume label can be used |
| 323 | by |
| 324 | .BR mount (8), |
| 325 | .BR fsck (8), |
| 326 | and |
| 327 | .BR /etc/fstab (5) |
| 328 | (and possibly others) by specifying |
| 329 | .BI LABEL= volume_label |
| 330 | instead of a block special device name like |
| 331 | .BR /dev/hda5 . |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 332 | .TP |
| 333 | .BI \-m " reserved-blocks-percentage" |
Theodore Ts'o | febac23 | 2007-07-11 23:20:17 -0400 | [diff] [blame] | 334 | Set the percentage of the filesystem which may only be allocated |
| 335 | by privileged processes. Reserving some number of filesystem blocks |
| 336 | for use by privileged processes is done |
| 337 | to avoid filesystem fragmentation, and to allow system |
| 338 | daemons, such as |
| 339 | .BR syslogd (8), |
| 340 | to continue to function correctly after non-privileged processes are |
| 341 | prevented from writing to the filesystem. Normally, the default percentage |
| 342 | of reserved blocks is 5%. |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 343 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 344 | .BI \-M " last-mounted-directory" |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 345 | Set the last-mounted directory for the filesystem. |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 346 | .TP |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 347 | .BR \-o " [^]\fImount-option\fR[,...]" |
| 348 | Set or clear the indicated default mount options in the filesystem. |
Theodore Ts'o | 8139367 | 2005-04-16 14:05:09 -0400 | [diff] [blame] | 349 | Default mount options can be overridden by mount options specified |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 350 | either in |
| 351 | .BR /etc/fstab (5) |
| 352 | or on the command line arguments to |
| 353 | .BR mount (8). |
| 354 | Older kernels may not support this feature; in particular, |
| 355 | kernels which predate 2.4.20 will almost certainly ignore the |
| 356 | default mount options field in the superblock. |
| 357 | .IP |
| 358 | More than one mount option can be cleared or set by separating |
| 359 | features with commas. Mount options prefixed with a |
| 360 | caret character ('^') will be cleared in the filesystem's superblock; |
| 361 | mount options without a prefix character or prefixed with a plus |
| 362 | character ('+') will be added to the filesystem. |
| 363 | .IP |
| 364 | The following mount options can be set or cleared using |
| 365 | .BR tune2fs : |
| 366 | .RS 1.2i |
| 367 | .TP |
| 368 | .B debug |
| 369 | Enable debugging code for this filesystem. |
| 370 | .TP |
| 371 | .B bsdgroups |
| 372 | Emulate BSD behaviour when creating new files: they will take the group-id |
| 373 | of the directory in which they were created. The standard System V behaviour |
Theodore Ts'o | 77be4d2 | 2003-03-06 12:39:55 -0500 | [diff] [blame] | 374 | is the default, where newly created files take on the fsgid of the current |
Theodore Ts'o | 8139367 | 2005-04-16 14:05:09 -0400 | [diff] [blame] | 375 | process, unless the directory has the setgid bit set, in which case it takes |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 376 | the gid from the parent directory, and also gets the setgid bit set if it is |
Theodore Ts'o | 9a85c2a | 2006-09-12 02:33:08 -0400 | [diff] [blame] | 377 | a directory itself. |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 378 | .TP |
| 379 | .B user_xattr |
| 380 | Enable user-specified extended attributes. |
| 381 | .TP |
| 382 | .B acl |
| 383 | Enable Posix Access Control Lists. |
| 384 | .TP |
| 385 | .B uid16 |
| 386 | Disables 32-bit UIDs and GIDs. This is for interoperability with |
| 387 | older kernels which only store and expect 16-bit values. |
Theodore Ts'o | 2bae543 | 2002-10-25 16:21:03 -0400 | [diff] [blame] | 388 | .TP |
| 389 | .B journal_data |
| 390 | When the filesystem is mounted with journalling enabled, all data |
| 391 | (not just metadata) is committed into the journal prior to being written |
| 392 | into the main filesystem. |
| 393 | .TP |
| 394 | .B journal_data_ordered |
| 395 | When the filesystem is mounted with journalling enabled, all data is forced |
Theodore Ts'o | ccdd1d6 | 2004-04-11 17:02:44 -0400 | [diff] [blame] | 396 | directly out to the main file system prior to its metadata being committed |
Theodore Ts'o | 2bae543 | 2002-10-25 16:21:03 -0400 | [diff] [blame] | 397 | to the journal. |
| 398 | .TP |
| 399 | .B journal_data_writeback |
| 400 | When the filesystem is mounted with journalling enabled, data may be |
Theodore Ts'o | ccdd1d6 | 2004-04-11 17:02:44 -0400 | [diff] [blame] | 401 | written into the main filesystem after its metadata has been committed |
Theodore Ts'o | 2bae543 | 2002-10-25 16:21:03 -0400 | [diff] [blame] | 402 | to the journal. This may increase throughput, however, it may allow old |
| 403 | data to appear in files after a crash and journal recovery. |
Theodore Ts'o | a0c3fd5 | 2002-10-15 17:43:43 -0400 | [diff] [blame] | 404 | .RE |
| 405 | .TP |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 406 | .BR \-O " [^]\fIfeature\fR[,...]" |
| 407 | Set or clear the indicated filesystem features (options) in the filesystem. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 408 | More than one filesystem feature can be cleared or set by separating |
| 409 | features with commas. Filesystem features prefixed with a |
| 410 | caret character ('^') will be cleared in the filesystem's superblock; |
| 411 | filesystem features without a prefix character or prefixed with a plus |
| 412 | character ('+') will be added to the filesystem. |
| 413 | .IP |
| 414 | The following filesystem features can be set or cleared using |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 415 | .BR tune2fs : |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 416 | .RS 1.2i |
| 417 | .TP |
Theodore Ts'o | 558df54 | 2008-02-27 15:01:19 -0500 | [diff] [blame] | 418 | .B large_file |
| 419 | Filesystem can contain files that are greater than 2GB. (Modern kernels |
| 420 | set this feature automatically when a file > 2GB is created.) |
| 421 | .TP |
Theodore Ts'o | ccbed85 | 2003-04-11 13:32:31 -0400 | [diff] [blame] | 422 | .B dir_index |
| 423 | Use hashed b-trees to speed up lookups in large directories. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 424 | .TP |
| 425 | .B filetype |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 426 | Store file type information in directory entries. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 427 | .TP |
| 428 | .B has_journal |
Theodore Ts'o | 82b39c9 | 2002-09-29 19:08:38 -0400 | [diff] [blame] | 429 | Use a journal to ensure filesystem consistency even across unclean shutdowns. |
| 430 | Setting the filesystem feature is equivalent to using the |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 431 | .B \-j |
Theodore Ts'o | 82b39c9 | 2002-09-29 19:08:38 -0400 | [diff] [blame] | 432 | option. |
Theodore Ts'o | ccbed85 | 2003-04-11 13:32:31 -0400 | [diff] [blame] | 433 | .TP |
| 434 | .B sparse_super |
| 435 | Limit the number of backup superblocks to save space on large filesystems. |
Theodore Ts'o | 037914e | 2008-02-26 17:31:06 -0500 | [diff] [blame] | 436 | .TP |
| 437 | .B resize_inode |
| 438 | Reserve space so the block group descriptor table may grow in the |
| 439 | future. |
| 440 | .B Tune2fs |
| 441 | only supports clearing this filesystem feature. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 442 | .RE |
| 443 | .IP |
Theodore Ts'o | 39567c4 | 2001-09-19 15:28:21 -0400 | [diff] [blame] | 444 | After setting or clearing |
Theodore Ts'o | 037914e | 2008-02-26 17:31:06 -0500 | [diff] [blame] | 445 | .BR sparse_super , |
| 446 | .BR filetype , |
| 447 | or |
| 448 | .B resize_inode |
Theodore Ts'o | 39567c4 | 2001-09-19 15:28:21 -0400 | [diff] [blame] | 449 | filesystem features, |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 450 | .BR e2fsck (8) |
Theodore Ts'o | 251395d | 2001-05-14 04:43:05 +0000 | [diff] [blame] | 451 | must be run on the filesystem to return the filesystem to a consistent state. |
Theodore Ts'o | 39567c4 | 2001-09-19 15:28:21 -0400 | [diff] [blame] | 452 | .B Tune2fs |
| 453 | will print a message requesting that the system administrator run |
| 454 | .BR e2fsck (8) |
Theodore Ts'o | 45e18ad | 2004-09-17 17:31:16 -0400 | [diff] [blame] | 455 | if necessary. After setting the |
| 456 | .B dir_index |
| 457 | feature, |
| 458 | .B e2fsck -D |
| 459 | can be run to convert existing directories to the hashed B-tree format. |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 460 | .TP |
| 461 | .BI \-r " reserved-blocks-count" |
| 462 | Set the number of reserved filesystem blocks. |
| 463 | .TP |
Theodore Ts'o | d4de4aa | 2001-12-26 08:58:01 -0500 | [diff] [blame] | 464 | .BI \-T " time-last-checked" |
| 465 | Set the time the filesystem was last checked using |
| 466 | .BR e2fsck . |
| 467 | This can be useful in scripts which use a Logical Volume Manager to make |
| 468 | a consistent snapshot of a filesystem, and then check the filesystem |
| 469 | during off hours to make sure it hasn't been corrupted due to |
| 470 | hardware problems, etc. If the filesystem was clean, then this option can |
| 471 | be used to set the last checked time on the original filesystem. The format |
| 472 | of |
| 473 | .I time-last-checked |
| 474 | is the international date format, with an optional time specifier, i.e. |
Theodore Ts'o | 9a85c2a | 2006-09-12 02:33:08 -0400 | [diff] [blame] | 475 | YYYYMMDD[HH[MM[SS]]]. The keyword |
Theodore Ts'o | d4de4aa | 2001-12-26 08:58:01 -0500 | [diff] [blame] | 476 | .B now |
| 477 | is also accepted, in which case the last checked time will be set to the |
| 478 | current time. |
| 479 | .TP |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 480 | .BI \-u " user" |
| 481 | Set the user who can use the reserved filesystem blocks. |
| 482 | .I user |
| 483 | can be a numerical uid or a user name. If a user name is given, it |
| 484 | is converted to a numerical uid before it is stored in the superblock. |
Theodore Ts'o | 896938d | 1999-10-23 01:04:50 +0000 | [diff] [blame] | 485 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 486 | .BI \-U " UUID" |
Theodore Ts'o | 8d64174 | 2001-05-14 04:12:27 +0000 | [diff] [blame] | 487 | Set the universally unique identifier (UUID) of the filesystem to |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 488 | .IR UUID . |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 489 | The format of the UUID is a series of hex digits separated by hyphens, |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 490 | like this: |
| 491 | "c1b9d5a2-f162-11cf-9ece-0020afc76f16". |
| 492 | The |
| 493 | .I UUID |
| 494 | parameter may also be one of the following: |
| 495 | .RS 1.2i |
| 496 | .TP |
| 497 | .I clear |
| 498 | clear the filesystem UUID |
| 499 | .TP |
| 500 | .I random |
| 501 | generate a new randomly-generated UUID |
| 502 | .TP |
| 503 | .I time |
| 504 | generate a new time-based UUID |
| 505 | .RE |
| 506 | .IP |
Andreas Dilger | 2d15576 | 2001-08-17 03:48:11 -0600 | [diff] [blame] | 507 | The UUID may be used by |
| 508 | .BR mount (8), |
| 509 | .BR fsck (8), |
| 510 | and |
| 511 | .BR /etc/fstab (5) |
| 512 | (and possibly others) by specifying |
| 513 | .BI UUID= uuid |
| 514 | instead of a block special device name like |
| 515 | .BR /dev/hda1 . |
| 516 | .IP |
Theodore Ts'o | ce57f14 | 2001-04-26 04:25:39 +0000 | [diff] [blame] | 517 | See |
| 518 | .BR uuidgen (8) |
| 519 | for more information. |
| 520 | If the system does not have a good random number generator such as |
| 521 | .I /dev/random |
| 522 | or |
| 523 | .IR /dev/urandom , |
| 524 | .B tune2fs |
| 525 | will automatically use a time-based UUID instead of a randomly-generated UUID. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 526 | .SH BUGS |
Theodore Ts'o | 6398532 | 2001-01-03 17:02:13 +0000 | [diff] [blame] | 527 | We haven't found any bugs yet. That doesn't mean there aren't any... |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 528 | .SH AUTHOR |
| 529 | .B tune2fs |
Theodore Ts'o | 2e5a1b9 | 2004-01-31 20:27:36 -0500 | [diff] [blame] | 530 | was written by Remy Card <Remy.Card@linux.org>. It is currently being |
| 531 | maintained by Theodore Ts'o <tytso@alum.mit.edu>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 532 | .B tune2fs |
Theodore Ts'o | a418d3a | 1997-04-26 14:00:26 +0000 | [diff] [blame] | 533 | uses the ext2fs library written by Theodore Ts'o <tytso@mit.edu>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 534 | This manual page was written by Christian Kuhtz <chk@data-hh.Hanse.DE>. |
Theodore Ts'o | 66cf2f6 | 2001-06-14 06:42:44 +0000 | [diff] [blame] | 535 | Time-dependent checking was added by Uwe Ohse <uwe@tirka.gun.de>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 536 | .SH AVAILABILITY |
| 537 | .B tune2fs |
Theodore Ts'o | 12da49c | 2001-05-12 15:49:17 +0000 | [diff] [blame] | 538 | is part of the e2fsprogs package and is available from |
Theodore Ts'o | 348e43d | 2001-05-03 14:43:43 +0000 | [diff] [blame] | 539 | http://e2fsprogs.sourceforge.net. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 540 | .SH SEE ALSO |
Andreas Mohr | 0fd2f90 | 2008-02-28 20:50:05 -0500 | [diff] [blame] | 541 | .BR debugfs (8), |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 542 | .BR dumpe2fs (8), |
| 543 | .BR e2fsck (8), |
| 544 | .BR mke2fs (8) |