How to fix Error 339 on Windows 11

Why This Error Happens

Error 339 is generated by the Storage Spaces driver when the metadata on one of the physical disks in a storage pool no longer matches the other copies (mirrored or parity data). This desynchronization typically occurs after an unexpected power loss, an improper disk removal, or a failing physical drive that didn’t complete its last write operation. Windows locks the volume from further writes as a safety measure to prevent further data corruption until a repair scan validates consistency across all copies.

Step-by-Step Resolution Guide

  1. Open PowerShell as Administrator and check the health of your storage pool:
   Get-VirtualDisk | Get-StorageJob
   Get-PhysicalDisk | Select FriendlyName, HealthStatus, OperationalStatus

Look for any disk marked as “Unhealthy” or “Lost Communication.”

  1. Manually trigger a repair job on the affected virtual disk:
   Repair-VirtualDisk -FriendlyName "YourVirtualDiskName"

Replace "YourVirtualDiskName" with the name shown in Get-VirtualDisk. This forces Windows to run the data integrity scan immediately instead of waiting for the background scheduled task.

  1. Check Task Scheduler for the automatic repair task: Navigate to
    Task Scheduler Library > Microsoft > Windows > StorageSpaces > SpaceManager
    and manually run the task if it shows as “Ready” but hasn’t executed.

  2. Inspect the physical disk for hardware failure using:

   Get-PhysicalDisk | Get-StorageReliabilityCounter | Select DeviceId, Wear, ReadErrorsTotal, Temperature

If read/write error counts are high, the disk should be replaced and removed from the pool before it fails completely.

  1. If the scan won’t complete, remove the problematic disk from the pool (if you have redundancy) and let Storage Spaces rebuild parity onto a healthy replacement disk:
   Remove-PhysicalDisk -StoragePoolFriendlyName "YourPoolName" -PhysicalDisks (Get-PhysicalDisk -FriendlyName "DiskX")

Alternative or Verification Steps

  • After running Repair-VirtualDisk, confirm the fix by re-checking Get-VirtualDisk | Select HealthStatus — it should return “Healthy” instead of “Warning” or “Unhealthy.”
  • If repair fails repeatedly, back up all accessible data immediately and recreate the storage pool from scratch, as this indicates likely physical media failure rather than a simple metadata desync.