Subject: Re: FFS drive recovery experiences?
To: None <netbsd-users@netbsd.org>
From: Richard Grace <rgrace@aapt.com.au>
List: netbsd-users
Date: 06/04/2002 10:34:08
>>> Amitai Schlair <schmonz@schmonz.com> 4/06/2002 04:48:44 >>>

> I screwed up and left important data on a drive without backing up.
> Naturally, the drive figured this out.
>=20
> I'm willing to fork over the dough to get this data back. Can anyone
> make a recommendation from experience with an FFS-savvy vendor?

Perhaps I misunderstand the extent of the damage, but...

OpenBSD has a tool called scan_ffs, which will read the sectors
of the disk looking for superblock magic numbers, and display the
ranges of sectors which belong to the filesystem, and the times
they were last mounted, etc. which enables you to re-create the
disklabel and fsck the partitions to get the data back - depending
on how badly overwritten the disk is, you may get quite a bit.

I ran this successfully on a 9GB disk, in only a couple of hours,
and got my data back, though I had only gone as far as making
the new filesystems before I realized it was the wrong disk.  My
machine was a Sun IPX (sun4c), but I think it should work for all
FFS/UFS disks.

I did manage to get the util compiled and working on NetBSD, but
there was a lot of work required, and I needed to import a lot of
OpenBSD source.  I'd be happy to share this if someone thought
they would like to make a package for NetBSD (ideally, someone
who knows more about filesystems than I do).

:-)

Good luck,=20

Richard.