On Sun, Dec 21, 2014 at 12:34 PM, constantine <costas.magn...@gmail.com> wrote: > Some months ago I had 6 uncorrectable errors. I deleted the files that > contained them and then after scrubbing I had 0 uncorrectable errors. > After some weeks I encountered new uncorrectable errors. > > Question 1: > Why do I have uncorrectable errors on a RAID-1 filesystem in the first place? > > Question 2: > How do I properly correct them? (Again by deleting their files? :( ) > > Question 3: > How do I prevent this from happening?
There are multiple kinds of uncorrectable errors so it depends on the exact error. If Btrfs is reporting uncorrectable errors, then that suggests both copies are bad. Whether md, LVM, or Btrfs raid, make sure the value for cat /sys/block/sdX/device/timeout is larger than the value reported by smartctl -l scterc /dev/sdX Not that units for the first command are seconds, the units for the second command are demiseconds. For the kernel to automatically fix bad sectors by overwriting them, the drive needs to explicitly report read errors. If the SCSI command timer value is shorter than the drive's error recovery, the SATA link might get reset before the drive reports the read error and then uncorrected errors will persist instead of being automatically fixed. -- Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html