http://linux-ntfs.sourceforge.net/snapshots/ntfsprogs-200307311516.tar.bz2
[ntfsprogs.git] / ntfsprogs / ntfsresize.8.in
1 .\" -*- nroff -*-
2 .\" Copyright 2002-2003 by Szabolcs Szakacsits  All Rights Reserved.
3 .\"
4 .TH NTFSRESIZE 8 "Jan 2003" "ntfsprogs @VERSION@"
5 .SH NAME
6 ntfsresize \- resize an NTFS filesystem
7 .SH SYNOPSIS
8 .B ntfsresize
9 [\fB\-fhin\fR]
10 [\fB\-s \fIsize\fR[\fBk\fR|\fBM\fR|\fBG\fR]]
11 .I device
12 .SH DESCRIPTION
13 The
14 .B ntfsresize
15 program non-destructively resizes Windows NT4, 2000, XP or .NET
16 NTFS filesystems.  At present it can be used to enlarge or shrink a
17 defragmented NTFS filesystem located on an unmounted
18 .I device
19 (usually a disk partition). The new volume will have
20 .I size
21 bytes.
22 The
23 .I size
24 parameter may have one of the optional modifiers
25 \fBk\fR, \fBM\fR, \fBG\fR, which means the
26 .I size
27 parameter is given in kilo-, mega- or gigabytes respectively.
28 .B ntfsresize
29 conforms to the SI, ATA, IEEE standards and the disk manufacturers
30 by using k=10^3, M=10^6 and G=10^9.
31 The options 
32 .B -i 
33 and 
34 .B -s 
35 are mutually exclusive. If both of them are omitted then the 
36 NTFS filesystem will be enlarged to the device size.
37 Before a real resize operation, always make a read-only 
38 test run using the 
39 .B -n 
40 option.
41 .PP
42 The
43 .B ntfsresize
44 program doesn't manipulate the size of partitions.
45 To do that you have to use a disk partitioning tool, for example
46 .BR fdisk (8).
47 .PP
48 If you wish to enlarge an NTFS filesystem, 
49 you must first make sure you can expand the size of the
50 underlying partition first. This can be done using 
51 .BR fdisk (8)
52 by deleting the partition and recreating it with a larger size.
53 Then  you may use
54 .B ntfsresize
55 to enlarge the size of the filesystem.
56 .PP
57 If you wish to shrink an NTFS partition, first use
58 .B ntfsresize
59 to shrink the size of the filesystem. Then you may use
60 .BR fdisk (8)
61 to shrink the size of the partition by deleting the
62 partition and recreating it with the smaller size.
63 .PP
64 .B IMPORTANT!
65 When recreating the partition with
66 .BR fdisk (8)
67 make sure you create it with the same starting
68 disk cylinder and partition type
69 as before. 
70 If you enlarge a partition make sure it will not overlap with 
71 an other existing partition!
72 If you shrink a partition, do not make 
73 it smaller than the new size of the NTFS filesystem! 
74 Otherwise you may lose your entire filesystem.
75 Also make sure you set the bootable flag for the partition if it
76 existed before. Failing to do so you might not be able to boot your
77 computer from the disk!
78 .PP
79 Note,
80 .B ntfsresize
81 schedules 'chkdsk' to make an NTFS consistency check
82 when you will boot Windows. Windows may force a reboot after
83 the successful consistency check.
84
85 .SH OPTIONS
86 .TP
87 .B -f
88 Forces ntfsresize to proceed with the filesystem resize operation, overriding
89 some safety checks which
90 .B ntfsresize
91 normally enforces. You can use this
92 parameter multiply times if you want to overcome every single safety checks.
93 .TP
94 .B -h
95 Display help and exit.
96 .TP
97 .B -i
98 Using this option you can calculate the smallest shrunken volume size supported.
99 This option will not make any changes to the filesystem.
100 .TP
101 .B -n
102 Use this option to make a test run before doing the real resize operation.
103 Volume will be opened read-only and
104 .B ntfsresize
105 displays what it would do if it were to resize the filesystem.
106 .TP
107 .B -s \fIsize\fR[\fBk\fR|\fBM\fR|\fBG\fR]
108 Resize volume to \fIsize\fR[\fBk\fR|\fBM\fR|\fBG\fR] bytes.
109 The optional modifiers \fBk\fR, \fBM\fR, \fBG\fR mean the
110 .I size
111 parameter is given in kilo-, mega- or gigabytes respectively.
112 Conforming to standards, k=10^3, M=10^6 and G=10^9.
113 .SH BUGS
114 No bugs are known or has been reported so far in the current version.
115 If you find otherwise, please report it to <linux-ntfs-dev@lists.sourceforge.net>
116 (no subscription needed). It's also strongly advised you
117 .B MAKE SURE YOU HAVE A BACKUP
118 of your important data in case of an unexpected failure.
119 .PP
120 Future work is planned to include support resizing fragmented NTFS volumes.
121 Please note, Windows 2000, XP and .NET have built in NTFS defragmenter.
122 .SH AUTHOR
123 .B ntfsresize
124 has been written by
125 Szabolcs Szakacsits <szaka@sienet.hu>.
126 .SH ACKNOWLEDGEMENT
127 Many thanks to Anton Altaparmakov and Richard Russon (FlatCap)
128 for libntfs, excellent documentation, comments, testing and fixes,
129 moreover to Theodore Ts'o whose
130 .BR resize2fs (8)
131 man page formed the basis of this page.
132 .SH AVAILABILITY
133 .B ntfsresize
134 is part of the linux-ntfs package and is available from
135 http://linux-ntfs.sourceforge.net/ as source and pre-compiled binary.
136 .B ntfsresize
137 related news, example of usage and FAQ (frequently asked questions)
138 is maintained at 
139 http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html
140 .SH SEE ALSO
141 .BR fdisk (8),
142 .BR cfdisk (8),
143 .BR sfdisk (8),
144 .BR parted (8),
145 .BR mkntfs (8),
146 .BR ntfsprogs (8)
147