Using Diskpart to Align a Windows Disk Partition

There is an EMC whitepaper titled Using diskpar and diskpart to align partitions on Windows Basic and Dynamic Disks. This paper describes how legacy Windows issues cause a single disk I/O to span multiple tracks. This puts an unnecessary load on the SAN and reduces performance. The fix is to align the partition. Below is a sample session using the DISKPART utility. Comments are in red.

Invoke Diskpart

C:\>diskpart

Microsoft DiskPart version 5.2.3790.3959

Copyright (C) 1999-2001 Microsoft Corporation.

On computer: MYTESTBOX

You must select the disk to act on

DISKPART> select disk 5

Disk 5 is now the selected disk.

Create a partition using the EMC-recommended alignment offset

DISKPART> create partition primary align=64

DiskPart succeeded in creating the specified partition.

Select the partition / volume that you just created

DISKPART> select volume=0

Volume 0 is the selected volume.

Assign a drive letter

DISKPART> assign letter=o

DiskPart successfully assigned the drive letter or mount point.

Exit Diskpart

DISKPART> exit

Leaving DiskPart…

C:\>

You can now use the disk management MMC to format the partition

This entry was posted in Performance, Windows OS. Bookmark the permalink.

6 Responses to Using Diskpart to Align a Windows Disk Partition

  1. I have published a fairly comprehensive deck related to disk partition alignment (sector alignment). It’s focus is on SQL Server yet much of it is relevant to Windows & Exchange:

    Disk Partition Alignment (Sector Alignment) for SQL Server: Part 1: Slide Deck
    http://blogs.msdn.com/jimmymay/archive/2008/10/14/disk-partition-alignment-for-sql-server-slide-deck.aspx

  2. BTW, the whitepaper you cited, “Using diskpar and diskpart to align partitions on Windows Basic and Dynamic Disks”, seems no longer to be available. For a long time it was the *only* official documentation I could find on disk partition alignment. Alas, it seems, like my darlin’ Clementine, to be lost & gone forever.

  3. Michael says:

    Can someone tell me if sector alignment is even possible on a single disk? If (hypothetically) I had a server 2003 server with one disk, no RAID of any type. Just one single disk. Would that benefit from sector alignment?

    The question comes up via NFS shares and virtualization. If the VMs are published over NFS, I do not see a need for GOS alignment. It is not block based storage and therefor there is nothing to align to.

    -M

  4. Semion says:

    Michael , no , disk alignment only make sense with 2 or more disks .

  5. Oliver Jones says:

    Disk alignment DOES now make sense with single disks, when the disks use 4K sectors.

    Several of these drives are now available from the likes of Western Digital, and performance will suffer if Windows XP/2003 partitions are not aligned on these disks, because a whole 4K sector will be read/written for the sake of modifying one 512-byte block. (It’s the RAID5 write hole, without the RAID.)

  6. There are quite a few ways to partition Windows, have a read of this thread http://www.techhelpcentre.com/showthread.php?t=835221.

Comments are closed.