As a system administrator it is often not the latest and greatest big new features of a new operating system which you end up finding the most useful, sometimes its the small improvements which really make your life easier. I’ve been spending a lot more time with Windows Server 2008 recently (OK, I know R2 is out, but it takes time for large organisations to move away from older OS’s and applications.)
Obviously there are great new headline features with things like Server Core and Read-Only Domain Controllers, but I have found a new feature I love which is the abilty to extend a system disk without having to go through some kind of convoluted process. It is particularly easy if it is a VM and you have enough space on the existing datastore to extend the VM’s disk without requesting more storage from your SAN team.
In VSphere 4.0 it even lets me extend the size of the vmdk with the server powered on, I don’t remember that being possible in 3.5, but I might be wrong. The big advantage for this for me is the fact that you do not need downtime to carry out this whole process, either extending the vmdk or the system volume!
Update: I just read in Mastering vSphere by Scott Lowe that the above is a new feature in vSphere 4.0 and the VM is required to be hardware version 7.
Take the following steps to carry it out:
Edit the settings of the 2008 VM and increase the size of the disk.
Within the Disk Management MMC, kick off a ‘Rescan Disks’
- You will now see the additional space available at the end of the current disk.
- Right-click the C: drive and choose ‘Extend Volume’
- Follow the wizard through to add the additonal space. On completion your system disk will now have the additional space added - all with no downtime!
For completeness there are a number of ways you could do this in Window Server 2003, the way I have typically used is the following. (Make sure you have a good backup of this VM before going ahead)
Power down the VM. Edit the settings of the VM to grow the VMDK. Do not power on the VM!
Find another Windows Server 2003 VM which is Powered On and has access to the same datastores. Edit the settings of the VM, add an additional hard disk, select the option to use an existing virtual disk, browse to the initial VM’s vmdk and select it.
In Disk Management Rescan the disks and you will see an additional drive with unallocated space available other than your current drives.
Use the command line utility diskpart to extend this drive.
- Enter diskpart to start
- List Volume will show available volumes on the machine
- Check the additional volume has not been listed as a System partition
- Select that volume with Select Volume volumenumber
- Enter Extend to increase the size of the drive with all available space
- List Volume will let you check it was successful
- Exit to finish
Go back into Disk Management and you should be able to see a larger drive.
Edit the settings of the VM and remove the additional disk - make sure you do not select the option to delete the files from disk!
Power the initial VM back on. After logging back in the first time you will most likely be prompted to restart the server. Once logged back in, check Disk Management to see the larger system disk.