From owner-freebsd-hackers Thu Jan 4 7:43:36 2001 From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 4 07:43:33 2001 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from slarti.muc.de (slarti.muc.de [193.149.48.10]) by hub.freebsd.org (Postfix) with SMTP id 557A837B404 for ; Thu, 4 Jan 2001 07:43:32 -0800 (PST) Received: (qmail 13836 invoked from network); 4 Jan 2001 15:41:27 -0000 Received: from jhs.muc.de (193.149.49.84) by slarti.muc.de with SMTP; 4 Jan 2001 15:41:27 -0000 Received: from park.jhs.private (localhost [127.0.0.1]) by jhs.muc.de (8.11.0/8.11.0) with ESMTP id f04CmTp03741; Thu, 4 Jan 2001 12:48:29 GMT (envelope-from jhs@park.jhs.private) Message-Id: <200101041248.f04CmTp03741@jhs.muc.de> To: Warner Losh Cc: hackers@freebsd.org, jhs@jhs.muc.de Subject: Re: Easy way to recover disk In-Reply-To: Message from Warner Losh of "Fri, 29 Dec 2000 18:21:38 MST." <200012300121.SAA00902@harmony.village.org> Date: Thu, 04 Jan 2001 13:48:29 +0100 From: "Julian Stacey Jhs@jhs.muc.de" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote: > OK. I have a disk drive that is failing in random ways. Today blocks > 123 456 and 293 might be unreadable. Tomorrow, it might be these and > 27 or it might just be 27. It is an IDE drive. I was wondering if anybody > had a program that would read the entire disk and keep a list/bitmap of > the bad blocks and try them again next time the program is run. Operating > on a slice or partition level would be ideal (I have a 20G disk that > is failing, but only about 18G of free space). > > Ideas? > > Warner > > P.S. Basically what I want at the end of the day, disk willing, is > what dd if=/dev/ad8s2a of=/huge/big-honkin-file ... would give me. > I want this so I can then dump it to tape. I can't run dump directly > since it hits those bad blocks and whines. I have 2 C programs you might like to extend/ plunder `for parts' :-) http://bim.bsn.com/~jhs/src/bsd/jhs/bin/public/valid/valid.c & valid.1 Makefile http://bim.bsn.com/~jhs/src/bsd/jhs/bin/public/slice/slice.c & slice.1 Makefile valid: rescues (or writes) arbitrary (or all) sectors of a floppy, but can also be given the name of other devices eg hard disc & normal files. It works best on dos ! as dos returns the buffer even if there's a crc error, If someone hacked the bsd kernel to return the read() buffer even on error, it'd make it equally usefull to rescue sectors on bsd too. slice: rescue data off bad tapes with intermittent drivers, first written to run on BSD4.2 nsc32016, also runs on freebsd of course. More info in the manuals on the web. Julian - Julian Stacey Unix Consultant - Munich Germany http://bim.bsn.com/~jhs/ Considering Linux ? Try FreeBSD with its 4200 packages ! Ihr Rauchen => mein allergischer Kopfschmerz ! Kau/Schnupftabak probieren ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message