[opensuse] How to determine the number of bad blocks?
![](https://seccdn.libravatar.org/avatar/9b95573cfd18fd9ca0df854e85c2e9d8.jpg?s=120&d=mm&r=g)
I have a USB external harddrive that I suspect is on its last leg. I would like some definitive way to determine the number of bad blocks. I've run "fsck /dev/sdb1 -c" several times, but the only output is: /dev/sdd1: 11/30539776 files (9.1% non-contiguous), 1006495/61049000 blocks where that first number (1006495) goes up with every run of fsck -c. Is that number the number of bad blocks? And if not, then how can I find out? Thanks in advance! Jeremy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a3d7773b69a4f91cf3561ddc6e0963ca.jpg?s=120&d=mm&r=g)
At 04:25 AM 30/11/2007, Jeremy Figgins wrote:
I have a USB external harddrive that I suspect is on its last leg. I would like some definitive way to determine the number of bad blocks. I've run "fsck /dev/sdb1 -c" several times, but the only output is:
/dev/sdd1: 11/30539776 files (9.1% non-contiguous), 1006495/61049000 blocks
where that first number (1006495) goes up with every run of fsck -c. Is that number the number of bad blocks? And if not, then how can I find out?
Hello Jeremy. You could use "badblocks" perhaps. I have used it successfully on "real" disks - I am not sure if it works on USB drives because I have not tried it. badblocks <device path> does a read-only test or badblocks -n <device path> does a "non destructive" read-write test man badblocks will help I'm sure. Regards, Denis -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/9b95573cfd18fd9ca0df854e85c2e9d8.jpg?s=120&d=mm&r=g)
Thanks for the reply. I looked at badblocks, but considering that the man page recommends not running the tool directly and that it didn't mention if it actually reports back if any bad blocks were found made me hesitant to run it. The man for fsck talks about a "bad block inode" that stores all of the bad block information. There has to be a way to read that. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/77cb4da5f72bc176182dcc33f03a18f3.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Thursday 2007-11-29 at 16:59 -0600, Jeremy Figgins wrote:
The man for fsck talks about a "bad block inode" that stores all of the bad block information. There has to be a way to read that.
Maybe, but that only lists the blocks already know to be bad, not really all that are bad. Try dumpe2fs -b -b print the blocks which are reserved as bad in the filesystem. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFHT4HytTMYHG2NR9URAtO/AJ4r0jlSCRykKnC28Cy4wzygQNn1aQCgmMy7 pvevromivnVe8I1I4rvch7w= =Uwo3 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Carlos E. R.
-
Denis Brown
-
Jeremy Figgins