Thread (2 messages) 2 messages, 2 authors, 2020-07-16

Programmatically check "global" RAID state?

From: Ian Pilcher <hidden>
Date: 2020-07-16 13:38:32

I want to write a quick script/program for my NAS that will initiate a
check of one of my RAID devices every night.  However, I want it to skip
the check if either of the following is true:

* Another check/resync is in process on any RAID device, or

* Any of the RAID devices on the system are unhealthy (degraded or
  failed).

Is there any way to programmatically check the "global" status of the
RAID subsystem like this, or am I stuck iterating through all of the
devices (likely via sysfs) and checking them individually?  (I'm pretty
sure that I am "stuck" but wanted to check just in case.)

Thanks!

-- 
========================================================================
                 In Soviet Russia, Google searches you!
========================================================================
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help