0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

記憶域スペースでのPowerShellコマンドメモ

Posted at

前回のエントリから研究が進んだので個人的メモです。

ProxmoxにてHDDパススルー

qm set 801 -virtio1 /dev/disk/by-id/ata-HP_SSD_S700_500GB_HBSA30130300484,serial=A1,backup=no
qm set 801 -virtio2 /dev/disk/by-id/ata-HP_SSD_S700_500GB_HBSA30130300485,serial=B2,backup=no
qm set 801 -virtio3 /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_11HEU1VNS,serial=C3,backup=no
qm set 801 -virtio4 /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_11HHM35NS,serial=D4,backup=no
qm set 801 -virtio5 /dev/disk/by-id/ata-TOSHIBA_DT01ACA100_11HMDZLNS,serial=E5,backup=no

記憶域プール作成

$Disks = Get-PhysicalDisk -CanPool $true | Sort-Object Size
$StoragePoolName = 'tank'
$StorageSubSystem = Get-StorageSubSystem
New-StoragePool -PhysicalDisks $Disks -FriendlyName $StoragePoolName -StorageSubSystemFriendlyName $StorageSubSystem.FriendlyName

シリアル番号でSSD/HDDタイプ付与

Set-PhysicalDisk -UniqueId A1 -MediaType SSD
Set-PhysicalDisk -UniqueId B2 -MediaType SSD
Set-PhysicalDisk -UniqueId C3 -MediaType HDD
Set-PhysicalDisk -UniqueId D4 -MediaType HDD
Set-PhysicalDisk -UniqueId E5 -MediaType HDD

SSD/HDD層を作成

$PerformanceTier = New-StorageTier -FriendlyName Performance -MediaType SSD -StoragePoolFriendlyName $StoragePoolName -ResiliencySettingName Mirror
$CapacityTier    = New-StorageTier -FriendlyName Capacity -MediaType HDD -StoragePoolFriendlyName $StoragePoolName -ResiliencySettingName Parity

最大割り当て可能領域を確認

Get-StorageTierSupportedSize Performance | FT @{E={$_.TierSizeMin/1GB};L="TierSizeMin(GB)"}, @{E={$_.TierSizeMax/1GB};L="TierSizeMax(GB)"}, @{E={$_.TierSizeDivisor/1GB};L="TierSizeDivisor(GB)"} -AutoSize
Get-StorageTierSupportedSize Capacity    | FT @{E={$_.TierSizeMin/1GB};L="TierSizeMin(GB)"}, @{E={$_.TierSizeMax/1GB};L="TierSizeMax(GB)"}, @{E={$_.TierSizeDivisor/1GB};L="TierSizeDivisor(GB)"} -AutoSize

ボリュームの作成

$VolumeName = 'testdisk'
New-Volume -StoragePoolFriendlyName $StoragePoolName -FriendlyName $VolumeName -StorageTierFriendlyNames $PerformanceTier.FriendlyName, $CapacityTier.FriendlyName -StorageTierSizes xxxGB, xxxxGB -FileSystem ReFS -AccessPath "E:" -ProvisioningType Fixed -AllocationUnitSize 4KB
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?