Get-StorageTierSupportedSize result is invalid
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- powershell
- Ambito
- documentation
Direzione di ricerca
Inizia dalla documentazione collegata di Get-StorageTierSupportedSize e riproduci l’esempio dei livelli di archiviazione PowerShell, concentrandoti su TierSizeMax rispetto ai risultati osservati di Resize-StorageTier. Documenta il significato previsto, il calcolo della capacità, le deduzioni per Write-back cache e metadati, nonché qualsiasi spazio non allocato richiesto o vincolo di ottimizzazione. Il lavoro è completato quando il comportamento e le limitazioni del cmdlet sono spiegati esplicitamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in
Get-Foocmdlet" instead of "Typo." - Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.
Links
Summary
The TierSizeMax property of the Get-StorageTierSupportedSize result is not explicitly defined and counterintuitive. AFAIU, it is also not calculated correctly. I think that this is a major bug in a critical subsystem and thus it should be fixed ASAP.
The example below demonstrates that although TierSizeMax is 6725 GB (while the AllocatedSize is 1777.5GB), but I can actually resize this tier to 12937.5 GB. Thus, TierSizeMax is neither "how large my pre-existing tier could become", nor "how large a new, additional tier could be".
Details
Here's the full example:
$StoragePoolName = "DataStorePool1"
$VDiskName = "DataStoreVDisk1"
$ResiliencySetting = "Simple"
$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,SerialNumber
#Store all physical disks that can be pooled into a variable, $PhysicalDisks
$PhysicalDisks = (Get-PhysicalDisk -CanPool $True | Where FriendlyName -NE "ATA Samsung SSD 870")
$PhysicalDisks
# Number FriendlyName SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage Size
# ------ ------------ ------------ --------- ------- ----------------- ------------ ----- ----
# 9 NVMe Samsung SSD 970 0025_385A_01B2_1E04. SSD True OK Healthy Auto-Select 1.82 TB
# 0 ATA WDC WD181KRYZ-01 3WGN974J HDD True OK Healthy Auto-Select 16.37 TB
# 10 NVMe Samsung SSD 970 0025_385A_01B2_1E13. SSD True OK Healthy Auto-Select 1.82 TB
# 6 XPG GAMMIX S70 BLADE 0000_0000_0000_0000_707C_18E8_B47D_B752. SSD True OK Healthy Auto-Select 7.28 TB
# 8 NVMe Samsung SSD 970 0025_385A_01B2_1E02. SSD True OK Healthy Auto-Select 1.82 TB
# 5 ATA WUH721818ALE6L4 6RG9Z5RW HDD True OK Healthy Auto-Select 16.37 TB
# 1 ATA WDC WD181KRYZ-01 3WJKB5LK HDD True OK Healthy Auto-Select 16.37 TB
# 4 ATA WUH721818ALE6L4 6RG9Z5UW HDD True OK Healthy Auto-Select 16.37 TB
$PD_set1 = $PhysicalDisks | Where-Object { $_.SerialNumber -like "0025_385A_01B2_1E04*" -or $_.FriendlyName -like "*WD181KRYZ*"}
#Create a new Storage Pool using the disks in variable $PD_set1, to ensure appropriate number of columns
$SubSysName = (Get-StorageSubSystem).FriendlyName
New-StoragePool -PhysicalDisks $PD_set1 -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 -NumberOfColumns 1 -ResiliencySettingName $ResiliencySetting # default interleave
$HDDTier = New-StorageTier -StoragePoolFriendlyName $StoragePoolName -FriendlyName $HDDTierName -MediaType HDD -NumberOfColumns 2 -ResiliencySettingName $ResiliencySetting # default interleave
#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 tiers -----------------------------------------------
# case_20 (NTFS - formatted, 32K cluster size), final
$WbcSize = 32GB
$ssd_usable = $SSDTierSizes - ($WbcSize * 2) - 20GB
$hdd_usable = $HDDTierSizes - 100GB
New-VirtualDisk -StoragePoolFriendlyName $StoragePoolName -FriendlyName $VDiskName -StorageTiers $SSDTier, $HDDTier -StorageTierSizes @($ssd_usable, $hdd_usable) -ResiliencySettingName $ResiliencySetting -WriteCacheSize ($WbcSize) -ProvisioningType Fixed -NumberOfDataCopies 1 -Interleave 256KB
# check actual number of columns:
Get-VirtualDisk -FriendlyName "DataStoreVDisk1" | Get-StorageTier | Select FriendlyName, NumberOfColumns, ResiliencySettingName
#
# FriendlyName NumberOfColumns ResiliencySettingName
# ------------ --------------- ---------------------
# DataStoreVDisk1-SSDTier 1 Simple
# DataStoreVDisk1-HDDTier 2 Simple
# add other disks
$PhysicalDisks = (Get-PhysicalDisk -CanPool $True | Where FriendlyName -NE "ATA Samsung SSD 870")
Add-PhysicalDisk -PhysicalDisks $PhysicalDisks -StoragePoolFriendlyName $StoragePoolName
Get-VirtualDisk -FriendlyName $VDiskName | Get-StorageTier
#
# FriendlyName TierClass MediaType ResiliencySettingName FaultDomainRedundancy Size FootprintOnPool StorageEfficiency
# ------------ --------- --------- --------------------- --------------------- ---- --------------- -----------------
# DataStoreVDisk1-SSDTier Performance SSD Simple 0 1.75 TB 1.75 TB 100.00%
# DataStoreVDisk1-HDDTier Capacity HDD Simple 0 32.73 TB 32.73 TB 100.00%
# ======================================= Optimize =====================================================================
Optimize-StoragePool -FriendlyName $StoragePoolName
Get-StorageJob
# Name IsBackgroundTask ElapsedTime JobState PercentComplete BytesProcessed BytesTotal
# ---- ---------------- ----------- -------- --------------- -------------- ----------
# DataStorePool1-Optimize False 1.11:31:12 Running 97 35.75 TB 36.72 TB
# DataStorePool1-Optimize False 1.11:31:12 Running 97 35.75 TB 36.72 TB
# DataStoreVDisk1-Regeneration True 00:00:10 Running 50 4.06 GB 8 GB
Get-StorageTier | Select-Object FriendlyName, @{L='Size(GB)';E={$_.Size/1GB}}, @{L='AllocatedSize(GB)';E={$_.AllocatedSize/1GB}}
# FriendlyName Size(GB) AllocatedSize(GB)
# ------------ -------- -----------------
# DataStoreVDisk1-SSDTier 1777.5 1777.5
# SSDTier 0 0
# DataStoreVDisk1-HDDTier 33426 33426
# HDDTier 0 0
#
# I've got no idea why it creates two new tiers, instead of using those I've explicitly provided...
Remove-StorageTier -FriendlyName $SSDTierName
Remove-StorageTier -FriendlyName $HDDTierName
Get-StorageTier | Select-Object FriendlyName, @{L='Size(GB)';E={$_.Size/1GB}}, @{L='AllocatedSize(GB)';E={$_.AllocatedSize/1GB}}
# FriendlyName Size(GB) AllocatedSize(GB)
# ------------ -------- -----------------
# DataStoreVDisk1-SSDTier 1777.5 1777.5
# DataStoreVDisk1-HDDTier 33426 33426
$VD_SSDTierName = $VDiskName + "-" + "SSDTier"
$VD_HDDTierName = $VDiskName + "-" + "HDDTier"
$VD_SSDTier = Get-StorageTier -FriendlyName $VD_SSDTierName
$VD_HDDTier = Get-StorageTier -FriendlyName $VD_HDDTierName
$VD_SSDTierSize_buggy_max = (Get-StorageTierSupportedSize -FriendlyName $VD_SSDTierName -ResiliencySettingName $ResiliencySetting).TierSizeMax
$VD_HDDTierSize_buggy_max = (Get-StorageTierSupportedSize -FriendlyName $VD_HDDTierName -ResiliencySettingName $ResiliencySetting).TierSizeMax
$VD_SSDTierSize_buggy_max / 1GB
6725
# Bullshit, severely underestimated.
$VD_HDDTierSize_buggy_max / 1GB
33624
# This might be correct, if this is "how much can we add"
$VD_SSDTierSize_true_max = (Get-StoragePool -FriendlyName $StoragePoolName | Get-PhysicalDisk | Where-Object {$_.MediaType -eq 'SSD'} | Measure-Object -Property Size -Sum).Sum - ($WbcSize * 2) - 40GB
$VD_HDDTierSize_true_max = (Get-StoragePool -FriendlyName $StoragePoolName | Get-PhysicalDisk | Where-Object {$_.MediaType -eq 'HDD'} | Measure-Object -Property Size -Sum).Sum - 100GB
$VD_SSDTierSize_true_max / 1TB
# 12.633873552084
$VD_HDDTierSize_true_max / 1TB
# 65.38671875
# ======================================= Resize VD ====================================================================
Resize-StorageTier -FriendlyName $VD_SSDTierName -Size $VD_SSDTierSize_true_max
Resize-StorageTier -FriendlyName $VD_HDDTierName -Size $VD_HDDTierSize_true_max
Get-StorageTier | Select-Object FriendlyName, @{L='Size(GB)';E={$_.Size/1GB}}, @{L='AllocatedSize(GB)';E={$_.AllocatedSize/1GB}}
# FriendlyName Size(GB) AllocatedSize(GB)
# ------------ -------- -----------------
# DataStoreVDisk1-SSDTier 12937.5 12937.5
# DataStoreVDisk1-HDDTier 66956 66956
(Get-VirtualDisk -FriendlyName "DataStoreVDisk1").Size / 1GB
79893.5
# speedcrunch: (2+2+2+8+18*4)*1e12/2^(30) = 80093.74141693115234375
# ======================================= Format VD ====================================================================
Get-VirtualDisk -FriendlyName $VDiskName | Get-Disk | Initialize-Disk -PartitionStyle GPT
$Partition = Get-VirtualDisk -FriendlyName $VDiskName | Get-Disk | New-Partition -UseMaximumSize -DriveLetter H
Format-Volume -Partition $Partition -FileSystem NTFS -AllocationUnitSize 64KB -NewFileSystemLabel "HData"
# DriveLetter FriendlyName FileSystemType DriveType HealthStatus OperationalStatus SizeRemaining Size
# ----------- ------------ -------------- --------- ------------ ----------------- ------------- ----
# H HData NTFS Fixed Healthy OK 78.02 TB 78.02 TB
Suggested Fix
-
Please explicitly define the intended meaning of the
TierSizeMaxin the docs- Is it "how large my pre-existing tier could become" or "how large a new, additional tier could be" or "just a mild suggestion about either"?
-
Please document down the arithmetic behind this.
- Is it correct, that I should subtract the
$WbcSize * 2(based on my old experiments, it looks like Write-Back cache footprint is twice it's size (i.e. it's probably always a 2-way mirror, despite this is not documented anywhere) - Please document down if I need to subtract a few more GB for the various metadata (how much?)
- Please document down if I need to leave some "unallocated space" for the tier-optimization to work adequately.
- Please document down how is the
TierSizeMaxrelated to theThe capacity consumption of the storage pool {some-id} has exceeded the threshold limit set on the pool. Return Code: STATUS_SUCCESSmessage in the "StorageSpaces-Driver" event log. Especially, for the Fixed provisioning (tiered storage spaces).
- Is it correct, that I should subtract the
-
Please review the actual code behind the
Get-StorageTierSupportedSizeand fix it. Make it provide more adequate values. I guess that heVD_SSDTierSize_true_maxand theVD_HDDTierSize_true_maxin my example script are actually a better estimates.
- Lingua principale
- Dockerfile
- Stelle
- 510
- Fork
- 643
- Merge medio
- 2g 21h
- PR unite (30g)
- 8
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MicrosoftDocs/windows-powershell-docs
-
Set-ProcessMitigation: -Remove does not remove path-scoped entries created with a full -Name pathAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MicrosoftDocs/windows-powershell-docs#4143 ·
I maintainer di solito rispondono entro 1 giorno
-
issue-doc-bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
MicrosoftDocs/windows-powershell-docs#4112 ·
I maintainer di solito rispondono entro 1 giorno
-
issue-doc-bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MicrosoftDocs/windows-powershell-docs#3861 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
issue-doc-bug needs-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
MicrosoftDocs/windows-powershell-docs#4153 ·
I maintainer di solito rispondono entro 1 giorno
-
issue-doc-bug needs-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
MicrosoftDocs/windows-powershell-docs#4114 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MicrosoftDocs/windows-powershell-docs
Issue simili
-
area:agent-sdk area:docs documentation enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
anthropics/claude-code#110914 ·
-
specification
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
WICG/webmonetization#813 ·
I maintainer di solito rispondono entro 3 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Polish READMEApertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Doc: Remove quotes and backticks around RFC objectsForse già presa @Tirth00000 l’ha presa oggi. Apertadoc good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
collective/icalendar#2146 · 1 commento ·