ntfsresize man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

ntfsresize(1M)		System Administration Commands		ntfsresize(1M)

NAME
       ntfsresize - resize an NTFS file system without data loss

SYNOPSIS
       ntfsresize  [options] --info device

       ntfsresize  [options] [--size size[k|M|G]] device

DESCRIPTION
       The  ntfsresize program safely resizes Windows XP, Windows Server 2003,
       Windows 2000, Windows NT4 and Longhorn NTFS  filesystems	 without  data
       loss.  All  NTFS	 versions used by 32-bit and 64-bit Windows "operating
       systems" are supported. Defragmentation is not required prior to resiz‐
       ing,  because ntfsresize can relocate any data if needed, without risk‐
       ing data integrity.

       ntfsresize can be used to  shrink  or  enlarge  any  NTFS  file	system
       located on an unmounted device (usually a disk partition). The new file
       system will have a size that you specify. The size parameter  can  have
       one  of	the  optional modifiers k, M, G, denoting, respectively, kilo‐
       bytes, megabytes, or gigabytes. ntfsresize conforms to the SI, ATA,  an
       IEEE  standards and the disk manufacturers by supporting k=10^3, M=10^6
       and G=10^9.

       If both ---info and ---size options are omitted then the NTFS file sys‐
       tem will be enlarged to the underlying device size.

       To  resize  a file system on a partition, you must resize both the file
       system and the partition, by editing the partition table on  the	 disk.
       Similarly  to  other command-line file system resizers, ntfsresize does
       not manipulate the size of the partitions. To do that you  must	use  a
       disk   partitioning  tool,  such as fdisk(1M). Alternatively, you could
       use one of the many user friendly partitioners  that  uses   ntfsresize
       internally.   Such   partitioners  include,  among  others,  Mandriva's
       DiskDrake,  QTParted,  SUSE/Novell's  YaST  Partitioner,	 IBM's	 EVMS,
       GParted, or Debian/Ubuntu's Partman.

       Back  up your data and your partition table before using any partition‐
       ing tool. For an NTFS file system, you can use ntfsclone(1M) as a means
       of backup.

       To shrink an NTFS partition, first use ntfsresize to shrink the size of
       the file system. Then use a utility such as  fdisk(1M)  to  shrink  the
       size  of the partition by deleting the partition and recreating it with
       the smaller size. Do not make the partition smaller than the  new  size
       of  NTFS;  otherwise, you will not be able to boot from that partition.
       If you mistakenly made a too-small partition, you would have to	recre‐
       ate the partition to be as large as newly sized NTFS file system.

       To  enlarge an NTFS file system, you must first enlarge the size of the
       underlying partition. You can use fdisk(1M) to delete the partition and
       recreate	 it  with  a  larger size. Make sure the newly sized partition
       does not overlap with any  other	 partition.  Then  use	ntfsresize  to
       enlarge the file system.

       When recreating a partition, make sure you create it at the same start‐
       ing sector and with the same partition type as was used in  the	parti‐
       tion  you are replacing. Otherwise, you will not be able to access your
       file system. Use the fdisk u command to switch from the default	cylin‐
       der  unit  to  the reliable sector unit. Also, if the bootable flag was
       set in the old partition, make sure to set it in the  recreated	parti‐
       ton. Otherwise, you might not be able to boot from the new partition.

EXTENDED DESCRIPTION
       There are a handful of very rarely met restrictions in the use of ntfs‐
       resize. An example of such a restriction	 occurs	 with  a  file	system
       stored  on  a  disk having unknown bad sectors. Relocation of the first
       MFT extent and resizing into the middle of a $MFTMirr extent   are  not
       supported.  These  cases	 are  detected and resizing is restricted to a
       safe size or the closest safe size is displayed.

       Upon completion of a resizing, ntfsresize schedules an NTFS consistency
       check.  In  Windows,  this check is performed by chkdsk. Upon the first
       subsequent reboot into Windows, you will note chkdsk running in a  blue
       background.  This  is  normal. Windows might force a quick reboot after
       the consistency check. Depending on your hardware  configuration,  Win‐
       dows  might  alert  you	to  a  systems setting change and recommend or
       require a reboot. Acknowledge the message and reboot a second time.

