Today, Anthony and I were meeting with customers to discuss some of the new Windows Server 2012 R2 capabilities and how they can be leveraged in the enterprise.
By the way, if you want to learn more about Windows Server 2012 R2 and Storage Spaces there is a great MVA module for it. Windows Server 2012: Storage on MVA
Any way… We spent a long time taking about Storage and how Windows Server 2012 R2 can address some of the challenges It pros face on a regular basis. Challenges like :
- Rapid data growth – over 20% per year, and
- Increasing storage costs: Some may say, “The cost of storage per TB is falling!” That’s true. But data is growing so fast that costs are still increasing. This is driven by both acquisition and operation costs.
Storage Spaces is designed to change the storage task for enterprises by providing storage solution that can use low-cost commodity storage devices.
It’s designed to address a simple question:
How can you pool together commodity storage devices so you can provision storage as you need it?
The result is Storage Spaces, and by combining this feature with the other capabilities of Windows Server 2012, the result is a highly available storage solution that has all the power and flexibility of a SAN but is considerably cheaper and also easier to manage.
Storage Spaces can virtualize storage to create what are called storage pools. A storage pool is an aggregation of unallocated space on physical disks installed in or connected to servers. Storage pools are flexible and elastic, allowing you to add or remove disks from the pool as your demand for storage grows or shrinks.
What are “Storage Tiers”?
During the conversation we covered Storage tiers. The basic idea behind that is a storage pool consisting of both mechanical hard drives and solid-state drives. Where the solid-state drives act as a repository for frequently read blocks known as the "hot blocks". these blocks are written to solid-state storage so that they can be read more quickly than would be possible if they resided on traditional mechanical hard drives.
Best of all, Windows automatically moves blocks to solid-state storage, and does so dynamically based on how frequently a block is used.
Setting up Tiered Storage
Here is how you can setup a tiered storage solution in Windows Server 2012 R2.
1- We start In Server manager in the File and Storage Services Section.
2- From there we created a pool with the 10 Drives we connected to Our server. (in our virtual environment we are using 10 VHDX disks with all look like the same media type to the servers but we will trick it later to believe they are SSDs and HDDs). As you can see below, We configured our Pool with 2 Hot Spare disks.
3- Once the Storage Pool is created . I used PowerShell to trick our server to believe we had different media types connected. Warning this is not as Supported way to do this in production…. This is only for demonstration purposes….
In a PowerShell command window, we used the following commands to set the media type for each disk.
Set-PhysicalDisk –FriendlyName PhysicalDisk1 –MediaType HDD
Set-PhysicalDisk –FriendlyName PhysicalDisk2 –MediaType HDD
Set-PhysicalDisk –FriendlyName PhysicalDisk3 –MediaType HDD
Set-PhysicalDisk –FriendlyName PhysicalDisk4 –MediaType HDD
Set-PhysicalDisk –FriendlyName PhysicalDisk5 –MediaType HDD
Set-PhysicalDisk –FriendlyName PhysicalDisk6 –MediaType HDD
Set-PhysicalDisk –FriendlyName PhysicalDisk7 –MediaType SSD
Set-PhysicalDisk –FriendlyName PhysicalDisk8 –MediaType SSD
Set-PhysicalDisk –FriendlyName PhysicalDisk9 –MediaType SSD
Set-PhysicalDisk –FriendlyName PhysicalDisk10 –MediaType SSD
We ended up with the following:
and after a manual refresh of Server Manager the changes appeared in the UI.
*** IMPORTANT: In Server Manager, click Refresh. Wait for refresh to complete.You must wait for refresh to complete so that Server Manager is aware of the media type changes you made in the previous step.
at that point we completed the Storage Pool as we normally do.
4- Creating the Disk is where the Tiering becomes evident.
In server Manager, in the File And Storage Service Section, I selected the Storage Pool I created earlier called tiered-Storage-Pool
Click New Virtual Disk.
On the Before You Begin page, click Next.
On the Storage Pool page, click tiered-Storage-Pool, and then click Next.
On the Virtual Disk Name page, in Name, type Tiered-Disk.
It’s important to select the Create storage tiers on this disk checkbox to enable tiering, and then click Next.
On the Storage Layout page, click Mirror, and then click Next.
Since I picked a mirrored configuration and I have more than 5 disk, I can select a Three-way Mirror and that way protect my data from multiple drive failure.
On the Provisioning page, click Fixed, and then click Next. (Thin provisioning is not supported on tiered volumes.)
On the Size page, in Virtual disk size, on both Faster Tier (SSD) and Standard Tier (HDD) select Maximum Size, and then click Next.
4. Click Create, and then click Close.
form this point on all you need to do is create a volume on that disk as you would in any other case. and your tiered storage solution is ready.
Of Course, during the conversation we were asked,
What if I know a particular file is always frequently accessed?
Great question! If there’s particular files in your environment that you absolutely know are always frequently accessed, such as a Parent VHD that is used for multiple linked Child VHDs via Differencing Disks, or any other file. You can specifically pin those files to the SSD tier.
that way Windows Server 2012 R2 doesn’t have to detect frequent access to keep the data blocks associated with those files in the fastest tier – they will always be there!
To pin a file to the SSD tier, use the new Set-FileStorageTier PowerShell cmdlet, as follows:
Set-FileStorageTier -FilePath <PATH> -DesiredStorageTier $tier_ssd
To un-pin a file from the SSD tier, use the new Clear-FileStorageTier PowerShell cmdlet, as follows:
Clear-FileStorageTier –FilePath <PATH>
That’s it!!! We have our Tiered Storage solution.
Try it out in your own labs.
Cheers!
Pierre Roman | Technology Evangelist
Twitter | Facebook | LinkedIn