[OpenAFS] Purging the client cache
Sat, 9 Jan 2010 18:50:48 +0000
On 9 Jan 2010, at 17:52, Russ Allbery wrote:
> What would be the best way to force a purge of the user's AFS cache
> they disconnect from the VPN, or at least ensure that the data doesn't
> persist on the local system for longer than a few hours after they
> working on it? Setting a lifetime for data in the cache would be
> sufficient, but I don't think there's a way to do that. Would the
> way to try to tackle this be to use fs setcache to reduce and then
> the cache as part of some script associated with the VPN
I think that's your best bet for Unix. Windows does have fs flushall,
which is a slightly neater way of achieving the same thing.
> Is there any simpler way?
In an ideal world, you'd think that fs flushvolume (and the
corresponding FlushVolumeData pioctl) would be your friend. However,
all that this does is move items in the cache into a discarded list
for eventual garbage collection. When (and whether) they actually get
discarded depends on cache utilisation - the cache truncate daemon
only truncates files when it needs to recover space.
There's all sorts of ways you could make this better by writing code,
but I assume you want something that will work with current (rather
than future) clients?