[OpenAFS] Read-Write Disconnected Mode - How does it work?

Simon Wilkinson sxw@inf.ed.ac.uk
Sat, 31 Jan 2009 23:55:37 +0000


On 31 Jan 2009, at 23:34, William McCabe wrote:

> The latest version of openafs 1.5.57 can use volumes in a  
> disconnected read-write mode.

Indeed it can. The work was done by Dragos Tatulea as part of last  
year's Google Summer of Code.

> Where can I find some documentation for how to use this feature? Is  
> the feature stable? What are the bugs?

There's not much user documentation available. Disconnected  
operations is still under active development - whilst I'd love to get  
feedback from power users who are testing it, it probably isn't  
entirely ready for production use. The major showstopper here is that  
we don't have a mechanism for preserving the state of the cache  
across machine reboots. This means that if you reboot your machine  
for any reason whilst disconnected, you lose all of the changes made  
whilst in the disconnected state. Obviously, this is a significant  
data loss issue and one that needs to be resolved before its ready  
for widespread use.

That said, of the currently known bugs in disconnected, which are  
tracked in RT at  http://rt.central.org/rt/Ticket/ 
Display.htmlid=124148&user=guest&pass=guest there don't appear to be  
any other significant data loss issues, and I'd be very grateful to  
hardy souls who wish to try it out and provide additional bug reports.

The user interface is currently pretty primitive (the other major  
issue that we need to resolve before it's 'done').

Before disconnecting, you must first prime your cache with all of the  
files you wish to use whilst disconnected. Eventually, we will have a  
pinning mechanism which will allow the cache manager to do this for  
you. I typically prime my cache by doing something along the lines of
find . | xargs cat > /dev/null

Then, you can take the cache manager disconnected by running (as root)
fs discon offline

You may then read and write files in the primed set as you see fit.

When you are back on a decent network connection, you can go back  
online by running, as root, and
with appropriate tokens:
fs discon online

This may fail either due to conflicts on the server, or due to  
transient errors such as connection timeouts. If it does so, you can  
retry simply by running the command again. Server conflicts currently  
have to be repaired by hand. If you're in a situation where you just  
can't fix the problem, and you're happy to discard the data, 'fs  
discon online -force' will reconnect you, throwing away any stored  
changes.

I've so far run a number of file system test utilities against  
disconnected mode, as well as using it for some day to day work, and  
a large number of package builds. I'm not currently aware of any way  
to break the current code. There are some additional fixes in CVS,  
over the 1.5.57 release, so if you are interested in testing, using  
the tip of the 1.5 branch is a good place to start.

If you do try it out, please do let me know how you get on!

Thanks,

Simon.