On Sat, Jan 3, 2015 at 10:40 PM, Dyweni - BTRFS <y4bwxfpc4...@dyweni.com> wrote:
> Hi All,
>
> Can BTRFS ignore bad blocks as they are discovered?
>
> I want to try BTRFS on some older drives, but they all have a few bad
> blocks.

Not currently, and I don't see it in the project ideas list. Right now
on Btrfs you will just get write errors, but I'm uncertain if it just
tries a new sector and continues on (indirectly not use the bad sector
but also not keeping track of it either)? The unreliable disk features
are still project ideas.

If the drives no longer have reserve sectors, then technically they're
toast. That's indicated by write failure in dmesg. Two work arounds:
use ext4 with mkfs.ext4 -c which builds a bad blocks list and then
won't use those sectors; mdadm 3.1+ has an option to build a bad
blocks list also but I don't know if raid0 or linear/concat are
supported:
http://thread.gmane.org/gmane.linux.raid/34883

If you haven't tried it, badblocks -wvs will (destructively) write
over the entire block device, and the drive firmware should detect
persistent write failures automatically and remap the LBA to a reserve
sector, removing the bad sector from use. This is transparent to
everything outside the drive. Once reserve sectors are depleted then
the drive will report write failure.



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

Reply via email to