[OpenAFS] data recovery from afs cache
Thu, 08 Jun 2006 13:46:37 -0400
On Thursday, June 08, 2006 03:34:24 AM +0200 Rafael Marco de Lucas
> i would like to rescue some data contained in an AFS client cache,
> i could locate some files by hand doing some "grep -r" in the cache
> directory but it is quite complex and this way i can not recover
> the filename,
> is it possible somehow to access as an offline filesystem ?
> and in example recover all the files in a tarball keeping all filenames
> and all the directory structure ?
> i would thank a lot any help,
Not trivially, no. The cache stores chunks of the contents of files and
directories. These are identified by each file's cell, volume, vnode
number, and uniqifier, which are collectively known as a File IDentifier or
FID. Cache chunks are not identified by filenames because, besides being
expensive to compute and process, filenames make extremely poor identifiers
(they are unstable, are not unique, and do not identify a unique object,
particularly when time is taken into account).
Reconstructing filenames might be possible in some cases, given the
CacheItems file and the complete contents of the cache. If you are looking
for a specific file or set of files, you are more likely to have success by
identifying the FID's of the files and directories you are interested in,
and then looking for cache chunks which correspond to those files.
-- Jeffrey T. Hutzelman (N3NHS) <email@example.com>
Sr. Research Systems Programmer
School of Computer Science - Research Computing Facility
Carnegie Mellon University - Pittsburgh, PA