Is it possible to use bad_blocks to simulate write_error and activate hot-replace?

Started by Apple Yin on Jan 20, 2015

open the first message on its own page

Message details and related content
I want to test hot-replace when a write error is recorded in a
bad-block log. Here is my steps:

1. create raid5 with 3 disks (sdb sdc sdd), and 1 spare (sde)

2. echo 2097152 512 > /sys/block/md192/md/dev-sdb/bad_blocks  /* set 1
badblock from 1G of sdb*/

3. dd if=/dev/zero of=/dev/md192 bs=1M count=1024 seek=2048 /* from 2G of md */
    dd if=/dev/zero of=/dev/md192 bs=1M count=1024 seek=2000 /* near to 2G */


No write error happen, sdb is not marked as want_replacement and not
start the rebuild. Anyone help ?
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help