8 Myths about Storage Spaces
EVERYBODY should read this!
Whether you have a big database that needs speed, or other valuable data like documents or just personal pictures you do not want to lose when disk fails (disks DO fail without notice, just a matter of moment), you should read this post.
There is a hidden gem in Windows OS you can leverage for free. Just not many people know about it and how big value can it bring to you. Read on and watch the demo in video.
What benefits can Storage Spaces give me?
Well, if you do not have Windows OS, and you have only 1 disk, then none. For those having or planning to have at least 2 disks (plus OS drive) it can:
- Increase the speed of your local storage. As multiple disks work in parallel for better resulting speed.
- Get resiliency to failure of a (one) disk. Or two failed disks if you choose three-way mirroring. That can save you from losing your data if you do not have a backup (you should have a backup). Or from ugly downtime caused by a disk failure.
- Consolidate many DIFFERENT disks into only few big, fast, resilient virtual drives, taking less drive letters.
- Ability to expand the storage capacity and speed by adding new physical disks, without changing ANY application or database settings – transparent to any software you use, no config changes needed in them, they will just see an “old” drive drive just got bigger and faster.
- On SAME physical disks you can have a fast “simple” (striping) virtual disks for temporary stuff, eg. temp db database, scratch disks, temp folder, and at the same time, over same disks you can create resilient “mirror” or “parity” virtual drive which protects your data from at least one disk failure. You can eg. place more important data to that virtual disk which is a tiny bit slower, but resilient to disk failure.
- Cloud Servers – have disks which are mirrored anyway. So just create a “simple” (striped, RAID0) virtual disk across all of drives and enjoy phenomenal increase in speed without losing capacity.
If you need speed, today’s normal, affordable M2 drives reach 3200 MB/s and 500 000 IOPS easily, just one individual drive, eg. WD BLACK SN750. One can use a PCIe card like this one, that measures 10 000 MB/s (yes, 10 GB per second – watch test here!) write and read speeds! Insane. And you can have 4 such cards if motherboard permits, for total of 16 M2 disks:
Filled with 2TB M2 drives, that would give you 16×2 = 32 TB of space with totally insane speed of 40 GB/s!!! In theory at least.
UPDATE 2019-12-05: In practice, this card won’t work if your MB is not on it’s “supported” list, or your MB does not have “x16 = 4 devices x4” option, or your CPU/MB does not have enough free PCIe lanes. That means, it won’t work in most cases unless you combined all components very carefully.
Storage Pool = set of disks (physical). Disks can be very different in size and type. We will create virtual disks on this set of physical disks.
Storage Space = Virtual Disk. Created on set of physical disks (Storage Pool). You define size and parity of the Virtual Disk.
Volume = partition on virtual disk. Can have a drive letter assigned.
Storage Spaces = Microsoft’s technology to turn local disks into arrays of disks, building virtual disks on them. Kind of software RAID. And works very, very well.
8 Myths about Storage Spaces
Whether in form of a myth (We cannot …!) or a question (Can we…?), here are 8 interesting things about Storage Spaces:
- Storage Spaces work only on servers OS, it cannot work on Windows 10.
NOT true! It works on Win10 quite nice.
- With only 2 disks, can you have both mirrored and striped virtual disks at the same time?
Mirroring = resiliency, Striping = speed and capacity. Yes we can.
- Adding disks – if we create pool with 2 disks initially, we cannot add just 1 disk, we must add “column” number of disks we initially had (in our case 2).
NOT true! We can add 1 disk or as many as we like.
- Adding disk – does NOT increase speed, only space.
It adds speed too! But in server OS you will need to run Powershell command “Optimize-StoragePool -FriendlyName <YourPoolName>” to achive that.
UPDATE: Sadly, this myth seems true (thanks Dinko!). “Optimize-StoragePool” only spreads data evenly over disks, so new disk gets data too. I got faster speed because I added a faster drive to the Pool. If you add a same-speed drive, speed will not be faster. It is determined by the number of “columns” – a number of disks used in parallel (does not include disks for redundant copies of mirror, but for simple and parity includes all disks, even parity disk). When creating a Virtual Disk, you can specify number of columns only through PowerShell, and it is NOT changeable after you create VD! Adding a drive to the pool does not increase columns of VD. To increase columns, you would need to create a new Virtual Disk with more columns, and copy data to it. Which is a real BUMMER! Microsoft, are you listening? We need ability to easily increase columns – to get speed with adding new drives, not just boring capacity!
- Expanding virtual disk – is it difficult, requires reboot?
Super-easy, few clicks, online.
- Shrinking virtual disk – is it possible?
Unfortunately not possible. Expand when you need, but do not over-expand too much, and do not expand too often. Each expand seems to take some space (around 250MB).
- Removing disk – Can you remove the disk that is used in virtual disks, and has data?
Sure we can, but we need to “prepare it for removal” first, to drain data to other disks.
- Failing disks – can mirroring/parity in SS really protect your data when a disk crashes? It calls for a test of disk failure!
Yes, it protects your data from 1 drive failure.
You can see all of that “in action” in this video:
(Music from https://filmmusic.io
“Verano Sensual” by Kevin MacLeod https://incompetech.com
License: CC BY http://creativecommons.org/licenses/by/4.0/)
UPDATE 2019-08-01 About Myth 4 – Adding disk on Server OS
After adding new physical disk, we should “Optimize” or spread the data over all disks (some call it “rebalance”) to
enjoy increase in speed spread data evenly across drives. In video at 9:09 you can see Windows 10 has that “Optimize” checkbox. But server Windows have quite different GUI and that checkbox is missing. So how to invoke “Optimize” after adding new disks to a pool in server OS?
Get-StorageJob # Which jobs are currently running?
Get-StoragePool # List storage pools and physical disks (disk outside pool = "Primordial")
#Update-StoragePool -FriendlyName "YourPoolName" # If created before Win2016/Win10
Optimize-StoragePool -FriendlyName "YourPoolName" # Rebalance, spread data across all disks
“Storage Spaces Direct automatically optimizes drive usage after you add drives or servers to the pool (this is a manual process for Storage Spaces systems…). Optimization starts 15 minutes after you add a new drive to the pool. Pool optimization runs as a low-priority background operation, so it can take hours or days to complete, especially if you’re using large hard drives.”
If you have, or plan to have, more than 2 drives, leverage Storage Spaces to get simpler disk management, faster disk speeds, and resilience to disk failure. It is free and very, very efficient. I personally used Storage Spaces to saved some very big database servers in the cloud (Windows 2016 server OS) that suffered from serious disk issues. After applying Storage Spaces, disk problems went away, they got the speed they needed.
- Capacity Calculator for Storage Spaces – what disk size to buy when expanding capacity to keep entire space usable?
- “Storage Spaces FAQ” from microsoft.com – very good, answers many questions.
- “Understanding Storage Space Internal Storage” from itprotoday.com – tries to explain columns and interleave
- “Dell Storage with Microsoft Storage Spaces Best Practices Guide” from dell.com – very detailed, also click on their other pages that explain Interleave, Virtual Disks – excellent stuff, a must read!
- “Storage Spaces Demo” from IT Free Training – near the end explains tiering.