Re: ignoring bad blocks

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

 



On Sun, Jan 4, 2015 at 8:18 AM, Marc MERLIN <marc@xxxxxxxxxxx> wrote:

> badblocks are a thing of the past, as you hinted drives automatically
> remap badblocks so that the filesystem doesn't have to deal with them.
>
> If you have a questionable drive, you can indeed simply dd 0's over it
> before you use it with btrfs.

I suggest badblocks because the default works on both 512 or 4096 byte
physical sector drives.

On AF 512e drives, dd default block size of 512 bytes will fail if a
bad sector is encountered. What happens (to at least one model of
drive since I've had this happen to me) is the 512 byte write to a bad
4096 byte sector gets interpreted by the drive as a Read Write Modify.
So do use dd you need to also use bs= setting it to a multiple of
4096. Of course most people using dd for zeroing set bs= to a decently
high value because it makes the process go much faster than the
default block size of 512 bytes.

I just used strace on badblocks and by default issues 64KiB writes
(the block size is 1024 bytes with a count of 64, which looks like it
gets aggregated).

-- 
Chris Murphy
--
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