From: Michael Tokarev <mjt@tls.msk.ru>
To: Neil Brown <neilb@suse.de>
Cc: David Greaves <david@dgreaves.com>, 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 08:51:40 +0000 [thread overview]
Message-ID: <46442E9C.3050603@msgid.tls.msk.ru> (raw)
In-Reply-To: <17987.51381.756955.577977@notabene.brown>
Neil Brown wrote:
[]
>> 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.
This is in fact an.. interesting issue.
Suppose I pulled the USB cable of sdb -- the WRONG one -- by a mistake.
I noticed this immediately (since the led on the disk stopped lighting),
and plugged the cable back again. There was no write requests to the
array during this time, there was no ANY requests to it at all, it was
completely idle.
But.
The unplug immediately triggers USB device removal. But md subsystem still
holds a reference to (now orphan) sdb. So upon plugging it back, since
sdb is busy, scsi subsystem (which handles USB disks) grabs first available
sdX device, let's say it'll be sdp.
So we've orphan sdb which is "in use" by the array, and fresh new sdp,
which is unused but contains the orphaned array component.
And there's no way to hot-re-add sdp to the array (there's nothing to do
to the array itself!) but.. to powercycle the machine! Because on
hot-remove, event count will be updated on the still-plugged-in device
(sda let it be), and upon hot-add, md will start resyncing. Oh well...
(the only help from md subsystem here is in case if it is using bitmaps,
but that's different issue.)
> 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.
The question now isn't about decision anymore. The question is now
about a possibility to implement that decision.
/mjt
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2007-05-11 8:51 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
2007-05-11 8:51 ` Michael Tokarev [this message]
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=46442E9C.3050603@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--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 \
--cc=neilb@suse.de \
/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).