Difference between revisions of "Create Tiered Storage Space"
| Line 11: | Line 11: | ||
If CanPool is false and you want to create a new pool from the disk then you need to check (and fix) the reasons for it. | If CanPool is false and you want to create a new pool from the disk then you need to check (and fix) the reasons for it. | ||
| − | 2. Create a new Storage Pool with the | + | 2. Create a new Storage Pool with the name "MyPool" using the Storage Spaces subsytem |
For this we collect a list of all devices which can pool: | For this we collect a list of all devices which can pool: | ||
| Line 19: | Line 19: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | 3. Create the tiers for HDD and SSD with mirror resiliency and store it in a variable. For a multi resilient volume you can also | + | 3. Create the tiers for HDD and SSD with mirror resiliency and store it in a variable. For a multi-resilient volume you can also choose parity for the HDD tier. For performance reasons I choose mirror for both tiers. |
<syntaxhighlight lang="powershell"> | <syntaxhighlight lang="powershell"> | ||
| Line 33: | Line 33: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | 5. After creating the virtualDisk you can still add drives (ideally with similar size and type) and the pool will increase automatically (it can take hours to be completed). You can start the process manually and check for the | + | 5. After creating the virtualDisk you can still add drives (ideally with similar size and type) and the pool will increase automatically after 15 Minutes if you have only one pool (it can take hours to be completed). You can start the process manually and check for the progress: |
<syntaxhighlight lang="powershell"> | <syntaxhighlight lang="powershell"> | ||
| Line 40: | Line 40: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | After that you need to increase the tiers and the virtual Disk manually | + | After that you need to increase the tiers and the virtual Disk manually: |
<syntaxhighlight lang="powershell"> | <syntaxhighlight lang="powershell"> | ||
Revision as of 09:38, 7 June 2020
This article shows you how to create a tiered storage space under Windows Server 2019 using Powershell.
First of all the screenshots are made after successfully creating the vDisk, so they will vary from the expected results of the commands. I'm using 3 Samsung 860 EVO 1TB SSDs and 3 Seagate Exos X16 16TB HDDs.
1. Check the requirements
Get-PhysicalDisk | ft FriendlyName,CanPool,Size,MediaType,cannotpoolreasonIf CanPool is false and you want to create a new pool from the disk then you need to check (and fix) the reasons for it.
2. Create a new Storage Pool with the name "MyPool" using the Storage Spaces subsytem For this we collect a list of all devices which can pool:
$disks = Get-PhysicalDisk |? {$_.CanPool -eq $true}
New-StoragePool -StorageSubsystemFriendlyName "Windows Storage*" -FriendlyName MyPool -PhysicalDisks $disks3. Create the tiers for HDD and SSD with mirror resiliency and store it in a variable. For a multi-resilient volume you can also choose parity for the HDD tier. For performance reasons I choose mirror for both tiers.
$ssd_tier = New-StorageTier -StoragePoolFriendlyName MyPool -FriendlyName myVirtDisk-SSD_Tier -MediaType SSD -ResiliencySettingName Mirror
$hdd_tier = New-StorageTier -StoragePoolFriendlyName MyPool -FriendlyName myVirtDisk-HDD_Tier -MediaType HDD -ResiliencySettingName Mirror
4. Create the virtual disk using the tiers. Please note that with mirror you only have half the raw capacity (minus a few %) available.
New-VirtualDisk -StoragePoolFriendlyName MyPool -FriendlyName myVirtDisk -StorageTiers @($ssd_tier,$hdd_tier) -StorageTierSizes @(1400GB,215000GB)5. After creating the virtualDisk you can still add drives (ideally with similar size and type) and the pool will increase automatically after 15 Minutes if you have only one pool (it can take hours to be completed). You can start the process manually and check for the progress:
Get-StoragePool -FriendlyName MyPool | Optimize-StoragePool
Get-StorageJobAfter that you need to increase the tiers and the virtual Disk manually:
Resize-StorageTier -FriendlyName myVirtDisk-HDD_Tier -Size 215000GB
Resize-StorageTier -FriendlyName myVirtDisk-SSD_Tier -Size 1400GB