LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   34 bad blocks, what should I do? (https://www.linuxquestions.org/questions/linux-hardware-18/34-bad-blocks-what-should-i-do-927224/)

tauro_kpo 02-02-2012 01:47 PM

34 bad blocks, what should I do?
 
I ran

Code:

sudo badblocks -v /dev/sdb
in an old 8 GB disk, in which I'm intending to install Ubuntu Server.

Found 34 bad blocks (is that a lot?) and I don't know exactly what to do next. How do I put the bad blocks apart, so that they won't be used? Should I create the partitions that I'm going to use and format them before/after?

Thank you very much in advance

TobiSGD 02-02-2012 01:48 PM

I would not use the disk. You have 34 bad blocks now, but they will become more and more. Get another disk.

tauro_kpo 02-02-2012 01:50 PM

Really? Is that bad?

How is it that the bad blocks are going to spread? Could you explain?

I'm doing this in my free time, just for fun. Isn't it possible to isolate the bad blocks?

H_TeXMeX_H 02-02-2012 01:57 PM

Bad blocks are a sign that the drive is dieing. If you use it, it will probably fail soon and you will lose your data. It will also be slow.

There are programs that can mark bad blocks, but it's not a solution, because the drive will fail.

TobiSGD 02-02-2012 02:45 PM

Quote:

Originally Posted by tauro_kpo (Post 4592001)
Really? Is that bad?

How is it that the bad blocks are going to spread? Could you explain?

I'm doing this in my free time, just for fun. Isn't it possible to isolate the bad blocks?

It is not that they spread. Bad blocks happen on any drive. For this reason the disks have a spare region, where they can remap bad blocks to. This will be done automatically from the drives firmware, you will not notice that normally. When the badblocks command finds bad blocks that means that the disk ran out of spare sectors, so it can't remap the blocks anymore.
For that reason it is also not possible to to isolate the blocks.

If you have a somewhat modern machine I would recommend to make your experiments with a virtual machine instead of a native install. Or, if your machine is capable of booting from USB, just use a cheap pendrive instead of a harddisk.

tauro_kpo 02-02-2012 04:22 PM

Thanks for the explanations. I'll throw it away.

syg00 02-02-2012 05:28 PM

Not that I want to change your mind, but ...

I had a 500 Gig drive with 24 bad bocks on it - which occasionally increased in "spurts". Due to the data allocations I was able to determine which file-system was generating the hits on I/O. I merely isolated that region of the disk, recreated the data elsewhere (on the same disk), and life continues.
The disk survives (it has both Linux ext4/btrfs and Win7 NTFS on it) and is in regular use without new bad blocks showing up.
I am waiting for it to die, but hasn't yet after some months. Note this is a data-only disk, not a "system" disk - I wouldn't risk it if the latter.

tauro_kpo 02-02-2012 05:37 PM

Thanks. That's interesting, that's what I initially thought that was possible. But what the heck, I couldn't even format it with gparted, nor change the partitions. I guess it is pretty screwed. :D


All times are GMT -5. The time now is 08:22 PM.