What does HRESULT 0x80042817 (VDS_E_INVALID_SHRINK_SIZE) mean?

 
Previous Next
VDS_E_SHRINK_OVER_DATA VDS_E_LUN_DISK_MISSING

VDS_E_INVALID_SHRINK_SIZE

This is an arithmetic/precondition error on the LUN shrink request. IVdsLun::Shrink accepts the number of bytes to remove, not the desired final size. A caller that computes bytesToRemove from stale capacity or accidentally passes the intended final size can request a reduction larger than the LUN itself.

Why this state matters

The method documentation also says the byte count does not need to be a multiple of the block or sector size; provider alignment behavior is therefore a different issue. This particular HRESULT should first trigger verification of current LUN capacity and the subtraction performed by the caller.

Diagnostic focus

  • Query current VDS_LUN_PROP immediately before calculating the shrink amount and avoid using an old inventory snapshot.
  • Log both current size, desired final size, and computed bytes-to-remove so unit and subtraction errors are visible.
  • Distinguish bytes from sectors, blocks, MiB, and GiB in the management layer; implicit unit conversion is a common source of oversized requests.
  • Recalculate after any concurrent extend/shrink operation and wait for VDS asynchronous completion before issuing another size change.

Technical references

IVdsLun::Shrink · IVdsLun · VDS_ASYNC_OUTPUT_TYPE · MS-VDS error codes · VDS common return codes


Looking for a different code? Search another status or error code.