]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - resize/resize2fs.8.in
resize2fs.8: Make it clear that power-of-2 units are meant by kilobytes
[thirdparty/e2fsprogs.git] / resize / resize2fs.8.in
1 .\" -*- nroff -*-
2 .\" Copyright 1997 by Theodore Ts'o. All Rights Reserved.
3 .\"
4 .\" .TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
5 .TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6 .SH NAME
7 resize2fs \- ext2/ext3/ext4 file system resizer
8 .SH SYNOPSIS
9 .B resize2fs
10 [
11 .B \-fFpPM
12 ]
13 [
14 .B \-d
15 .I debug-flags
16 ]
17 [
18 .B \-S
19 .I RAID-stride
20 ]
21 .I device
22 [
23 .I size
24 ]
25 .SH DESCRIPTION
26 The
27 .B resize2fs
28 program will resize ext2, ext3, or ext4 file systems. It can be used to
29 enlarge or shrink an unmounted file system located on
30 .IR device .
31 If the filesystem is mounted, it can be used to expand the size of the
32 mounted filesystem, assuming the kernel supports on-line resizing. (As
33 of this writing, the Linux 2.6 kernel supports on-line resize for
34 filesystems mounted using ext3 and ext4.).
35 .PP
36 The
37 .I size
38 parameter specifies the requested new size of the filesystem.
39 If no units are specified, the units of the
40 .I size
41 parameter shall be the filesystem blocksize of the filesystem.
42 Optionally, the
43 .I size
44 parameter may be suffixed by one of the following the units
45 designators: 's', 'K', 'M', or 'G',
46 for 512 byte sectors, kilobytes, megabytes, or gigabytes, respectively.
47 The
48 .I size
49 of the filesystem may never be larger than the size of the partition.
50 If
51 .I size
52 parameter is not specified, it will default to the size of the partition.
53 .PP
54 Note: when kilobytes is used above, I mean
55 .IR real ,
56 power-of-2 kilobytes, (i.e., 1024 bytes), which some politically correct
57 folks insist should be the stupid-sounding ``kibibytes''. The same
58 holds true for megabytes, also sometimes known as ``mebibytes'', or
59 gigabytes, as the amazingly silly ``gibibytes''. Makes you want to
60 gibber, doesn't it?
61 .PP
62 The
63 .B resize2fs
64 program does not manipulate the size of partitions. If you wish to enlarge
65 a filesystem, you must make sure you can expand the size of the
66 underlying partition first. This can be done using
67 .BR fdisk (8)
68 by deleting the partition and recreating it with a larger size or using
69 .BR lvextend (8),
70 if you're using the logical volume manager
71 .BR lvm (8).
72 When
73 recreating the partition, make sure you create it with the same starting
74 disk cylinder as before! Otherwise, the resize operation will
75 certainly not work, and you may lose your entire filesystem.
76 After running
77 .BR fdisk (8),
78 run resize2fs to resize the ext2 filesystem
79 to use all of the space in the newly enlarged partition.
80 .PP
81 If you wish to shrink an ext2 partition, first use
82 .B resize2fs
83 to shrink the size of filesystem. Then you may use
84 .BR fdisk (8)
85 to shrink the size of the partition. When shrinking the size of
86 the partition, make sure you do not make it smaller than the new size
87 of the ext2 filesystem!
88 .SH OPTIONS
89 .TP
90 .B \-d \fIdebug-flags
91 Turns on various resize2fs debugging features, if they have been compiled
92 into the binary.
93 .I debug-flags
94 should be computed by adding the numbers of the desired features
95 from the following list:
96 .br
97 \ 2\ \-\ Debug block relocations
98 .br
99 \ 4\ \-\ Debug inode relocations
100 .br
101 \ 8\ \-\ Debug moving the inode table
102 .TP
103 .B \-f
104 Forces resize2fs to proceed with the filesystem resize operation, overriding
105 some safety checks which resize2fs normally enforces.
106 .TP
107 .B \-F
108 Flush the filesystem device's buffer caches before beginning. Only
109 really useful for doing
110 .B resize2fs
111 time trials.
112 .TP
113 .B \-M
114 Shrink the filesystem to the minimum size.
115 .TP
116 .B \-p
117 Prints out a percentage completion bars for each
118 .B resize2fs
119 operation, so that the user can keep track of what
120 the program is doing.
121 .TP
122 .B \-P
123 Print the minimum size of the filesystem and exit.
124 .TP
125 .B \-S \fIRAID-stride
126 The
127 .B resize2fs
128 program will heuristically determine the RAID stride that was specified
129 when the filesystem was created. This option allows the user to
130 explicitly specify a RAID stride setting to be used by resize2fs instead.
131 .SH KNOWN BUGS
132 The minimum size of the filesystem as estimated by resize2fs may be
133 incorrect, especially for filesystems with 1k and 2k blocksizes.
134 .SH AUTHOR
135 .B resize2fs
136 was written by Theodore Ts'o <tytso@mit.edu>.
137 .SH COPYRIGHT
138 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All
139 rights reserved.
140 As of April, 2000
141 .B Resize2fs
142 may be redistributed under the terms of the GPL.
143 .SH SEE ALSO
144 .BR fdisk (8),
145 .BR e2fsck (8),
146 .BR mke2fs (8),
147 .BR lvm (8),
148 .BR lvextend (8)