On Tue, Apr 6, 2021 at 12:14 AM antlists [off-list ref] wrote:
(I don't understand it, but if a system crashes in the middle
of a raid-5 write it can apparently mess things up something horrid).
Short version is that the disks making up a RAID stripe don't always
get written simultaneously. If things crash just wrong, you can get
half the stripe with old data, half the stripe with new data, and no
way to tell which is which. A journal fixes this by writing the data
twice: first to the journal, then to the array. If the system crashes
while writing to the journal, you've still got the entire old data on
the array; if it crashes while writing to the array, you've got the
entire new data on the journal. You're never in an inconsistent
half-and-half situation.
--
Mark