Event

From Linux Raid Wiki
Jump to: navigation, search

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...

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.

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.

Personal tools