[OpenAFS] recovering corrupted save on file

Rafael Marco de Lucas rmarco@ifca.unican.es
Thu, 08 Jun 2006 17:48:22 +0200


This is a multi-part message in MIME format.

--Boundary_(ID_XEIB+/T3i2HnlTd/5wMF2w)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline


Hi Jeffrey,

thanks for your fast answer, but i can not understand why it has to be so hard....
as i understand each time the system tries to access an afs file it does the
callback to know if it has changed in the server and if it has not changed then
the system takes it from the local cache, is it right ?

then would it be enough to fix it somehow just to do a bypass to the callback...
to avoid checking it with the server ? (i mean, simulate that the server always
says: ok, take it from the local cache)

cheers, Rafa

pd1. of course i realized that touching code is not as easy as writing emails ;-)
pd2. other stupid question, changing the clock to the past would thank to avoid
the callback ?


--Boundary_(ID_XEIB+/T3i2HnlTd/5wMF2w)
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 7BIT

A client side cache does not contain data that is useful to a file
server.   There is no easy way to copy the data to the server.  The
cache does not contain files, it contains the most recently used blocks
of data required by the client.  Developing a tool to extract those
data blocks and use them to partially reconstruct files would be a
significant development project.

Jeffrey Altman


Rafael Marco de Lucas wrote:
> I think i have more or less the same problem...
> i would like to recover a ton of files from some big afs caches...
> 
> is there any easy way like copy the cache into a new AFS server ?
> 
> if some tool development for it make sense maybe i would be
> able to dedicate some time on it, but i would need a lot of help
> since i never had a look inside openafs code,
> (it could help for many afs server hardware disaster with lost of data)
> 
> i would thank any comment about it,
> 
> regards,
> Rafa
> 
> 
> 
> ------------------------------------------------------------------------
> 
> The cache does not store files it contains blocks.  There is no
> guarantee that a file will be entirely contained in the cache.
> 
> You do not specify which OS you are using.  On Windows the cache
> file is simply a paging file for dedicated virtual memory.  Assuming
> the afsd_service.exe is shut down cleanly it would be possible to
> write code that could walk the contents of the cache to piece together
> the blocks of the file that exist.  However, no such tools currently
> exist.  The tool would have to be able to determine the cell, volume,
> vnode, and unique values for the file in order to find the correct
> stat cache entry and data buffers.
> 
> Jeffrey Altman
> 
> 
> David Bear wrote:
>> We have one room in one building that on occasion has some very
>> strange network disruption. It last about 8 minutes. When it clears
>> everything works fine.
>>
>> The problem is that if someone has a file stored in an afs server open
>> on their client, AND they perform a save when the network has its
>> tantrum, the file is corrupted; either truncated to 0 bytes or filled
>> with garbage.
>>
>> Is there any possible way to recover a file like this from the local
>> cache manager? I assume the local machine would commit some form of
>> the file to the local disk -- stored by the cache manager and then
>> actual write to the network would happen later. 
>>
>> Of course we are trying to troubleshoot the network -- but at this
>> university that's not something that happens very fast... especially
>> when the problem is only intermittent.


--Boundary_(ID_XEIB+/T3i2HnlTd/5wMF2w)--