Monitoring the hard drive is the best option.
You can start with SMART monitoring. SMART stands for Self Monitoring and Repairing Tool. Particularly disks with high ECC (error correcting codes) should be replaced because those weak sectors will eventually fail.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 114 100 006 Pre-fail Always - 61609160
3 Spin_Up_Time 0x0003 093 092 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 195
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 085 060 030 Pre-fail Always - 4648073590
9 Power_On_Hours 0x0032 077 077 000 Old_age Always - 20551
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 32
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 099 000 Old_age Always - 6 6 12
189 High_Fly_Writes 0x003a 061 061 000 Old_age Always - 39
190 Airflow_Temperature_Cel 0x0022 061 045 045 Old_age Always In_the_past 39 (Min/Max 33/55)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 0
193 Load_Cycle_Count 0x0032 039 039 000 Old_age Always - 122569
194 Temperature_Celsius 0x0022 039 055 000 Old_age Always - 39 (0 21 0 0 0)
195 Hardware_ECC_Recovered 0x001a 114 100 000 Old_age Always - 61609160
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 253 000 Old_age Offline - 9421h+55m+42.115s
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 36542577472
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 2583422390857
195 Hardware_ECC_Recovered, here the drive read a sector the ECC data told it the sector was wrong and it recovered it. Also note the Raw_read_Error_Rate and Seek_Error_Rate. It's generally not important how many you have, but how fast the number increases. However, on bad drives these can easily reach into the millions or even billions. If your drive gets that high, replace it. Every time it has to do an ECC recovery the drive read speed slows down, and when you have millions the drive will really start to lag.
Quoting from Hard Drive ECC Errors! - Memofix's Data Recovery Blog:
When a hard drive reads a sector of data, it also reads a 50 byte ECC
code that resides just after the real data. When the data was 1st
written to the sector it ran a sophisticated algorithm on the 512
bytes of sector data and this resulted in a unique ECC code which can
only be replicated by reading the exact same data. When a sector is
read later, the drive attempts to validate the data by running the
same algorithm on the data and comparing it to the previously stored
ECC code. If the code doesn’t match, the disk drive produces an error
code and prevents the transfer of the data. The hard drive will
normally attempt to re-read the data up to 10 times as it tries to
match the ECC code and this process slows the drive down considerably.
The ECC is a complex mathematical formula that can detect and correct bad sectors.
Refreshing the surface refers to reading the drive in small blocks of sectors and rewriting those blocks with the same contents, verifying they are all ok. Some software adds additional tricks like inverting all the data, writing to the drive re-reading and then inverting it again, to ensure all the sectors are in working order.
Every couple months refreshing the surface with something like SpinRite from grc.com.
A program called Victoria from http://hdd.by will give you timing for the surface of the disk.
The more sectors that take longer to read, the worst off it is.
Above: You see clear signs that the drive is aging because there are so many green blocks; a brand new drive would almost entirely be in the lightest gray region with a few 100 in the 100 region (medium gray).
Finally, Parity files.
This will generate repair files that will allow you to repair bad sectors in a given file.
The higher the percentage of parity data, the worse the error it can repair.
However, it shouldn't require much data to handle a few 100 bad sectors.
I don't know the exact ratio, but someone else here probably does.
Here you add the files you want to protect, set the protection level (2% should be enough for these purposes), and click create.
Here's the resulting PAR files totaling about 75 MB:
Here I intentional destroyed 10000 sectors (count=10000)
bs is block size of 512.
dd conv=notrunc if=/dev/zero of="Windows 10 64 16299.15.iso" bs=512 count=10000 seek=1
A mere 2% PAR data was able to recover at least 10,000 bad block 512 bytes per block.
What is parity data?
While this article covers it briefly:
It is also a formula that very smart people developed to correct errors.
When the parity program is run it generates these extra recovery bits.
It's based on XOR.
I have included some screen captures of QuickPAR, but WinRAR also has this ability. See here:
Under "Options" you can set the percentage of recovery data;
2% should be enough to protect against bad sectors.
If you have 10,000 bad sectors, you need to replace the hard drive ASAP.
RAID 5/6 have to protect against one or two whole disks failing,
so this percentage is orders of magnitude higher.