Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Variables
- $StoragePoolName = "General Storage"
- $TieredSpaceName = "General Tier"
- $ResiliencySetting = "Mirror"
- $SSDTierName = "SSDTier"
- $HDDTierName = "HDDTier"
- #List all disks that can be pooled and output in table format (format-table)
- Get-PhysicalDisk -CanPool $True | ft FriendlyName,OperationalStatus,Size,MediaType
- #Store all physical disks that can be pooled into a variable, $PhysicalDisks
- $PhysicalDisks = (Get-PhysicalDisk -CanPool $True | Where MediaType -NE UnSpecified)
- #Create a new Storage Pool using the disks in variable $PhysicalDisks with a name of My Storage Pool
- $SubSysName = (Get-StorageSubSystem).FriendlyName
- New-StoragePool -PhysicalDisks $PhysicalDisks -StorageSubSystemFriendlyName $SubSysName -FriendlyName $StoragePoolName
- #View the disks in the Storage Pool just created
- Get-StoragePool -FriendlyName $StoragePoolName | Get-PhysicalDisk | Select FriendlyName, MediaType
- #Create two tiers in the Storage Pool created. One for SSD disks and one for HDD disks
- $SSDTier = New-StorageTier -StoragePoolFriendlyName $StoragePoolName -FriendlyName $SSDTierName -MediaType SSD
- $HDDTier = New-StorageTier -StoragePoolFriendlyName $StoragePoolName -FriendlyName $HDDTierName -MediaType HDD
- #Identify tier sizes within this storage pool
- $SSDTierSizes = (Get-StorageTierSupportedSize -FriendlyName $SSDTierName -ResiliencySettingName $ResiliencySetting).TierSizeMax
- $HDDTierSizes = (Get-StorageTierSupportedSize -FriendlyName $HDDTierName -ResiliencySettingName $ResiliencySetting).TierSizeMax
- #Create a new virtual disk in the pool with a name of TieredSpace using the SSD and HDD tier
- New-VirtualDisk -StoragePoolFriendlyName $StoragePoolName -FriendlyName $TieredSpaceName -StorageTiers $SSDTier, $HDDTier -StorageTierSizes $SSDTierSizes, $HDDTierSizes -ResiliencySettingName $ResiliencySetting -AutoWriteCacheSize -AutoNumberOfColumns
- #Alternatively try adjusting the sizes manually:
- #New-VirtualDisk -StoragePoolFriendlyName $StoragePoolName -FriendlyName $TieredSpaceName -StorageTiers @($SSDTier,$HDDTier) -StorageTierSizes @(20GB,100gb) -ResiliencySettingName $ResiliencySetting -AutoWriteCacheSize -NumberOfColumns 2 -FaultDomainAwareness PhysicalDisk -PhysicalDiskRedundancy 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement