From owner-freebsd-fs@FreeBSD.ORG Sun Nov 2 17:39:18 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02583106567A for ; Sun, 2 Nov 2008 17:39:18 +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 8D6018FC24 for ; Sun, 2 Nov 2008 17:39:17 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-196-106-204.dynamic.qsc.de [92.196.106.204]) by mx01.qsc.de (Postfix) with ESMTP id 2B83050C6B; Sun, 2 Nov 2008 18:39:14 +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 mA2HdDrH001561; Sun, 2 Nov 2008 18:39:13 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sun, 2 Nov 2008 18:39:13 +0100 From: Polytropon To: frank@exit.com Message-Id: <20081102183913.d4ec58f6.freebsd@edvax.de> In-Reply-To: <1225642408.97152.15.camel@jill.exit.com> References: <20081102050601.9fccb80f.freebsd@edvax.de> <1225600923.97152.3.camel@jill.exit.com> <20081102082015.b8d40d77.freebsd@edvax.de> <1225642408.97152.15.camel@jill.exit.com> 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 FS Subject: Re: Repairing a defective UFS 2 partition with fsck_ffs (or other means) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Nov 2008 17:39:18 -0000 On Sun, 02 Nov 2008 08:13:28 -0800, Frank Mayhar wrote: > ffs2recov is a very low-level tool to recover files and data from a > corrupted file system. Among other things, it can search for > directories, print contents of inodes, recover files by name and recover > directory hierarchies given an inode and a name. This is something I must have misunderstood from the manual. As I mentioned before, English is not my native language. So it's possible that this part of the examples section If you would like to recover inode 2385 named dir and all it's decendants the command: % ffs2recov -c 2385 -n dir ffs.image will create dir, populate it, setting modes, permissions, and times to the originals. will not "recreate the inode", but will take this as a starting point to recover the rest... I'll investigate this further. > It's not for the faint > of heart but it can recover data that nothing else can. Up to this point, I agree that ffs2recov seems to be the most promising tool. But you're right, I have to learn more about this topic. It isn't that easy as creating a FAT with a hex editor. :-) > It sounds like your home directory inode has been trashed, in which case > your only choice is to try to find the directory blocks themselves, dump > them and use them to find the names of the files in that directory. > Otherwise you'll be stuck with them named by their inode. Thank you, this is a very good approach. I found ffs2recov very handy for the different stages, such as dumping blocks, retrieving inode informations and such things. > Those errors mean that there is very serious corruption on disk. I do believe it's so. Allthough I'm not sure what particularly caused the damage, according to fsck_ffs there seem to be many corruptions within the soft update data and the inodes, which form some kind of linked list, as far as I understood it. > The > program is ignoring those errors and forging on to try to find and > recover everything it can. It may be that you won't be able to recover > much. Depends on the "magnitude of damage"... which I can't tell exactly of. > You should, however, be able to recover at least some of your > data, especially the stuff that's further away (physically and > logically) from the trashed area of the disk. I need to try some more, and I think the ref_fs.txt from The Sleuth Kit mentioned in my first posting will give some good information about how files and directories, inodes, blocks and the other termini technici build up the basic principles of an UFS file system. It's... I never had much interest in how it worked, as long as it worked, but I found out that many knowledge is obtained when trying to solve some strange problem. After some time, you can explain how TCP/IP, routing or compilation processes work. :-) > I really can't hold your hand, here, since I'm overloaded as it is, > sorry. Best of luck. Thank you. You did really help me giving some advices. And after all... all the data loss and damages... I find the topic quite interesting. Allthough there's no high demand for this data, I'll take the time to learn more, and maybe find a way to solve the problem using ffs2recov. There's probably no need to reinvent the wheel until you learn how to drive. :-) /* PS. I'm not on the -fs mailing list. */ -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...