On Sat, 29 Nov 2014 15:26:52 +0000 pg@xxxxxxxxxxxxxxxxxxxx (Peter Grandi) wrote: > [ ... ] > > > During a resync (after an unclean shutdown) the devices are > > indistinguishable. RAID1 reads all drives and if there is a > > difference it chooses one data block to write to the others - > > always the one with the lowest index number. > > Uhhhhh "indistinguishable" and "lowest index number"? > > Shouldn't that be "lowest index number among those with the > highest event count"? > > Put another way, couldn't it happen that in a 5-way RAID1 for > example an unclean shutdown results in 2 drives with the same > highest event count and 3 drives with lower event counts, and > then the data page to write is that from the one of the 2 with > the lowest index number and is written only to the 3 with the > lower event count? > > Also, in case of an «unclean shutdown» resulting in all members > of a RAID1 set having the same event count, is the resync still > done? Is it necessary? Or is «unclean shutdown» used here as an > alias for "not all event counts are the same". > > I am asking as to what RAID1 actually does mostly, but also > perhaps as to what it ought to be doing. I've told you what it actually does. I think that is what it ought to do. If you think that maybe it ought to do something differently from what it does, I suggest you try to come up with a specific scenario where what actually happens is not optimal, and give clear reasons for why you think something else is optimal. To be specific, after an unclean shutdown, the array is assembled from all devices which have an uptodate event count, and then all blocks are compared and where a difference is found, data is copies from the lowest index number block to the others. "uptodate" in the context of event counts means the event count is equal to, or one less than, the highest event count found. NeilBrown
Attachment:
pgp0tkhPiRjHD.pgp
Description: OpenPGP digital signature