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
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
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.