Date: Wed, 20 Jul 2005 10:30:11 -0700 From: Frank Mayhar <frank@exit.com> To: hackers@freebsd.org Subject: UFS2 recovery tool? Message-ID: <1121880611.929.12.camel@realtime.exit.com>
next in thread | raw e-mail | index | archive | help
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. (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. 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... -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1121880611.929.12.camel>