Using NTFS Resize

Recently I found myself in a situation which required me to resize an NTFS partition in order to fit it onto a replacement HDD. In searching around and seeking some advice from a work mate I found the SysRescue Live CD (downloadable from: www.sysresccd.org) that has a tool on it called NTFSResize.

This is a great tool that will both shrink and expand NTFS volumes to any size desired. There are two main ways to use ntfsresize:

WARNING: Back up all drives involved in using ntfsresize before using. It is a dangerous tool that could really cause you some grief if you don't have a full backup of all data concerned. I also recommend only having the HDD that you plan to operate upon plugged in to the system. This will help you to avoid resizing the wrong volume!

To shrink and NTFS volume onto a smaller partition.

Basically you need to run ntfsresize to size the filesystem down to the required size and then run up fdisk and drop the partition down to the same size.

So to drop my 80G volume down to 40G I issued the following command:

ntfsresize [options] --size 30G /dev/hda1

Then went into fdisk, deleted the current partition, added a new partition that was 30GB in size.Changed it to being an active partition (so that I could boot it), told it that the partition was type 7 (NTFS) and finally wrote the partition table.

Reboot, and voila, you should have successfully resized your volume. If not, go back to your backup, back it up and try again thinking harder this time round.

To expand a NTFS volume onto a larger partition.

This is the reverse of the above process funnily enough.You essentially run up fdisk.Expand the partition to the desired size. Then run ntfsresize to increase the size of the volume to the size of the partition.

NTFSRESIZE Usage options:

ntfsresize [options] --info device

For information. Run this before doing anything to see what is happening on the drive and to check for any errors on the volume). If you do get an error about the disk being flagged for a chkdsk then load up the recovery console (on the Windows XP/2003 install disc) and issue a "chkdsk /f /p" to force a disk check and then repeat the process detailed above.

ntfsresize [options] --size SIZE (in k/M/G) PARTITION (e.g ntfsresize --size 20G /dev/hda1)

To do the actual resize. You can also run the extremely handy -n option which will have no action but essentially be a "dry run" to check that the process will complete properly before commiting.