| Previous | Next |
| ERROR_VOLMGR_VOLUME_OFFLINE | ERROR_VOLMGR_NUMBER_OF_EXTENTS_INVALID |
ERROR_VOLMGR_VOLUME_RETAINED
Interpret the state transition: volmgr volume retained
ERROR_VOLMGR_VOLUME_RETAINED has unsigned value 0xC038004C. In the volmgr layer, the operation is rejected because the volume already owns a retained partition record and cannot acquire a duplicate one. Diagnosis of this result should follow logical volume geometry and the disk extents that realize it through one controlled state transition.
Record geometry, identity and ownership
| Storage diagnostic field | Value |
|---|---|
| Identity and generation | volume ID, requested length, sector sizes, extent table, plex/member counts, disk health and the exact VM_VOLUME_LAYOUT buffer |
| Narrow experiment | query the retain-partition flag, apply or remove it once on a test volume, and retry the original operation without repartitioning |
| Closest comparison | ERROR_VOLMGR_VOLUME_NOT_RETAINED |
| Owning object | logical volume geometry and the disk extents that realize it |
| Rejected invariant | the volume already owns a retained partition record and cannot acquire a duplicate one |
Keep this HRESULT as the primary result if rollback or cleanup reports another code; those later values describe recovery, not the first rejected invariant.
Separate validation from capability
- Associate this result with one caller, one transaction and one target UniqueId.
- Save the pre-call and post-call inventories, including volume ID, requested length, sector sizes, extent table, plex/member counts, disk health and the exact VM_VOLUME_LAYOUT buffer.
- Use this A/B case without touching unrelated storage: query the retain-partition flag, apply or remove it once on a test volume, and retry the original operation without repartitioning.
- Validate both the HRESULT and the on-disk or provider state after the relevant reopen, remount or attach cycle.
A useful diagnostic fork is ERROR_VOLMGR_VOLUME_NOT_RETAINED versus this result. This code concerns the volume already owns a retained partition record and cannot acquire a duplicate one; the alternate code should remain observable after the fix, proving the application did not suppress the entire subsystem.
Mechanism-specific note
Retain-partition state records whether partition identity should survive deletion of the dynamic volume. Query the flag and the partition record together. It is not a general “keep data” switch, and toggling it cannot repair missing extents, synchronization failures or an invalid pack log.
Verification after correction
Refresh the disk layout, serialize the change as one volume-manager transaction and reject any external partition mutation until commit or rollback completes. After correcting it, reopen the pack, volume, tier, snapshot or virtual disk so no cached generation participates in the validation run.
- The controlled A/B case changes only the invariant that triggers this result.
- No unrelated disk, cluster owner, tier policy or virtual-disk backing file is altered to hide it.
- Health, synchronization or job state reaches a terminal value consistent with the repaired operation.
- Telemetry includes both symbolic names when it or
ERROR_VOLMGR_VOLUME_NOT_RETAINEDoccurs again.
Technical references
- Microsoft: COM error codes for VOLMGR, VHD and SDIAG — documents the supported management path relevant to this HRESULT.
- Microsoft: Virtual Disk Service object model — defines the volmgr objects used to interpret it.
- Microsoft: Pack object — primary API or object-model reference.
- Microsoft: Virtual Disk Service common return codes — use this source to verify volmgr state and parameters.
Looking for a different code? Search another status or error code.
