| 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, it rejects a specific contract 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.
Dynamic volumes are represented as packs containing disks and volumes; each volume has one or more plexes, and each plex is assembled from members and extents. Indices and counts are relative to the submitted layout generation, while configuration logs are replicated across participating dynamic disks. This object model determines which identifiers, counts and ownership state are meaningful.
The standard message identifies the immediate condition, but this result also requires the producer API, object topology and attempted state transition. Capture them before an automatic refresh advances the storage generation.
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 for it.
- 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 for it 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 for it.
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 for it. 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 while diagnosing it.
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 responsible for it.
- 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 the operation.
- Telemetry includes both symbolic names when it or
ERROR_VOLMGR_VOLUME_NOT_RETAINEDoccurs again.
Avoid broad rescans, forced failovers and metadata deletion until identities and generations are captured for it. Those actions can make a stale request appear to heal without fixing its caller.
Technical references
- Microsoft: COM error codes for VOLMGR, VHD and SDIAG — documents the supported management path relevant to it.
- Microsoft: Virtual Disk Service object model — defines the volmgr objects used to interpret it.
- Microsoft: Pack object — primary API or object-model reference for the boundary.
- Microsoft: Virtual Disk Service common return codes — use this source to verify volmgr state and parameters for it.
Looking for a different code? Search another status or error code.
