On Tue Feb 12, 2019 at 07:11:02PM +0000, Nix wrote: > On 10 Feb 2019, Harald Dunkel spake thusly: > > > On 1/27/19 12:21 AM, Nik.Brt. wrote: > >> > >> These mismatches happen, in raid1, but why they happen is not precisely known. There are a few ideas... and it is said that they are harmless in most cases (=outside of files). > >> The phenomenon happens a lot less if you have LVM over the raid1, and also this is not exactly known why. > > > > This is more than alarming. Do I put my data at risk using software RAID1? > > No, because the only situation in which they are known to happen is when > you have a powerdown or crash or similar event when the data has hit one > spindle and not the other. In this case, *either* content is valid: if > you get one, you could have got the other if the machine powered down a > fraction of a second earlier or later. All that matters is that the data > remains conssitent. > I think you're wrong there - my understanding is that mismatches on RAID1 are very common under certain circumstances, but (as far as I'm aware) don't cause any risk to data. >From what I recall of the details, unlike other RAID levels, RAID1 doesn't bother taking a copy of the buffer to be written (as it's going to write the same data to all drives anyway), which means the data can be changed between writes to the different disks. The mismatch only happens if there's no further write command issued after the change (otherwise the changed data would get rewritten to all disks), which means the data written won't be re-used. This is most common with swap, but can happen with other applications which write temporary data to disk. Cheers, Robin -- ___ ( ' } | Robin Hill <robin@xxxxxxxxxxxxxxx> | / / ) | Little Jim says .... | // !! | "He fallen in de water !!" |