Linux RAID mdadm: what does 'Events' mean?

5,638

It's actually 2 integers.

printf("\n         Events : %d.%d\n\n", sb->events_hi, sb->events_lo);

events_hi and events_lo are counters of the update events their sum is the total md events, the hi and lo (I ASSUME, without looking further into the code) represent the "significance" of the update.

Share:
5,638

Related videos on Youtube

Jaydee
Author by

Jaydee

After scraping through an engineering degree I spent a lot of my time working for accountants. I'm currently working for a Helicopter Charter Company where mobile web solutions are really useful. Most of my current expertise is with Delphi 7 / MySQL / Java / Tomcat with bits of PHP and all kinds of odds and sods.

Updated on September 18, 2022

Comments

  • Jaydee
    Jaydee over 1 year

    When I type

    mdadm --detail /dev/md0

    I get a lots of useful information most of which I understand. However I also get a line that reads:

    Events : 0.710

    Where the number varies.

    Naively, I thought an event either happened or it didn't. How can I have only 0.710 of an event? Or if you prefer why is "Events" not an integer value?

    EDIT

    After seeing user's answer below, I dug into the code a bit and found

    `#if __BYTE_ORDER == __BIG_ENDIAN

    144 __u32 events_hi; /* 7 high-order of superblock update count */

    145 __u32 events_lo; /* 8 low-order of superblock update count */

    ...

    148 #else

    149 __u32 events_lo; /* 7 low-order of superblock update count */

    150 __u32 events_hi; /* 8 high-order of superblock update count */

    ...

    153 #endif`

    So "Events" is high-order and low order of "superblock update count" https://raid.wiki.kernel.org/index.php/Superblock

  • Jaydee
    Jaydee almost 11 years
    Ah ha! So the .710 is 710 (presumably) low priority events. Many thanks for digging this out. I wonder if there is a list of "events_lo" type events (and indead events_hi) anywhere.