[OpenAFS] Recovering filenames from namei fileserver's /vicepa tree

Richard Godbee rwg@vt.edu
Sun, 26 Jun 2005 16:05:29 -0400

When it rains, it pours... :-)

First off, I must admit that I am a complete AFS newbie -- everything  
I know about AFS is from what I've read in the past two days.

I received a (panicked) call the other day from one of our smaller  
departments on campus.  They lost their computer support person half  
a year ago, they haven't been able to hire another one, they hear I'm  
a Unix person, and something has happened to their Linux servers  
because nobody can access their files.  When I went over there, I  
found a fleet of Linux computers in various states of non-working  
that were all part of an AFS cell.

 From what little documentation there was, I worked out that they had  
two fileservers -- charlie and november -- and their Windows desktop  
machines were setup to store people's profiles (including their  
documents) on those machines.  charlie boots, but the AFS server  
refuses to start.  november won't even boot, and once I got it  
started off a rescue CD, I found an outside computer company the  
department hired to fix/maintain the servers had overwritten the  
first hard drive of the three disk software RAID 5 set with another  
Linux installation.  Just to make sure I couldn't bring the RAID  
array up by marking the first drive as failed, they also fdisk'd the  
remaining two drives.  Oh, did I mention there are no backups?

Here is where I stand now: I managed to recover november's RAID  
array, and I have copied both machines' /vicepa trees to my  
PowerBook.  At this point, we're uninterested in reconstructing their  
AFS cell.  They're bringing in a Windows admin, and she's going to  
move all of their desktops onto a University-managed OU with profiles  
stored on a University-managed NAS.

** What is the fastest/least-painful way for me to take these two / 
vicepa trees and get meaningful pathnames/filenames attached to the  
files? **

Here is what I've looked into so far:

- I found a document describing the structures the namei fileserver  
uses.  I'm not above writing a program that walks the structures, but  
the text is mostly German, which I can't read: http://archiv.tu- 

- I found src/vol/test/listVicepx.c in the OpenAFS source tree.  It  
looks like I could use its output and a Perl script to do what I  
need, but it looks listVicepx's source hasn't been kept up with the  
rest of the tree and it doesn't compile (missing headers, structs'  
members having new names, etc.).

- Can I bring up a fresh Linux box, install the OpenAFS server 
+client, point that OpenAFS server at one of the /vicepa trees, and  
copy out the files with their names intact?

If you've made it this far: Thank you for reading, and I would  
*greatly* appreciate any advice on the best way to proceed.

Richard Godbee, Unix Systems Administrator
Department of Geosciences, Virginia Tech
4044 Derring Hall (0420), Blacksburg, VA 24061
rwg@vt.edu / +1.540.231.7002 / +1.540.231.3386 (FAX)