One of the most common administration tasks of a SAN Administrator is expanding a LUN or Volume.

In this 11th part of our Blog Series on Storage Spaces Direct we will look at the process to expand an existing Virtual Disk and corresponding Volume.

Expand a Virtual Disk

 

Let’s assume that our volume size when we initially created our Storage Spaces Direct Virtual disk was 200 GB configured in a 2-Way Mirror.

This would mean that we would be consuming 400 GB of space from the Storage Pool.

The day has come that we have run out of space so we want to double it in size to 400 GB.

This can be done with a single line of PowerShell as shown below.

Get-VirtualDisk Mirror | Resize-VirtualDisk -Size 400GB 

 

We don’t have to worry about any Storage Tiers because this is only a 2-node configuration in our lab.

 

When we run the Show Pretty Volume script we learned about in Part #10 of this Blog series we can see that the Capacity of the Volume is still 200GB.

This can also be verified with Get-Volume and indicates that we still have a bit of work to do.

Get-Volume Output

 

 

The goal was to increase this to the maximum size of 400 GB. This can be done by running the PowerShell script below.

$Cluster = "S2DCluster"
$VirtualDisks = Get-VirtualDisk Mirror 
Get-VirtualDisk $VirtualDisks.FriendlyName | Get-Disk | Get-Partition | ? Type -EQ Basic | Resize-Partition -Size 400GB 

 

This will resize the Volume using the newly created space that we have created in the Virtual disk. I often find that this illustration really depicts the flow of JBOD’s, Virtual Disks, and Volumes.

 

Storage Architecture – Image Courtesy of TECHNET

 

Before being able to complete the task of expanding the Volume we first needed to add more space to the Virtual Disk. This is because we had maxed out the size during the initial provisioning process.

We then had to Expand the Volume which is a similar process to expanding a LUN after it has had more space added in Windows through Disk Manager or Diskpart.

 

Here is what the finished product looks like in Failover Cluster Manager now that we have expanded our CSV Volume.

 

 

Expanded S2D CSV Volume

 

Well there you have it we have successfully doubled the size of our Virtual Disk and corresponding Volume.

Once again as we are learning with Storage Spaces Direct most actions can be completed with single lines of PowerShell.

Happy learning….

 

Thanks,

 

Cristal

 

Cristal Kawula

Cristal Kawula is the co-founder of MVPDays Community Roadshow and #MVPHour live Twitter Chat. She was also a member of the Gridstore Technical Advisory board and is the President of TriCon Elite Consulting. Cristal is also only the 2nd woman in the world to receive the prestigious Veeam Vanguard award.

 

BLOG: http://www.checkyourlogs.net

Twitter: @supercristal1 / @mvpdays / #mvphour

Check out www.mvpdays.com to see where the MVPDays Roadshow will be next. Maybe it will be in a city near you.