From: NeilBrown <neilb@suse.de>
To: Benjamin ESTRABAUD <be@mpstor.com>
Cc: Linux-RAID <linux-raid@vger.kernel.org>
Subject: Re: mdadm --fail requires writeable drive.
Date: Thu, 14 Nov 2013 11:44:49 +1100 [thread overview]
Message-ID: <20131114114449.27f3c746@notabene.brown> (raw)
In-Reply-To: <52836DD1.8080605@mpstor.com>
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
On Wed, 13 Nov 2013 12:17:21 +0000 Benjamin ESTRABAUD <be@mpstor.com> wrote:
> Hi,
>
> I noticed that mdadm --fail will only work if a disk is present and is
> writeable.
>
> mdadm's Manage.c seems to first make sure the drive can be "stat"ed
> before proceeding (which will fail if the drive is gone), and then
> seemingly try to write "Faulty" to the drive's superblock as well as
> notifying MD of the drive failure.
>
> However, in many cases, a drive must be set faulty because it has gone
> offline. MD will do a very good job to set the drive faulty itself,
> provided that IOs are running on the array. If no IOs are running on the
> array, removing a drive and then trying to set it as failed will not
> work. Trying to "-r" the drive will also fail since the drive is not yet
> marked as failed, so deemed still in use.
>
> Looking through the code it seemed to me that MD could be told to fail a
> drive even if that drive was no longer present (the /dev/sdX device node
> file still is in this case), in the same way as remove works. Would that
> be possible? Am I missing something here?
Does
mdadm /dev/mdXX --fail detached
do what you want?
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-11-14 0:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 12:17 mdadm --fail requires writeable drive Benjamin ESTRABAUD
2013-11-14 0:44 ` NeilBrown [this message]
2013-11-14 17:33 ` Benjamin ESTRABAUD
2013-11-15 4:46 ` NeilBrown
2013-11-15 12:22 ` Benjamin ESTRABAUD
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=20131114114449.27f3c746@notabene.brown \
--to=neilb@suse.de \
--cc=be@mpstor.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).