Whamcloud - gitweb
ChangeLog, main.c, resize2fs.8.in, resize2fs.c:
[tools/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 .SH NAME
6 resize2fs \- ext2 file system resizer
7 .SH SYNOPSIS
8 .B resize2fs
9 [
10 .B \-d 
11 .I debug-flags
12 ]
13 [
14 .B \-f
15 ]
16 [
17 .B \-F
18 ]
19 [
20 .B \-p
21 ]
22 .I device
23 [
24 .I size
25 ]
26 .SH DESCRIPTION
27 The 
28 .B resize2fs 
29 program will resize ext2 file systems.  It can be used to enlarge or
30 shrink an ext2 file system located on
31 .I device 
32 so that it will have 
33 .I size 
34 blocks.
35 If the
36 .I size
37 parameter is not specified, it will default to the size of the partition.
38 The 
39 .I size
40 parameter may never be larger than the size of the partition.
41 .PP
42 The
43 .B resize2fs
44 program does not manipulate the size of partitions.  If you wish to enlarge
45 a filesystem, you must first make sure you can expand the size of the
46 underlying partition first.  This can be done using 
47 .BR fdisk (8)
48 by deleting the partition and recreating it with a larger size.  When 
49 recreating the partition, make sure you create it with the same starting
50 disk cylinder as before!  Otherwise, the resize operation will 
51 certainly not work, and you may lose your entire filesystem.
52 .PP
53 If you wish to shrink the an ext2 partition, first use 
54 .B resize2fs
55 to shrink the size of filesystem.  Then you may use 
56 .BR fdisk (8)
57 to shrink the size of the partition.  When shrinking the size of 
58 the partition, make sure you do not make it smaller than the new size 
59 of the ext2 filesystem!
60 .SH OPTIONS
61 .TP
62 .I \-d debug-flags
63 Turns on various resize2fs debugging features, if they have been compiled 
64 into the binary.
65 .I debug-flags
66 should be computed by adding the numbers of the desired features 
67 from the following list:
68 .br
69 \       1\      \-\ Print out all disk I/O 
70 .br
71 \       2\      \-\ Debug block relocations
72 .br
73 \       8\      \-\ Debug inode relocations
74 .br
75 \       16\     \-\ Debug moving the inode table
76 .TP
77 .I \-p
78 Prints out a percentage completion bars for each 
79 .B resize2fs
80 operation, so that the user can keep track of what
81 the program is doing.
82 .TP 
83 .I \-f
84 Forces resize2fs to proceed with the filesystem resize operation, overriding 
85 some safety checks which resize2fs normally enforces.
86 .TP
87 .I \-F
88 Flush the filesystem device's buffer caches before beginning.  Only
89 really useful for doing 
90 .B resize2fs
91 time trials.
92 .SH AUTHOR
93 .B resize2fs
94 was written by Theodore Ts'o <tytso@mit.edu>.
95 .SH SEE ALSO
96 .BR fdisk (8),
97 .BR e2fsck (8),
98 .BR mke2fs (8)