What does Windows error code 108 (ERROR_DRIVE_LOCKED) mean?

 
Could be also:
ConstantTypeOS
ESHUTDOWNerrnoLinux
ECONNRESETerrnoWindows
REFMON_INITIALIZATION_FAILEDBugCheck CodeWindows
Previous Next
ERROR_DISK_CHANGE ERROR_BROKEN_PIPE

ERROR_DRIVE_LOCKED

What ERROR_DRIVE_LOCKED means

ERROR_DRIVE_LOCKED is a Win32 system result whose documented message is: “The disk is in use or locked by another process.” In practical troubleshooting, it belongs to volume, removable-drive, formatting, backup, or maintenance operations that need exclusive drive access but another process owns or uses it. The numeric result identifies the failed contract, while the operation and target object explain why this particular result appeared.

Typical causes

  • an open file or current directory keeps the volume busy
  • antivirus, indexing, backup, or shell software opened the drive during an exclusive operation
  • another maintenance tool already holds a volume lock

How to investigate the result

  1. use handle enumeration to locate processes with open objects on the volume
  2. check services that scan newly mounted media
  3. retry after closing shells and changing all current directories away from the drive

When investigating this result, start with the first failing call rather than a later cleanup error. Preserve the raw it before any wrapper converts it. Record whether it is reproducible in a clean process, a new user session, or after the relevant object is recreated.

Developer guidance

Acquire exclusive access only for the shortest necessary interval and report the blocking volume and operation. Do not forcibly invalidate unrelated handles. Logs should include the operation name, canonical target, process architecture, operating-system build, and the state that was validated immediately before the call. Avoid blind retries while the same precondition remains unchanged.

Administrator and support guidance

Close applications using the drive and pause scanners only when operational policy allows it. For system volumes, schedule the operation for boot or offline maintenance. Before restarting after this result, collect evidence because a restart may clear the state responsible for it. When a it workaround succeeds, record exactly which process, mapping, media, driver, or configuration value changed.

Example incident

A formatting tool requests an exclusive lock while Explorer is previewing a file on the removable drive, so the lock attempt returns this result. A useful incident timeline shows the successful setup steps, the first operation returning it, and any secondary errors produced during its rollback.

How it differs from related results

ERROR_BUSY_DRIVE is associated with legacy JOIN or SUBST manipulation; it usually reflects a real drive or volume being held by another process. That distinction determines whether the remedy belongs in application input, resource release, mapping topology, driver compatibility, or underlying storage.

Evidence worth collecting

Capture evidence around the condition “an open file or current directory keeps the volume busy.” The result evidence package should include the exact API or command, all non-secret input fields, normalized paths or device names, object ownership, and a timestamp correlatable with Windows Event Log and application tracing. The first concrete it check should be to use handle enumeration to locate processes with open objects on the volume.

Recovery and verification

Recovery from it is complete only when the original operation succeeds under the same relevant conditions. After fixing it, repeat the action and verify that no stale mapping or handle remains. Run the operation a second time to confirm that the setup and cleanup associated with it are idempotent. If it disappears only after reboot, continue investigating the owner or leaked state rather than treating reboot as the permanent correction.

When to escalate

Escalate it with a minimal reproduction, the exact it value, application and component versions, target path or device class, and the collected state before and after this failure. For a legacy the case, also state whether the executable is 16-bit, DOS-derived, virtualized, redirected, or running under a compatibility subsystem.

References


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