On 8/15/20 1:33 PM, Roy Sigurd Karlsbakk wrote:
In my not-so-humble opinion, the bug is the existence of the BadBlocks
feature. Once a badblock is recorded for a sector, redundancy is
permanently lost at that location. There is no tool to undo this.
I strongly recommend that you remove badblock logs on all arrays before
the "feature" screws you.
I think it has screwed me a bit already, but then, I didn't check until recently. I didn't even know about this "feature". But doesn't help much when those "badblocks" are recorded already. What would be the official way to remove them apart from rebuild the whole array?
That's the biggest problem. There is no way to remove sectors from the
badblocks log. At least, I've not seen one. Official or otherwise.
What I don't understand is how this feature ended up in mdadm without
any way to reverse the addition of entries, particularly since *you
silently lose redundancy*.
A friend of mine wrote a thing in python to remove the badblocks list from an offline array. I haven't dared to test it on a live system, but apparently it worked on his (5 drives in RAID-5 IIRC with three of them showing a list identical of badblocks). You can find the code here https://git.thehawken.org/hawken/md-badblocktool.git
This would be the first. /:
Vennlig hilsen
roy
Phil