From owner-freebsd-questions@FreeBSD.ORG Mon May 12 15:32:48 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFCBB37B401; Mon, 12 May 2003 15:32:48 -0700 (PDT) Received: from dynamic.hydro.washington.edu (dynamic.hydro.washington.edu [128.95.246.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20D1943FE0; Mon, 12 May 2003 15:32:48 -0700 (PDT) (envelope-from penglish@hydro.washington.edu) Received: from dynamic.hydro.washington.edu (localhost [127.0.0.1]) h4CMWdTP047626; Mon, 12 May 2003 15:32:39 -0700 (PDT) (envelope-from penglish@hydro.washington.edu) Received: from localhost (penglish@localhost)h4CMWdBL047623; Mon, 12 May 2003 15:32:39 -0700 (PDT) (envelope-from penglish@hydro.washington.edu) X-Authentication-Warning: dynamic.hydro.washington.edu: penglish owned process doing -bs Date: Mon, 12 May 2003 15:32:39 -0700 (PDT) From: Paul English To: Chuck Swiger In-Reply-To: <3EBD4405.8060406@mac.com> Message-ID: <20030512145220.K47130-100000@dynamic.hydro.washington.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-fs@freebsd.org cc: freebsd-questions@freebsd.org Subject: Filesystem directory structure recovery - competition for Beer of the Month Club X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 22:32:49 -0000 Hi Everyone, At Chuck's suggestion I'm opening up a competition for a 6 month subscription to Beer of the Month club. The Judge: That's me. A reasonably competent sysadmin. The Goal: Be the first one to send me the most helpful information on how to recover the directory structure of a messed-up filesystem. The Parameters: I had a disk failure. Unfortunately, I also discovered that my backup server (Legato Networker under Solaris) had run out of licenses. And tried to email me, but failed to inform me on the Networker screen that I keep open at all times. (I'm not bitter!) And I also discovered the email delivery wasn't working properly on that machine. So - I have no backups of this system. I sent my disk to a data recovery company. They were able to recover "all but 2%" of the data, but they did it in a raw mode and copied it to a new disk and sent that to me. I promptly copied that to yet another disk (using dd) so that I wouldn't mess up what I paid them so much money for. They're still trying to recover the directory structure for me, and if they beat you all the competition is off since they won't be giving me a refund! I am only interested in one separate partition on this disk with my user's data on it. So I tried to mount that partition, only to find that the superblock was bad. I used newfs -N to find out where the backup superblocks were, and found one (several actually) that were fine. Using fsck -b to restore it, then fsck wants to make LOTS of changes. If I say "yes" to everything, *all* of the data on the disk (15GB) ends up in lost+found. Some of the directory structure is preserved, but there 145 inode-numbered directories in the top level. If I say "no" to everything (except replacement of the bad superblock), I can mount it read-only (or rw with -f), but there is nothing there when I do an ls: #ls /mnt > ls: /mnt: Bad file descriptor I have not tried doing a mixture of yes's and no's to fsck's questions, since it asks a *lot* of questions about this filesystem, and I don't know which ones to say yes or no to in any case. That would be useful information. I would like to hand my user back his directory with all of those 145 inode-numbered directories in their proper places in the filesystem with their proper names. Without the names, places would still be helpful and vice versa. Paul