Select Page

Create a Virtual Disk on Storage Spaces Standard

Creating Virtual Disks

This article describes how to create Multiple Virtual Disks (Spaces) on a single Windows 2012r2 Storage Pool .  Each Virtual Disk can be configured with various performance and reliability parameters.   The parameters on the Virtual Disk can be specified to give the best performance and reliability required for the specific application.   An example of this would be to create a high-performance, highly-reliable volume for a busy database application and another for a large low-IO data archive, both on the same Storage Pool where the first uses SSD resources for performance and the later only HDD drives in a parity (RAID-5 like) configuration for mass data archives.

Create Auto-Tier Structures

Run the PowerShell commands:

$ssd_Tier = New-StorageTier -StoragePoolFriendlyName Pool1 -FriendlyName SSD_Tier -MediaType SSD

$hdd_Tier = New-StorageTier -StoragePoolFriendlyName Pool1 -FriendlyName HDD_Tier -MediaType HDD

Storage Spaces auto-tier is a feature where a virtual disk can be created where the disk blocks which are most active (or “hot”) are stored on the SSD drives and the slower blocks stored on the regular hard drives.  This provides a mass storage system which performs similar to an array of SSD drives.   Any time VMs are used, they must be either stored on SSD drives directly or on a Virtual Disk using SSD drives in an Auto Tier configuration since Virtual Machines require the performance provided by SSD drives.

Create the Virtual Disk

Virtual Disks (or Spaces) can be created within a storage pool. These virtual disk spaces can be configured with a variety of parameters which allow the storage administrator to tune the drives as required for the specific workloads.   For example, a virtual disk VHD with the operating environment of the Virtual Machine, or perhaps active SQL databases require SSDs to provide high IO throughput, and probably high resiliency of double or triple mirroring.   Another example, log files and other systems with lower IO throughput and resilience may be stored on a virtual disk space configured with no SSDs and with a resiliency of Parity (RAID 5 (sort of)).

Select the Pool Auto Tier objects

Run the Powershell commands:

$ssd_Tier = Get-StorageTier -MediaType SSD

$hdd_Tier = Get-StorageTier -MediaType HDD

Create the New Virtual Disk

A typical configuration for a VM VHD.

Run a version of this PowerShell command:

$vd = New-VirtualDisk -StoragePoolFriendlyName Pool1 -FriendlyName VMSpace1 -StorageTiers @($ssd_Tier,$hdd_Tier) -StorageTierSizes @(100GB, 500GB) -ResiliencySettingName Mirror -WriteCacheSize 1GB
Note: Virtual Disk name VMSpace1 is for this example. The actual name should follow the departments IT naming standards.
Note:  The settings above is an example.  You will be required to adjust the parameters for your environment.
Note:  The Tiered configuration is not required to build a Virtual Disk with only HDD drives.

Initialize the Virtual Disk

Run a version of this PowerShell command:

Initialize-Disk -VirtualDisk (Get-VirtualDisk -FriendlyName VMSpace1)
Note: Virtual Disk name VMSpace1 is for this example.   The actual name should follow the departments IT naming standards.

Partition the Virtual Disk

Create a Partition and Volume for the Virtual Disk

New-Partition -DiskNumber 17 -UseMaximumSize –AssignDriveLetter

Format the Virtual Disk

Format-Volume -DriveLetter D
Note:  Naturally the drive letter will vary depending on your system.  The drive letter is returned by the New-Partition command above or can be obtained from a Get-Disk PowerShell command.

Example command outputs:

PowerShell Command Outputs

Note: The typical ratio for SSD to HDD tiers is 8% to 10%.   The values chosen for this example provided extra SSD space since the space was available.   Each of the SSD and HDD tiers can be expanded dynamically at any time in the future so a good strategy to preserve expensive SSD storage is to start with a lower SSD percentage and monitor the “Hits Ratio” of the SSD tier.   Additional SSD storage can be added incrementally and dynamically at any time desired.
Note: For critical data, the administrator may select a resiliency of three way mirroring by using the “NumberOfDataCopies” parameter selecting the value 3.

Adding SSD Tier Storage via Server Manager

Storage Spaces can easily be managed via Server Manager.  For example, to expand a Tier on the the new Virtual Disk (image above) – right-click to review the configuration of the disk, or select extend to bring up the Extend Virtual Disk wizard.   Additional SSD or HDD storage can be added.

Was this article helpful?

Submit a Comment

Your email address will not be published. Required fields are marked *