From: Ross Boylan <ross@biostat.ucsf.edu>
To: linux-raid@vger.kernel.org,
Sebastian Riemer <sebastian.riemer@profitbricks.com>
Cc: ross@biostat.ucsf.edu
Subject: Re: mdadm --fail doesn't mark device as failed?
Date: Wed, 21 Nov 2012 09:23:28 -0800 [thread overview]
Message-ID: <1353518608.5795.76.camel@corn.betterworld.us> (raw)
In-Reply-To: <50AD0B01.7020300@profitbricks.com>
On Wed, 2012-11-21 at 18:10 +0100, Sebastian Riemer wrote:
> On 21.11.2012 18:03, Ross Boylan wrote:
> > On Wed, 2012-11-21 at 17:53 +0100, Sebastian Riemer wrote:
> >> On 21.11.2012 17:17, Ross Boylan wrote:
> >>> After I failed and removed a partition, mdadm --examine seems to show
> >>> that partition is fine.
> >>>
> >>> Perhaps related to this, I failed a partition and when I rebooted it
> >>> came up as the sole member of its RAID array.
> >>>
> >>> Is this behavior expected? Is there a way to make the failures more
> >>> convincing?
> >> Yes, it is expected behavior. Without "mdadm --fail" you can't remove a
> >> device from the array. If you stop the array with the failed device,
> >> then the state is stored in the superblock.
> > I'm confused. I did run mdadm --fail. Are you saying that, in addition
> > to doing that, I also need to manipulate sysfs as you describe below?
> > Or were you assuming I didn't mdadm --fail?
>
> You only need to set the value in the "errors" sysfs file additionally
> to ensure that this device isn't used for assembly anymore.
>
> The kernel reports in "dmesg" then:
> md: kicking non-fresh sdb1 from array!
>
OK. So if I understand correctly, mdadm -fail has no effect that
persists past a reboot, and doesn't write to disk anything that would
prevent the use of the failed RAID component.(*) But if I write to
sysfs, the failure wil persist across reboots.
This behavior is quite surprising to me. Is there some reason for this
design?
Ross
(*) Also the different update or last use times either aren't recorded
or don't affect the RAID assembly decision. For example, in my case md1
included sda3 and sdc3. I failed sdc3, so that only sda3 had the most
current data. But when the system rebooted, md1 was assembled from sdc3
only.
next prev parent reply other threads:[~2012-11-21 17:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-21 16:17 mdadm --fail doesn't mark device as failed? Ross Boylan
2012-11-21 16:53 ` Sebastian Riemer
2012-11-21 17:03 ` Ross Boylan
2012-11-21 17:10 ` Sebastian Riemer
2012-11-21 17:23 ` Ross Boylan [this message]
2012-11-21 17:47 ` Sebastian Riemer
2012-11-21 19:41 ` Ross Boylan
2012-11-22 9:43 ` Sebastian Riemer
2012-11-22 10:07 ` Sebastian Riemer
2012-11-24 0:29 ` Ross Boylan
2012-11-21 19:52 ` Ross Boylan
2012-11-22 4:42 ` NeilBrown
2012-11-22 4:40 ` NeilBrown
2012-11-23 23:58 ` Ross Boylan
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=1353518608.5795.76.camel@corn.betterworld.us \
--to=ross@biostat.ucsf.edu \
--cc=linux-raid@vger.kernel.org \
--cc=sebastian.riemer@profitbricks.com \
/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.