From owner-freebsd-questions@FreeBSD.ORG Mon Jul 5 19:39:55 2010 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 E6E38106564A for ; Mon, 5 Jul 2010 19:39:55 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id A5C5C8FC15 for ; Mon, 5 Jul 2010 19:39:55 +0000 (UTC) Received: from r55.edvax.de (port-92-195-117-232.dynamic.qsc.de [92.195.117.232]) by mx02.qsc.de (Postfix) with ESMTP id E7EBE1DBE1; Mon, 5 Jul 2010 21:39:53 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o65JdrRc001481; Mon, 5 Jul 2010 21:39:53 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 5 Jul 2010 21:39:53 +0200 From: Polytropon To: Christoph Kukulies Message-Id: <20100705213953.b56c3e01.freebsd@edvax.de> In-Reply-To: <4C31E793.3040000@kukulies.org> References: <4B434D52.3030301@kukulies.org> <20100106023007.b3a19517.freebsd@edvax.de> <4C31E793.3040000@kukulies.org> 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=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" Subject: Re: copying a disk with ignoring errors 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: Mon, 05 Jul 2010 19:39:56 -0000 On Mon, 05 Jul 2010 16:09:23 +0200, Christoph Kukulies wrote: > Some student lost some important data due to disk failure. He will restore it easily from backup. :-) > I tried PHKs' recoverdisk with recoverdisk -b 1024000 /dev/ad2 ad2.dmp > > and it went off quite promising just few dma read timeouts and when I > was at 7% of recovery > it suddenly says: > ad2: FAILURE - device detached. > 1558528000 1024000 failed (device not configured) > # Not good. Can you obtain an 1:1 copy of the disk using ddrescue? And it's often easier to operate partition-wise, if there are functionally separated partitions on the disk; let's assume the /home directory was mounted from slice 1 partition f, then try: # ddrescue -d -r 3 -n /dev/ad2s1f home.ddr logfile If you are lucky to get a copy of this partition, you can try to apply analytic and repairing tools to that partition copy. > Hmm. How can I avoid that the device gets detached? I do not think you can do anything against it. A device detachment means a MASSIVE failure. It *can* be a problem of the controller, but mostly it is a problem of the disk itself. There can be a way to get around it - by replacing the disk's PCB with an identical one. But it's not for sure that this will work, e. g. if the disk's drive components have massive defects. A device detachment at least doesn't look like an "easy" I/O problem within the drive's components (the platters, heads, the motors). The error must be that massive that the disk itself says goodbye to the system and disappears so that no control commands will reach it. You can try "atacontrol reinit" to force the disk back on-line, but it may refuse to do so. See "man atacontrol" for other options. You can also use the "smartctl" program (from port "smartmontools") to check the drive's error memory to see what has caused the detachment; maybe there's some information there. It's like /dev/cpu: device disappeared. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...