On 2020-12-30 14:58, Andy Smith wrote:
You can see the event count with:
# mdadm --examine /dev/sda1 # or whatever the member device is
So yes in one way your idea that the most recently modified half is
the one chosen could be said to be correct, if by "most recently
modified" you actually mean "most number of events".
As you were thinking, it is pretty safe to do if you never write to
the device you take out.
Thanks for introducing me to the "event count" concept. But when I look
at the event counts of my RAID1 disks, I get confused: the event count
seems to not increase in normal use, except that once in a while it
temporarily increments by one and then decrements back again a moment later:
root@nuser:~# while :; do mdadm --examine /dev/sda2 |grep "Events :";
sleep 3; done
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17116
Events : 17117
Events : 17116
Events : 17116
Events : 17116
The value has been 17116 or 17117 for several days. This is the root
partition and it is regularly written to (that partition has a
mailserver queue directory and /var/log and ...).
So if it really uses that count to determine synchronization, then I
don't see how it can work.
On the other hand, the timestamp value is updated "all the time".
--
Jesper Dybdal
https://www.dybdal.dk