[OpenAFS] readonly/readwrite

Derek Atkins warlord@MIT.EDU
01 Mar 2001 14:05:28 -0500


Corey Kovacs <ckovacs@DEPAUW.EDU> writes:

> So when I create a "home" volume, by default it will exhibit the behavior I
> want (distributed homes) since the client will not find a RO volume because
> I have not issued the 'vos addsite' command.  But when I create the volumes

This is correct.  There is only the RW volume, so that's what clients
get.

> for system binaries etc, I DO issue the 'vos addsite' which then creates the
> RO (.usr.X11) volumes which the client tries to use by default, which again
> is the way to do it. When I make changes to the RW version (usr.X11)
> then I do a 'vos release' on that particular RW volume and the changes will
> propogate to the RO volume and then users will have access to the new files.

Mostly correct.  You are still confusing volume names and mountpoints.
Let's follow through your example.  First let's "setup" a normal cell,
you create the root.afs and root.cell volumes, and mount them
appropriately (note, these commands are not exactly right -- they are
just showing the general operations you want to perform, not how you
perform them):

	vos create ... root.afs
	vos create ... root.cell
	fs mkm /afs/<cellname> root.cell -cell <cellname>
	fs mkm /afs/.<cellname> root.cell -cell <cellname> -rw

So, everything under /afs/cellname will be a mix of RO and RW volumes,
but under /afs/.cellname will be ONLY RW volumes.  With this in mind,
we can replicate root.afs and root.cell:
	vos addsite ... root.afs
	vos addsite ... root.cell
	vos release root.afs
	vos release root.cell

Now, when you go to /afs/<cellname>, you will get the RO copy of the
volume.

Now you want to create a volume for X11 user code.  Let's call the
volume "usr.X11".  You create the RW volume: vos create -server afs1
-partition a -name usr.X11

Next, you mount the volume where you want users to see it (note that
you need to make the mountpoint in the RW copy of the system):

	fs mkm /afs/.<cell>/system/usr.X11 usr.X11

Next you can replicate this volume and add data to it.  Whenever you
want to add or change the data, you access the RW volume via the
dot-path: /afs/.<cell>/system/usr.X11.  Normal operations, however,
access through the normal path and get the RO volume:
/afs/<cell>/system/usr.X11

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available