[Leaplist] I need help with fixing bad blocks

Aaron Morrison ae4ko at amsat.org
Tue Mar 4 16:28:19 EST 2008


If you suspect a problem with the drive (not a logical filesystem  
problem), then you should run spinrite.  It's not free, but worth the  
money when you need it.
It will probably fix your problem.

grc.com

--am


On 04 Mar 2008, at 15:38, andrei raevsky wrote:

> Hi LEAPers,
>
> Following John's advice I did some looking around trying to figure  
> out why my Ubuntu box would freeze after booting up and it turns out  
> that this might be caused by a bad blocks problem.  Here how I  
> figured this out:
>
> My computer has the following partitions:
>
> root at ubuntu:/home/ubuntu# fdisk -lu
>
> Disk /dev/sda: 80.0 GB, 80026361856 bytes
> 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Disk identifier: 0x01840183
>
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sda1              63    20482874    10241406   83  Linux
> /dev/sda2        20482875    20996954      257040   82  Linux swap /  
> Solaris
> /dev/sda3        20996955   156296384    67649715   83  Linux
>
> Disk /dev/sdb: 30.7 GB, 30738677760 bytes
> 255 heads, 63 sectors/track, 3737 cylinders, total 60036480 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Disk identifier: 0x016b35db
>
>   Device Boot      Start         End      Blocks   Id  System
> /dev/sdb1              63    60034904    30017421   83  Linux
> root at ubuntu:/home/ubuntu#
>
> Since I was having I/O problems which froze the computer I did a  
> check on them and I found this:
>
> root at ubuntu:/home/ubuntu# fsck.reiserfs /dev/sda1
> reiserfsck 3.6.19 (2003 www.namesys.com)
>
> *************************************************************
> ** If you are using the latest reiserfsprogs and  it fails **
> ** please  email bug reports to reiserfs-list at namesys.com, **
> ** providing  as  much  information  as  possible --  your **
> ** hardware,  kernel,  patches,  settings,  all reiserfsck **
> ** messages  (including version),  the reiserfsck logfile, **
> ** check  the  syslog file  for  any  related information. **
> ** If you would like advice on using this program, support **
> ** is available  for $25 at  www.namesys.com/support.html. **
> *************************************************************
>
> Will read-only check consistency of the filesystem on /dev/sda1
> Will put log info to 'stdout'
>
> Do you want to run this program?[N/Yes] (note need to type Yes if  
> you do):Yes
> ###########
> reiserfsck --check started at Tue Mar  4 16:20:04 2008
> ###########
> Replaying journal..
> Reiserfs journal '/dev/sda1' in blocks [18..8211]: 0 transactions  
> replayed
> Checking internal tree..
> The problem has occurred looks like a hardware problem. If you have
> bad blocks, we advise you to get a new hard drive, because once you
> get one bad block  that the disk  drive internals  cannot hide from
> your sight,the chances of getting more are generally said to become
> much higher  (precise statistics are unknown to us), and  this disk
> drive is probably not expensive enough  for you to you to risk your
> time and  data on it.  If you don't want to follow that follow that
> advice then  if you have just a few bad blocks,  try writing to the
> bad blocks  and see if the drive remaps  the bad blocks (that means
> it takes a block  it has  in reserve  and allocates  it for use for
> of that block number).  If it cannot remap the block,  use badblock
> option (-B) with  reiserfs utils to handle this block correctly.
>
> bread: Cannot read the block (1114121): (Input/output error).
>
> Aborted (core dumped)
>
> Then I tried this:
>
> root at ubuntu:/home/ubuntu# badblocks /dev/sda1
> 4456448
> 4456484
> 4456485
> 4456486
> 4456487
> 4456488
> 4456489
> 4456490
> 4456491
> 4456492
> 4456493
> 4456494
> 4456495
> 4456496
> 4456497
> 4456498
> 4456499
> 4456500
> 4456501
> 4456502
> 4456503
>
> My other partitions did not report any errors.
>
> Interestingly, I also tried a smart tools check which my partition  
> passed:
>
> root at ubuntu:/home/ubuntu# sudo smartctl -H /dev/sda1
> smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce  
> Allen
> Home page is http://smartmontools.sourceforge.net/
>
> === START OF READ SMART DATA SECTION ===
> SMART overall-health self-assessment test result: PASSED
>
> root at ubuntu:/home/ubuntu# smartctl -i /dev/sda1
> smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce  
> Allen
> Home page is http://smartmontools.sourceforge.net/
>
> === START OF INFORMATION SECTION ===
> Model Family: Maxtor DiamondMax D540X-4K family
> Device Model: MAXTOR 4K080H4
> Serial Number: 674120623352
> Firmware Version: A08.1500
> User Capacity: 80,026,361,856 bytes
> Device is: In smartctl database [for details use: -P show]
> ATA Version is: 5
> ATA Standard is: ATA/ATAPI-5 T13 1321D revision 1
> Local Time is: Tue Mar 4 17:42:35 2008 UTC
> SMART support is: Available - device has SMART capability.
> SMART support is: Enabled
>
> I am currently running my system off a live-CD so I am able to  
> access the web.
>
> My questions are:
>
> 1) Is there a way to map and isolate the bad blocks and keep on  
> living happily with my hard drive
>
> or
>
> 2) what is the safest way to clone my partition to another hard disk  
> (which I rather not do, since I am very short on cash)
>
> Of course, if I have missed anything, please let me know how I could  
> otherwise fix my computer.
>
> Many thanks in advance,
>
> Andrei
>
> PS:
>
> /dev/sda1 is my / partition with the system on it
> /dev/sda2 is my /swap partition
> /dev/sda2 is my /home partition with my data on it and this is the  
> one I *really* would like to save, if possible.
> /dev/sdb1 is my /usr partition  
> _______________________________________________
> Leaplist mailing list
> Leaplist at leap-cf.org
> http://lists.leap-cf.org/mailman/listinfo/leaplist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.leap-cf.org/pipermail/leaplist/attachments/20080304/4c9df317/attachment-0001.html


More information about the Leaplist mailing list