On Sun, 26 Jan 2014 22:03:45 +0100 Clemens Eisserer <linuxhippy@xxxxxxxxx> wrote: > Hi, > > I've seen several SD cards used in my raspberry pi develop bad blocks > which can not be read or written anymore. > I thought raid couldn't help here as it would flag the whole device as > "bad" once it can not write a block anymore, however recently I > learned linux-raid is now capable of handling bad blocks. > > I've been searching a bit, however didn't find a lot of information, > so I would be greateful if somebody could answer the following > questions: > > 1. Is the badblock-code contained in the stable 3.12 kernel? Yes. Not sure if it will help you though. > > 1. Using a raid1 with badblock management, is it possible for > linux-raid to automatially repair errors transparently? > So if a block goes bad, does linux-raid silently replace it without > user intervention. When raid1 get a read failure it will read the data from another device and write it to the failing device. If that works it assumes the block has been repaired. If it fails and a bad-block-log is configured, then the address of the bad block is stored in the bad-block-log and raid1 won't try reading from there again. It will always read from the other device. > > 2. What happens in case a replaced block fails again? Is this supported? Yes. raid1 will simply over-write it again. But I think you want md/raid1 to remap the bad blocks. It doesn't do that. It assumes the underlying device will do any remapping needed. NeilBrown > > Any pointer to documentation about bad-block handling would be highly > appriciated. > > Thanks, Clemens > -- > 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
Attachment:
signature.asc
Description: PGP signature