It seems like you have created a mirrored virtual disk with storage spaces using an initial disk of 128GB and a storage pool of 256GB. After completing the mirroring process and removing the initial disk, the virtual disk still shows the allocated size as 128GB. To free up the unallocated space and adjust the virtual disk size, follow these steps:
- Open PowerShell as an administrator.
- Run the following command to get a list of storage pools:
Get-StoragePool
- Identify the storage pool you want to modify (the one with a 256GB capacity). Note the "FriendlyName" of the storage pool.
- Run the following command to get a list of virtual disks within the storage pool:
Get-VirtualDisk -StoragePoolFriendlyName <StoragePool_FriendlyName>
Replace <StoragePool_FriendlyName>
with the friendly name of your storage pool.
- Identify the virtual disk you want to modify (the one with a 128GB capacity). Note the "FriendlyName" of the virtual disk.
- Run the following command to resize the virtual disk to its maximum supported size:
Resize-VirtualDisk -FriendlyName <VirtualDisk_FriendlyName> -Size (Get-VirtualDiskSupportedSize -FriendlyName <VirtualDisk_FriendlyName>).SizeMax
Replace <VirtualDisk_FriendlyName>
with the friendly name of your virtual disk.
- After resizing the virtual disk, you need to extend the volume to make use of the additional space. First, open Disk Management by pressing
Win+X
and selectingDisk Management
. - In Disk Management, locate the volume corresponding to your virtual disk. Right-click the volume and select
Extend Volume
. - Follow the
Extend Volume Wizard
to allocate the unallocated space to the volume.
After completing these steps, your virtual disk should reflect the correct size, and the unallocated space should be used by the volume.
Note that defragmentation (Defrag F: /U /V
) would not help in this situation, as it is used to optimize file storage within a volume, rather than adjusting the size of a virtual disk or volume.