Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2003 21:28:47 -0700
From:      Richard Johnson <raj@cisco.com>
To:        =?ISO-8859-1?Q?Rapha=EBl_Marmier?= <raphael@computer-rental.ch>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Question re. hard read errors
Message-ID:  <CC6423A6-CE0F-11D7-AC66-0003939711FE@cisco.com>
In-Reply-To: <833CD204-C97A-11D7-A0DA-000393D67E4A@computer-rental.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
Actually, I found the web page on "gzrecover":

   http://www.urbanophile.com/arenn/hacking/gzrt/gzrt.html

This doesn't seem to work for me, probably because the mmap it uses=20
doesn't work very well when the file contains bad blocks.

I also found:

   http://www.gzip.org/recover.txt

and will probably pursue this, but it'll take quite a while.

Also, there's a reference in the gzip documentation to:

   If a .tar.gz file is damaged, files beyond the failure
   point cannot be recovered. (Future versions of gzip will have
   error recovery features.)

so maybe this will be available at some point.  I'd love to know if=20
someone is actually working now on this.

/raj


On Friday, August 8, 2003, at 01:30  AM, Rapha=EBl Marmier wrote:

> Try using dd to grab all possible bits of that file:
> /bin/sh
> dd if=3D/path/tothe/file of=3D/path/to/newfile conv=3Dsync,noerror=20
> >ddlog.txt 2>&1
>
> you get the log of all errors and faulty blocks in ddlog.txt
>
> This will make a copy of the file with unreadable blocks converted to=20=

> blank. Then you should fix the compresssed archive with the proper=20
> utility (although I don't know exactly how), then you should be able=20=

> to untar it. Maybe the information on which files where lost will even=20=

> be available.
>
> If it turns out you didn't loose that much, it will spare you the=20
> effort to read the disk harder. In case you really lost damn imporant=20=

> stuff, you can send the disk to a data recovery company, but it costs=20=

> $$$$$$...
>
> Hope this helps
>
> Raphael
>
> Le Vendredi, 8 ao=FB 2003, =E0 01:33 Europe/Zurich, Richard Johnson a=20=

> =E9crit :
>
>> I have a 1.5Gb file stored on a FreeBSD 4.8 disk drive and the system=20=

>> is giving me hard read errors when I try reading it.  It appears as=20=

>> though this disk has a few bad blocks. :(   Unfortunately, it's a=20
>> compressed tar file and I (stupidly!) erased the file from the=20
>> original computer before untar'ing it here and finding the errors! =20=

>> I'd like to recover as much as possible of this file before writing=20=

>> off the entire thing.
>>
>> I looked at /usr/src/sys/dev/ata/ata-disk.c and found the retry count=20=

>> was set to 3.  I changed it to 10.  After the first error (which is,=20=

>> indeed, reported 10 times) the system reports that it's going into=20
>> PIO mode and I still hear the same amount of hammering on the drive=20=

>> after that and only one error message produced.
>>
>> Is there some way I can force the system to retry 10 or more times=20
>> for each and every block?  Maybe there's some other utility I can use=20=

>> which tries harder to read the blocks?
>>
>> ANY pointers to information would be greatly appreciated.
>>
>> /raj
>>
>>
>> _______________________________________________
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to=20
>> "freebsd-questions-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CC6423A6-CE0F-11D7-AC66-0003939711FE>