Waclaw Chrabaszcz
... there is no spoon ...

Server 2012 R2 – Storage Spaces – A Software Defined Storage by Microsoft

Thursday, January 1, 2015 12:59 PM

You know ... when I was young (bear in mountainsJ) the server was meaning a file server and Novell as well. In 2000 Microsoft released Server 2000, Active Directory and have changed the world once forever. We will never forget year 2002 when Windows XP was born and of course Server 2003. It was great time to participate in this revolution. We were so proud doing migrations to XP/2003 world. Once it was done we choose to rest, not we … Microsoft did it.

It's funny but what you should be aware in live is … the success. Slowly but constantly you become lazy and you missing opportunities. Something similar happened once Microsoft became Macrosoft. Almost drunk with huge success they made few strange decisions (e.g.Vista) and they left a lot of free space in their origin technology – a file server.

More and more dedicated storage solutions came to market and took over files. Of course SAN (Storage Area Network) it is a backbone for Windows Servers, but NAS (Network Attached Storage) don't need any Windows. Why we choose NAS - due to two factors.

Let's take a look on your personal files. WHAT??!! I've got 100 MB of files??!! I thought I've got my CV only … and few things from my previous computer. I copied these 3 years ago and someday I will review them. Multiply this story by 2000 and we've got typical file server. On typical file server about 20% of stored files are active, but most of them will never be open. More over users stores thousands of copies of the same document on various paths. More over many documents .e.g. credit agreements are equal in 99% of the content except personal data. Why not to store only one copy of the file for plenty users and locations. What's more why not to split files in blocks, and store equal blocks only once.

Btw. These pictures comes from Microsoft Technet. So in well optimized world each user has his own metadata e.g. different file attributes, a small chunk of data combined with pointers to shared or private file blocks. If file2 updates block A, it will become private, but B and C is still shared. Of course the "compression ratio" is growing with the number of copies of the file. Unfortunately data deduplication consumes lot of CPU power and disk IOps, however we don't have to run it on the fly, we can schedule it overnight.

But there is one more thing. We know that some of files are active and open day by day by many users. We would like to guarantee fast access to them, where us most of files we would like to store as cheap as possible. If we attach fast SSD disk as D:\ and slow SATA hdd as E:\ we can move "hot" files to D:\. However in few months some other files will become hot, and many of our files on D will cool down. If we move files from one drive to the other, users will be confused were their files are. All we need is the virtualization of physical disks. Users see only Virtualized layer and access files just on one mapped drive, they don't care about our activities. But we under the virtualization layer can move files between fast SSD and slow HDD disks. It is called the data tiering.

Of course NAS solutions offers data deduplication and tiering, and we quickly found these advantages as the key for file storage success. What? The success once again? Does it mean we should be careful again? Yes indeed. To offer good deduplication and tiering NAS needs Storage Processors and well protected by copyrights storage software. Moreover, this shy, silent new guy in a corner. He's a Storage Admin. No one knows what he's doing, and he have no idea how to fix Sharepoint, SQL server and other end user related technologies. Looking for reduction of operational costs we need something cheaper but easy to manage for regular WinAdmin. The answer is JBOD – Just Bunch Of Disks. A pure disk rack without Storage Processor, advanced Storage Software. And your Windows 2012 R2 (file) Server thanks to Storage Spaces can take care of data deduplication and tiering.

Storage Spaces are a virtualization layer for physical disks, we can combine multiple disks into one volume and manage them under the hood. We can mirror data if we need data protection, combine fast/slow, cheap/expensive, 7200/15k/SSD disk in various combinations including data tiering. We can even set HotSpare disks. Storage spaces can move hot data to fast tier automatically, or we can manually assign particular files/folders to particular tier.

Data deduplication can be enabled on the volume lever. On typical file server with user's docs you should save about 50% of space. On VHD library you can gain even 80%. Yes that's huge number. All you need is Windows Server 2012 R2. So ... let's do it!

#enumerate physical disks
Get-PhysicalDisk | Format-Table FriendlyName, MediaType, CanPool
$PhysicalDisks = (Get-PhysicalDisk -CanPool $True)

#disk virtualization and tiering
New-StoragePool -FriendlyName MyStoragePool -StorageSubsystemFriendlyName "Storage Spaces*" -PhysicalDisks $PhysicalDisks
Update-StoragePool -Name MyStoragePool -WhatIf:$True

#assign disks to proper tiers
2..5 | % {Set-PhysicalDisk -FriendlyName PhysicalDisk$_ -MediaType HDD}
6..8 | % {Set-PhysicalDisk -FriendlyName PhysicalDisk$_ -MediaType SSD}

#create fast and slow tier
New-StorageTier -StoragePoolFriendlyName myStoragePool -FriendlyName "SSDdrives" -MediaType SSD
New-StorageTier -StoragePoolFriendlyName myStoragePool -FriendlyName "HDDdrives" -MediaType HDD
$sdd = Get-StorageTier -FriendlyName "SSD*"
$HDD = Get-StorageTier -FriendlyName "HDD*"

#create software defined storage
New-VirtualDisk -StoragePoolFriendlyName myStoragePool `
-FriendlyName "2tier" -ResiliencySettingName "Mirror" `
-storageTiers $ssd, $hdd -StorageTierSizes 50GB,100GB

#create volume on virtualized layer
New-Volume -StoragePoolFriendlyName "myStoragePool" -FriendlyName "UserData" -AccessPath "H:" `
-ResiliencySettingName "Mirror" -ProvisioningType "Fixed" -StorageTiers $ssd, $hdd `
-StorageTierSizes 50MB,100MB -FileSystem NTFS

#enable deduplication
Enable-DedupVolume -Volume H: -UsageType Default
Set-DedupVolume –Volume D: -MinimumFileAgeDays 0
Start-DedupJob H: -Type Optimization –Memory 50
Update-DedupStatus -Volume "H:"

#share a volume
md H:\UserDocs
New-SmbShare -Name UserDocs -Path H:\UserDocs -FullAccess Contoso\Administrator

#assign a file to fast tier
Set-FileStorageTier -DesiredStorageTier $sdd -FilePath "H:\UserDocs\SharedVM\Windows7.vhd"

But … there is one more thing … J

Microsoft is already working on the new release of Windows Server 10

  • Storage Replica – you will replicate volumes to other locations for DR proposes, it could be sync or async replication
  • Storage Quality of Service - you will set max and min disk performance for VMs hosted on Hyper-V, so your developers will not consume IOps required for production run.

But this is the story for another beer.


# re: Server 2012 R2 – Storage Spaces – A Software Defined Storage by Microsoft

Great Write-Up on the progression of Storage Spaces from 2012 R1 to R2, and what is coming in WS 10. Like how you keep it entertaining. :) Mmm... Beer. 4/29/2015 6:40 PM | Beer Lover

# re: Server 2012 R2 – Storage Spaces – A Software Defined Storage by Microsoft

Thanks BeerLover ! People like you help me to keep blogging... Cheers! 5/3/2015 1:34 PM | wchrabaszcz

Post a comment