Re: raid1 faulty disk --> hot adding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday June 10, raziebe@xxxxxxxxx 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

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux