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