Md tests - #256
Conversation
Adds _md_detail(), _md_is_level(), _md_is_healthy(), and _md_is_faulty() to check an array's raid level and health via mdadm --detail --export and --test Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
Creates a 2-device RAID 0 array on brd-backed ram disks, verifies it comes up active, writes to it with fio, then tears it down. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
Creates a 2-device RAID 1 array on brd-backed ram disks, verifies it comes up active, writes to it with fio, then tears it down. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
Creates a 3-device RAID 5 array on brd-backed ram disks, verifies it comes up active, writes to it with fio, then tears it down. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
Creates a 4-device RAID 6 array on brd-backed ram disks, verifies it comes up active, writes to it with fio, then tears it down. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
Creates a 4-device RAID 10 array on brd-backed ram disks, verifies it comes up active, writes to it with fio, then tears it down. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
Creates a 3-device RAID 5 array on real devices from TEST_DEV_ARRAY, verifies it comes up active, writes to it with fio, then tears it down. Unlike md/007 (brd-backed), this exercises real device I/O, which is what can surface timing-dependent issues brd's near-instant ram-backed I/O cannot reproduce. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
Reproduces a NULL pointer dereference in wait_for_serialization()/ raid1_write_request() when a write races a fail - remove - add - recovery transition while a filesystem writer is still active. Fixes an ordering bug from an earlier version of this test: the wait loop checked for the device to reach 'removed' state before --remove was ever called, so it would spin its full timeout and fail on output-diff every run regardless of whether the race triggered. Also adds a bounded wait confirming recovery actually starts before racing the writer against it, and a timeout on the initial mdadm --wait so a stalled resync fails the test instead of hanging it. Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
|
|
||
| local mddev="/dev/md/blktests_md_${TEST_NAME##*/}" | ||
|
|
||
| if ! _init_brd rd_size=524288 rd_nr=2; then |
There was a problem hiding this comment.
from past experience, usually it's better to calculate the values not hard code them in case they are depended on the drive.
There was a problem hiding this comment.
good point.
I looked how md/001 is doing that and I did that in the similar way, but yeah I agree.
There was a problem hiding this comment.
yeah, sorry, sometimes you just start pulling a thread....
|
Thanks, I took a look in the commits and they look good overall. Let me leave a few comments.
Is this the expected failure? I also wonder if md/011 has corresponding kernel side fix commit or not. |
Yes, the problem is known and there is a known fix. I will update the test information with the details. Hmm I did not run it on v7.2-rc5 kernel; I will do and see why this is timing out in the 2nd run. |
No description provided.