How to repair an unreadable sector of a disk belonging to a RAIDS
Hello
It may happen that a sector of a disk becomes unreadable. When this disc does not belong to a raid the recommended method is to do the following command
sudo hdparm --yes-i-
which puts zeros in this sector by reallocating it.
When this disc belongs to a RAIDS, I think it is possible to do a lot better than putting zeros since it should be possible to recover the true value by reading the other discs in the raids.
Unfortunately I don't know the MDADM command that would do this. It must certainly exist. Otherwise, it is very regrettable not to know how to repair.
The principle of the command could be to rewrite the sectors provided in a file or better, for it to know how to detect them itself (badblock).
I think doing these commands is not the correct answer to the problem
mdadm –fail /dev/md0 /dev/sdX
mdadm –remove /dev/md0 /dev/sdX
mdadm –add /dev/md0 /dev/sdX
See this discussion https:/
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu mdadm Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask geole0 for more information if necessary.