Saturday, November 03, 2007

Using Vista diskpart - Dynamic disk and volume management tool to shrink volumes

Dynamic disk and volume management has been provided to Microsoft by VERITAS Software Corporation. That means it supports some advanced volume management techniques.

People often need to shrink a volume, just so they can install that new release of Solaris or OpenBSD. But to do that, they need some free unallocated disk space they can create a primary partition from (in case of Solaris and BSD, which need to be installed on primary partitions).

With older versions of Windows people would use GNU Parted (QtParted, gParted front-ends), Partition Magic or FIPS. Now you can just use diskpart to safely resize NTFSv5.

Let's assume we want to shrink a volume by 80GB. Just open a command prompt and type:

list volume
select volume NUMBER
shrink desired 81920
list volume

You can, of course, just use the graphical interface available as a mmc snap-in (start - run - diskmgmt.msc).

Now you can use the available disk space to create a primary partition for your new operating system, and dual-boot it :-).