Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting following disk error on one of my server

smartd[4235]: Device: /dev/sda, 1 Currently unreadable (pending) sectors

Can i apply following command to repair bad block on live RHEL5 system .

badblocks -n -v /dev/hda1
share|improve this question

No. badblocks only SEARCHES for bad blocks on drive. it does not repairs them. for repair, you can use following commands:

badblocks /dev/sda1 > badblocks_list

fsck -t ext3 -l badblocks_list /dev/sda1

the first command saves the list of bad blocks in a file,which is feeded to fsck to repair.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.