OPTIONS
       Supported options are listed below. Most options have both  single-let‐
       ter  and	 full-name  forms.  Multiple single-letter options that do not
       take an argument can be combined. For example, -fv is the equivalent of
       -f  -v. A full-name option can be abbreviated to a unique prefix of its
       name.

       -b, --bad-sectors

	   By default, ntfsresize exits upon encountering  bad	sectors.  This
	   option allows the utility to proceed in spite of such sectors.

	   Prior  using	 this  option, it is strongly recommended that you use
	   ntfsclone(1M) with the --rescue option to make a backup,  then,  in
	   Windows,  run  chkdsk  /f  /r volume: from the command line. If the
	   disk guarantee displays as valid, then replace it, as it is	defec‐
	   tive.  Note that no software can repair bad sector errors. The most
	   that can be done is to work around these defects.

	   This option has no effect if a disk has no bad sectors.

       -f, --force

	   ntfsresize always marks a file system for consistency check	before
	   a  real (not using --no-action) resize operation and it leaves that
	   way for extra safety. Thus, if an NTFS file system  was  marked  by
	   ntfsresize,	it  is	safe  to  use  this  option. You must use this
	   option, if you need to resize several times	without	 booting  into
	   Windows between each resizing step.

       -h, --help

	   Display usage information and exit.

       -i, --info

	   Used	 when  you  want to shrink a file system. Causes ntfsresize to
	   determine the smallest shrunken file system size supported. Most of
	   the	time  the  smallest size is the space already used on the file
	   system. ntfsresize does not shrink a file system to a smaller  size
	   than what is returned by this option. Depending on several factors,
	   it might be unable to shrink to this theoretical size. Although the
	   integrity  of your data should be never at risk, it is nevertheless
	   strongly recommended to make a test run by  using  the  --no-action
	   option before actual resizing.

	   Based  on  testing,	the  smallest attainable size is approximately
	   space used in the file system plus 20-200 MB. Note also  that  Win‐
	   dows might need an additional 50-100 MB to boot safely.

	   This option never causes any changes to the file system; the parti‐
	   tion is opened read-only.

       -n, --no-action

	   Use this option to make a test run before doing the	resize	opera‐
	   tion.  Volume will be opened read-only and ntfsresize displays what
	   it would do if it were to resize the file system. Proceed with  the
	   actual resizing only if the test run passed.

       -P, --no-progress-bar

	   Do not display progress bars during ntfsresize operation.

       -s, --size size[k|M|G]]

	   Resize  file	 system to size bytes. The new file system will have a
	   size that you specify. The size  parameter  can  have  one  of  the
	   optional  modifiers	k,  M,	G,  denoting, respectively, kilobytes,
	   megabytes, or gigabytes. ntfsresize conforms to  the	 SI,  ATA,  an
	   IEEE	 standards  and	 the  disk manufacturers by supporting k=10^3,
	   M=10^6 and G=10^9. Before performing an actual resizing, run	 ntfs‐
	   resize with the --no-action option, along with this option, first.

       -v, --verbose

	   Display copious output.

       -V, --version

	   Display the version number of ntfsresize.

EXIT STATUS
       Display zero on success, non-zero otherwise.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Availability		     │system/file-system/ntfsprogs │
       ├─────────────────────────────┼─────────────────────────────┤
       │Interface Stability	     │Uncommitted		   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       fdisk(1M), ntfsclone(1M), parted(1M), attributes(5)

       http://wiki.linux-ntfs.org

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

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

SunOS 5.11			  21 May 2009			ntfsresize(1M)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net