I've noticed that on my home Ubuntu server one drive is read only for some reason. Digging up I found that this can happen when hard drives have errors. I used badblocks to check for errors, and indeed I have some damaged sectors.
In most cases the only rational course of action is to try to backup data, remove the HDD and buy a new one. However, this server doesn't have anything I already don't have backed up on multiple places, and I'd like to use it till it dies. I use it for streaming music and running some simple scripts. In any case, it would be a big fuss reinstalling everything.
Is there a way to mark these bad blocks without formatting a hdd?