This article introduces a workaround for an issue in which shadow copy volume is delayed in being brought online, and shadow copies are unexpectedly deleted. Event ID 32 is received when the issue occurs.
Symptom
On a server, shadow copies are stored on a different volume. After you restart the server, you find shadow copies are deleted. Additionally, you receive the following event log:
Log Name: System
Source: volsnap
Event ID: 32
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Description:
The shadow copies of volume X: were aborted because the shadow copy storage volume was not present.
You may notice delays in bringing the shadow copy volume online.
Cause
This issue occurs because there are multiple phantom shadow copy entries under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\STORAGE\VolumeSnapshot. It increases the time for the snapshots to be enumerated on the shadow storage volume when the parent volume comes online.
If it takes a long time in the enumeration, volsnap will delete these snapshots.
Workaround
To work around this issue, use the devnodeClean.exe tool to clean up the large buildup of phantom VolumeSnapshots in the registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\STORAGE\VolumeSnapshot.
Note: The devnodeclean.exe tool will only delete phantom shadow copies. Valid shadow copies will remain intact.
To get the list of entries to be deleted, run the following command:
devnodeclean /n
To delete the phantom shadow copies, run the following command:
devnodeclean
Additionally, we recommend configuring a devnodeclean scheduled task to proactively remove stale entries.
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
