如何扩展存储池中用作物理驱动器的 VHDX?

如何扩展存储池中用作物理驱动器的 VHDX?

在 Windows 10 存储空间中,可以创建使用多个 VHDX 作为物理驱动器的存储池。例如,我创建并安装了 2x 5GB VHDX:

PS C:\> New-VHD -Path a:\test.vhdx -SizeBytes 5GB
PS C:\> New-VHD -Path b:\test.vhdx -SizeBytes 5GB
PS C:\> Mount-VHD -Path a:\test.vhdx
PS C:\> Mount-VHD -Path b:\test.vhdx

然后,通过添加 VHDX 作为物理磁盘来创建存储池:

# make sure the physical disk is the VHDXs
PS C:\> Get-PhysicalDisk | Where-Object {$_.DeviceId -eq 9 -or $_.DeviceId -eq 10} | select PhysicalLocation

PhysicalLocation
----------------
A:\test.vhdx
B:\test.vhdx


PS C:\> $PhysicalDisks = (Get-PhysicalDisk | Where-Object {$_.DeviceId -eq 9 -or $_.DeviceId -eq 10})

PS C:\> New-StoragePool -FriendlyName "Test" -StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks $PhysicalDisks -ResiliencySettingNameDefault Mirror -ProvisioningTypeDefault Thin -Verbose

FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly    Size AllocatedSize
------------ ----------------- ------------ ------------ ----------    ---- -------------
Test         OK                Healthy      False        False      8.97 GB        512 MB

存储池有2个利用两个VHDX作为物理磁盘:

PS c:\> Get-StoragePool -FriendlyName "Test" | Get-PhysicalDisk

Number FriendlyName           SerialNumber MediaType CanPool OperationalStatus HealthStatus Usage       Size
------ ------------           ------------ --------- ------- ----------------- ------------ -----       ----
9      Microsoft Virtual Disk              SSD       False   OK                Healthy      Auto-Select 5 GB
10     Microsoft Virtual Disk              SSD       False   OK                Healthy      Auto-Select 5 GB

接下来,我将 VHDX 扩展到 10GB:

PS C:\> Resize-VHD -Path a:\test.vhdx -SizeBytes 10GB
PS C:\> Resize-VHD -Path b:\test.vhdx -SizeBytes 10GB

但存储池大小没有增加:

PS C:\> Get-StoragePool -friendlyname Test

FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly    Size AllocatedSize
------------ ----------------- ------------ ------------ ----------    ---- -------------
Test         OK                Healthy      False        False      8.97 GB        512 MB

我认为 VHDX 存储池分区尚未扩展。是否可以扩展分区以充分利用 VHDX 中的可用空间?

相关内容