Operating System - Linux
1819500 Members
3130 Online
109603 Solutions
New Discussion юеВ

how to run badblocks check on linux ?

 
SOLVED
Go to solution
'chris'
Super Advisor

how to run badblocks check on linux ?

hi

how to run badblocks check on linux ?
I'm using linux SuSE 8.2

kind regards
chris
6 REPLIES 6
twang
Honored Contributor

Re: how to run badblocks check on linux ?

Do you try the way used in redhat, unmounting all of the disk drive's partitions, then
# badblocks -ws /dev/fd0
Steven E. Protter
Exalted Contributor

Re: how to run badblocks check on linux ?

Try this article

http://wireless.ictp.trieste.it/school_2002/lectures/fonda/MoreLinux/linux/linux_guides/RH_Linux_Unleashed/rhl05.htm

https://listman.redhat.com/archives/ataraid-list/2002-December/date.html

https://listman.redhat.com/archives/ataraid-list/2002-December/msg00022.html

for sure, remember to unmount the filesystem first.

There is a command called badblocks that you might want to do a man page on.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
kenny chia
Regular Advisor

Re: how to run badblocks check on linux ?

You can try this to detect bad sectors (Assuming this is what you want) without bringing your system to single user mode

if your disk is /dev/hda

# dd if=/dev/hda of=/dev/null ob=1M

watch for I/O errors or something alike
All Your Bases Are Belong To Us!
Caesar_3
Esteemed Contributor

Re: how to run badblocks check on linux ?

Hello!

badblocks -vs

Caesar
Avinoam
Frequent Advisor

Re: how to run badblocks check on linux ?

hello

in order to run a disk surface check you should:
1. boot your system into runlevel 1

2. umount you partition/HD that you wish to check for bad-blocks,( you can run e2label /dev/hda2 - and you will get label of your partition/HD

3. run: e2fsck ???p ???f /dev/hda9
the -p is for repair, the -f is for force ( where /dev/hda9 is the partition that you wish to check

god luck
Sababa
Avinoam
Frequent Advisor
Solution

Re: how to run badblocks check on linux ?

hello

in order to run a disk surface check you should:
1. boot your system into runlevel 1

2. umount you partition/HD that you wish to check for bad-blocks,( you can run e2label /dev/hda2 - and you will get label of your partition/HD

3. run: e2fsck ???p ???f /dev/hda9
the -p is for repair, the -f is for force ( where /dev/hda9 is the partition that you wish to check

good luck
Sababa