1NTFSRESIZE(8)               System Manager's Manual              NTFSRESIZE(8)
2
3
4

NAME

6       ntfsresize - resize an NTFS filesystem without data loss
7

SYNOPSIS

9       ntfsresize [OPTIONS] --info(-mb-only) DEVICE
10       ntfsresize [OPTIONS] [--size SIZE[k|M|G]] DEVICE
11

DESCRIPTION

13       The  ntfsresize program safely resizes Windows XP, Windows Server 2003,
14       Windows 2000, Windows NT4 and Longhorn NTFS  filesystems  without  data
15       loss.  All  NTFS versions are supported, used by 32-bit and 64-bit Win‐
16       dows.  Defragmentation is NOT required prior to  resizing  because  the
17       program   can  relocate  any  data  if  needed,  without  risking  data
18       integrity.
19
20       Ntfsresize can be used to shrink or enlarge any NTFS filesystem located
21       on  an  unmounted DEVICE (usually a disk partition). The new filesystem
22       will have SIZE bytes.  The SIZE parameter may have one of the  optional
23       modifiers  k,  M,  G, which means the SIZE parameter is given in kilo-,
24       mega- or gigabytes respectively.  Ntfsresize conforms to the  SI,  ATA,
25       IEEE  standards  and the disk manufacturers by using k=10^3, M=10^6 and
26       G=10^9.
27
28       If both --info(-mb-only) and --size are omitted then the NTFS  filesys‐
29       tem will be enlarged to the underlying DEVICE size.
30
31       To  resize  a  filesystem  on  a  partition,  you  must resize BOTH the
32       filesystem and the partition by editing  the  partition  table  on  the
33       disk.  Similarly  to other command line filesystem resizers, ntfsresize
34       doesn't manipulate the size of the partitions, hence  to  do  that  you
35       must  use  a  disk  partitioning  tool  as  well, for example fdisk(8).
36       Alternatively you could use one of the many user friendly  partitioners
37       that  uses  ntfsresize internally, like Mandriva's DiskDrake, QTParted,
38       SUSE/Novell's YaST Partitioner, IBM's EVMS, GParted or  Debian/Ubuntu's
39       Partman.
40
41       IMPORTANT!   It's  a good practice making REGULAR BACKUPS of your valu‐
42       able data, especially before using ANY partitioning tools. To do so for
43       NTFS,  you  could use ntfsclone(8).  Don't forget to save the partition
44       table as well!
45
46   Shrinkage
47       If you wish to shrink an NTFS partition, first use ntfsresize to shrink
48       the  size  of the filesystem. Then you could use fdisk(8) to shrink the
49       size of the partition by deleting the partition and recreating it  with
50       the  smaller size.  Do not make the partition smaller than the new size
51       of NTFS otherwise you won't be able to boot. If  you  did  so  notwith‐
52       standing then just recreate the partition to be as large as NTFS.
53
54   Enlargement
55       To  enlarge  an NTFS filesystem, first you must enlarge the size of the
56       underlying partition. This can be done using fdisk(8) by  deleting  the
57       partition  and recreating it with a larger size.  Make sure it will not
58       overlap with an other existing partition.  Then  you may use ntfsresize
59       to enlarge the size of the filesystem.
60
61   Partitioning
62       When  recreating  the  partition by a disk partitioning tool, make sure
63       you create it at the same starting sector and with the  same  partition
64       type as before.  Otherwise you won't be able to access your filesystem.
65       Use the 'u' fdisk command to switch to the reliable  sector  unit  from
66       the default cylinder one.
67
68       Also  make  sure  you  set  the  bootable  flag for the partition if it
69       existed before. Failing to do so you might not be  able  to  boot  your
70       computer from the disk.
71

OPTIONS

73       Below  is a summary of all the options that ntfsresize accepts.  Nearly
74       all options have two equivalent names.  The short name is preceded by -
75       and  the  long name is preceded by --.  Any single letter options, that
76       don't take an argument, can be combined into  a  single  command,  e.g.
77       -fv  is  equivalent to -f -v.  Long named options can be abbreviated to
78       any unique prefix of their name.
79
80       -c, --check
81              By using this option ntfsresize will only check  the  device  to
82              ensure that it is ready to be resized. If not, it will print any
83              errors detected.   If  the  device  is  fine,  nothing  will  be
84              printed.
85
86       -i, --info
87              By using this option ntfsresize will determine the theoretically
88              smallest shrunken filesystem size supported. Most  of  the  time
89              the  result is the space already used on the filesystem. Ntfsre‐
90              size will refuse shrinking to a smaller size than what  you  got
91              by  this  option  and  depending  on several factors it might be
92              unable to shrink very close to this theoretical  size.  Although
93              the  integrity  of your data should be never in risk, it's still
94              strongly recommended to make a test run by using the --no-action
95              option before real resizing.
96
97              Practically  the  smallest  shrunken size generally is at around
98              "used space" + (20-200 MB). Please also take into  account  that
99              Windows  might  need  about  50-100  MB  free space left to boot
100              safely.
101
102              This option never causes any changes to the filesystem, the par‐
103              tition is opened read-only.
104
105       -m, --info-mb-only
106              Like  the info option, only print out the shrinkable size in MB.
107              Print nothing if the shrink size is the  same  as  the  original
108              size (in MB).
109
110       -s, --size SIZE[k|M|G]
111              Resize  filesystem to SIZE[k|M|G] bytes.  The optional modifiers
112              k, M, G mean the SIZE parameter is  given  in  kilo-,  mega-  or
113              gigabytes respectively.  Conforming to standards, k=10^3, M=10^6
114              and G=10^9. Use this option with --no-action first.
115
116       -f, --force
117              Forces ntfsresize to proceed with the resize operation  even  if
118              the filesystem is marked for consistency check.
119
120              Please  note, ntfsresize always marks the filesystem for consis‐
121              tency check before a real resize operation and  it  leaves  that
122              way for extra safety. Thus if NTFS was marked by ntfsresize then
123              it's safe to use this option. If  you  need  to  resize  several
124              times  without  booting into Windows between each resizing steps
125              then you must use this option.
126
127       -n, --no-action
128              Use this option to make a test run before doing the real  resize
129              operation.   Volume will be opened read-only and ntfsresize dis‐
130              plays what it would do if it  were  to  resize  the  filesystem.
131              Continue with the real resizing only if the test run passed.
132
133       -b, --bad-sectors
134              Support  disks  having  hardware  errors, bad sectors with those
135              ntfsresize would refuse to work by default.
136
137              Prior using this option, it's strongly  recommended  to  make  a
138              backup  by  ntfsclone(8) using the --rescue option, then running
139              'chkdsk /f /r volume:' on Windows from the command line. If  the
140              disk  guarantee  is still valid then replace it.  It's defected.
141              Please also note, that no software  can  repair  these  type  of
142              hardware errors. The most what they can do is to work around the
143              permanent defects.
144
145              This option doesn't have any effect if the disk is flawless.
146
147       -P, --no-progress-bar
148              Don't show progress bars.
149
150       -v, --verbose
151              More output.
152
153       -V, --version
154              Print the version number of ntfsresize and exit.
155
156       -h, --help
157              Display help and exit.
158

