1ntfsresize(1M)          System Administration Commands          ntfsresize(1M)
2
3
4

NAME

6       ntfsresize - resize an NTFS file system without data loss
7

SYNOPSIS

9       ntfsresize  [options] --info device
10
11
12       ntfsresize  [options] [--size size[k|M|G]] device
13
14

DESCRIPTION

16       The  ntfsresize program safely resizes Windows XP, Windows Server 2003,
17       Windows 2000, Windows NT4 and Longhorn NTFS  filesystems  without  data
18       loss.  All  NTFS  versions used by 32-bit and 64-bit Windows "operating
19       systems" are supported. Defragmentation is not required prior to resiz‐
20       ing,  because ntfsresize can relocate any data if needed, without risk‐
21       ing data integrity.
22
23
24       ntfsresize can be used to  shrink  or  enlarge  any  NTFS  file  system
25       located on an unmounted device (usually a disk partition). The new file
26       system will have a size that you specify. The size parameter  can  have
27       one  of  the  optional modifiers k, M, G, denoting, respectively, kilo‐
28       bytes, megabytes, or gigabytes. ntfsresize conforms to the SI, ATA,  an
29       IEEE  standards and the disk manufacturers by supporting k=10^3, M=10^6
30       and G=10^9.
31
32
33       If both ---info and ---size options are omitted then the NTFS file sys‐
34       tem will be enlarged to the underlying device size.
35
36
37       To  resize  a file system on a partition, you must resize both the file
38       system and the partition, by editing the partition table on  the  disk.
39       Similarly  to  other command-line file system resizers, ntfsresize does
40       not manipulate the size of the partitions. To do that you  must  use  a
41       disk   partitioning  tool,  such as fdisk(1M). Alternatively, you could
42       use one of the many user friendly partitioners  that  uses   ntfsresize
43       internally.   Such   partitioners  include,  among  others,  Mandriva's
44       DiskDrake,  QTParted,  SUSE/Novell's  YaST  Partitioner,  IBM's   EVMS,
45       GParted, or Debian/Ubuntu's Partman.
46
47
48       Back  up your data and your partition table before using any partition‐
49       ing tool. For an NTFS file system, you can use ntfsclone(1M) as a means
50       of backup.
51
52
53       To shrink an NTFS partition, first use ntfsresize to shrink the size of
54       the file system. Then use a utility such as  fdisk(1M)  to  shrink  the
55       size  of the partition by deleting the partition and recreating it with
56       the smaller size. Do not make the partition smaller than the  new  size
57       of  NTFS;  otherwise, you will not be able to boot from that partition.
58       If you mistakenly made a too-small partition, you would have to  recre‐
59       ate the partition to be as large as newly sized NTFS file system.
60
61
62       To  enlarge an NTFS file system, you must first enlarge the size of the
63       underlying partition. You can use fdisk(1M) to delete the partition and
64       recreate  it  with  a  larger size. Make sure the newly sized partition
65       does not overlap with any  other  partition.  Then  use  ntfsresize  to
66       enlarge the file system.
67
68
69       When recreating a partition, make sure you create it at the same start‐
70       ing sector and with the same partition type as was used in  the  parti‐
71       tion  you are replacing. Otherwise, you will not be able to access your
72       file system. Use the fdisk u command to switch from the default  cylin‐
73       der  unit  to  the reliable sector unit. Also, if the bootable flag was
74       set in the old partition, make sure to set it in the  recreated  parti‐
75       ton. Otherwise, you might not be able to boot from the new partition.
76

EXTENDED DESCRIPTION

78       There are a handful of very rarely met restrictions in the use of ntfs‐
79       resize. An example of such a restriction  occurs  with  a  file  system
80       stored  on  a  disk having unknown bad sectors. Relocation of the first
81       MFT extent and resizing into the middle of a $MFTMirr extent   are  not
82       supported.  These  cases  are  detected and resizing is restricted to a
83       safe size or the closest safe size is displayed.
84
85
86       Upon completion of a resizing, ntfsresize schedules an NTFS consistency
87       check.  In  Windows,  this check is performed by chkdsk. Upon the first
88       subsequent reboot into Windows, you will note chkdsk running in a  blue
89       background.  This  is  normal. Windows might force a quick reboot after
90       the consistency check. Depending on your hardware  configuration,  Win‐
91       dows  might  alert  you  to  a  systems setting change and recommend or
92       require a reboot. Acknowledge the message and reboot a second time.
93

OPTIONS

