From owner-freebsd-questions@FreeBSD.ORG Thu Oct 30 02:35:07 2008 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 4B977106568F for ; Thu, 30 Oct 2008 02:35:07 +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 08D3E8FC14 for ; Thu, 30 Oct 2008 02:35:06 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-195-52-25.dynamic.qsc.de [92.195.52.25]) by mx01.qsc.de (Postfix) with ESMTP id DC34150DB2 for ; Thu, 30 Oct 2008 03:35:05 +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 m9U2Z4F3004244 for ; Thu, 30 Oct 2008 03:35:04 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Thu, 30 Oct 2008 03:35:04 +0100 From: Polytropon To: FreeBSD Questions Message-Id: <20081030033504.63973d33.freebsd@edvax.de> 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 Subject: Building an inode 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: Thu, 30 Oct 2008 02:35:07 -0000 Hi again, coming back to my problem with the inode of my home directory having disappeared, I found out that the tool ffs2recov from the ports is able to establish an inode entry for a directory where you can explicitely name the inode and the directory. I know which inode number my former home directory had, and of course I know its name. Would it be sufficient to % fs2recov -c 12345 -n poly ad0s1f.dd I think there's more to establish an intact directory structure. As far as I've already learned, when "walking back" the path from a file deep within a directory structure, every inode contains a field "where it comes from", let's say, where CWD and .. are (as an inode number): bla.txt dingens/ foo/ poly/ / 12380 -----> 12370 -----> 12360 -----> 12345 -----> 2 This would be /home/poly/foo/dingens/bla.txt on ad0s1f (where / is then mounted as /home). When I can assume that every inode still knows "where it came from", what would be a useful tool to build poly/ (12345) again? I think I'll need to construct its content again, because just by creating poly/ as 12345, where does the filesystem know from what's the content of poly/? Is the term "directory slots" I came across related to that topic? Which sources could give good hints? Sadly, fsck_ffs doesn't do the job... but maybe if I fix the file system a bit (instead of fixing fsck_ffs)...? Hey, it's not that I try to build my own nuclear plant in the living room... :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...