All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Pilcher <arequipeno@gmail.com>
To: linux-raid@vger.kernel.org
Subject: Programmatically check "global" RAID state?
Date: Thu, 16 Jul 2020 08:38:32 -0500	[thread overview]
Message-ID: <repl8o$ggb$1@ciao.gmane.io> (raw)

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!
========================================================================

             reply	other threads:[~2020-07-16 13:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 13:38 Ian Pilcher [this message]
2020-07-16 13:54 ` Programmatically check "global" RAID state? Reindl Harald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='repl8o$ggb$1@ciao.gmane.io' \
    --to=arequipeno@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.