Modify Storage Tiers Optimization With PowerShell #PowerShell #StorageSpaces #WS2012R2

Hello Folks,

The killer feature in Windows Server 2012 R2 is Storage Tiered Spaces.

What is Storage Tiered Spaces?

Storage Tiers automatically moves frequently accessed data to faster (solid-state drive) storage and infrequently accessed data to slower (hard disk) storage, by having the file system actively measure the activity of the workload in the background and then automatically and transparently move data to the appropriate tier (SSD or HDD) depending on how hot or cold the data is determined to be.

Storage Spaces in Windows Server 2012 R2 can thus ensure that the workload’s hot data is always stored on the SSD tier to take advantage of the high performance of this tier, and its cold data on the HDD tier to make use of the high capacity of this tier. If a portion of the data for a particular file becomes hotter (is accessed more frequently), then it gets moved from the HDD tier to the SSD tier. And if the portion of data becomes cooler (is accessed less frequently), then it gets moved from the SSD tier to the HDD tier as shown in figure 1.

HDD_SSD_Tier

Figure 1

For more information on What’s New in Storage Spaces in Windows Server 2012 R2, click here.

Ok, so having this explained, the placement of data in storage tiers on all tiered storage spaces in the system is a daily task that runs every day at 1.00 AM.

Storage02

Storage01

Sure enough the trigger can be customized to run more than once per day.

As I am running heavy SQL Virtual Machines workloads on my storage spaces, I need the system to determine more frequently the cold and hot data chunks and move them accordingly between the two tiers.

How can we accomplish this? Easy enough by creating new Trigger in Task Scheduler UI.

How about if you want to add 4 or 5 Triggers, how many clicks you want to click? Winking smile

The cutting edge time is PowerShell Smile

Here is an easy way to do it:

PS C:\>$Time1 = New-ScheduledTaskTrigger -Daily -At 7am

PS C:\>$Time2 = New-ScheduledTaskTrigger -Daily -At 12pm

PS C:\>$Time3 = New-ScheduledTaskTrigger -Daily -At 7pm

PS C:\>$Time4 = New-ScheduledTaskTrigger -Daily -At 1am

PS C:\>Set-ScheduledTask -TaskPath “\Microsoft\Windows\Storage Tiers Management” -TaskName “Storage Tiers Optimization” -Trigger $Time1, $Time2, $Time3, $Time4

PS C:\> Get-ScheduledTask -TaskName “Storage Tiers Optimization” | fl Triggers

Triggers : {MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger}

Storage03

Cheers,
/Charbel

About Charbel Nemnom 325 Articles

Charbel Nemnom is a Microsoft Cloud Consultant and Technical Evangelist, totally fan of the latest’s IT platform solutions, accomplished hands-on technical professional with over 15 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

Leave a Reply