95       Supported options are listed below. Most options have both  single-let‐
96       ter  and  full-name  forms.  Multiple single-letter options that do not
97       take an argument can be combined. For example, -fv is the equivalent of
98       -f  -v. A full-name option can be abbreviated to a unique prefix of its
99       name.
100
101       -b, --bad-sectors
102
103           By default, ntfsresize exits upon encountering  bad  sectors.  This
104           option allows the utility to proceed in spite of such sectors.
105
106           Prior  using  this  option, it is strongly recommended that you use
107           ntfsclone(1M) with the --rescue option to make a backup,  then,  in
108           Windows,  run  chkdsk  /f  /r volume: from the command line. If the
109           disk guarantee displays as valid, then replace it, as it is  defec‐
110           tive.  Note that no software can repair bad sector errors. The most
111           that can be done is to work around these defects.
112
113           This option has no effect if a disk has no bad sectors.
114
115
116       -f, --force
117
118           ntfsresize always marks a file system for consistency check  before
119           a  real (not using --no-action) resize operation and it leaves that
120           way for extra safety. Thus, if an NTFS file system  was  marked  by
121           ntfsresize,  it  is  safe  to  use  this  option. You must use this
122           option, if you need to resize several times  without  booting  into
123           Windows between each resizing step.
124
125
126       -h, --help
127
128           Display usage information and exit.
129
130
131       -i, --info
132
133           Used  when  you  want to shrink a file system. Causes ntfsresize to
134           determine the smallest shrunken file system size supported. Most of
135           the  time  the  smallest size is the space already used on the file
136           system. ntfsresize does not shrink a file system to a smaller  size
137           than what is returned by this option. Depending on several factors,
138           it might be unable to shrink to this theoretical size. Although the
139           integrity  of your data should be never at risk, it is nevertheless
140           strongly recommended to make a test run by  using  the  --no-action
141           option before actual resizing.
142
143           Based  on  testing,  the  smallest attainable size is approximately
144           space used in the file system plus 20-200 MB. Note also  that  Win‐
145           dows might need an additional 50-100 MB to boot safely.
146
147           This option never causes any changes to the file system; the parti‐
148           tion is opened read-only.
149
150
151       -n, --no-action
152
153           Use this option to make a test run before doing the  resize  opera‐
154           tion.  Volume will be opened read-only and ntfsresize displays what
155           it would do if it were to resize the file system. Proceed with  the
156           actual resizing only if the test run passed.
157
158
159       -P, --no-progress-bar
160
161           Do not display progress bars during ntfsresize operation.
162
163
164       -s, --size size[k|M|G]]
165
166           Resize  file  system to size bytes. The new file system will have a
167           size that you specify. The size  parameter  can  have  one  of  the
168           optional  modifiers  k,  M,  G,  denoting, respectively, kilobytes,
169           megabytes, or gigabytes. ntfsresize conforms to  the  SI,  ATA,  an
170           IEEE  standards  and  the  disk manufacturers by supporting k=10^3,
171           M=10^6 and G=10^9. Before performing an actual resizing, run  ntfs‐
172           resize with the --no-action option, along with this option, first.
173
174
175       -v, --verbose
176
177           Display copious output.
178
179
180       -V, --version
181
182           Display the version number of ntfsresize.
183
184

EXIT STATUS

186       Display zero on success, non-zero otherwise.
187

ATTRIBUTES

189       See attributes(5) for descriptions of the following attributes:
190
191
192
193
194       ┌─────────────────────────────┬─────────────────────────────┐
195       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
196       ├─────────────────────────────┼─────────────────────────────┤
197       │Availability                 │SUNWntfsprogs                │
198       ├─────────────────────────────┼─────────────────────────────┤
199       │Interface Stability          │Uncommitted                  │
200       └─────────────────────────────┴─────────────────────────────┘
201

SEE ALSO

203       fdisk(1M), ntfsclone(1M), parted(1M), attributes(5)
204
205
206       http://wiki.linux-ntfs.org
207

NOTES

209       In  Linux  version  2.6,  with partitions that have been manipulated by
210       parted(1M), use of ntfsresize preceded corruption of partition  tables,
211       which resulted in unbootable Windows systems. This occurred even if the
212       NTFS file system was consistent. This problem is  independent  of  NTFS
213       and, thus, ntfsresize. Moreover, ntfsresize never touches the partition
214       table. Under the conditions just  described,  you  can,  in  the  BIOS,
215       change  Disk Access Mode to LBA to regain the ability to boot. For fur‐
216       ther  discussion  of  this  condition  see  the  ntfsresize   FAQ   at:
217       http://mlf.linux.rulez.org/mlf/ezaz/ntfsresize.html.
218

AUTHORS

220       ntfsresize was written by Szabolcs Szakacsits, with  contributions from
221       Anton Altaparmakov and Richard Russon.
222
223
224
225SunOS 5.11                        21 May 2009                   ntfsresize(1M)
Impressum