Discrepancy in volume size when you extend a volume with DISKPART

Had an issue come in today where the customer requested that one of their drives on SAN storage be expanded. They carved out the necessary disk space and expanded the LUN which was verified showing 430GB total on the array. Rescanned in Disk Management and showed the Unallocated Space. They then used diskpart to expand the D$ drive, disk management then shoed 430GBs.  However, properties still showed only 359GB. Diskpart list disk showed 430GB.

So why the discrepancy?  Well when you extend a volume with DISKPART it doesn't automatically extend the file system with it, so you need to do the following:

C:\Debuggers>diskpart

Microsoft DiskPart version 6.0.6001

Copyright (C) 1999-2007 Microsoft Corporation.

On computer: ServerX

DISKPART> sel vol d

Volume 1 is the selected volume.

DISKPART> EXTEND FILESYSTEM

DiskPart successfully extended the file system on the volume.

When that is completed, then you'll see all the space in the properties.  If you extend the volume via the MMC then this happens automatically for you behind the scenes.

Technorati tags: vista, windows 2008