You dont have javascript enabled! Please enable it! Modify Storage Tiers Optimization With #PowerShell #StorageSpaces - CHARBEL NEMNOM - MVP | MCT | CCSP | CISM - Cloud & CyberSecurity

Modify Storage Tiers Optimization with #PowerShell #StorageSpaces

2 Min. Read

In this article, I will show you how to modify storage tiers optimization with PowerShell.

Introduction

The killer feature in Windows Server is Storage Tiered Spaces.

What are 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.

Storage Spaces in Windows Server
Figure 1

For more information on What’s New in Storage Spaces in Windows Server 2012 R2, check 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

Modify Storage Tiers Optimization

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 a new Trigger in Task Scheduler UI.

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

The cutting edge time is PowerShell Smile

Here is an easy way to do it:

$Time1 = New-ScheduledTaskTrigger -Daily -At 7am

$Time2 = New-ScheduledTaskTrigger -Daily -At 12pm

$Time3 = New-ScheduledTaskTrigger -Daily -At 7pm

$Time4 = New-ScheduledTaskTrigger -Daily -At 1am

Set-ScheduledTask -TaskPath "\Microsoft\Windows\Storage Tiers Management" -TaskName "Storage Tiers Optimization" -Trigger $Time1, $Time2, $Time3, $Time4

Get-ScheduledTask -TaskName "Storage Tiers Optimization" | fl Triggers

Triggers : {MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger, MSFT_TaskDailyTrigger}

Storage03

Cheers,
/Charbel

Photo of author
About the Author:
Charbel Nemnom
Charbel Nemnom is a Senior Cloud Architect with 21+ years of IT experience. As a Swiss Certified Information Security Manager (ISM), CCSP, CISM, Microsoft MVP, and MCT, he excels in optimizing mission-critical enterprise systems. His extensive practical knowledge spans complex system design, network architecture, business continuity, and cloud security, establishing him as an authoritative and trustworthy expert in the field. Charbel frequently writes about Cloud, Cybersecurity, and IT Certifications.
Previous

Demo: Hyper-V Virtual Switch Extended Port ACL’s

Migrate VMware VMs to Hyper-V using MVMC 2.0

Next

Let us know what you think, or ask a question...