EXIT CODES

160       The exit code is 0 on success, non-zero otherwise.
161

KNOWN ISSUES

163       No reliability problem is known. If you need help please try the  Ntfs‐
164       resize  FAQ  first  (see  below) and if you don't find your answer then
165       send your question, comment or bug report to the development team:
166       ntfs-3g-devel@lists.sf.net
167
168       There are a few very rarely met restrictions  at  present:  filesystems
169       having  unknown bad sectors, relocation of the first MFT extent and re‐
170       sizing into the middle of a $MFTMirr extent aren't supported yet. These
171       cases  are  detected  and  resizing is restricted to a safe size or the
172       closest safe size is displayed.
173
174       Ntfsresize schedules an NTFS consistency check and after the first boot
175       into  Windows you must see chkdsk running on a blue background. This is
176       intentional and no need to worry about it.  Windows may force  a  quick
177       reboot after the consistency check.  Moreover after repartitioning your
178       disk and depending on the hardware configuration, the  Windows  message
179       System  Settings Change may also appear. Just acknowledge it and reboot
180       again.
181
182       The disk geometry handling semantic (HDIO_GETGEO ioctl) has changed  in
183       an  incompatible way in Linux 2.6 kernels and this triggered multitudi‐
184       nous partition table corruptions resulting in unbootable  Windows  sys‐
185       tems,  even  if  NTFS was consistent, if parted(8) was involved in some
186       way. This problem was often attributed to ntfsresize but in  fact  it's
187       completely  independent  of  NTFS  thus ntfsresize. Moreover ntfsresize
188       never touches the partition table at all. By changing the 'Disk  Access
189       Mode'  to  LBA  in the BIOS makes booting work again, most of the time.
190       You can find more information about this issue in  the  Troubleshooting
191       section of the below referred Ntfsresize FAQ.
192

AUTHORS

194       ntfsresize  was written by Szabolcs Szakacsits, with contributions from
195       Anton Altaparmakov and Richard Russon.  It was  ported  to  ntfs-3g  by
196       Erik Larsson and Jean-Pierre Andre.
197

ACKNOWLEDGEMENT

199       Many  thanks  to Anton Altaparmakov and Richard Russon for libntfs, the
200       excellent documentation and comments, to  Gergely  Madarasz,  Dewey  M.
201       Sasser and Miguel Lastra and his colleagues at the University of Grana‐
202       da for their continuous and highly valuable help, furthermore  to  Erik
203       Meade, Martin Fick, Sandro Hawke, Dave Croal, Lorrin Nelson, Geert Hen‐
204       drickx, Robert Bjorkman and Richard Burdick for beta testing the  relo‐
205       cation  support,  to  Florian  Eyben,  Fritz  Oppliger, Richard Ebling,
206       Sid-Ahmed Touati, Jan Kiszka, Benjamin  Redelings,  Christopher  Haney,
207       Ryan  Durk, Ralf Beyer, Scott Hansen, Alan Evans for the valued contri‐
208       butions and to Theodore Ts'o whose  resize2fs(8)  man  page  originally
209       formed the basis of this page.
210

AVAILABILITY

212       ntfsresize is part of the ntfs-3g package and is available from:
213       http://www.tuxera.com/community/
214
215       The manual pages are available online at:
216       http://man.linux-ntfs.org/
217
218       Ntfsresize  related news, example of usage, troubleshooting, statically
219       linked binary and FAQ (frequently asked questions) are maintained at:
220       http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html
221

SEE ALSO

223       fdisk(8),  cfdisk(8),  sfdisk(8),  parted(8),  evms(8),   ntfsclone(8),
224       mkntfs(8), ntfsprogs(8)
225
226
227
228ntfs-3g 2011.4.12                February 2006                   NTFSRESIZE(8)
Impressum