Extending NTFS Volumes Quickly.

Have you ever sat in a presentation and saw a command execute that you never knew about and was just blown away? Yesterday was one of those days.

I was watching a demo of a new SAN solution and the presenter created a new volume on an NTFS drive but didn’t use the full drive size. During the demo he wanted to adjust the size of that drive to use all the free space on the drive.  My thoughts, okay here comes a tutorial on RAID 0 … NOPE Instead he fired up a CLI tool I’ve only used once called DISKPART

With diskpart, you’ll select the volume you’ll be working on and then execute the command: extend to extend the partition. Here’s the info on this command:

extend [size=n][noerr]
Use the extend command to cause the current in-focus volume to be extended into contiguous unallocated space. The unallocated space must follow (it must be of higher sector offset than) the in-focus partition. The intended use of this command is to grow an existing basic data partition into newly created space on an extended hardware Raid logical unit number (LUN).
If the partition had been previously formatted with the NTFS file system, the file system is automatically extended to occupy the larger partition, and data loss does not occur. If the partition had been previously formatted with any file system format other than NTFS, the command is unsuccessful and does not change the partition.
Diskpart blocks the extension of only the current system or boot partition.

Leave a Reply