Re: Subject: RFC: Read repair for md RAID1 after mirror read failures

"G.W. Kant - Hunenet B.V." <[email protected]>
Newsgroups gmane.linux.raid
Message-ID <[email protected]>
Hi Abd,

On 7/15/26 7:27 AM, Abd-Alrhman Masalkhi wrote:
>> With today's 18–24 TB HDDs and backup/archive workloads, where data may
>> remain unchanged for years, latent media degradation seems increasingly
>> relevant. A successful read from the alternate mirror may be one of the
>> last opportunities to refresh such a sector before it becomes
>> permanently unreadable.
>>
> And Check/Repair is the right defense for cold archival data on large
> drives.


I have been looking into your suggestion that periodic check/repair is 
the appropriate defense for cold archival data on large drives.

Before I start reading the resync code, I would like to make sure I 
understand what repair actually does.

Suppose all mirrors read successfully and contain identical data. In 
other words, there are no read errors and no mismatches.

Does repair simply verify the data and move on, or does it also rewrite 
each successfully read block to the corresponding LBA on every mirror?

The distinction is important for what I have in mind.

My concern is not recovery from an existing read error—that is already 
handled by fix_read_error()—but rather the long-term aging of cold 
magnetic recordings.

If a sector is still readable today but is approaching the point where 
the drive's ECC will eventually no longer be able to reconstruct it, 
then a successful rewrite would effectively establish a new "write time" 
for that sector. If the drive can no longer reliably store the data at 
that location, the rewrite would also give the firmware an opportunity 
to remap the sector.

So my question is essentially:

Does repair perform such a rewrite of successfully read blocks, or does 
it only rewrite blocks when a read error or mismatch has already been 
detected?

Regards,

Dion
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.