Tweak Windows to not retry forever when reading a failing HDD sector

0

0

How to configure Windows to perform better with a failing HDD?

When a program tries to read a file from a failing HDD sector, it eventually receives The request could not be performed because of an I/O device error. However, when it tries to close the handle, this request hangs forever and the process cannot be killed:

C:\>type D:\keep\dontindex\bad\y.dat >nul
The request could not be performed because of an I/O device error

Is this tweakable? HDDs fail and the goal is not having to hard-reset the PC when this happens.

enter image description here

basin

Posted 2019-08-12T13:39:29.763

Reputation: 394

Just an opinion, but the best way to solve this issue is to replace the hard drive. – Anaksunaman – 2019-08-12T19:03:38.450

Answers

0

First off, I would advise to change the harddisk while it still work.

For your question you have to run chkdsk with /F to enable Windows to mark which sector are defect to prevent read/write onto those sector, so you don't have to tweak anything, that will make your Windows stop using those sectors.

C:\>chkdsk /? Checks a disk and displays a status report.

CHKDSK [volume[[path]filename]]] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]] [/B]

  volume          Specifies the drive letter (followed by a colon),
                  mount point, or volume name.   filename        FAT/FAT32 only: Specifies the files to check for fragmentation.   /F   Fixes errors on the disk.   /V              On FAT/FAT32: Displays the full path and name of every file
                  on the disk.
                  On NTFS: Displays cleanup messages if any.   /R              Locates bad sectors and recovers readable information
                  (implies /F).   /L:size         NTFS only:  Changes the log file size to the specified number
                  of kilobytes.  If size is not specified, displays current
                  size.   /X              Forces the volume to dismount first if necessary.
                  All opened handles to the volume would then be invalid
                  (implies /F).   /I              NTFS only: Performs a less vigorous check of index entries.   /C              NTFS only: Skips checking of cycles within the folder
                  structure.   /B              NTFS only: Re-evaluates bad clusters on the volume
                  (implies /R)

The /I or /C switch reduces the amount of time required to run Chkdsk by skipping certain checks of the volume.

yagmoth555

Posted 2019-08-12T13:39:29.763

Reputation: 258