调整 Windows,使其在读取故障 HDD 扇区时不再重试

调整 Windows,使其在读取故障 HDD 扇区时不再重试

如何配置 Windows 以使其在出现故障的 HDD 时表现更好?

当程序尝试从故障的 HDD 扇区读取文件时,它最终会收到The request could not be performed because of an I/O device error。但是,当它尝试关闭句柄时,此请求将永远挂起,并且无法终止该进程:

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

这可以调整吗?硬盘出现故障时,目标是不必硬重置 PC。

在此处输入图片描述

答案1

首先,我建议在硬盘还能工作的时候更换它。

对于您的问题,您必须运行带有 /F 的 chkdsk 以使 Windows 能够标记哪些扇区有缺陷以防止读/写这些扇区,因此您不必调整任何东西,这将使您的 Windows 停止使用这些扇区。

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.

相关内容