Remove unused space from a disk

WinTechie 281 Reputation points
2020-08-12T11:45:32.73+00:00

Hi,

I have a on-prem VM which has 500 GB of disk connected, it is hardly used, currently utilized around 30 GB.

Is there a way using "disk mirroring option" to reduce the total space and return remaining space back to datastore

eg: by attaching a new disk with 50 GB, adding it in mirror with existing 500 (GB) disk (not sure if size difference between 2 disks is acceptable before creating mirroring)

syncing the data, break the mirror and remove 500 GB disk

If there is any other way to optimize disk space/storage space, i would like to know...

Windows Server 2012
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,536 questions
Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
632 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 30,386 Reputation points Microsoft Vendor
    2020-08-13T03:24:56.41+00:00

    Hi,

    You don't need to do that to free up the unused space. If your virtual disk is dynamically expanding, you could just compact it. Open the Hyper-V Manager and select Edit Disk on the right, then locate your virtual disk and choose compact

    17336-2020-08-13-140204.png

    Please refer to the below article for the details.

    https://learn.microsoft.com/en-us/archive/blogs/askcore/compacting-a-dynamically-expanding-virtual-hard-disk-in-windows-server-2012

    If your virtual disk is fixed, just convert it to dynamically expanding.

    You'll have to shutdown your virtual machine before you do this.

    Best Regards,
    Ian

    ----------

    Please remember to "Accept Answer" and upvote if the reply is helpful.

    0 comments No comments