Re: [PATCH 1/3] raid0, linear, md: add error_handlers for raid0 and linear
From: Mariusz Tkaczyk <hidden>
Date: 2021-12-20 08:45:49
Hi Xiao, On Sun, 19 Dec 2021 11:20:59 +0800 Xiao Ni [off-list ref] wrote:
quoted
Usage of error_handler causes that disk failure can be requested from userspace. User can fail the array via #mdadm --set-faulty command. This is not safe and will be fixed in mdadm. It is correctable because failed state is not recorded in the metadata. After next assembly array will be read-write again. For safety reason is better to keep MD_BROKEN in runtime only.Hi Mariusz Let me call them chapter[1-4] Could you explain more about 'mdadm --set-faulty' part? I've read this patch. But I don't know the relationship between the patch and chapter4. In patch2, you write "As in previous commit, it causes that #mdadm --set-faulty is able to mark array as failed." I tried to run command `mdadm /dev/md0 -f /dev/sda`. md0 is a raid0. It can't remove sda from md0.
Did you test kernel with my patchset applied? I've added chapter 4 because I'm aware of behavior change. Now for r0, nothing happens when we are trying to write failure to md/<disk>/state. After the change, drive is not remove too, but MD_BROKEN is set and any new write will be rejected. The drive will be still visible in array (I didn't change that). Should I add it to description? Thanks, Mariusz