Addressing the "Partition Extends Beyond The End Of The Disk" issue
Situation
In some situations, the following warning or error message might appear during snapshot (shadow copy) creation for a local volume (could affect image-based backups) or a VM instance (could affect VM backups):
WARN - Partition extends beyond the end of the disk. Start:XXXXXX Length:YYYYYYYYY Sector:512 DiskLength:ZZZZZZZZZZZZZ. Difference is 1.2 GB (-1200000000 bytes)
It means that a certain partition (volume) within the physical or virtualized disk's GPT (GUID Partition Table) is incorrectly laid out and requires readjustment. In most cases the culprit is one of the letter-assigned source volumes ("C:", "D:", or other volume chosen as a backup source).
Solution
In order to address this issue the best way, the following course of action is recommended:
Open Windows Disk Management tool by right-clicking "Start" button and clicking "Disk Management";
Right-click on the problematic volume and choose "Shrink Volume" option (volume will be automatically analyzed which could take a few minutes):
- In the opened sub-window, specify to what extent the volume's size is going to be reduced and click "Shrink".
In most cases, marginally above the difference value described in the warning message should be enough. For example, 1250 or 1300 MB for 1.2 GB difference from the warning message presented in the beginning of this article.
- Once the procedure is complete, close the opened windows and reboot the machine (instance) during the closest available maintenance time frame.
It would be even better if you ensure that the problematic volume is defragmented (optimized) before taking the above steps:
- Navigate to Windows tool "Defragment and Optimize Drives":
- Proceed with "Optimize" (or "Analyze", then "Optimize") option for the problematic volume:
- Proceed with volume shrink as described above.
In most cases, on modern Windows operating systems (10, 11, Server 2016, Server 2019), optimization of the volumes is scheduled to be performed automatically.