G
G
glaucidium2017-06-03 09:54:56
RAID
glaucidium, 2017-06-03 09:54:56

Does software raid recover bad blocks?

I want to make a software raid 1. How will it behave if it detects a bad block on one of the disks? Just reads information from another disk? Will a bad block be marked and restored using spare blocks and information from another disk?
I would not want to be in a situation where one disk dies and when it is replaced, not everything can be copied, because. the second disk will also have bad blocks.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2017-06-03
@glaucidium

Speaking of linux raid.
If the block is not readable, it will read from redundant disks and try to write to the failed disk. If the recording fails, it will eject the disk from the array as a failed one. If the block is written, it will continue to work. (everything with appropriate swearing in the logs and dmesg)
Whether the disk will make a remap for this block or simply successfully overwrite the existing one - at the discretion of the firmware of this disk. Linux raid doesn't care. He is concerned that there is the required data for the given LBA.
Usually, in distribution packages, the crown task is set once a month to run an array check - all blocks are read and their contents are compared between all mirrors. I don't know what will happen (except for screaming in dmesg and logs) if both disks are read blocks, but they give out different data. If one of the disks did not read the block, then there will be an attempt to restore.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question