[OpenAFS] mountpoints are always RW...

Tino Schwarze tino.schwarze@informatik.tu-chemnitz.de
Tue, 11 Feb 2003 15:33:27 +0100


Hi there,

On Tue, Feb 11, 2003 at 02:24:51PM +0000, Hamish Marson wrote:

> OK. Either I'm doing something wrong, or my understanding of AFS is 
> severely flawed. My understanding of AFS clients is that they will 
> favour a RO copy of a volume over a RW copy, unless the -rw flag was 
> used when creating the mount with fs mkmount.

Alright. Therefore, there are two kinds of mount points in AFS:
1. automatic (favors RO if available and no RW was traversed yet)
2. forced-RW

The first type is marked by '#volume', the second by '%volume'.

> So why when I mount a volume on my AFS tree does fs lsmount always say 
> #volumename for BOTH /afs/.cellname/dir and /afs/cellname/dir (Which 
> will favour the RO copy? SHouldn't .cellname be the RW copy with 
> %volumename?) but fs examine shows it as the RW copy, and writing to the 
> .cellname tree shows up in the /afs/cellname tree without doing a 
> release? (I thought the RO path would read from the RO copy, and not 
> update till a release).

Well, the output of lsmout only shows you the kind of mount point, not
what volume gets used. Mount points are in fact symlinks, therefore
normal files.

> fs mkm  /afs/.cellname/web/site1/html/test html.test
> fs lsmount /afs/cellname/web/site1/html/test
> '/afs/cellname/web/site1/html/test' is a mount point for volume '#html.test'
> 
> fs lsmount /afs/.cellname/web/site1/html/test
> '/afs/.cellname/web/site1/html/test' is a mount point for volume 
> '#html.test'

This is correct. /afs/.cell/.../html/test and /afs/cell/.../html/test
are the same file. What volume is used, is decided by the client (based
on the path leading to the mount point).  It just uses the mount point
as a hint whether to use an RO or not. When you access test using
/afs/.cell, an RW volume will be used, but if you access test using
/afs/cell/... and all volumes on the path have RO clones (and no
mountpoint is a forced-RW), the RO volume will be used.

HTH! Tino.

-- 
             * LINUX - Where do you want to be tomorrow? *
                  http://www.tu-chemnitz.de/linux/tag/