[OpenAFS] Force client to cache directory
Mon, 4 Jan 2010 19:00:58 +0100
Am Montag, 4. Januar 2010 16:56:44 schrieb Gilles Martin:
> I was wondering if it's possible to force caching a specific directory on a
> client. For example by running a cron job regularly. The aim of this is
> that the client in case of server problem has an up to date version of the
> files in its cache. I didn't find any command in the cache manager that
> does this, it's only possible to clear the cache, I would like to do the
> opposite, fill the cache !
Well, why not do something like an "ls -l" as a cron-job on the client ?
You just have to make sure, in case the ls-cmd is hanging, that you don't call
Calling this script by cron should work (not tested) :
LS_CMD="ls -l /afs/path"
if [ `ps -eaf | grep -v grep | grep -c "$LS_CMD"` == 0 ]; then