linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Ian Pilcher <arequipeno@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Inoperative array shown as "active"
Date: Sat, 14 Sep 2013 15:59:12 +1000	[thread overview]
Message-ID: <20130914155912.5ba135d9@notabene.brown> (raw)
In-Reply-To: <l10sq0$e24$1@ger.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1261 bytes --]

On Sat, 14 Sep 2013 00:39:20 -0500 Ian Pilcher <arequipeno@gmail.com> wrote:

> I'm in the process of writing a program to monitor various aspects of
> my NAS.  As part of this effort, I've been simulating RAID disk failures
> in a VM, and I noticed something that seems very odd.
> 
> Namely, when a sufficient number of disks has been removed from a RAID-5
> or RAID-6 array to make it inoperable, the array is still shown as
> "active" in /proc/mdstat and "clean" in the sysfs array_state file.  For
> example:
> 
> md0 : active raid5 sde[3](F) sdd[2] sdc[1](F) sdb[0]
>       6286848 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/2] [U_U_]
> 
> (mdadm does show the state as "clean, FAILED".)
> 
> Is this the expected behavior?

Yes.

> 
> AFAICT, this means that there is no single item in either /proc/mdstat
> or sysfs that indicates that an array such as the example above has
> failed.  My program will have to parse the RAID level, calculated the
> number of failed members (if any), and determine whether that RAID level
> can survive that number of failures.  Is this correct?

Yes.

> 
> Anything I'm missing?

mdadm already does this for you. "mdadm --detail /dev/md0".

NeilBrown

> 
> Thanks!
> 


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2013-09-14  5:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-14  5:39 Inoperative array shown as "active" Ian Pilcher
2013-09-14  5:59 ` NeilBrown [this message]
2013-09-14  6:25   ` Ian Pilcher

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=20130914155912.5ba135d9@notabene.brown \
    --to=neilb@suse.de \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).