You are not logged in.

#1 2013-09-30 23:45:04

solixxx
Member
Registered: 2013-03-11
Posts: 10

How to keeps track of new coming bad blocks on a hdd

I have some 2,5 hdd lying around and wanted to test them for bad blocks and found that I can use Badblocks for this.

But how do I keep the "list" of bad blocks up-to-date if new bad blocks are detected, or is this not posseble?

Solixxx

Last edited by solixxx (2013-09-30 23:48:21)

Offline

#2 2013-09-30 23:46:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,635

Re: How to keeps track of new coming bad blocks on a hdd

Personally, if I start getting bad blocks, the hdd goes in the pile to get destroyed.

Offline

#3 2013-09-30 23:54:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to keeps track of new coming bad blocks on a hdd

solixxx wrote:

But how do I keep the "list" of bad blocks up-to-date if new bad blocks are detected, or is this not posseble?

That's a bit like asking "how do I check if this malfunctioning parachute is still malfunctioning" :-)

If there's no mechanism to isolate bad blocks, damaged sectors etc. on the device, it's should be sent to the nearest zoo as a chew toy for a T-Rex.

Offline

#4 2013-09-30 23:59:22

solixxx
Member
Registered: 2013-03-11
Posts: 10

Re: How to keeps track of new coming bad blocks on a hdd

Scimmia wrote:

Personally, if I start getting bad blocks, the hdd goes in the pile to get destroyed.

I normally also do that, but it would be a waste if this was possible. Also there is the fun in just throwing them out and buy some new ones, without first giving this a try.

Last edited by solixxx (2013-10-01 00:00:13)

Offline

#5 2013-10-01 00:10:45

solixxx
Member
Registered: 2013-03-11
Posts: 10

Re: How to keeps track of new coming bad blocks on a hdd

Archivist wrote:

That's a bit like asking "how do I check if this malfunctioning parachute is still malfunctioning" :-)

If there's no mechanism to isolate bad blocks, damaged sectors etc. on the device, it's should be sent to the nearest zoo as a chew toy for a T-Rex.

But is this not what Badblocks does in the first place. It checks all blocks and lists the bad ones, and then you add the list, then you format you hdd, so the system does not use the bad blocks?

Offline

#6 2013-10-01 00:14:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,605
Website

Re: How to keeps track of new coming bad blocks on a hdd

You can detect and lock out bad ones... but the danger is not knowing which good blocks will go bad in the future.  I have a hdd in an old machine that has bad blocks on it... been running fine for 9+ months now after isolating them.

# e2fsck -ccvk /dev/sdxy

EDIT: This invocation will actually call badblocks for you; for example, in htop after running the above on my system:

... badblocks -b 4096 -X -s -n /dev/sda6 3145900

Last edited by graysky (2013-10-03 16:56:50)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2013-10-01 00:23:21

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: How to keeps track of new coming bad blocks on a hdd

graysky wrote:

You can detect and lock out bad ones... but the danger is not knowing which good blocks will go bad in the future.  I have a hdd in an old machine that has bad blocks on it... been running fine for 9+ months now after isolating them.

Exactly :-)

I've been using a drive with isolated bad blocks for over a year now, but I store only data I don't care that much about - I can re-download or recreate it.


I thought you just wanted to list the bad blocks. If you're going to reformat the device, it is the mechanism of isolating the bad blocks I wrote about, so you should be OK.
I think badblocks prevents the bad block from being used by the filesystem, but they still reside on the device, so if you run badblocks again, it should list both the old bad blocks and any new ones too.

Offline

#8 2013-10-01 00:41:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,605
Website

Re: How to keeps track of new coming bad blocks on a hdd

I boot to a "mini" arch install on another partition and run the command I listed on my real root every month or so.  As I understand it, any badblocks identified are added to a blacklist and the OS will not use them.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2013-10-01 04:41:56

solixxx
Member
Registered: 2013-03-11
Posts: 10

Re: How to keeps track of new coming bad blocks on a hdd

Thx, for the help

Solixxx

Offline

Board footer

Powered by FluxBB