Thread (6 messages) 6 messages, 2 authors, 2020-11-19

Re: Events Counter - How it increments

From: heming.zhao@suse.com <hidden>
Date: 2020-11-18 16:46:03

On 11/10/20 10:24 PM, Jorge Fábregas wrote:
Hi everyone,

I'm new to Linux RAID. I've searched for a clear explanation on this but
couldn't find it.

How does the "Events" counter (as shown with mdadm --examine) gets
incremented? On what sort of events?

I was initially confused about the "Events" (thinking on the different
events as reported by mdadm --monitor) but I see this is another thing.
I've seen explanations about it incrementing after performing writes but
I've done some test writes and I don't see the counters changing at all
on my RAID1 arrays.  I've also seen explanations that it increments
whenever there are changes to the superblock?

Thank you.
The events is related with (struct mddev) mddev->events. 
you can search it in kernel source code.

and the 'events' is also recorded in md metadata area, with struct:
struct mdp_superblock_1 {
   ... ...
   __le64  events;     /* incremented when superblock updated */
   ... ...
};
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help