From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 20 23:22:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6FDF16A41F for ; Wed, 20 Jul 2005 23:22:44 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from crumpet.united-ware.com (ddsl-66-42-172-210.fuse.net [66.42.172.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECD3043D48 for ; Wed, 20 Jul 2005 23:22:42 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from [192.168.1.101] (ddsl-66-42-172-210.fuse.net [66.42.172.210]) (authenticated bits=0) by crumpet.united-ware.com (8.12.8p2/8.12.8) with ESMTP id j6KNJMwj048573 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 20 Jul 2005 19:19:23 -0400 (EDT) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: frank@exit.com Date: Wed, 20 Jul 2005 19:21:54 -0400 User-Agent: KMail/1.8 References: <1121880611.929.12.camel@realtime.exit.com> In-Reply-To: <1121880611.929.12.camel@realtime.exit.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1224922.qDkBpkRHDx"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200507201922.01906.mistry.7@osu.edu> X-Spam-Status: No, hits=1.5 required=5.0 tests=BAYES_99 autolearn=no version=2.64 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on crumpet.united-ware.com Cc: freebsd-hackers@freebsd.org Subject: Re: UFS2 recovery tool? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 23:22:44 -0000 --nextPart1224922.qDkBpkRHDx Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 20 July 2005 01:30 pm, Frank Mayhar wrote: > Due to a series of circumstances involving a RAID controller and an > unclear user interface and an unfortunate use of "fsck -y", I > managed to hammer a couple of very large file systems.=20 > (Fortunately I had a very recent copy of /home backed up elsewhere, > or I wouldn't be sending this email.) > > While I could live without the data on those file systems if I > absolutely had to, I know much of the data is recoverable with the > right tools. In fact I found a whole intact subtree using fsdb. > Unfortunately the root directory was wiped. While I can recover > the inode with fsdb, it doesn't allow me to allocate a new (free) > block for the directory contents. > > What I need is either a way to set up the root directory so I can > link the subtrees that I find to it, or, alternatively, something > like ffsrecov that will just pull the subtree off the dead > filesystem directly, writing it to a _live_ filesystem.=20 > Unfortunately, ffsrecov hasn't yet been updated to support UFS2. > > If I have to, I'll write the code myself, but I'm hoping here that > someone else has done so already. (At the moment it's hard for me > to find the time for such relatively complex development that isn't > directly work-related.) > > So, has anyone done this? If someone even has code lying around > that understands UFS2 and can create directories and allocate > blocks, even if it's not suitable for inclusion in ports, that > would be wonderful. Drop me email with a pointer to said code. > > Alternatively, if you have (detailed, low-level) advice as to how > to write the code, feel free to chime in. (Please, though, don't > tell me to look at fsck_ffs, fsdb and sys/ffs/*; that I know > already and it will be where I start if I end up writing this all > myself.) > > So here's hoping... scan_ffs and gpart have saved my butt more than a few times. =20 Depending on your situation they may or may not help. =2D-=20 Anish Mistry --nextPart1224922.qDkBpkRHDx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBC3tyZxqA5ziudZT0RAgrEAKDCn/Lmy2IWh/5xzQMN2UUzEcdVMgCgtZjm 4wMY8S1tarFbFb6kDJ1fMGY= =GciF -----END PGP SIGNATURE----- --nextPart1224922.qDkBpkRHDx--