Setting up Windows 2012 storage virtualization. A software RAID solution or more?

A new feature in windows 2012 installed by default in all server editions! Microsoft calls it Storage Virtualization and the idea behind it is somewhat familiar to most administrators that have worked on a hardware RAID controller before. In fact disk virtualization is working like a software RAID with better scalability, resiliency and optimization.

The basic concept is to group physical disks together into a container called storage pools and to manage those disks as a single storage space. Afterwards, in these storage pools, you create virtual disks on which you specify a layout which is simply a raid level.

The Raid Levels of a virtual disk can be:

  • Simple: This is a stripe set with no parity, similar to RAID 0. There is no redundancy. It has a better performance and more capacity available compared to a configuration with a single disk.
  • Mirror: This is a mirror set, similar to RAID 1. Data is duplicated across two or three disks, increasing reliability but decreasing the total size in half. This configuration protects data from a single drive failure or from two simultaneous drive failures in the case of a five disk configuration.
  • Parity: This is a striped set with distributed parity, similar to RAID 5. This configuration protects data from a single disk failure. It requires a minimum of three disks to operate.

Primordial

Storage Virtualization can be configured via Windows 2012 server manager or PowerShell. To set up storage virtualization in server manager you have to navigate to File and storage services -> Volumes -> Storage Pools.

Storage Pools

Note that the Primordial is the system’s default storage pool that includes all unallocated physical disks. To create a new storage pool you have to right click on the white-space, on the Storage pools pane, and select the new storage pool option:

Enter the name and the description of the new storage pool

New storage pool

Select the physical disks that will participate in the storage pool, along with their allocation type. The allocation type can be set to auto or to hot spare. Auto means that the physical disk will actively participate in the storage pool. Hot spare means that the drive will not actively participate in the storage pool. It will take over in the case of a drive failure.

The drives must be online and in unallocated state in order to appear in the wizard. The drives can be of any type including SAS, VHD, VHDX, USB etc.

New storage pool

Review the Confirmation dialog and press Create to create the Storage pool.

After you create a storage pool you will be able to create one or more virtual disks. To create a virtual disk right click on your storage pool name, in server manager, and select the new virtual disk option. Select the storage pool on which you wish to create the virtual disk

New storage pool

Type the virtual disk’s name and description

Virtual Disk

Select the storage layout

Storage layout

Select a provisioning type: Provisioning type can be either thin or fixed. In Thin mode the virtual disk will use the minimum required space, as needed, growing gradually up to the Vdisk size. In fixed mode the whole size will be committed from scratch.

Virtual Disk

Specify the Vdisk size

Virtual Disk size

Review the confirmation dialog and create the virtual disk.

By default, after the completion of the Vdisk wizard the new volume wizard will start. It will guide you through the volume creation on the newly added Vdisk.

In case you want to add more physical drives in a provisioned storage pool, right click on that storage pool’s name and select the add physical disk option.

For your information, the operations you can perform on a Vdisk is to repair, detach, mask/unmask, extend or delete it.

To replicate the procedure by using powershell

Firstly, list the available physical disks along with their status and their ability to participate in storage pools (CanPool value).  Get-PhysicalDisk:

canpool

In this example you will associate four physical disks in auto mode and one in hot spare mode. To accomplish that you have to create a variable containing the four disks you want to allocate, in auto mode, in a new storage pool.

In this example you want to include the physical disks 1-4 and not 5.

$PhysicalDisks=Get-PhysicalDisk -canpool $true | where-object{$_.FriendlyName -ne "PhysicalDisk5"}

 

Inject that variable into the new-StoragePool cmdlet by using the –physicaldisks switch:

new-StoragePool

Add physical disk 5 as a hot spare: create a variable containing the physical disk 5 and then feed that variable into the add-physicaldisk cmdlet

$PhysicalDiskAdd=get-physicaldisk -friendlyname PhysicalDisk5 
add-PhysicalDisk -PhysicalDisks $PhysicalDiskAdd -StoragePoolFriendlyName "Storage Pool 1" –Usage HotSpare

 

 

Finally, to create the virtual disk, use the new-VirtualDisk cmdlet as shown below

new-VirtualDisk

You can check out the storage pool and the virtualdisk settings by using the get-StoragePool|FL and the get-virtualDisk|FL cmdlets respectively.

As a final step you may use either diskpart or powershell commands to create the appropriate volumes on these virtual drives.

By | 2016-10-19T13:01:33+00:00 Monday, 7 January, 2013|Categories: Featured, Technical|Tags: , , , , , , , , |2 Comments

About the Author:

Lefteris is an experienced IT specialist / infrastructure architect with an extensive background in the small-to-medium project-based business.

Since 2002 Lefteris has been providing IT Services that improve the information and technology set-ups of small and medium businesses to an ideal level, therefore reducing your company’s operating costs and increasing your staff’s effectiveness.

Unlike other IT specialists and service providers who focus on plain-vanilla IT support, we focus on your company’s improvement by the use of technology.

2 Comments

  1. John Mathis 19/12/2015 at 20:45 - Reply

    Will this work on an out of the box install? Meaning I want to setup the system disk as a mirrored volume. I am essentially trying to create two raid volumes. One with the OS installed, and one for my database. I have 4 disks total. 2 HDs & 2 SSDs. My difficulty is getting the system disk installed on one one of the mirrored partitions… Thank you for the article.

  2. Lefteris Karafilis 21/12/2015 at 11:07 - Reply

    Hi John,

    Officially you cannot use that kind of software mirroring for your OS drive. I suggest you to buy a raid controller in order to setup mirroring for your OS drive.

    Recently I configured a Dell T110 II for a customer of mine. In that case the RAID controller supported only one virtual disk. Therefore I configured a mirrored virtual disk for the OS via that RAID controller. I also configured a mirrored virtual disk via storage spaces for the DATA drive.

    I hope that helps…

Leave A Comment