System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

check for badblocks without damage the system

SOLVED
Go to solution
'chris'
Super Advisor

check for badblocks without damage the system

hi

howto check for badblocks ?
is it possible to start for example:

# badblocks -vs /dev/hda

on the running linux without damage the system ?
4 REPLIES
rajv
Advisor
Solution

Re: check for badblocks without damage the system

Hi,

you can run fsck to check and fix the bad blocks.

#fsck -y /dev/hda

you can run this single usermode.

wtih out -y option system will ask want fix or not(y/n).
'chris'
Super Advisor

Re: check for badblocks without damage the system

thx, but the disk should be unmouted before running fsck.
Ivan Ferreira
Honored Contributor

Re: check for badblocks without damage the system

badblocks should be called from fsck using the -c option. And yes, you must umount the file system. You don't have another option.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Mike Stroyan
Honored Contributor

Re: check for badblocks without damage the system

Many disks support SMART self test. You can use smartctl to start a non-destructive bad blocks self test in the background even while a disk is in use.
See "man smartctl" and http://www.linuxjournal.com/article/6983 for more information about smartctl.