Am 13.08.2018 um 18:45 schrieb Wol's lists: > On 13/08/18 11:56, Reindl Harald wrote: >> "Two threads writing with O_DIRECT io to the same address could result >> in different data on the two devices" makes no sense - everything talks >> with the RAID1 layer which is a block-device and expected to have alway >> the same data on both mirrors - O_DIRECT don't bypass the RAID layer >> because it even don't know about the phyiscal disks underneath >> >> if what ever workload (except a hard crash) leads to different data it's >> a bug which should be fixed better sooner than later > > Sounds to me like it's worse than that - IN NORMAL OPERATION it sounds > like it could return different data from different reads of the same > section of the file! > > What's it called - "the principle of least surprise"? > > If I write to block 658 of the raid-1, then surely it should be written > to block 658 (plus house keeping offset) of *both* underlying devices. > Otherwise you need a translation layer to say which raid block is which > device block on which raid device. Of course, that could be the > bad-blocks layer. > > And if that translation layer is messed up, then you get a corrupt raid. > > That's a point, though. Does the raid we are discussing have a bad > blocks layer? "we" don't discuss a specific existing RAID i am simly shocked that people try to tell that there are normal OS operations far away from bad drives which may result in both pairs of a RAID1 don't contain the same data when i read something like "It might be expected behaviour with async direct IO. Two threads writing with O_DIRECT io to the same address could result in different data on the two devices" makes me somehow puke because when that is true mariadb with "innodb_flush_method = O_DIRECT" may read back different data after one of the two or more RAID1 devices fails which is the opposite RAID1 is used for