1

I created a storage spaces pool on top of a VHDX file. Everything works fine, until I attempt to set new maximum to the VHDX file. In that case Storage Spaces can't see the updated size (and therefore volume on the virtual disk can't be extended to span its new size). I tried to rescan, refreshed Storage Spaces cache, nothing worked. Is there a trick that needs to be done for the Storage Spaces to pick up changes to the physical disk?

Detailed steps:

  1. Create a VHDX

    diskpart
    create vdisk file=D:\disk01.vhdx maximum=8192 type=expandable
    select vdisk file=D:\disk01.vhdx
    attach vdisk
    
  2. Create a new storage pool

    New-StoragePool -FriendlyName pool01 –StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks (Get-PhysicalDisk | Where-Object { $_.PhysicalLocation -eq "D:\disk01.vhdx"} )
    

    At this time, the storage pool shows expected size:

    Get-StoragePool pool01
    
    FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly    Size    AllocatedSize
    ------------ ----------------- ------------ ------------ ----------    ----    -------------
    pool01       OK                Healthy      False        False      7.48 GB       7.25 GB
    
  3. Resize the maximum size of VHDX file:

    select vdisk file=D:\disk01.vhdx
    expand vdisk maximum=16384
    

Then Get-StoragePool still shows previous capacity:

FriendlyName OperationalStatus HealthStatus IsPrimordial IsReadOnly    Size AllocatedSize
------------ ----------------- ------------ ------------ ----------    ---- -------------
pool01       OK                Healthy      False        False      7.48 GB       7.25 GB

When I do the same test using VDS, it works as expected (the Disk Management snap-in shows proper VHDX maximum size after refreshing).

Is there some extra step necessary? Or is this not supported at all by Storage Spaces? I was unable to find any resources on this.

vasek
  • 111
  • 5
  • Storage Spaces maintains certain metadata on the disk that includes the size. Consider it something like partition table + LVM's physical volume. I do not think there is easy way around this issue. - To avoid any X/Y question: Why do you want to do this though? – charlesz May 12 '23 at 20:54
  • I am trying to create a disk pool with striped disks that can be resized. In my case the underlying "hardware" disk is not VHDX but EBS volume instead, which can be scaled. VDS does not support expanding striped volumes, so wanted to give Storage Spaces a try. – vasek May 12 '23 at 21:00

0 Answers0