linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Leon Woestenberg <leon.woestenberg@gmail.com>
Cc: Tejun Heo <htejun@gmail.com>, Ric Wheeler <ric@emc.com>,
	linux-raid@vger.kernel.org,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: libata hotplug and md raid?
Date: Thu, 14 Sep 2006 16:23:04 -0700	[thread overview]
Message-ID: <20060914232304.GB2616@suse.de> (raw)
In-Reply-To: <c384c5ea0609140524ofed0dd8v6f1b89a6b4d67f75@mail.gmail.com>

On Thu, Sep 14, 2006 at 02:24:45PM +0200, Leon Woestenberg wrote:
> Hello all,
> 
> On 9/13/06, Tejun Heo <htejun@gmail.com> wrote:
> >Ric Wheeler wrote:
> >> Leon Woestenberg wrote:
> >>> In short, I use ext3 over /dev/md0 over 4 SATA drives /dev/sd[a-d]
> >>> each driven by libata ahci. I unplug then replug the drive that is
> >>> rebuilding in RAID-5.
> >>>
> >>> When I unplug a drive, /dev/sda is removed, hotplug seems to work to
> >>> the point where proc/mdstat shows the drive failed, but not removed.
> >
> >Yeap, that sounds about right.
> >
> >>> Every other notion of the drive (in kernel and udev /dev namespace)
> >>> seems to be gone after unplugging. I cannot manually removed the drive
> >>> using mdadm, because it tells me the drive does not exist.
> >
> >I see.  That's a problem.  Can you use /dev/.static/dev/sda instead?  If
> >you can't find those static nodes, just create one w/ 'mknod
> >my-static-sda b 8 0' and use it.
> >
> 
> I did further testing of the ideas set out in this thread.
> 
> Although I can use (1) static device nodes, or (2) persistent naming
> with the proper udev rules, each has its own kind of problems with md.
> 
> As long as the kernel announces drives as disappeared but md still
> holds a lock, replugging drives will map to other major:minor number
> no matter what I try in userspace.
> 
> Static device nodes will therefore not help me select the drive that
> was unplugged/plugged per se.
> 
> Persistent naming using udev works OK (I used /dev/bay0 through
> /dev/bay3 to pinpoint the drive bays) but these disappear upon
> unplugging, while md keeps a lock to the major:minor, so replugging
> will move it to different major:minor numbers.
> 
> So the question remains: How will hotplug and md work together?
> 
> How does md and hotplug work together for current hotplug devices?

The answer to both of these questions is, "not very well."  Me and Kay
have been talking with Neil Brown about this and he agrees that it needs
to be fixed up.  That md device needs to have proper lifetime rules and
go away proper.  Hopefully it gets fixed soon.

thanks,

greg k-h

  reply	other threads:[~2006-09-14 23:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13 10:11 libata hotplug and md raid? Leon Woestenberg
2006-09-13 10:51 ` Ric Wheeler
2006-09-13 11:06   ` Tejun Heo
2006-09-13 11:45     ` Leon Woestenberg
2006-09-14 11:44     ` Turbo Fredriksson
2006-09-14 12:24     ` Leon Woestenberg
2006-09-14 23:23       ` Greg KH [this message]
2006-09-15 19:38         ` Leon Woestenberg
2006-10-17  0:23       ` Mark Lord
2006-10-17  1:58         ` Neil Brown
2006-10-17  8:07           ` Gabor Gombas
2006-10-17  8:11             ` Gabor Gombas
2007-01-10 22:55           ` Mike Accetta

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=20060914232304.GB2616@suse.de \
    --to=gregkh@suse.de \
    --cc=htejun@gmail.com \
    --cc=leon.woestenberg@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=ric@emc.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).