From owner-freebsd-questions@FreeBSD.ORG Wed Jul 20 08:54:59 2011 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 413ED106566C; Wed, 20 Jul 2011 08:54:59 +0000 (UTC) (envelope-from D.Forsyth@ru.ac.za) Received: from d.mail.ru.ac.za (d.mail.ru.ac.za [IPv6:2001:4200:1010::25:4]) by mx1.freebsd.org (Postfix) with ESMTP id 534578FC0C; Wed, 20 Jul 2011 08:54:58 +0000 (UTC) Received: from iwr.ru.ac.za ([146.231.64.249]:59225) by d.mail.ru.ac.za with esmtp (Exim 4.75 (FreeBSD)) (envelope-from ) id 1QjSYS-0003Xm-4P; Wed, 20 Jul 2011 10:54:56 +0200 Received: from iwdf-5.iwr.ru.ac.za ([146.231.64.28]) by iwr.ru.ac.za with esmtp (Exim 4.76 (FreeBSD)) (envelope-from ) id 1QjSYS-0003iO-2F; Wed, 20 Jul 2011 10:54:56 +0200 From: "DA Forsyth" Organization: IWR To: freebsd-fs@freebsd.org, freebsd-questions@freebsd.org Date: Wed, 20 Jul 2011 10:54:56 +0200 MIME-Version: 1.0 Message-ID: <4E2697E0.27289.3E5BF8BB@d.forsyth.ru.ac.za> Priority: normal In-reply-to: References: <4E257889.12343.39F99213@d.forsyth.ru.ac.za>, X-mailer: Pegasus Mail for Windows (4.52) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: d.mail.ru.ac.za (146.231.129.36) Cc: Subject: Re: How to fix bad superblock on UFS2? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d.forsyth@ru.ac.za List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 08:54:59 -0000 On 20 Jul 2011 , Maxim Konovalov entreated about "Re: How to fix bad superblock on UFS2?": > Try to use tools/tools/find-sb to locate superblocks. Thankyou Maxim I may yet need to use that on another partition, but last night I achieved some success by hacking fsck_ffs to display what it is doing. By doing this I found that it considers the 'first alternate' superblock to be the one in the LAST cylinder group. So, by using dd to copy a working superblock to block 128 and to the last one listed by 'newfs -N', fsck_ffs could then actually recover some files. Since I probably broke more things on this partition than were broken by the 'disk smoke event', I was not surprised when only about half the drives files showed up in lost+found and the primary folder is now empty (the whole drive is a Samba share with quotas, so I create a folder to share so that users cannot mess with the quota.* files). Not a problem for this partition as I have a full level 0 dump. I now have 2 more partitions to resurrect.... both report 'Cannot find file system superblock' though 'newfs -N' shows a sensible list of them, so I have hope. But, further thanks to you for pointing out find-sb, because in googling for that I found various other very useful things, including http://www.chakraborty.ch/tag/raid-filesystem-partition-recovery-ufs- freebsd/ which at the least, points out things to avoid doing (-: thanks -- DA Fo rsyth Network Supervisor Principal Technical Officer -- Institute for Water Research http://www.ru.ac.za/institutes/iwr/