What does HRESULT 0xC0380046 (ERROR_VOLMGR_VOLUME_ID_INVALID) mean?

 
Could be also:
ConstantTypeOS
STATUS_VOLMGR_VOLUME_ID_INVALIDNTSTATUSWindows
Previous Next
ERROR_VOLMGR_VOLUME_CONTAINS_MISSING_DISK ERROR_VOLMGR_VOLUME_LENGTH_INVALID

ERROR_VOLMGR_VOLUME_ID_INVALID

Locate the rejected storage invariant: volmgr volume id invalid

The practical meaning of ERROR_VOLMGR_VOLUME_ID_INVALID (0xC0380046) is tied to logical volume geometry and the disk extents that realize it: the volume identifier does not resolve to a volume in the selected pack generation. The result does not, by itself, prove file-system corruption or physical-media failure while diagnosing this result.

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 for this HRESULT.

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 while diagnosing it.

Evidence to preserve before repair

Storage diagnostic fieldValue
Identity and generationvolume ID, requested length, sector sizes, extent table, plex/member counts, disk health and the exact VM_VOLUME_LAYOUT buffer
Narrow experimentserialize 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 comparisonERROR_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE
Owning objectlogical volume geometry and the disk extents that realize it
Rejected invariantthe volume identifier does not resolve to a volume in the selected pack generation

Keep this HRESULT as the primary result if rollback or cleanup reports another code; those later values describe recovery, not the first rejected invariant while diagnosing this result.

One-variable reproduction

  1. Associate this result with one caller, one transaction and one target UniqueId.
  2. 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.
  3. Use this A/B case for this HRESULT without touching unrelated storage: 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 while diagnosing it.
  4. Validate both the HRESULT and the on-disk or provider state after the relevant reopen, remount or attach cycle for this HRESULT.

Compare traces for ERROR_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE and it. The latter page covers a nearby storage boundary, whereas it rejects the volume identifier does not resolve to a volume in the selected pack generation while diagnosing it. A correct caller should be able to reproduce each case independently while diagnosing it.

Mechanism-specific note

The identifier must be resolved in the same enumeration generation and provider scope that will execute the operation. Store the stable GUID plus the pack generation. Drive letters, friendly names and array positions are unsuitable substitutes because they can change independently of the underlying dynamic-volume object.

Repair without rewriting unrelated metadata

Refresh the disk layout, serialize the change as one volume-manager transaction and reject any external partition mutation until commit or rollback completes for this HRESULT. After correcting it, reopen the pack, volume, tier, snapshot or virtual disk so no cached generation participates in the validation run.

  • 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 it.
  • The passing state survives the lifecycle transition relevant to it, such as reopen, remount, owner change or detach/attach.
  • The application still distinguishes it from ERROR_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE and has no unbounded retry loop.

Do not use it as a reason to edit dynamic-disk sectors, VHDX metadata, RCT sidecars or snapshot support files directly while diagnosing it. Unsupported edits can turn a recoverable state mismatch into persistent corruption.

Technical references


Looking for a different code? Search another status or error code.