[dm-devel] Possible bug in mirror target

Zdenek Kabelac zkabelac at redhat.com
Tue Feb 5 10:03:01 UTC 2019


Dne 05. 02. 19 v 1:47 Drew Hastings napsal(a):
> Hi,
> 
> 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
> 
> 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.
> 
> Works fine if you do cause IO errors on the 2nd leg:
> 
> root at kernel-dev:~# dmsetup create zerodev --table "0 1073741824 zero"
> root at kernel-dev:~# dmsetup create errordev --table "0 1073741824 error"
> 
> 
> root at kernel-dev:~# dmsetup create mirror-table --table "0 1073741824 mirror 
> core 2 524288 nosync 2 /dev/mapper/zerodev 0 /dev/mapper/errordev 0 0"

Hi

There are 2 operational modes for old dm mirror target.
One requires to handle errors externally. Please check i.e. the following 
guide for mirror target:

https://wiki.gentoo.org/wiki/Device-mapper

Lvm2 is using 'dmeventd' to service this error handling (i.e. dropping
the mirror leg or allocating replacement one).

Without this option you will start to receive disc failures.
Also not -  old mirror has been obsoleted by dm-raid target, that
is using small log device for each leg (and using same kernel
internals as mdraid)


Regards

Zdenek




More information about the dm-devel mailing list