On my server I have a 4 disk RAID-5 configuration. One of the drives fails the S.M.A.R.T. test. The array has not yet been declared as degraded but the disk shows up as needing replacement.
I don't want to spent money on a new drive just because it has a couple of bad blocks.
So, I've been thinking, if I remove the drive from the array, reformat it and then re-insert it again. Will I be able to re-initialise it and will the bad sectors get mapped out automagically?
Or do I need to do something extra?
(Please note: I'm using a headless, X-less server. So, only CLI available.)
Also, due to input from others, I already pulled the drive and replaced it by the spare. The array is repairing.
So, the disk is sitting on the shelf now with me wondering: If I put it back later, will the bad blocks be mapped out?