linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* raid1 faulty disk --> hot adding
@ 2005-06-09 23:12 Raz Ben-Jehuda(caro)
  2005-06-10  1:00 ` Neil Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Raz Ben-Jehuda(caro) @ 2005-06-09 23:12 UTC (permalink / raw)
  To: linux-raid

Hello guys.
I tried to to raidhotadd a faulty disk to a mirror and it failed
saying that "bd_claim failed on..."
i took a dive into the  code and it seems that when a disk in the raid
fails the bd_holder fileld in
the block_device struct remained with the old value although the disk
was faulty.
So the logical thing to do was to set rdev->bdev->bd_holder to 0x00 .
I did it in the error() routine in raid1.c .
This way I manage to hotadd a disk.
Are there anyone here that can point his view regarding this matter  ?
--
Raz
Long Live the Penguin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: raid1 faulty disk --> hot adding
  2005-06-09 23:12 raid1 faulty disk --> hot adding Raz Ben-Jehuda(caro)
@ 2005-06-10  1:00 ` Neil Brown
  2005-06-10  6:21   ` Raz Ben-Jehuda(caro)
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2005-06-10  1:00 UTC (permalink / raw)
  To: Raz Ben-Jehuda(caro); +Cc: linux-raid

On Friday June 10, raziebe@gmail.com wrote:
> Hello guys.
> I tried to to raidhotadd a faulty disk to a mirror and it failed
> saying that "bd_claim failed on..."
> i took a dive into the  code and it seems that when a disk in the raid
> fails the bd_holder fileld in
> the block_device struct remained with the old value although the disk
> was faulty.
> So the logical thing to do was to set rdev->bdev->bd_holder to 0x00 .
> I did it in the error() routine in raid1.c .
> This way I manage to hotadd a disk.
> Are there anyone here that can point his view regarding this matter  ?

If a drive fails, and you want to re-add it, what you should do is
first remove it, and then add it.
  raidhotremove /dev/mdX /dev/sdY
  raidhotadd /dev/mdX /dev/sdY

(or equivalent mdadm commands).

clearing bd_holder is certainly not the right thing to do.

NeilBrown


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: raid1 faulty disk --> hot adding
  2005-06-10  1:00 ` Neil Brown
@ 2005-06-10  6:21   ` Raz Ben-Jehuda(caro)
  0 siblings, 0 replies; 3+ messages in thread
From: Raz Ben-Jehuda(caro) @ 2005-06-10  6:21 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

Yes. my mistake. 
I tried it with two ramdisks and I made some stupid mistake.

thanks Neil

6/10/05, Neil Brown <neilb@cse.unsw.edu.au> wrote:
> On Friday June 10, raziebe@gmail.com wrote:
> > Hello guys.
> > I tried to to raidhotadd a faulty disk to a mirror and it failed
> > saying that "bd_claim failed on..."
> > i took a dive into the  code and it seems that when a disk in the raid
> > fails the bd_holder fileld in
> > the block_device struct remained with the old value although the disk
> > was faulty.
> > So the logical thing to do was to set rdev->bdev->bd_holder to 0x00 .
> > I did it in the error() routine in raid1.c .
> > This way I manage to hotadd a disk.
> > Are there anyone here that can point his view regarding this matter  ?
> 
> If a drive fails, and you want to re-add it, what you should do is
> first remove it, and then add it.
>   raidhotremove /dev/mdX /dev/sdY
>   raidhotadd /dev/mdX /dev/sdY
> 
> (or equivalent mdadm commands).
> 
> clearing bd_holder is certainly not the right thing to do.
> 
> NeilBrown
> 
> 


-- 
Raz
Long Live the Penguin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-10  6:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-09 23:12 raid1 faulty disk --> hot adding Raz Ben-Jehuda(caro)
2005-06-10  1:00 ` Neil Brown
2005-06-10  6:21   ` Raz Ben-Jehuda(caro)

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).