The following is the GNU All-permissive License as recommended in

Copyright (C) 2024 Free Software Foundation

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Contributions are welcome. See

disable and check raid badblocks

For context, see The issue is that using --replace on a RAID array can run into errors if the RAID badblocks feature is enabled (or is it only if there are bad blocks?)

checking for raid badblocks on the array

Do this for each array member:

mdadm --examine-badblocks /dev/sdi1

Disabling badblocks

This only works if there are no RAID bad blocks in the RAID array. The option to force removal of badblocks will apparently cause corruption. See the above article.

mdadm ... --assemble --update=no-bbl