| Previous | Next |
| ERROR_VOLMGR_NO_VALID_LOG_COPIES | ERROR_VOLMGR_NUMBER_OF_DISKS_INVALID |
ERROR_VOLMGR_PRIMARY_PACK_PRESENT
Locate the rejected storage invariant: volmgr primary pack present
ERROR_VOLMGR_PRIMARY_PACK_PRESENT (0xC0380059) is emitted by the volmgr path when the system already has a primary dynamic-disk pack and cannot promote another one in the same scope. The deciding object is dynamic-disk pack identity, quorum and replicated configuration log, so the first investigation belongs there rather than in a generic “disk failure” bucket.
Keep the first result attached to its request parameters and object instance. Cleanup failures or a later drive-letter change are secondary evidence, not replacements for the original failure.
Evidence to preserve before repair
| Storage diagnostic field | Value |
|---|---|
| Owning object | dynamic-disk pack identity, quorum and replicated configuration log |
| Rejected invariant | the system already has a primary dynamic-disk pack and cannot promote another one in the same scope |
| Identity and generation | pack GUID and name, online state, primary flag, disk inventory, configuration-log sequence numbers, quorum view and failing transaction ID |
| Narrow experiment | serialize the exact VM_VOLUME_LAYOUT buffer, validate every count and Size field, and compare it with a layout produced by a known-good management API |
| Closest comparison | ERROR_VOLMGR_NOT_PRIMARY_PACK |
When it is followed by a secondary cleanup failure, store both codes with timestamps and retain this one as the initiating result.
One-variable reproduction
- Before changing state, freeze the failing generation and save pack GUID and name, online state, primary flag, disk inventory, configuration-log sequence numbers, quorum view and failing transaction ID.
- Exercise this exact comparison: serialize the exact VM_VOLUME_LAYOUT buffer, validate every count and Size field, and compare it with a layout produced by a known-good management API.
- During the comparison, keep image bytes, unrelated disks, provider policy and cluster topology fixed.
- After the test, record the next return value and the durable object state; crossing the boundary should expose a later result rather than silently retrying.
Use ERROR_VOLMGR_NOT_PRIMARY_PACK as the nearest comparison. This result is specific to the system already has a primary dynamic-disk pack and cannot promote another one in the same scope; the neighboring result belongs to another validation or lifecycle branch. Keeping both names prevents a generic storage label from hiding the actual owner.
Mechanism-specific note
Primary-pack selection defines which disk group owns the authoritative dynamic-disk namespace in this scope. Preserve both pack GUIDs and the reason promotion was requested. Do not change the primary flag as a generic repair: first establish whether the operation was sent to the wrong pack or whether a stale management object points at a former primary.
Repair without rewriting unrelated metadata
Repair the pack configuration through supported dynamic-disk management, preserving GUIDs and the newest valid log sequence; avoid sector-level edits to replicated metadata. Keep the correction scoped to the owning object and avoid rewriting adjacent metadata merely to make the call return success.
- The original request now reaches success or a documented later status with the intended layout and access mode.
- A new enumeration reports internally consistent IDs, counts, geometry and ownership for the object corrected after this result.
- The passing state survives the lifecycle transition relevant to this result, such as reopen, remount, owner change or detach/attach.
- The application still distinguishes this result from
ERROR_VOLMGR_NOT_PRIMARY_PACKand has no unbounded retry loop.
Technical references
- Microsoft: COM error codes for VOLMGR, VHD and SDIAG — defines the volmgr objects used to interpret it.
- Microsoft: Virtual Disk Service object model — primary API or object-model reference.
- Microsoft: Pack object — use this source to verify volmgr state and parameters.
- Microsoft: Virtual Disk Service common return codes — documents the supported management path relevant to this HRESULT.
Looking for a different code? Search another status or error code.
