Windows Server,  Windows XP

Windows Server 2008: Expanding a Volume

You may find that a disk in Windows Server simply isn’t big enough for your greedy applications.  But never fear, the good folks at Microsoft have given us the ability to expand that volume on the fly, as needed by adding other pools of storage or single disks to it.  However, it’s important to keep in mind that if you have a highly available volume (let’s just say a RAID6) and you add a single disk to it then you have just effectively lost the high availability for the data stored on the extended portion of the volume.  So make sure that the new storage you are adding matches up to your policies on RAID levels, etc.

To expand a volume first add the storage and do not allocate it to a volume or create a disk out of it.  Leave it as free space.  Then, while logged in as an administrator, open Administrative Tools from the Server Manager.  From here, click on Storage and select Disk Management.  Then right-click on the disk you wish to expand and click on Extend Volume, which will open the Extend Volume Wizard. Click on the free space to add to the disk from the list under the Available column, which will move it under the Selected column.  From here you will be given a value (in MB) for how much to extend the volume.  This cannot be greater than the number listed in the Maximum available space in MB field.   Once you are satisfied with the storage you will be adding into your logical disk click on the Next button.  

Read the overview of what will be added, taking note to verify that the total number of MB is not greater than what is available and click on the Finish button.  Now wait and viola your disk should now be bigger.

You can also do this through the command line by using the diskpart command.  Basically, you select a partition from a disk by doing select disk and then select partition (you can list disk and list partition to see what you will be managing).  Then use the Extend Size= variable to define how much to extend it by (by default it will just use all the space so you don’t have to set this if you don’t want to).  Once done type Extend and you’re off to the races.  

Once again, I need to emphasize that whole redundancy thing.  If you add a single disk into a volume that was RAID 6 then you’re going to be in a far less redundant scenario.  When possible preserve the RAID type for the original media.

An alternative to this process is to use a couple of different strategies.  

The first is to use a symbolic link provided the application can traverse one.  You can symlink a folder from one drive onto another.  You can do this using the mklink command.  Using symbolic links may allow you to temporarily isolate what data will go onto, for example, a near line disk being used temporarily as online storage.  This can be useful in situations where you plan on adding a larger disk that is fully redundant later and just need to put your data somewhere in the meantime.

Another option is the subst command.  Using the subst command you can basically map a drive letter to a folder on the computer.  This will effectively mount up a path as though it were a network share, used similarly to the NET USE command. 

A final option from back in the day is to use the append command, but I think this one was not included with Windows Server 2008 so don’t quote me on that…

So another point to make is that the process for expanding a volume works with internal media and external media.  So if you have, for example, a fiber channel disk array or some eSATA storage you can expand an internal disk (let’s say C: or D:) to include this media.  So given a full array of internal disks and no available expansion slots you can fairly easily go ahead and add more media even if you are out of internal space.  Ergo, from a storage standpoint, you can almost always upgrade provided you have an extra PCI or PCI-X slot on a Windows Server.  Or you could theoretically use iSCSI storage, although I haven’t personally gone this route in this type of situation…