If you are a Small Business customer, find additional troubleshooting and learning resources at the Support for Small Business site.

RAPID PUBLISHING ARTICLES PROVIDE INFORMATION DIRECTLY FROM WITHIN THE MICROSOFT SUPPORT ORGANIZATION. THE INFORMATION CONTAINED HEREIN IS CREATED IN RESPONSE TO EMERGING OR UNIQUE TOPICS, OR IS INTENDED SUPPLEMENT OTHER KNOWLEDGE BASE INFORMATION.

The application may be using IVdsVolumeShrink::QueryMaxReclaimableBytes() method to find the maximum number of bytes which can be reclaimed from the current volume. However, this method can return more reclaim-able bytes than what is actually available. When
IVdsVolumeShrink::Shrink() is provided (as first parameter for ullDesiredNumberOfReclaimableBytes) with the value returned above, it is possible that IVdsVolumeShrink::Shrink() will fail as with above event log.

IVdsVolumeShrink::QueryMaxReclaimableBytes() relies on underlying Defrag APIs to determine the amount of volume space that can be recovered. This is because the shrink operation needs to account for immovable files on the volume, as the file system extent must be adjusted along with the volume length. Although this API has been substantially improved in Windows 7, there are still immovable files that are not properly detected.

The application should call IVdsVolumeShrink::Shrink() with following parameter values for maximum shrinkage:

ullDesiredNumberOfReclaimableBytes ==> Set to value of reclaimabl bytes obtained from IVdsVolumeShrink::QueryMaxReclaimableBytes()
ullMinNumberOfReclaimableBytes ==> set to Zero

With these parameters, Virtual Disk Service (VDS) shrinks the volume as much as it can. Also, because some files are temporarily immovable, the application may be able to recover additional space if it calls IVdsVolumeShrink::Shrink() with same set of parameters a second time.

MICROSOFT AND/OR ITS SUPPLIERS MAKE NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY, RELIABILITY OR ACCURACY OF THE INFORMATION CONTAINED IN THE DOCUMENTS AND RELATED GRAPHICS PUBLISHED ON THIS WEBSITE (THE “MATERIALS”) FOR ANY PURPOSE. THE MATERIALS MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS AND MAY BE REVISED AT ANY TIME WITHOUT NOTICE.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.