I have a physical disk with two partitions, an old OS partition (with MBR) of 296GB and a RECOVERY partition of 2048MB (a default DELL recovery partition), both are not in use. I have successfully resized the OS partition from 296GB to 174GB with the following command:
DISKPART> shrink
which shrinks to the maximum shrinkable space. However, the partition only uses 56GB and I want to create a partition of at least under 128GB (to be able to create a VHD of it). When I shrink again, I receive the following error:
DISKPART> shrink desired=50000 Virtual Disk Service error: The specified shrink size is too big and will cause the volume to be smaller than the minimum volume size.
According to this post I should defrag, which I did using several tools (open source UltraDefrag seemed to do the best job). It seems that all files are on top of the disk, but how can I check that for sure? And if not, how can I manually defrag/move files, to claim the largest possible consecutive free disk space?
Or: what should I do to shrink the volume to its current used size plus a bit?
(Note: I tried to create a new VHD with the CREATE VDISK
command pointing to the oversized VHD for the source-parameter, but here too, the 128GB/137GiB limit prevents success, it seems. Mounting the VHD and shrinking it had exactly the same effect as doing it on the original physical disk, which is why I now try to first limit the physical partition size.)