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

EXIT CODES

149       The exit code is 0 on success, non-zero otherwise.
150

KNOWN ISSUES

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

AUTHORS

183       ntfsresize was written by Szabolcs Szakacsits, with contributions  from
184       Anton Altaparmakov and Richard Russon.
185

ACKNOWLEDGEMENT

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

AVAILABILITY

200       ntfsresize is part of the ntfsprogs package and is available from:
201       http://www.linux-ntfs.org/content/view/19/37
202
203       The manual pages are available online at:
204       http://man.linux-ntfs.org/
205
206       Ntfsresize  related news, example of usage, troubleshooting, statically
207       linked binary and FAQ (frequently asked questions) are maintained at:
208       http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html
209

SEE ALSO

211       fdisk(8),  cfdisk(8),  sfdisk(8),  parted(8),  evms(8),   ntfsclone(8),
212       mkntfs(8), ntfsprogs(8)
213
214
215
216ntfsprogs 1.13.1                 February 2006                   NTFSRESIZE(8)
Impressum