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 integ‐
18       rity.
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 fit in a DEVICE whose desired size is SIZE bytes.  The SIZE param‐
23       eter  may  have  one of the optional modifiers k, M, G, which means the
24       SIZE parameter is given in  kilo-,  mega-  or  gigabytes  respectively.
25       Ntfsresize  conforms  to the SI, ATA, IEEE standards and the disk manu‐
26       facturers by using k=10^3, M=10^6 and G=10^9.
27
28       If both --info(-mb-only) and --size are omitted then the NTFS  filesys‐
29       tem will be enlarged to match 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).  Al‐
36       ternatively 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 another  existing  partition.   You  may  enlarge  upwards
59       (first  sector unchanged) or downwards (last sector unchanged), but you
60       may not enlarge at both ends in a single step.  If you merge  two  NTFS
61       partitions,  only  one of them can be expanded to the merged partition.
62       After you have enlarged the partition, you may use  ntfsresize  to  en‐
63       large the size of the filesystem.
64
65   Partitioning
66       When  recreating  the  partition by a disk partitioning tool, make sure
67       you create it at the same starting sector and with the  same  partition
68       type as before.  Otherwise you won't be able to access your filesystem.
69       Use the 'u' fdisk command to switch to the reliable  sector  unit  from
70       the default cylinder one.
71
72       Also  make  sure  you set the bootable flag for the partition if it ex‐
73       isted before. Failing to do so you might not be able to boot your  com‐
74       puter from the disk.
75

OPTIONS

77       Below  is a summary of all the options that ntfsresize accepts.  Nearly
78       all options have two equivalent names.  The short name is preceded by -
79       and  the  long name is preceded by --.  Any single letter options, that
80       don't take an argument, can be combined into  a  single  command,  e.g.
81       -fv  is  equivalent to -f -v.  Long named options can be abbreviated to
82       any unique prefix of their name.
83
84       -c, --check
85              By using this option ntfsresize will only check  the  device  to
86              ensure that it is ready to be resized. If not, it will print any
87              errors detected.   If  the  device  is  fine,  nothing  will  be
88              printed.
89
90       -i, --info
91              By using this option without --expand, ntfsresize will determine
92              the theoretically smallest shrunken filesystem  size  supported.
93              Most  of  the  time  the result is the space already used on the
94              filesystem. Ntfsresize will refuse shrinking to a  smaller  size
95              than  what  you got by this option and depending on several fac‐
96              tors it might be unable to shrink very close to this theoretical
97              size.  Although  the  integrity  of your data should be never in
98              risk, it's still strongly recommended to make a test run by  us‐
99              ing the --no-action option before real resizing.
100
101              Practically  the  smallest  shrunken size generally is at around
102              "used space" + (20-200 MB). Please also take into  account  that
103              Windows  might  need  about  50-100  MB  free space left to boot
104              safely.
105
106              If used in association with option --expand, ntfsresize will de‐
107              termine  the  smallest downwards expansion size and the possible
108              increments to the size. These are exact byte counts  which  must
109              not be rounded.  This option may be used after the partition has
110              been expanded provided the upper bound has not been changed.
111
112              This option never causes any changes to the filesystem, the par‐
113              tition is opened read-only.
114
115       -m, --info-mb-only
116              Like  the info option, only print out the shrinkable size in MB.
117              Print nothing if the shrink size is the  same  as  the  original
118              size  (in  MB).   This option cannot be used in association with
119              option --expand.
120
121       -s, --size SIZE[k|M|G]
122              Resize  filesystem  to  fit  in  a  partition  whose   size   is
123              SIZE[k|M|G]  bytes by shifting its end and keeping its beginning
124              unchanged. The filesystem size is set to be at least one  sector
125              smaller than the partition.  The optional modifiers k, M, G mean
126              the SIZE parameter is given in kilo-, mega- or gigabytes respec‐
127              tively.   Conforming  to  standards,  k=10^3, M=10^6 and G=10^9.
128              ki=2^10, Mi=2^20 and Gi=2^30 are also allowed. Use  this  option
129              with --no-action first.
130
131       -x, --expand
132              Expand  the  filesystem  to the current partition size, shifting
133              down its beginning and keeping its end unchanged.  The  metadata
134              is  recreated  in  the  expanded space and no user data is relo‐
135              cated. This is incompatible with option -s (or --size)  and  can
136              only  be  made if the expanded space is an exact multiple of the
137              cluster size. It must also be large enough to hold the new meta‐
138              data.
139
140              If  the  expansion is interrupted for some reason (power outage,
141              etc), you may restart the resizing, as  the  original  data  and
142              metadata have been kept unchanged.
143
144              Note : expanding a Windows system partition and filesystem down‐
145              wards may lead to the registry or some files  not  matching  the
146              new  system layout, or to some important files being located too
147              far from the beginning of the partition, thus making Windows not
148              bootable.
149
150       -f, --force
151              Forces  ntfsresize  to  proceed with the resize operation either
152              without prompting for an explicit acceptance, or if the filesys‐
153              tem  is  marked  for  consistency check. Double the option (-ff,
154              --force --force) to avoid prompting even if the file  system  is
155              marked for check.
156
157              Please  note, ntfsresize always marks the filesystem for consis‐
158              tency check before a real resize operation and  it  leaves  that
159              way for extra safety. Thus if NTFS was marked by ntfsresize then
160              it's safe to use this option. If  you  need  to  resize  several
161              times  without  booting into Windows between each resizing steps
162              then you must use this option.
163
164       -n, --no-action
165              Use this option to make a test run before doing the real  resize
166              operation.   Volume will be opened read-only and ntfsresize dis‐
167              plays what it would do if it  were  to  resize  the  filesystem.
168              Continue with the real resizing only if the test run passed.
169
170       -b, --bad-sectors
171              Support  disks  having  hardware  errors, bad sectors with those
172              ntfsresize would refuse to work by default.
173
174              Prior using this option, it's strongly  recommended  to  make  a
175              backup  by  ntfsclone(8) using the --rescue option, then running
176              'chkdsk /f /r volume:' on Windows from the command line. If  the
177              disk  guarantee  is still valid then replace it.  It's defected.
178              Please also note, that no software  can  repair  these  type  of
179              hardware errors. The most what they can do is to work around the
180              permanent defects.
181
182              This option doesn't have any effect if the disk is flawless.
183
184       -P, --no-progress-bar
185              Don't show progress bars.
186
187       -v, --verbose
188              More output.
189
190       -V, --version
191              Print the version number of ntfsresize and exit.
192
193       -h, --help
194              Display help and exit.
195

