[OpenAFS] reading files in the client cache area
Simon Wilkinson
sxw@inf.ed.ac.uk
Sat, 9 Jan 2010 12:59:37 +0000
On 9 Jan 2010, at 12:17, sabah s. salih wrote:
> I tried running
>
> fs checkvolumes
>
> to copy files from local client machines to the server.
fs checkvolumes doesn't do this. As it says in the man page
"The fs checkvolumes command discards the table of mappings
between
volume names and volume ID numbers that the Cache Manager
stores in
memory and uses when fetching data from volumes. The next time
an
application requests AFS data, the Cache Manager must contact
the
Volume Location (VL) Server for volume location information,
and then
an appropriate file server machine for the actual data."
> Is there any other way to list files cashed in the local clients and
> copy them to the server?
There is no tool currently available to do this. It's theoretically
possible that you might be able to recover some data in this way, but
how much you can regain will depend on how much is still in client
caches, and how much of the cell's state is still the same as when the
data is lost. Information is stored in the AFS cache in a set of
chunks, with each file being comprised of a number of chunks - only
those chunks which have been read from a given client will be in that
clients cache. Information in the cache is indexed, not by the
filename, but by the AFS FID (a numerical identifier). Being able to
link files back into the correct location in the directory tree will
require knowing what all of the volume identifiers were at the time
the data was lost (which may be difficult if you have recreated new
volumes with the old names), and being able to recover all of the
directories which were in the path of that location.
In addition, the client never saves to disk file metadata (ownership,
Unix mode bits), and never sees directory ACL data, so that
information will not be available from the clients.
It's possible that you might be able to partially reconstruct some
data by going down this route, although how much really does depend on
the way your cell is used, and the actions you've taken since the data
was lost. If you did want to explore this further, your best bet would
probably be to speak to one of the companies offering AFS consultancy
( see http://www.openafs.org/support.html ) with regards to developing
such a tool, and going through the steps of combining the data it
produces back into a directory tree.
Cheers,
Simon.