Is there a way I can create ECC data for hard disk files?

Yes, these are called parity files. There are various utilities to create these kinds of files, such as Parchive and PAR2.

These utilities will generally let you choose how much parity data you wish to generate. The more parity data, the greater your ability to recover files. Disk space is the trade-off.


This sounds kind of like ZFS's checksumming and RAID-Z. I don't think anything exactly like this exists at the drive level, but there are tools (mentioned above) at the file level.