Add bitmap to md-raid which is under recovery

Sven Bachmann
When you try to add a bitmap to a Linux md-raid which is currently under recovery, you’ll get an error that says mdadm: Cannot add bitmap while array is resyncing or reshaping etc. failed to set internal bitmap. Here is a solution that should be applied in the early resync process, as you will loose the current progress. First, you’ll need to mark the drive/partition that is resynced as bad.