On Wed, Apr 7, 2010 at 16:21, Michael Evans <mjevans1983@xxxxxxxxx> wrote: > It sounds like the last 'synced' time should be tracked, as well as > the last modification time. If the two differ then it can be known > that the contents has diverged since last sync. I have perhaps a better solution: Every time an event happens that could affect the coherency of the components of an array (i.e. started, stopped, disk failed), a counter is incremented on all of the components. Then a random number is written next to it (same number to all disks). On assembling an array: For all components in the array, find the highest counter. If enough disks with this counter are present and contain the same random number, the it starts the array, and if a rebuild is necessary to regain parity or the specified number of mirrors, the remaining components of the same array are consumed for this purpose. If there are multiple randoms present for this highest counter, then the last modification time can be used to choose the most up to date one. It comes online, and overwrites the components with the older modification time, or maybe it just prompts the admin, and starts degraded. This would catch the problem originally reported by Phillip because the random numbers written to the components' headers would have been written at different times, and so they would be different. mdadm would know by this that they had diverged regardless of any timestamp or counter. -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html