EXIT CODES

197       The exit code is 0 on success, non-zero otherwise.
198

KNOWN ISSUES

200       No reliability problem is known.  If you find  a  bug  please  send  an
201       email describing the problem to the development team at:
202       ntfs-3g-devel@lists.sf.net
203
204       There  are  a  few very rarely met restrictions at present: filesystems
205       having unknown bad sectors, relocation of the first MFT extent and  re‐
206       sizing into the middle of a $MFTMirr extent aren't supported yet. These
207       cases are detected and resizing is restricted to a  safe  size  or  the
208       closest safe size is displayed.
209
210       Ntfsresize schedules an NTFS consistency check and after the first boot
211       into Windows you must see chkdsk running on a blue background. This  is
212       intentional  and  no need to worry about it.  Windows may force a quick
213       reboot after the consistency check.  Moreover after repartitioning your
214       disk  and  depending on the hardware configuration, the Windows message
215       System Settings Change may also appear. Just acknowledge it and  reboot
216       again.
217
218       The  disk geometry handling semantic (HDIO_GETGEO ioctl) has changed in
219       an incompatible way in Linux 2.6 kernels and this triggered  multitudi‐
220       nous  partition  table corruptions resulting in unbootable Windows sys‐
221       tems, even if NTFS was consistent, if parted(8) was  involved  in  some
222       way.  This  problem was often attributed to ntfsresize but in fact it's
223       completely independent of NTFS  thus  ntfsresize.  Moreover  ntfsresize
224       never  touches the partition table at all. By changing the 'Disk Access
225       Mode' to LBA in the BIOS makes booting work again, most  of  the  time.
226       You  can  find more information about this issue in the Troubleshooting
227       section of the below referred Ntfsresize FAQ.
228

AUTHORS

230       ntfsresize was written by Szabolcs Szakacsits, with contributions  from
231       Anton  Altaparmakov  and  Richard  Russon.  It was ported to ntfs-3g by
232       Erik Larsson and Jean-Pierre Andre.
233

ACKNOWLEDGEMENT

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

AVAILABILITY

248       ntfsresize is part of the ntfs-3g package and is available from:
249       http://www.tuxera.com/community/
250

SEE ALSO

252       fdisk(8),  cfdisk(8),  sfdisk(8),  parted(8),  evms(8),   ntfsclone(8),
253       mkntfs(8), ntfsprogs(8)
254
255
256
257ntfs-3g 2021.8.22                  July 2013                     NTFSRESIZE(8)
Impressum