From: "John Stoffel" <john@stoffel.org>
To: "G.W. Kant - Hunenet B.V." <g.w.kant@hunenet.nl>
Cc: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>,
"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
"yukuai@fygo.io" <yukuai@fygo.io>
Subject: Re: Subject: RFC: Read repair for md RAID1 after mirror read failures
Date: Wed, 15 Jul 2026 12:27:50 -0400 [thread overview]
Message-ID: <27223.46342.543928.404779@quad.stoffel.home> (raw)
In-Reply-To: <cff97a09-ee38-4785-9a45-1fd562fbaf5e@hunenet.nl>
>>>>> "G" == "G W Kant <- Hunenet B.V." <g.w.kant@hunenet.nl>> writes:
> 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.
So you have to also think of other situations. You have a RAID1
array, and one block gets corrupted, but is still readable. How do
you tell which block is the proper one? You need checksums or parity
or more copies to check against for consistency.
It's not a simple problem. For long term archiving, I would try to
use something with RAID6 or more, and ideally have a filesystem which
also checksums data. This is what ZFS does, and which bcachefs does
as well, but since they're both out of kernel, I don't use either with
my current home linux setup.
But for long term storage, that could be the way to go. but then you
need to periodically scrub your data, which means reading it all,
checking the checksums and re-writing and fixing corruption.
> 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.
You really need three or more disks with multiple parity and checksums
for long term storage.
> 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
next prev parent reply other threads:[~2026-07-15 16:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 2:52 Subject: RFC: Read repair for md RAID1 after mirror read failures G.W. Kant - Hunenet B.V.
2026-07-15 5:27 ` Abd-Alrhman Masalkhi
2026-07-15 7:10 ` G.W. Kant - Hunenet B.V.
2026-07-15 7:27 ` Yu Kuai
2026-07-15 11:24 ` G.W. Kant - Hunenet B.V.
2026-07-15 17:53 ` Abd-Alrhman Masalkhi
2026-07-15 14:13 ` G.W. Kant - Hunenet B.V.
2026-07-15 16:27 ` John Stoffel [this message]
2026-07-15 17:01 ` Dragan Milivojević
2026-07-15 17:41 ` Abd-Alrhman Masalkhi
2026-07-15 18:04 ` Abd-Alrhman Masalkhi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27223.46342.543928.404779@quad.stoffel.home \
--to=john@stoffel.org \
--cc=abd.masalkhi@gmail.com \
--cc=g.w.kant@hunenet.nl \
--cc=linux-raid@vger.kernel.org \
--cc=yukuai@fygo.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox