[OpenAFS] client loopback mount of AFS-hosted file

Steve Traugott stevegt@TerraLuna.Org
Thu, 30 Sep 2004 17:04:35 -0700


Hi All,

Has anyone ever tried (in Linux, with OpenAFS servers and clients) a
long-running loopback mount of a file from AFS space?  I'm not talking
about using a loopback mount for vicepa on the server; I'm talking about
doing something like this on an OpenAFS client:

    dd if=/dev/zero of=/afs/foo/bar.img bs=1M count=1000
    mkfs /afs/foo/bar.img 
    mount -o loop /afs/foo/bar.img /mnt
    [ long-running process chroots to /mnt and stays there for months ]

Concerns:

    - AFAIK the mount command itself will take a long time if the entire
      file isn't already in the local AFS client cache.  The cache
      manager needs to copy the entire file (e.g. 1Gb in the above
      example) before mount() returns.  Right?

    - Assuming the local cache is large enough to keep the entire 1Gb on
      disk at all times, when/how will dirty blocks get written back to
      the AFS server?  Only at unmount?  Or does it depend on the
      behavior of the loopback device driver?  Or the driver for the
      filesystem we made in bar.img?  I strolled around in loop.c, but
      didn't find anything that looked like it would trigger an fsync,
      for instance...  Is there any way in OpenAFS that, say, a cron job
      could force a periodic cache flush of dirty blocks?

Lacking root access on any AFS machine at the moment, I can't try the
mount myself; am considering building a cell just to test this, but
advance info (or warnings) ;-)  would be greatly appreciated.

Thanks,

Steve
-- 
Stephen G. Traugott  (KG6HDQ)
UNIX/Linux Infrastructure Architect, TerraLuna LLC
stevegt@TerraLuna.Org 
http://www.stevegt.com -- http://Infrastructures.Org