Dynamic Disks

Those of you who’ve worked with me before are probably aware that I am not the greatest fan of Microsoft’s server platform for high-performance enterprise computing. That said, I acknowledge that it is not uncommon for people to use Windows Server 2003 as a core platform to run any number of applications in their business. Something that visibly agitates me is people who use Dynamic Disks without thinking through the consequences of their actions. Firstly, this article from Microsoft’s TechNet gives a good outline of how Dynamic Disks and Volumes work and this KB article defines what some of the differences are between Basic and Dynamic Disks while discussing Best Practice options for using Dynamic Disks in Production.

My opinion of Dynamic Disks thus far is that, while the technology has some neat features, a lot of the functionality can be had using hardware-based RAID and vmkfstools. To clarify, most people deploy Dynamic Disks to take advantage of disk spanning and RAID-like parity functionality. But this can be had easily with most Engenio and EMC-based hardware arrays. People also use it to get around the problem of sizing with relation to basic disks, but I think this enthusiasm needs to be tempered with some forethought and planning. For example, we recently babysat a Spanned Dynamic Volume that was comprised of 4 +1TB LUNs that kept appearing as Foreign when the user rebooted the host. The thing to remember with spanning is that it provides no parity, and thus no protection from failure. If you insist on using Dynamic Volumes, at least ensure that there is a level of parity involved to save you from the likely outcome of volume failure. Before you deploy a 5TB RAID-0 volume, think carefully about why you need to create this “superLUN of business discontinuity”, and what other mechanisms are available to achieve the same outcome.

If you’re working in a VMware ESX environment, you should normally be able to use SAN-based disk expansion technologies, combined with diskpart in Windows, or vmkfstools in VMware ESX, to achieve the desired result.

In Windows, run the following commands to extend a basic volume:

diskpart

list volume

select volume x (where x is the number of the volume you wish to extend)

extend

exit

In VMware ESX, run the following command to extend a vmdk disk file:

vmkfstools -X 50G disk.vmdk

Note that the 50G value is the new size of the disk, not the extra space you require.

If you find yourself needing to extend a boot volume in Windows Server 2003, diskpart won’t be any help. Before you reach for the gparted ISO file, think about combining vmkfstools with another (test) Virtual Machine. Here are the required steps:

1. Backup your VM (VM1).
2. Shutdown VM1 and run vmkfstools against VM1’s disk file.
3. Attach the disk to a second guest (VM2).
4. Run diskpart on the volume (in this case it will probably be D: or something similar).
5. Once the volume is extended, shutdown VM2 and remove (but don’t delete) the disk from VM2’s config.
6. Attach the newly expanded volume to VM1.
7. Boot VM1.
8. Profit.

I hope that’s provided a starting point for further investigation into basic and dynamic disks. Remember, before converting every volume in sight to Dynamic, think very carefully about the ramifications of doing this.