All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about potential data consistency issues when writes failed in mdadm raid1
@ 2023-03-15 18:06 Ronnie Lazar
  2023-03-17 20:58 ` John Stoffel
  0 siblings, 1 reply; 8+ messages in thread
From: Ronnie Lazar @ 2023-03-15 18:06 UTC (permalink / raw)
  To: linux-raid; +Cc: Asaf Levy

Hi,

I'm trying to understand how mdadm protects against inconsistent data
read in the face of failures that occur while writing to a device that
has raid1.
Here is the scenario:
I have set up raid1 that has 2 mirrors. First one is on local storage
and the second is on remote storage.  The remote storage mirror is
configured with write-mostly.

We have parallel jobs: 1 writing to an area on the device and the
other reading from that area.
The write operation writes the data to the first mirror, and at that
point the read operation reads the new data from the first mirror.
Now, before data has been written to the second (remote) mirror a
failure has occurred which caused the first machine to fail, When the
machine comes up, the data is recovered from the second, remote,
mirror.

Now when reading from this area, the users will receive the older
value, even though, in the first read they got the newer value that
was written.

Does mdadm protect against this inconsistency?

Regards,
Ronnie Lazar

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-20 13:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 18:06 Question about potential data consistency issues when writes failed in mdadm raid1 Ronnie Lazar
2023-03-17 20:58 ` John Stoffel
2023-03-19  9:13   ` Asaf Levy
2023-03-19  9:55     ` Geoff Back
2023-03-19 11:31       ` Asaf Levy
2023-03-19 12:45         ` Geoff Back
2023-03-19 14:34           ` Asaf Levy
2023-03-20 13:52         ` John Stoffel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.