Event
DavidGreaves (Talk | contribs) (A day in the life of an Event) |
Latest revision as of 08:49, 26 March 2008
[edit] What do the 'Events' actually represent and what do they mean for RAID0, RAID1, RAID5 etc?
An 'event' is one of:
- switch from 'active' to 'clean'
- switch from 'clean' to 'active'
- device fails
- device is added
- spare replaces a failed device after a rebuild
Notice a normal read/write is not an event.
None of these are meaningful for RAID0, so the 'events' counter on RAID0 should be stable.
Unfortunately, the number looks like a decimal but isn't. It is a 64bit number. We print out the top 32 bits, a period and then the bottom 32 bits. Maybe it'll be 'fixed' someday...
[edit] How are they calculated?
Normally:
events = events + 1;
The event count on a drive is set to zero on creation and reset to the majority on a resync or a forced assembly.
[edit] What are they for?
When an array is assembled, all the disks should have the same number of events. If they don't then something odd happened.
eg: If one drive fails then the remaining drives have their event counter incremented. When the array is re-assembled the failed drive has a different event count and is not included in the assembly.