Saturday, October 17, 2015

Hyper-V TIP: How to expand disk drives

One thing you may find yourself needing to do is expanding the disk drives.  This TIP shows you how.

Procedure

  1. Shutdown the SharePoint VM which has the disks you want to re-size.
  2. Launch Hyper-V Manager.
  3. Connect to the Hyper-V server hosting the VM.
  4. Select the VM in the Virtual Machines list.
  5. In the Actions pane, click Settings... A settings dialog appears.  
  6. In the Settings dialog, in the Hardware list pane, select the hard drive you want to re-size.  In my case, I wanted to resize the Logs drive.  The right details pane updates to show configurable parameters for the selected object. These configurable details will only be enabled if the VM is shutdown.
  7. Click the Edit button.  The Edit Virtual Hard Disk Wizard dialog appears.
  8. Select the Expand option, and then click the Next button.
  9. In the New Size text box, increase the size as desired.  In my case, I increased the Logs drive from 100 GB to 250 GB.
  10. Click the Next button.  A summary of the configuration changes is displayed.
  11. Click the Finish button.  The dialog closes and you are returned to the Settings dialog.
  12. Click OK.  After this, you will need to extend the volume from within the VM
  13. Start the VM.
  14. Login to the VM, and then start Computer Management.
  15. In the left object pane, expand Storage and then select Disk Management.
  16. In the main details pane, scroll down the list of disk size visualizations for the disk you expanded in Hyper-V.  You'll see that it appears to have two sections: a Primary Partition and an Unallocated one.
  17. Right-click on the Primary Partition, and then choose Extend Volume...  The Extend Volume Wizard dialog appears.
  18. Just click the Next button to accept the default of maximally extended the primary partition through the full unallocated portion.
  19. Click Finish.  The dialog closes, and you are taken back to Computer Management.  looking at the disk visualization list, you now see that the disk is expanded through the entire unallocated portion as well.
  20. Exit Computer Management.

References

  • In my case, I increased the memory on those farm servers hosting SharePoint Server 2013 Enterprise from 12 GB to 24 GB. This in turn triggered the "Drives are running out of free space" health rule on the Logs drive, which was 100 GB.  The other server drives were already large enough and had sufficient space to handle a full memory dump even with doubling server memory. I could have just disabled this rule.  However, this is not recommended best practice. Instead, I decided to increase the Logs drive from 100 GB to 250.

No comments: