BPF Performance Tools book

Recent posts:
Blog index
About
RSS

Brendan Gregg's Blog

home

findbill

10 Jan 2006

I originally posted this at http://bdgregg.blogspot.com/2006/01/findbill-i-just-made-quick-update-to.html.

I just made a quick update to findbill: a simple Perl program that scans a disk to find where backup UFS superblocks are. These are used during disaster recovery, when a UFS file system can no longer be mounted, and a backup superblock must be used for repair.

Most of the time sysadmins use "newfs -N" to find backup superblock locations, which prints where they would be placed by default. However, if you have tuned file system parameters, then those default locations may have changed. This means that the "newfs -N" approach no longer works. My findbill tool can be used instead, as it scans for superblocks on disk rather than guessing where they would be.

The findbill output now includes information from the superblocks: last write time and mountpoint, if available. This should help identify false positives, such as older superblocks from a previous filesystem that have yet to be overwitten.

# findbill /dev/rdsk/c0d0s3
Searching /dev/rdsk/c0d0s3,

Type     Block    Time last written         Mountpoint
UFS      16       Sun Jan  8 16:11:42 2006  /extra1
UFS      32       Sun Apr 17 18:28:54 2005
UFS      32352    Sun Apr 17 18:28:54 2005
UFS      64672    Sun Apr 17 18:28:54 2005
UFS      96992    Sun Apr 17 18:28:54 2005
UFS      129312   Sun Apr 17 18:28:54 2005
UFS      161632   Sun Apr 17 18:28:54 2005
UFS      193952   Sun Apr 17 18:28:54 2005
^C

It's called "findbill" as I've heard the UFS magic number (0x011954, which I scan for) is either Bill Joy's or Marshall Kirk McKusick's birthday. They are the authors of the BSD Fast File System (FFS), which became UFS. The UFS cylinder block magic number (0x090255) looks suspiciously like a birthday as well (I don't know who).

Update: I later confirmed that it is Marshall Kirk McKusick's birthday, so the tool should be called findkirk!

findbill also identifies superblocks from MTB_UFS: the revamped UFS for the world of terabyte filesystems. UFS lives!


Site Navigation


BPF Performance Tools book

Recent posts:
Blog index
About
RSS