Added initial unfs3 sources for version 0.9.22+dfsg-1maemo2
[unfs3] / unfs3 / Extras / tags.7
1 .\"
2 .\" (C) 2004, Pascal Schmidt
3 .\"
4 .TH tags 7 "04 Jan 2004"
5 .SH NAME
6 tags \- tagged files used for clustering extensions
7 .SH DESCRIPTION
8 Tagged files are used by
9 .B ClusterNFS
10 and
11 .B unfs3
12 to support NFS exporting directories like
13 .I /etc
14 and
15 .I /var
16 to a cluster of client machines. The problem at hand is that different
17 files need to be served to different clients. Tagged files provide a
18 way to specify which file should be served to which client(s).
19 .P
20 Tags are appended to the end of a filename and are seperated from the
21 rest of the name by beginning and ending with $$. For each file, there
22 can be multiple tagged variants. The normal file, without a tag, is
23 only served to clients by default when no tagged file matching the client is
24 found. The following tags exist:
25 .TP
26 .B file$$$$
27 If a client attempts to access this file, it will be redirected to the
28 normal file instead, no matter what other tagged files exist. This
29 is mainly useful for use inside symlinks that need to point to a normal
30 file although other access to the normal file should be redirected. In
31 this special case, the tagged file
32 .B file$$$$
33 does not even need to exist (the symlink will then seem to be dangling
34 on the server).
35 .TP
36 .B file$$IP=a.b.c.d$$
37 If a client with an IP address of
38 .I a.b.c.d
39 attempts to access the normal file,
40 it will be redirected to this file instead.
41 .TP
42 .B file$$IP=a.b.c.d_n$$
43 If a client with an IP adress in the network
44 .I a.b.c.d/n
45 attempts to
46 access the normal file, it will be redirected to this file instead. Note that
47 .B unfs3
48 only supports 8, 16, and 24 as values for
49 .BR n .
50 .TP
51 .B file$$HOST=name$$
52 If a client with the hostname
53 .I name
54 attempts to access the normal file, it will be redirected to this file instead.
55 .TP
56 .B file$$HOST=name*$$
57 If a client whose hostname begins with the string
58 .I name
59 attempts to access the normal file, it will be redirected to this file instead.
60 .TP
61 .B file$$CLIENT$$
62 If any client attempts to access the normal file, it will be redirected to this
63 file instead.
64 .TP
65 .B file$$ALWAYS=IP$$
66 If any client attempts to access or create the normal file, it will be redirected to
67 .B file$$IP=a.b.c.d$$
68 instead, where
69 .I a.b.c.d
70 is the IP address of the client. It does not matter whether the target
71 tagged file exists or not.
72 .TP
73 .B file$$ALWAYS=CLIENT$$
74 If any client attempts to access or create the normal file, it will be redirected to
75 .B file$$CLIENT$$
76 instead. It does not matter whether that file exists or not.
77 .TP
78 .B $$ALWAYS=CLIENT$$
79 Like above, but effective for all files in the directory where it is found.
80 .TP
81 .B $$ALWAYS=IP$$
82 Like above, but effective for all files in the directory where it is found.
83 .PP
84 Note that the ALWAYS tag can lead to file not found errors on clients
85 if the tagged files it redirects to does not exist on the server. For
86 example,
87 .BR ls (1)
88 can suffer from this problem. Furthermore, this tag is a
89 .B unfs3
90 extension and does not exist in
91 .BR ClusterNFS .
92 When this tags exists, it prevents all access to the normal file by any
93 client.
94 .TP
95 .B file$$CREATE=IP$$
96 If any client attempts to create the normal file,
97 .B file$$IP=a.b.c.d$$
98 will be created instead, where
99 .I a.b.c.d
100 is the IP address of the client.
101 .TP
102 .B file$$CREATE=CLIENT$$
103 If any client attempts to create the normal file,
104 .B file$$CLIENT$$
105 will be created instead.
106 .TP
107 .B $$CREATE=IP$$
108 Like above, but effective for all files in the directory where it is found.
109 .TP
110 .B $$CREATE=CLIENT$$
111 Like above, but effective for all files in the directory where it is found.
112 .PP
113 Tags work for all kinds of named filesystem objects.
114 If multiple tagged files
115 are found for a normal file, they are considered in the order they are
116 given above, starting at the top. Processing stops once a match is found.
117 In
118 .BR ClusterNFS ", but not in " unfs3 ,
119 only files accessible and readable by a client are considered matches.
120 .SH AUTHOR
121 Pascal Schmidt
122 .SH "SEE ALSO"
123 .BR unfsd (8)