On Fri, 19 Jun 2020 09:24:26 +0200 Daniel Smedegaard Buus <danielbuus@xxxxxxxxx> wrote: > I was testing btrfs to see data checksumming behavior when > encountering a rotten area, so I set up a loop device backed by a 1GB > file. I filled it with a compressed file and made it rot with, e.g., > > dd if=/dev/zero of=loopie bs=1k seek=800000 count=1 > > That is, the equivalent of having data on a single block on an actual > hard drive go bad. Not really, because when real on-disk sectors go bad, the (properly behaving) drive will return I/O errors, not blocks of zeroes instead. For a closer emulation of hardware bad sectors, check out dm-dust: https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/dm-dust.html Roman
