Update the rpmbuild example to put files under packages
[openafs-wiki.git] / reguser / OpenAFSROVolumes.mdwn
1 In this section we will add read-only volume support to our OpenAFS cell.
2
3 At this point we should have the top-level directory structure:
4
5     /afs/                   -> root.afs
6       yoyodyne.com/         -> root.cell
7         project/
8           mayhem            -> project.mayhem
9         user/
10           alice             -> user.alice
11           bob               -> user.bob
12
13 == About volume groups ==
14
15 TODO: discussion about volume groups?
16
17 == Creating top level read-only volumes ==
18
19 Obtain admin credentials.
20
21     kinit admin
22     aklog
23
24 The <code>vos addsite</code> tool is used to declare read-only sites in
25 the VLDB. The first read-only site should match the location of the
26 read-only volume, i.e., the same fileserver and same partition on the
27 fileserver.  Additional read-only sites should be declared on other
28 fileservers.  Then, use <code>vos release</code> to distribute the files.
29
30 First, we create read-only volumes for the top level volumes.
31
32     vos addsite afs01 a root.afs
33     vos addsite afs02 a root.afs
34     
35     vos release root.afs
36     
37     vos addsite afs01 a root.cell
38     vos addsite afs02 a root.cell
39     
40     vos release root.cell
41
42 Refresh your client's cache to be sure the paths are re-evaluated.
43
44     fs checkvolumes
45     fs flushall
46
47 Now, the cache manager should resolve paths to the top level cell directory to
48 be served out of the read-only root.cell volume.
49
50     fs examine /afs/yoyodyne.com/
51
52 == Creating a read-only volume ==
53
54 Let's create read-only volumes for a volume in our cell.
55
56     vos addsite afs01 a project.mayhem
57     vos addsite afs02 a project.mayhem
58     vos release project.mayhem
59
60     fs examine /afs/yoyodyne.com/project/mayhem/
61
62 This path should now be served by the read-only copy of the volume.  The files
63 reside on both fileservers, and clients may use either one. If one file server
64 is down, clients should automatically fail over to the other server.
65
66 == Accessing read-write data ==
67
68 In order to access the read-write volume we must use a path that has
69 a read-write mount point.
70
71     fs example /afs/.yoyodyne.com/project/mayhem/
72
73 Sine Nomine Associates Nov 2017