Re: How does btrfs handle bad blocks in raid1?

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

 



On 01/09/2014 05:06 PM, Jim Salter wrote:
On Jan 9, 2014 7:46 PM, George Mitchell <george@xxxxxxxxxxx> wrote:
I would prefer that the drive, even flash media type, would
catch and resolve write failures.  If it doesn't happen at the hardware
layer, according to how I understand Hugo's answer, btrfs, at least for
now, is not capable of it.
Not sure what you mean by this. If a bit flips on a btrfs-raid1 block, btrfs will detect it. Then it checks the mirror's copy of that block. It returns the good copy, then immediately writes the good copy over the bad copy.

I know this because I tested it directly just last week by flipping a bit in an offline btrfs filesystem manually. When I brought the volume back online and read the file containing the bit I flipped, it operated exactly as described, and logged its actions in kern.log, . :-)
Jim, my point was that IF the drive does not successfully resolve the bad block issue and btrfs takes a write failure every time it attempts to overwrite the bad data, it is not going to remap that data, but rather it is going to fail the drive. In other words, if the drive has a bad sector which it has not done anything about at the drive level, btrfs will not remap the sector. It will, rather, fail the drive. Is that not correct?
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux