]>
Commit | Line | Data |
---|---|---|
24b2c7a7 TT |
1 | .\" -*- nroff -*- |
2 | .\" Copyright 1997 by Theodore Ts'o. All Rights Reserved. | |
3 | .\" | |
ba0af756 | 4 | .\" .TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
0cee8a5c | 5 | .TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
24b2c7a7 | 6 | .SH NAME |
a7ac1df3 | 7 | resize2fs \- ext2/ext3 file system resizer |
24b2c7a7 TT |
8 | .SH SYNOPSIS |
9 | .B resize2fs | |
10 | [ | |
199ddaaa JB |
11 | .B \-fFpPM |
12 | ] | |
13 | [ | |
c762c8e6 TT |
14 | .B \-d |
15 | .I debug-flags | |
24b2c7a7 | 16 | ] |
c762c8e6 | 17 | [ |
46c5490d TT |
18 | .B \-S |
19 | .I RAID-stride | |
20 | ] | |
c762c8e6 | 21 | .I device |
f4b2a6db | 22 | [ |
c762c8e6 | 23 | .I size |
f4b2a6db | 24 | ] |
24b2c7a7 TT |
25 | .SH DESCRIPTION |
26 | The | |
c762c8e6 | 27 | .B resize2fs |
41e55437 TT |
28 | program will resize ext2 or ext3 file systems. It can be used to enlarge or |
29 | shrink an unmounted file system located on | |
792a0881 | 30 | .IR device . |
bf69235a TT |
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 only.). | |
35 | .PP | |
792a0881 | 36 | The |
f4b2a6db | 37 | .I size |
792a0881 TT |
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. | |
f4b2a6db TT |
47 | The |
48 | .I size | |
792a0881 TT |
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. | |
f4b2a6db TT |
53 | .PP |
54 | The | |
55 | .B resize2fs | |
56 | program does not manipulate the size of partitions. If you wish to enlarge | |
3e9f8632 | 57 | a filesystem, you must make sure you can expand the size of the |
f4b2a6db TT |
58 | underlying partition first. This can be done using |
59 | .BR fdisk (8) | |
41e55437 TT |
60 | by deleting the partition and recreating it with a larger size or using |
61 | .BR lvextend (8), | |
62 | if you're using the logical volume manager | |
63 | .BR lvm (8). | |
23658ffa | 64 | When |
f4b2a6db TT |
65 | recreating the partition, make sure you create it with the same starting |
66 | disk cylinder as before! Otherwise, the resize operation will | |
23658ffa TT |
67 | certainly not work, and you may lose your entire filesystem. |
68 | After running | |
69 | .BR fdisk (8), | |
70 | run resize2fs to resize the ext2 filesystem | |
71 | to use all of the space in the newly enlarged partition. | |
f4b2a6db | 72 | .PP |
143ac30c | 73 | If you wish to shrink an ext2 partition, first use |
f4b2a6db TT |
74 | .B resize2fs |
75 | to shrink the size of filesystem. Then you may use | |
76 | .BR fdisk (8) | |
77 | to shrink the size of the partition. When shrinking the size of | |
78 | the partition, make sure you do not make it smaller than the new size | |
79 | of the ext2 filesystem! | |
24b2c7a7 TT |
80 | .SH OPTIONS |
81 | .TP | |
46c5490d | 82 | .B \-d \fIdebug-flags |
f4b2a6db TT |
83 | Turns on various resize2fs debugging features, if they have been compiled |
84 | into the binary. | |
c762c8e6 TT |
85 | .I debug-flags |
86 | should be computed by adding the numbers of the desired features | |
87 | from the following list: | |
88 | .br | |
c762c8e6 TT |
89 | \ 2\ \-\ Debug block relocations |
90 | .br | |
f34171a7 | 91 | \ 4\ \-\ Debug inode relocations |
c762c8e6 | 92 | .br |
f34171a7 | 93 | \ 8\ \-\ Debug moving the inode table |
c762c8e6 | 94 | .TP |
46c5490d | 95 | .B \-f |
f4b2a6db TT |
96 | Forces resize2fs to proceed with the filesystem resize operation, overriding |
97 | some safety checks which resize2fs normally enforces. | |
98 | .TP | |
46c5490d | 99 | .B \-F |
c762c8e6 TT |
100 | Flush the filesystem device's buffer caches before beginning. Only |
101 | really useful for doing | |
102 | .B resize2fs | |
103 | time trials. | |
199ddaaa JB |
104 | .TP |
105 | .B \-M | |
106 | Shrink the filesystem to the minimum size. | |
107 | .TP | |
108 | .B \-p | |
109 | Prints out a percentage completion bars for each | |
110 | .B resize2fs | |
111 | operation, so that the user can keep track of what | |
112 | the program is doing. | |
113 | .TP | |
114 | .B \-P | |
115 | Print the minimum size of the filesystem and exit. | |
116 | .TP | |
117 | .B \-S \fIRAID-stride | |
118 | The | |
119 | .B resize2fs | |
120 | program will heuristically determine the RAID stride that was specified | |
121 | when the filesystem was created. This option allows the user to | |
122 | explicitly specify a RAID stride setting to be used by resize2fs instead. | |
123 | .SH KNOWN BUGS | |
124 | The minimum size of the filesystem as estimated by resize2fs may be | |
125 | incorrect, especially for filesystems with 1k and 2k blocksizes. | |
24b2c7a7 | 126 | .SH AUTHOR |
c762c8e6 | 127 | .B resize2fs |
24b2c7a7 | 128 | was written by Theodore Ts'o <tytso@mit.edu>. |
fac9c206 TT |
129 | .SH COPYRIGHT |
130 | Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All | |
131 | rights reserved. | |
0cee8a5c | 132 | As of April, 2000 |
fac9c206 | 133 | .B Resize2fs |
0cee8a5c | 134 | may be redistributed under the terms of the GPL. |
24b2c7a7 | 135 | .SH SEE ALSO |
f4b2a6db | 136 | .BR fdisk (8), |
24b2c7a7 | 137 | .BR e2fsck (8), |
41e55437 TT |
138 | .BR mke2fs (8), |
139 | .BR lvm (8), | |
140 | .BR lvextend (8) |