From: Dave W <dave+gmane@wuertele.com>
To: linux-raid@vger.kernel.org
Subject: Re: How does kernel decide that a drive is "spare"?
Date: Fri, 11 Jun 2010 06:51:00 +0000 (UTC) [thread overview]
Message-ID: <loom.20100611T083659-954@post.gmane.org> (raw)
In-Reply-To: C2.E9.26996.922D11C4@cdptpa-omtalb.mail.rr.com
Leslie Rhorer <lrhorer <at> satx.rr.com> writes:
> Any failed drives are moved to spare status. Issue the `mdadm -D
> /dev/mdX` command, and it will probably show 3 failed drives.
You are correct.
> > Why are three drives assumed to be spares?
>
> It's not assumed. If was almost surely forced by md / mdadm.
Is there any way to get md or mdadm to tell me how it is making this decision?
If I run "mdadm -Afv /dev/md0 /dev/sd[bcdef]1" I see this in messages:
Jun 11 07:22:10 fileserver kernel: md: md0 stopped.
Jun 11 07:22:10 fileserver kernel: md: unbind<sdd1>
Jun 11 07:22:10 fileserver kernel: md: export_rdev(sdd1)
Jun 11 07:22:10 fileserver kernel: md: unbind<sdb1>
Jun 11 07:22:10 fileserver kernel: md: export_rdev(sdb1)
Jun 11 07:22:10 fileserver kernel: md: unbind<sdc1>
Jun 11 07:22:10 fileserver kernel: md: export_rdev(sdc1)
Jun 11 07:22:10 fileserver kernel: md: unbind<sdf1>
Jun 11 07:22:10 fileserver kernel: md: export_rdev(sdf1)
Jun 11 07:22:10 fileserver kernel: md: unbind<sde1>
Jun 11 07:22:10 fileserver kernel: md: export_rdev(sde1)
Jun 11 07:22:27 fileserver kernel: md: md0 stopped.
Jun 11 07:22:27 fileserver kernel: md: bind<sde1>
Jun 11 07:22:27 fileserver kernel: md: bind<sdf1>
Jun 11 07:22:27 fileserver kernel: md: bind<sdc1>
Jun 11 07:22:27 fileserver kernel: md: bind<sdb1>
Jun 11 07:22:27 fileserver kernel: md: bind<sdd1>
All the ATA and SCSI messages in the log appear normal -- there are no warnings
or errors that I can see.
> No doubt at least one of the drives probably has enough
> info on hand to be able to recover most if not all of the information. You
> should be able to force assemble (-A -f) the array using at least 4 drives,
> or perhaps all six.
I tried all combinations of three out of the five drives, but at most two
drives ever get used:
# mdadm -Af /dev/md0 /dev/sd[de]1
mdadm: /dev/md0 assembled from 2 drives - not enough to start the array.
# mdadm -Af /dev/md0 /dev/sd[bcd]1
mdadm: /dev/md0 assembled from 1 drive and 2 spares - not enough to start the \
array.
# mdadm -Af /dev/md0 /dev/sd[bce]1
mdadm: /dev/md0 assembled from 1 drive and 2 spares - not enough to start the \
array.
# mdadm -Af /dev/md0 /dev/sd[bcf]1
mdadm: No suitable drives found for /dev/md0
# mdadm -Af /dev/md0 /dev/sd[cde]1
mdadm: /dev/md0 assembled from 2 drives and 1 spare - not enough to start the \
array.
# mdadm -Af /dev/md0 /dev/sd[cdf]1
mdadm: /dev/md0 assembled from 1 drive and 2 spares - not enough to start the \
array.
# mdadm -Af /dev/md0 /dev/sd[def]1
mdadm: /dev/md0 assembled from 2 drives and 1 spare - not enough to start the \
array.
Thanks for the advice,
Dave
prev parent reply other threads:[~2010-06-11 6:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 5:18 How does kernel decide that a drive is "spare"? Dave W
2010-06-11 6:05 ` Leslie Rhorer
2010-06-11 6:51 ` Dave W [this message]
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=loom.20100611T083659-954@post.gmane.org \
--to=dave+gmane@wuertele.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