<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div><div>I'm assuming all user space code is expected to use the handle_errors feature, so this isn't that big of a deal. I'm also using 4.19.13, which I think is more recent than the latest update to dm-raid1.c</div></div><div><br></div><div>That said, there may be a bug that causes the entire mirror to crash if there is an error on the first leg of the mirror, but not on the 2nd leg.</div><div><br></div><div>Works fine if you do cause IO errors on the 2nd leg:</div><div><br></div><div><div>root@kernel-dev:~# dmsetup create zerodev --table "0 1073741824 zero"</div><div>root@kernel-dev:~# dmsetup create errordev --table "0 1073741824 error"</div><div><br></div><div><br></div><div><div>root@kernel-dev:~# dmsetup create mirror-table --table "0 1073741824 mirror core 2 524288 nosync 2 /dev/mapper/zerodev 0 /dev/mapper/errordev 0 0"</div><div>root@kernel-dev:~# dd if=/dev/zero of=/dev/mapper/mirror-table bs=512 count=1</div><div>1+0 records in</div><div>1+0 records out</div><div>512 bytes copied, 0.000417845 s, 1.2 MB/s</div><div>root@kernel-dev:~# dd if=/dev/zero of=/dev/mapper/mirror-table bs=512 count=1</div><div>1+0 records in</div><div>1+0 records out</div><div>512 bytes copied, 0.00036228 s, 1.4 MB/s</div></div><div>root@kernel-dev:~# dmsetup status mirror-table</div><div>0 1073741824 mirror 2 253:1 253:2 2047/2048 1 AD 1 core</div><div>root@kernel-dev:~# dmsetup remove mirror-table<br></div><div><br></div><div><br></div><div>The whole mirror fails if you do the error device on the first leg:<br></div><div><br></div><div>root@kernel-dev:~# dmsetup create mirror-table --table "0 1073741824 mirror core 2 524288 nosync 2 /dev/mapper/errordev 0 /dev/mapper/zerodev 0 0"</div><div>root@kernel-dev:~# dd if=/dev/zero of=/dev/mapper/mirror-table bs=512 count=1</div><div>1+0 records in</div><div>1+0 records out</div><div>512 bytes copied, 0.000274188 s, 1.9 MB/s</div><div>root@kernel-dev:~# dd if=/dev/zero of=/dev/mapper/mirror-table bs=512 count=1</div><div>dd: error writing '/dev/mapper/mirror-table': Input/output error</div><div>1+0 records in</div><div>0+0 records out</div><div>0 bytes copied, 0.000857634 s, 0.0 kB/s</div></div><div><br></div><div><div>root@kernel-dev:~# dmsetup status mirror-table</div><div>0 1073741824 mirror 2 253:2 253:1 2047/2048 1 DA 1 core</div></div><div><br>dmesg would be:<br><br><div>[ 1935.876401] device-mapper: raid1: Mirror read failed from 253:2. Trying alternative device.</div><div>[ 1939.091919] device-mapper: raid1: Mirror read failed.</div></div><div><br></div><div>Thanks for your time!</div><div><br></div></div></div></div></div></div></div></div>