-   Linux - Software (
-   -   Dealing with bad blocks (

_Lukes 12-01-2006 07:41 AM

Dealing with bad blocks

I have my linux installed on a single ext2 partition, unfortunately there are also bad blocks. Is there any possibility to re-partition the hard drive, to move all the bad blocks to separate partition ?? If yes how can I do this?

matthewg42 12-01-2006 08:23 AM

You can have the blocks marked as bad so they won't be used. You'll lose that capacity from your partition, and the data which was on them before they went bad will be lost.

A word of caution - when hard disks start to fail the rot often spreads. It's not always the case - I have a hard disk which got bad blocks a year into it's [so far] 3 year life, and since then no more have gone bad.

If the device has important data on it, it's probably wise to replace it.

_Lukes 12-01-2006 08:45 AM

Yes, but if I mark them, they will only be separated temporarily, till I completely remove the partition. Am I rigth ? My idea is to find all the bad blocks on my hd and 'catch' them on a separate one. I could even format ext2 and reinstall linux if I would know that my idea is possible.
I have same situation as you, long ago bad blocks appeared, but they do not spread. So I want to get rid of them once and for all :)

matthewg42 12-01-2006 09:32 AM

Bad blocks aren't something to do with the filesystem - they are physical problems with the drive. Reformatting and re-partitioning won't help - the drive will still have bad patches on it.

When you are formatting a partition drive there's often an option to do a surface scan when formatting. This will identify and mark bad blocks. This "slow" format should always be done on critical hardware to detect defects, and it's prudent to do it on all older hardware.

matthewg42 12-01-2006 09:34 AM

Having said that, some tools may be able to apparently erase badblocks. In fact what happens is that most modern drives have some low-level sectors of the drive in reserve which can be used to replace faulty ones. In fact modern drives do this on-the-fly without any apparent effect at the file-system level. The SMART interface allows software to query the drive and pull of statistics about this sort of activity.

All times are GMT -5. The time now is 06:08 AM.