From: NeilBrown <neilb@suse.de>
To: Jim Schatzman <james.schatzman@futurelabusa.com>
Cc: Mike Hartman <mike@hartmanipulation.com>, linux-raid@vger.kernel.org
Subject: Re: RAID showing all devices as spares after partial unplug
Date: Mon, 19 Sep 2011 09:08:31 +1000 [thread overview]
Message-ID: <20110919090831.6464a1eb@notabene.brown> (raw)
In-Reply-To: <20110918011749.98312581F7A@mail.futurelabusa.com>
[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]
On Sat, 17 Sep 2011 19:16:50 -0600 Jim Schatzman
<james.schatzman@futurelabusa.com> wrote:
> Mike-
>
> I have seen very similar problems. I regret that electronics engineers cannot design more secure connectors. eSata connector are terrible - they come loose at the slightest tug. For this reason, I am gradually abandoning eSata enclosures and going to internal drives only. Fortunately, there are some inexpensive RAID chassis available now.
>
> I tried the same thing as you. I removed the array(s) from mdadm.conf and I wrote a script for "/etc/cron.reboot" which assembles the array, "no-degraded". Doing this seems to minimize the damage caused by drives prior to a reboot. However, if the drives are disconnected while Linux is up, then either the array will stay up but some drives will become stale or the array will be stopped. The behavior I usually see is that all the drives that went offline now become "spare".
>
> It would be nice if md would just reassemble the array once all the drives come back online. Unfortunately, it doesn't. I would run mdadm -E against all the drives/partitions, verifying that the metadata all indicates that they are/were part of the expected array. At that point, you should be able ro re-create the RAID. Be sure you list the drives in the correct order. Once the array is going again, mount the resulting partitions RO and verify that the data is o.k. before going RW.
mdadm certainly can "just reassemble the array once all the drives come ...
online".
If you have udev configured to run "mdadm -I device-name" when a device
appears, then as soon as all required devices have appeared the array will be
started.
It would be good to have better handling of "half the devices disappeared",
particular if this is notice while trying to read or while trying to mark the
array "dirty" in preparation for write.
If it happens during a real 'write' it is a bit harder to handle cleanly.
I should add that to my list :-)
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
prev parent reply other threads:[~2011-09-18 23:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAB=7dhk0AV1dKL2cngt1eZXJwCVrfixfLE5z=J1i-7tqdL-6QA@mail.gmail.com>
2011-09-17 20:39 ` RAID showing all devices as spares after partial unplug Mike Hartman
2011-09-17 22:16 ` Mike Hartman
[not found] ` <CAB=7dhmFQ=Rtagj2j_22cnoS0A2yoKvJgaTM+ZiqDBqhPRooDQ@mail.g mail.com>
2011-09-18 1:16 ` Jim Schatzman
2011-09-18 1:34 ` Mike Hartman
[not found] ` <CAB=7dh=PymkpqRLTWiNzD-+n=XwEWnPN8nQwXg1=UmiJmZ1b1w@mail.g mail.com>
2011-09-18 2:57 ` Jim Schatzman
2011-09-18 3:07 ` Mike Hartman
[not found] ` <CAB=7dh=9UcEWJjLbOvPLu1Ubij0X4i6+SQ-6L9VE5gHLvcJVcw@mail.gmail.com>
2011-09-18 3:59 ` Mike Hartman
2011-09-18 13:23 ` Phil Turmel
2011-09-18 16:07 ` Mike Hartman
2011-09-18 16:18 ` Phil Turmel
[not found] ` <20110920010054.8DFFE581F7A@mail.futurelabusa.com>
2011-09-20 4:33 ` Phil Turmel
2011-09-18 23:08 ` NeilBrown [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=20110919090831.6464a1eb@notabene.brown \
--to=neilb@suse.de \
--cc=james.schatzman@futurelabusa.com \
--cc=linux-raid@vger.kernel.org \
--cc=mike@hartmanipulation.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 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).