Re: Bad block management - which mdadm?

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

 



On Mon, 24 Oct 2011 22:12:14 +0200 Arkadiusz Miśkiewicz
<a.miskiewicz@xxxxxxxxx> wrote:

> 
> kernelnewbies.org reports such feature for 3.1 kernel
> 
> 1.9. Software RAID: Bad block management
> The MD layer (aka "Multiple Devices", aka software raid) has gained bad block 
> management support: bad blocks will be added to a list, and the system will 
> try not to use them. This feature requires an updated mdadm version.
> 
> Which mdadm supports that?
> 

mdadm-3.3 will support bad block management.
However it is not released yet.

You can get current code from

   git://neil.brown.name/mdadm  devel-3.3


It isn't released yet because

  1/ I haven't found/made time to work on mdadm and integrate support
     properly.
  2/ The kernel isn't really quite read for full support.

If you have a bad block list, then a write error will not fail the drive but
will record the location of the write error.
This might be what you want.  But if you have a hot-spare available it might
not be what you want - the current kernel code will never use a hot spare
until a drive fails really badly.

What it *should* do is "hot-replace".  i.e. recover the data on to a spare
without first removing the device with the bad block.  But the hot-replace
code isn't ready yet.

I expect hot-replace to be in linux-3.3 (for RAID4/5/6 at least) and I hope to
release mdadm-3.3 before then with full support for bad blocks and hot
replace.

For now if you use the devel-3.3 code to create a new array it will place a
bad-block-log on the array and the kernel will use that bad block log to
record failed blocks rather than failing the whole device.
If you want a device to be failed, you might have to explicitly do that
yourself with "mdadm /dev/mdX --fail /dev/sdY"

NeilBrown

Attachment: signature.asc
Description: PGP signature


[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