From: Neil Brown <neilb@suse.de>
To: David Greaves <david@dgreaves.com>
Cc: Bernd Schubert <bs@q-leap.de>,
linux-raid@vger.kernel.org,
linux-hotplug-devel@lists.sourceforge.net,
416512@bugs.debian.org
Subject: Re: removed disk && md-device
Date: Fri, 11 May 2007 11:36:53 +1000 [thread overview]
Message-ID: <17987.51381.756955.577977@notabene.brown> (raw)
In-Reply-To: message from David Greaves on Thursday May 10
On Thursday May 10, david@dgreaves.com wrote:
> Neil Brown wrote:
> > On Wednesday May 9, bs@q-leap.de wrote:
> >> Neil Brown <neilb@suse.de> [2007.04.02.0953 +0200]:
> >>> Hmmm... this is somewhat awkward. You could argue that udev should be
> >>> taught to remove the device from the array before removing the device
> >> >from /dev. But I'm not convinced that you always want to 'fail' the
> >>> device. It is possible in this case that the array is quiescent and
> >>> you might like to shut it down without registering a device failure...
> >> Hmm, the the kernel advised hotplug to remove the device from /dev, but you
> >> don't want to remove it from md? Do you have an example for that case?
> >
> > Until there is known to be an inconsistency among the devices in an
> > array, you don't want to record that there is.
> >
> > Suppose I have two USB drives with a mounted but quiescent filesystem
> > on a raid1 across them.
> > I pull them both out, one after the other, to take them to my friends
> > place.
> >
> > I plug them both in and find that the array is degraded, because as
> > soon as I unplugged on, the other was told that it was now the only
> > one.
> And, in truth, so it was.
So what was?
It is true that now one drive is "the only one plugged in", but is
that relevant?
Is it true that the one drive is "the only drive in the array"??
That depends on what you mean by "the array". If I am moving "the
array" to another computer, then the one drive still plugged into the
first computer is not "the only drive in the array" from my
perspective.
If there is a write request, and it can only be written to one drive
(because the other is unplugged), then it becomes appropriate to tell
the still-present drive that it is the only drive in the array.
>
> Who updated the event count though?
Sorry, not enough words. I don't know what you are asking.
>
> > Not good. Best to wait for an IO request that actually returns an
> > errors.
> Ah, now would that be a good time to update the event count?
Yes. Of course. It is an event (IO failed). That makes it a good
time to update the event count...... am I missing something here?
>
>
> Maybe you should allow drives to be removed even if they aren't faulty or spare?
> A write to a removed device would mark it faulty in the other devices without
> waiting for a timeout.
Maybe, but I'm not sure what the real gain would be.
>
> But joggling a usb stick (similar to your use case) would probably be OK since
> it would be hot-removed and then hot-added.
This still needs user-space interaction.
If the USB layer detects a removal and a re-insert, sdb may well come
back a something different (sdp?) - though I'm not completely familiar
with how USB storage works.
In any case, it should really be a user-space decision what happens
then. A hot re-add may well be appropriate, but I wouldn't want to
have the kernel make that decision.
NeilBrown
next prev parent reply other threads:[~2007-05-11 1:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-09 12:17 removed disk && md-device Bernd Schubert
2007-05-09 13:14 ` martin f krafft
2007-05-09 13:39 ` Bernd Schubert
2007-05-10 7:12 ` Neil Brown
2007-05-10 14:33 ` David Greaves
2007-05-11 1:36 ` Neil Brown [this message]
2007-05-11 8:51 ` Michael Tokarev
2007-05-11 9:22 ` Bernd Schubert
2007-05-11 20:39 ` Bill Davidsen
2007-05-15 9:52 ` Goswin von Brederlow
2007-05-11 8:52 ` David Greaves
2007-05-11 15:05 ` David Greaves
2007-05-11 20:50 ` David Greaves
2007-05-10 18:17 ` Bernd Schubert
2007-05-11 6:16 ` Neil Brown
2007-05-11 20:47 ` Bill Davidsen
2007-05-16 21:19 ` Colin McCabe
2007-05-09 21:41 ` Michael Tokarev
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=17987.51381.756955.577977@notabene.brown \
--to=neilb@suse.de \
--cc=416512@bugs.debian.org \
--cc=bs@q-leap.de \
--cc=david@dgreaves.com \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--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).