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

Άρθρο από Lefteris Karafilis Mon, 07/01/2013 - 15:00

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 and 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 total available size. This configuration protects data from a single drive failure or from two simultaneous drive failures in 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, decreasing total available size and requires a minimum of three disks to operate.

   

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.

   

   

Note that the primordial is a system default storage pool that includes all unallocated physical disks. To create a new storage pool you have to right click on the whitespace on Storage pools pane and select new storage pool:

Enter the name and description of the new storage pool

   

Select the physical disks that will participate in the storage pool along with their allocation type. The allocation type can be auto or hot spare meaning that the physical disk will actively participate in the storage pool or wait as a hot spare in case of an active drive failure respectively. Note that drives must be online and unallocated in order to appear in the wizard and can be of any type like SAS, VHD, VHDX, USB etc.

 

   

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

   

After you create a storage pool you are able to create one or more virtual disks on that storage pool or any storage pool you have already created. To create a virtual disk right click your storage pool name in server manager and select new virtual disk. Select the storage pool on which your virtual disk will be created

   

Type your virtual disk name and description

   

Select a storage layout

   

Select a provisioning type: Provisioning type can be either thin or fixed; meaning that the virtual disk will use the minimum required space from the storage pool as needed growing gradually up to the Vdisk size or the size allocation will be committed from scratch to the Vdisk size respectively.

   

Specify the Vdisk size

   

And finally check the confirmation dialog and create the virtual disk.

   

By default after the Vdisk creation the new volume wizard will begin to guide you through the volume creation dialog on the newly added Vdisk. In case you want to add more physical drives later in any storage pool you can right click on the storage pool name and select add physical disk.

   

Note that 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

   

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

   

To associate four physical disks in auto mode and one in hot spare mode you first need to create a variable with a filter containing the four disks you want to participate in auto mode in your new storage pool. In our case we want to include physical disks 1-4 and not 5.

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

   

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

   

Then add physical disk 5 as a hot spare by first creating a variable containing that physical disk and then feeding that variable to add-physicaldisk cmdlet

$PhysicalDiskAdd=get-physicaldisk -friendlyname PhysicalDisk5

add-PhysicalDisk -PhysicalDisks $PhysicalDiskAdd -StoragePoolFriendlyName "Storage Pool 1" -Usage HotSpare

   

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

   

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

   

Then you can use either diskpart or powershell commands to create volumes on that virtual drives as needed.

   

   

   

   

 

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options