Creating Virtual Disks
Contents
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
Initialize the Virtual Disk
Run a version of this PowerShell command:
Initialize-Disk -VirtualDisk (Get-VirtualDisk -FriendlyName VMSpace1)
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
Example command outputs:
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.