Rebalance hard drives in a Storage Space Pool?
I have 2x 1.5TB drives in a (two-way mirror storage pool). That pool recently hit 100% capacity meaning both drives had 0% space left.
I added 2x 4TB drives to the storage pool but Storage space doesn't attempt to rebalance the disk utilization. After I added I now see:
My storage space pool : Physical drives
1.5 TB HDD-1 : 100% used
1.5 TB HDD-2 : 100% used
4.0 TB HDD-3 : 0% used
4.0 TB HDD-4 : 0% used
Seems that all future writes would now be concentrated on the newer drives. I was expecting Storage Space to get busy
once it saw the new drives and begin rebalancing - but no such luck.
How can I rebalance the usage so that my read/writes are distributed roughly proportionately/equally across all drives in my storage pool?
FYI, this is on Windows Server 2012 R2 but it's the same storage space as Windows 8.1
Solution 1:
Resurrecting this old question with something that finally works in the upcoming Windows 10 and Windows Server 2016 OSes.
Microsoft have added a Optimize-StoragePool
PowerShell command in Windows 10 and Windows Server 2016 that rebalances storage spaces for an entire pool.
It's as easy as opening an Administrative PowerShell console and running
> Optimize-StoragePool -FriendlyName "TheNameOfYourStoragePool"
I blogged about it here.
Microsoft announced the feature just a few days ago as part of the new Storage Spaces Direct but it works just fine with normal Storage Spaces as well.
Solution 2:
I had a similar issue when I discovered Storage Spaces (in Windows 8.1) and I was migrating my existing files. I started off with the drives:
- Aaron: 500GB, 95% used
- Bruce: 1TB, 70% used
- Craig: 1TB, 55% used
- Devin: 1TB, 30% used
- Ethan: 3TB, 50% used
- Felix: 3TB, 0% used
So, I after shifting everything on to the 2 3TB drives, I connected the remaining 4 drives to Storage Spaces, created a space, then copied the files from the 2 populated drives into the space (parity resilience). After adding the two drives back to the space (sequentially), all the drives were at around 50% usage, but the 3TB drives where at 20% and 0% respective to when they had been cleared and added to the pool.
I tried waiting a few days to see if the system would rebalance itself, but nothing happened.
Eventually, what I discovered was I had two options:
- Create a second space, and sequentially copy and delete the files from one to the other (not sure if cutting does the same, but I was operating with the understanding that if a cut was performed, the system would detect that and simply re-label the slabs rather than move them, but I cannot vouch for the validity of this statement)
- Take a disk offline and re-introduce it (REQUIRES SOME RESILIENCE)
I went with the second option, but in earlier tests, the first option seemed to work, but very slowly.
So, once all my files and disks where in the pool, I physically disconnected (USB in my case, in your case you could probably just disable the device) one of the fuller disks. Storage Spaces then started showing an error about "Reduced Resiliency", and gave me the option to remove the disk from the pool, which I did.
I then waited several hours (started it in the morning, went to work, came back to a finished screen) while Storage Spaces then repaired the spaces. Once the space had been repaired, I reconnected the disk, formatted it, and reintroduced it to the pool.
I repeated this step for all the drives I wanted to rebalance, working in an order from largest to smallest in capacity, so that my small 500GB drive was the last to be re-added.
Yes, this means that ultimately there is one drive left over that is at 0% usage, but in time, it was quickly filled back up to the average % usage of the entire pool
Solution 3:
Windows 10 has the Optimize Pool command available right in the GUI:
Windows Server
The ability to optimize a pool was added with Windows Server 2016. But unlike it's GUI-based workstation OS counterpart, Windows Server has no GUI to manage storage space optimization. Instead you must use powershell:
> Get-StoragePool
FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly Size AllocatedSize
------------ ----------------- ------------ ------------ ---------- ---- -------------
Primordial OK Healthy True False 10.23 TB 5.46 TB
Silk Road Pool OK Healthy False False 5.45 TB 4.11 TB
> Optimize-StoragePool -FriendlyName "Silk Road Pool"
But also note that on Windows Server, the data will be automatically rebalanced 30 minutes after a drive is added.
You can get the status of the optimization through powershell (Again, Microsoft hates graphical user interfaces):
> Get-StorageJob
Name IsBackgroundTask ElapsedTime JobState PercentComplete BytesProcessed BytesTotal
---- ---------------- ----------- -------- --------------- -------------- ----------
Optimize False 00:12:21 Running 11
Rebalance True 00:00:00 Running 11 114085068800 1020323168256
Note: The ability to reblance/optimize only works for Windows Server 2016/Windows 10 spaces. If you are using a space created in Windows Server 2012/Windows 8: you'll have to "Upgrade" the space.