From owner-freebsd-questions@FreeBSD.ORG Tue Oct 27 14:05:21 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB46410656A3 for ; Tue, 27 Oct 2009 14:05:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 89A678FC19 for ; Tue, 27 Oct 2009 14:05:21 +0000 (UTC) Received: from r55.edvax.de (port-92-195-97-236.dynamic.qsc.de [92.195.97.236]) by mx01.qsc.de (Postfix) with ESMTP id C2B4C3CB3E; Tue, 27 Oct 2009 15:05:20 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n9RE5JB1002031; Tue, 27 Oct 2009 15:05:20 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Tue, 27 Oct 2009 15:05:19 +0100 From: Polytropon To: =?ISO-8859-1?Q?Gr=FCnewald_Micha=EBl?= Message-Id: <20091027150519.dcee178a.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd questions general Subject: Re: Bad sectors: how bad can it be X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Oct 2009 14:05:21 -0000 On Tue, 27 Oct 2009 08:31:18 +0100, Gr=FCnewald Micha=EBl wrote: > Starting the machine by other means, I found that the hard-drive is =20 > installed on has bad sectors. I am looking for advices on how to =20 > recover from this, if possible. If there's data on the disk you want to get back, first make a dd copy of the drive or the partition in question. Use an accurately working disk as the target. In case of bad sectors, you should maybe try dd_rescue and ddrescue because they can handle bad sectors often better than the common dd. You'll find them in the ports. After you got your dd copy, work with that for recovery. Do not use the defective disk anymore, only if you messed up the dd copy. A command would look like this: # ddrescue -d -r 3 -n /dev/ad1s1f ads1f.dd ddrescue.log The result is an image of the partition that you can then mount again. # mdconfig -a -t vnode -u 10 -f ad1s1f.dd # mount -o ro /dev/md10 /mnt If the file system isn't intact anymore, there are other tools that may be able to help you, such as recoverdisk, ffs2recov, magicrescue, testdisk, scan_ffs, recoverjpeg, photorec and finally + ultimately, The Sleuth Kit (fls, dls, ils etc.). > Basically the question is: shall I discard my hard-drive with bad-=20 > sectors, or can I continue using it? Discard it. Hard disks are cheap today, and bad sectors may have the habit to multiply. Don't take that risk. BUT: Discard it when you got all your important data off the disk. --=20 Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...