Fix it now
The storage device was asked to read or write and reported that it could not. Every code here is raised at the bottom of the storage stack, so the program showing it – Setup, a backup job, File Explorer – is not the fault. Work out which device failed, and copy the data off it before you repair anything.
Get-PhysicalDisk | Select-Object FriendlyName, MediaType, HealthStatus, OperationalStatus
Get-WinEvent -LogName System -MaxEvents 100 | Where-Object ProviderName -eq 'disk'
chkdsk X: /scan
- Read the HealthStatus column. Microsoft documents four values – Healthy, Warning, Unhealthy and Unknown – and anything other than Healthy settles the question before you spend time on cables.
- Read the System log entries. The disk driver names the device it could not reach, which tells you whether the source, the destination or the installation media is at fault.
- If the data on that device is not backed up elsewhere, stop and image the drive to healthy storage now. Repair passes make a marginal drive worse.
- Only once you have an image, repair the file system:
chkdsk X: /f /r, orRepair-Volume -DriveLetter X -OfflineScanAndFixfrom PowerShell. - For an external drive, connect it directly to the machine rather than through a hub or dock, and swap the cable before concluding the drive is dead.
Microsoft’s own chkdsk reference notes that /r reads every sector and takes a considerable time, and that on an SSD it checks each sector’s physical integrity. That is exactly the load a dying drive cannot take, which is why the image comes first.
If the device now reads and writes cleanly you can stop here. If not, the next section explains which of the five codes you have and what each one actually says.
Why it happens
Windows layers storage requests. An application asks the file system, the file system asks the volume, the volume asks the disk driver, the driver asks the controller, and the controller asks the device. When the device cannot satisfy the request, the failure travels back up that chain and is translated into a Win32 error at the top. 0x8007045D is that translation for error 1117, ERROR_IO_DEVICE, whose published text is that the request could not be performed because of an I/O device error.
Because it comes from the bottom of the stack, the program reporting it is rarely relevant. Setup, a backup product, File Explorer and Windows Update all present a different message for the same underlying event. The information worth having is in the System log, where the disk driver records which device failed.
The companion codes are separate published errors rather than variations of the first, and they narrow the fault. 0x80070017 is ERROR_CRC: the data came back but did not match its checksum, so something between the platter and the buffer altered it. 0x8007001D is ERROR_WRITE_FAULT, the system cannot write to the specified device. 0x80070571 is ERROR_DISK_CORRUPT, the disk structure is corrupted and unreadable – a statement about the volume rather than the hardware. 0x8007001F is ERROR_GEN_FAILURE, published simply as a device attached to the system not functioning.
The media itself is failing
You have this one if The System log records repeated errors against the same device, the error follows particular files, and Get-PhysicalDisk reports anything other than Healthy.
- Image the drive to healthy storage before you do anything else, using a tool that retries and skips unreadable areas.
- Run the drive vendor’s diagnostic, which reports wear and error counts Windows does not surface.
- Work on the image, not the original, and treat the original as evidence rather than as a machine you are fixing.
- Replace the drive. Repairing a file system does not repair the media beneath it.
0x80070017, the CRC failure, is the most specific of the five here. Data that comes back different from what was written is either bad media or a bad link, and both are hardware.
The link rather than the drive: cable, port, enclosure or dock
You have this one if The error moves with the connection rather than the drive, or clears when the same device is attached somewhere else.
- Swap the data cable for a known-good one and move to a different port on the board.
- Attach external drives directly rather than through a hub, dock or extension lead.
- Try the drive in a different enclosure; enclosure controllers fail more often than the drives inside them.
- On a USB device, test with selective suspend disabled for that port to rule out power management dropping the device mid-transfer.
A drive that reads perfectly in another machine, or through another cable, has already told you the fault is not in the drive.
The installation or backup media, not the target
You have this one if The error appears at the same point in a Windows setup or a restore every time, on hardware that is otherwise healthy.
- Verify the downloaded image with
Get-FileHash <file> -Algorithm SHA256against the publisher’s value before you write it. - Rewrite the media onto a different USB stick, on a port directly on the machine.
- On a server, mount the ISO through the management controller’s virtual media instead of using a stick.
The controller or its driver
You have this one if Several different drives on the same controller report errors, or the problem began after a driver or firmware change.
- Install the storage controller driver published for your exact machine or board model rather than a generic one.
- Roll back a driver updated just before the errors began, from Device Manager under Storage controllers.
- Move one drive to a different controller and see whether the fault follows the drive or stays with the controller.
Volume damage rather than media damage
You have this one if Drive health reports Healthy, the vendor diagnostic is clean, and 0x80070571 appears against specific files or folders.
- Run
chkdsk X: /scanfirst. It is an online scan and it changes nothing. - If it finds damage, run
chkdsk X: /f /rwith the volume dismounted, orRepair-Volume -DriveLetter X -OfflineScanAndFix. - Restore the affected files from backup afterwards; a repaired file system does not restore lost file contents.
Full reference
Reading the five codes as a set
| Code | Published as | What that narrows it to |
|---|---|---|
0x8007045D |
ERROR_IO_DEVICE, 1117 | The device could not complete the operation. The broadest of the five |
0x80070017 |
ERROR_CRC, 23 | Data came back but failed its checksum. Media or link |
0x8007001D |
ERROR_WRITE_FAULT, 29 | The write path specifically, rather than reads |
0x8007001F |
ERROR_GEN_FAILURE, 31 | A device attached to the system is not functioning |
0x80070571 |
ERROR_DISK_CORRUPT, 1393 | The structure on the disk, which is a file system statement |
Only 0x80070571 is a statement about the volume. The other four are statements about the device, and no amount of file system repair changes what a device reports. That is the distinction that decides whether you reach for chkdsk or for a screwdriver.
Where the error appears, and what that usually means
| Context | Usual explanation |
|---|---|
| The same point in Windows setup every time | Damaged installation media or an incomplete download |
| Copying or backing up one large file | Unreadable sectors under that particular file |
| Only on an external drive, never internally | Cable, hub, enclosure or port power |
| Several drives sharing one controller | The controller, its driver or its power feed |
| At random during ordinary use | The drive. Check health before anything else |
The scan and repair commands, and what each costs you
| Command | What it does | Disruption |
|---|---|---|
chkdsk X: /scan |
Online scan on NTFS; records what it finds | None |
chkdsk X: /f |
Fixes errors; the volume must be locked | Volume offline, or scheduled for restart |
chkdsk X: /r |
Locates bad sectors and recovers readable information; includes /f | Hours, and heavy load on the drive |
chkdsk X: /spotfix |
Fixes only what an online scan already logged | Brief |
Repair-Volume -DriveLetter X -Scan |
Documented equivalent of chkdsk /scan | None |
Repair-Volume -DriveLetter X -OfflineScanAndFix |
Documented equivalent of chkdsk /f | Volume offline |
Do not open with chkdsk /r on a drive you already suspect. Microsoft notes that it reads every sector, that on large drives the physical read speed alone makes it slow, and that on an SSD it checks every sector’s physical integrity. On a drive with a marginal head or a growing reallocation count that workload is often the last thing it does.
When the drive tests clean and the error persists
- Test the same drive on a different machine. If the error does not follow it, you have a host problem, not a drive problem.
- Check the power supply on a desktop with several drives. Marginal 12V rails produce intermittent device failures that look exactly like dying disks.
- On a laptop, check for a swollen battery pressing on the drive assembly or its connector.
- Look for a filter driver in the path. Backup, encryption and endpoint products all sit between the file system and the disk, and a failure inside one surfaces as a device error.
- If the fault only appears under sustained load, treat it as thermal until proven otherwise and watch the drive temperature during a long copy.
Getting data off a device that is still returning errors
- Stop using it for anything else. Every additional read is a read the drive may not survive.
- Attach it to a working machine as a secondary device, so nothing is trying to boot from it or index it.
- Image it sector by sector with a tool that retries and skips, rather than copying files one at a time.
- Mount the image and recover from that. Files that failed on the original often read cleanly from an image taken while the drive still cooperated.
- Only then decide whether the original is worth a professional recovery attempt. That decision gets more expensive every time the drive is powered on.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x8007045D |
ERROR_IO_DEVICE (1117): the request could not be performed because of an I/O device error | Microsoft Learn |
0x80070017 |
ERROR_CRC (23): data error, cyclic redundancy check. What came back did not match its checksum | Microsoft Learn |
0x8007001F |
ERROR_GEN_FAILURE (31): a device attached to the system is not functioning | Microsoft Learn |
0x8007001D |
ERROR_WRITE_FAULT (29): the system cannot write to the specified device | Microsoft Learn |
0x80070571 |
ERROR_DISK_CORRUPT (1393): the disk structure is corrupted and unreadable | Microsoft Learn |
Confirm the fix worked
- Copy a large file to and from the device and confirm it completes without an error.
chkdsk X: /scanreports the volume clean.Get-PhysicalDiskreports HealthStatus Healthy and OperationalStatus OK for that device.- The vendor diagnostic reports no uncorrectable errors and no growth in reallocated sectors.
- After a day of normal use, the System log holds no new entries from the disk source for that device.
Questions people ask about this
Can I recover the data?
Often, if you act before running repairs. Image the drive to healthy storage first and work on the image. If the drive is already refusing most reads, stop and decide whether the data justifies a professional attempt, because every further read attempt on failing hardware reduces the odds.
Do I need to buy software to fix this?
No licence fixes a device I/O error. The diagnostics are free from the drive vendor and the repair tools ship with Windows. Money enters this only as a replacement drive, or as a recovery service when the data is worth more than the hardware.
Why does it only fail on one large file?
Because the unreadable sectors happen to lie under that file. The rest of the volume reads normally, which is why everything else copies. It is still a statement about the drive rather than about the file, so check the drive properly instead of skipping the file.
Setup fails with this on a brand new drive. Is the drive faulty?
Possibly, but rule out the easy things first. Rewrite the installation media on a different stick, verify the download hash, and connect the drive directly. New drives do fail; cheap USB sticks and marginal cables fail far more often.
What is the difference between 0x8007045D and 0x80070571?
The first is the device saying it could not do what was asked. The second, ERROR_DISK_CORRUPT, is Windows saying the structure on the disk is unreadable. The first is usually hardware and the second is usually the file system, which is why they lead to different tools.
