9e8d9dd544c51be17b8bd4c9d4a750e0f74bdf12
[openafs.git] / doc / txt / vldb.txt
1
2 This document describes version 4 of the OpenAFS Volume Location Database
3 (VLDB) file format.
4
5
6 VLDB file layout
7
8 The vldb.DB0 file consists of 64 octet ubik header, followed by a 132,120 octet
9 vldb header, followed a variable number of vldb records.  Records are either a
10 148 octet volume location (vl) entry or a 8192 octet multi-homed (mh) extension
11 block.  A bit flag at a fixed offset of each record specifies the record type.
12 A field in the vldb header indicates the location of the last record. Any data
13 in the file following the last record is ignored.
14
15
16 Ubik header
17
18 The vldb.DB0 file begins with a 64 octet ubik header.  All fields are in
19 network byte order.  Only the first 16 octets of the ubik header are used.  The
20 unused fields should always be zero.  The first 16 octets of the ubik header
21 contain the representation of a struct ubik_hdr, with all the fields in network
22 byte order:
23
24        0                   1                   2                   3
25        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
26       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
27       |                           ubik_magic                          |
28       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
29       |            padding            |          header_size          |
30       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
31       |                             epoch                             |
32       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
33       |                            counter                            |
34       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
35       |                            [unused]                           |
36       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
37       |                            [unused]                           |
38       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
39       |                            [unused]                           |
40       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
41       |                            [unused]                           |
42       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
43       |                            [unused]                           |
44       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
45       |                            [unused]                           |
46       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
47       |                            [unused]                           |
48       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
49       |                            [unused]                           |
50       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
51       |                            [unused]                           |
52       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
53       |                            [unused]                           |
54       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
55       |                            [unused]                           |
56       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57       |                            [unused]                           |
58       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
59        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
60        0                   1                   2                   3
61
62 magic is the ubik file identification. It should always be 0x00354545.
63
64 pad1 is unused, should always be 0
65
66 header_size is the size of the ubik header (including unused space), should always
67 be 0x40
68
69 epoch is the ubik quorum epoch value.
70
71 counter is the ubik counter for transactions and updates.
72
73 unused space should always be zero.
74
75
76 The ubik header is not exposed through the VL_ RPC package, and as such is not
77 considered to be part of the logical VLDB database.
78
79 Subsequent discussion will refer to VLDB addresses, or simply addresses.  A
80 VLDB address is a logical offset to a data within the VLDB.  The physical file
81 offset of data referenced by a VLDB address is the VLDB address plus the size
82 of the ubik header (64 octets).
83
84
85 VLDB header
86
87 The VLDB header follows the ubik_header. It is the logical beginning of the
88 VLDB.  The VLDB header is 132120 octets in size. The majority of this space
89 contains four hash tables enabling quick lookups of volumes by name and id.
90 All integer fields are stored in network byte order.
91
92 The layout of the VLDB header is:
93
94         0                   1                   2                   3
95         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
96 octets +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
97      0 |                            version                            |
98        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
99      4 |                          headersize                           |
100        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
101      8 |                            freePtr                            |
102        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
103     12 |                            eofPtr                             |
104        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
105     16 |                            allocs                             |
106        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
107     20 |                             frees                             |
108        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
109     24 |                          MaxVolumeId                          |
110        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
111     28 |                         TotalEntries[0] (rw)                  |
112        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
113     32 |                         TotalEntries[1] (ro)                  |
114        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
115     36 |                         TotalEntries[2] (bk)                  |
116        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
117     40 |                          IpMappedAddr                         |
118        ~                              ...                              ~
119   1056 |                                                               |
120        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
121   1060 |                          VolnameHash                          |
122        ~                              ...                              ~
123  33820 |                                                               |
124        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
125  33824 |                          VolidHash[0] (rw)                    |
126        ~                              ...                              ~
127        |                                                               |
128        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
129        |                          VolidHash[1] (ro)                    |
130        ~                              ...                              ~
131        |                                                               |
132        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
133        |                          VolidHash[2] (bk)                    |
134        ~                              ...                              ~
135 132112 |                                                               |
136        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
137 132116 |                              SIT                              |
138        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
139         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
140         0                   1                   2                   3
141
142 vldbversion is the vldb disk format version number. This document describes
143 version 4.
144
145    Note: The OpenAFS vlserver creates empty vldb files as version 3, and
146          converts the vldb to version 4 in place the first time a fileserver
147          UUID is registered.
148
149 headersize is the size in octets of the vldb header, currently 0x020418 (132120)
150
151 freePtr is the logical address in octets of the first in a linked list of
152 unused vldb entries in the vldb database file (that is the first logical hole
153 in the database file). This value is zero if the database is densely packed.
154 The physical file offset to the first free entry is the freePtr value plus the
155 size of the ubik header (64 octets).
156
157 eofPtr is the logical address in octets of the end of the database file. When a
158 new entry is created that extends the database file, it will be created at this
159 logical index.The physical file offset to the end of the database file eofPtr
160 value plus the size of the ubik header (64 octets).
161
162 allocs is the number of calls to AllocBlock(), for statistical purposes.
163
164 frees is the number of calls to FreeBlock(), for statistical purposes.
165
166 MaxVolumeId is the largest volume id allocated. It is incremented every time
167 a volume is created.
168
169 TotalEntries[0] is the number of read-write volume entries.
170
171 TotalEntries[1] is the number of read/only volume entries.
172
173 TotalEntries[2] is the number of backup volume entries.
174
175 IpMappedAddr maps vl entry serverNumbers to file server information.  The vl
176 entry serverNumber field is used as an offset into the IpMappedAddr table.  The
177 IpMappedaddr is a table of 255 records, one for each possible serverNumber,
178 from 0 to 254.  Each record is a 32 bit integer in network byte order.  Empty
179 records should be zero filled.
180
181 IpMappedAddr records hold either a reference to a mh entry or a single IPv4
182 address.  Records which contain 0xFF in the first octet are references to mh
183 entries. Non-zero records which do not contain 0xFF in the first octet hold a
184 single IPv4 address in network byte order.
185
186 The format of a reference to a mh entry is:
187
188         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
189        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
190        |      0xFF     |     base      |            index              |
191        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
192
193 0xFF in the first octet indicates the record contains a multi-homed entry
194 reference, instead of an IPv4 address.
195
196 base is the mh extension block number; supported range is 0 to 3.
197
198 index is the index to the mh entry within the mh extension block; supported range
199 is 1 to 63. (Index of 0 is reserved for the mh extension block header.)
200
201 Following the index are four hash tables, each containing 8191 (a prime number)
202 32-bit entries in network byte order. Each entry represents a hash bucket and
203 holds the address of the vl entry at the head of the hash chain, or zero to
204 indicate an empty hash bucket.
205
206 VolnameHash is the hash table for searches by volume name.  The nextNameHash
207 field at the head of the chain holds the address of the next vl entry in the
208 hash chain.
209
210 The NameHash hash function is targetted for ASCII text and is similar to the
211 PRDB name hash function.  Each octet of the volume name is treated as an
212 unsigned integer from which 63 (decimal) is subtracted, and the resulting
213 stream of integers is used as the coefficients of a power series with base 63
214 (decimal), with the least significant coefficient appearing first.
215
216 For example, for a volume name string string of "abc", which is the stream
217 of octets (in decimal):
218
219    97 98 99
220
221 then the power series used in the hash function calculation would be
222 (all numbers in decimal):
223
224   34 + (35 * 63) + (36 * 63**2)
225
226 The value of this power series is stored in an unsigned 32-bit integer, and as
227 such is implicitly computed modulo 2**32.  The remainder modulo 8191 (the size
228 of the hash table) of this 32-bit value is used as the index into the hash
229 table for this name entry.  (This hash function can be easily implemented
230 iteratively.)
231
232
233 VolidHash[0] is the hash table for searches by read-write volume ID. The
234 nextIdHash[0] field at the head of the chain holds the address of the next vl
235 entry in the hash chain.
236
237 VolidHash[1] is the read-only volume ID to vldb entry hash table. The
238 nextIdHash[1] field at the head of the chain holds the address of the next vl
239 entry in the hash chain.
240
241 VolidHash[2] is the backup volume ID to vldb entry hash table. The
242 nextIdHash[2] field at the head of the chain holds the address of the next vl
243 entry in the hash chain.
244
245 The VolidHash hash function the remainder modulo 8191 (the size of the hash
246 table) of the absolute value of the volume id.
247
248
249 SIT holds the logical address of the first multi-homed extension block in the
250 vldb. Each multi-homed extension block holds 4 logical addresses to additional
251 multi-homed extension blocks.
252
253
254 VLDB Records
255
256 VLDB Records follow immediately after the VLDB header. Each record is either a
257 148 octet sized volume location (vl) entry or a 8192 octet sized multi-homed
258 (mh) extension block.  A bit flag at a fixed offset specifies the record type.
259
260     Note: The mh extension block size is *not* a multiple of the
261           vl entry size.
262
263 The only invariant field is the single bit field which indicates the
264 record type:
265
266         0                   1                   2                   3
267         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
268 octets +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
269      0 |                       [record-specific]                       |
270        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
271        |                       [record-specific]                       |
272        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
273        |                       [record-specific]                       |
274        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
275     12 |              [record-specific-flags]                  |C| ... |
276        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
277        |                       [record-specific]                       |
278        ~                            ...                                ~
279        |                                                               |
280        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
281
282 C is the continuation block flag (VLCONTBLOCK). A value of 0 indicates the
283 record is a 148 octet vl entry. A value of 1 indicates the record is a 8192
284 octet mh extension block.
285
286
287 VL Entry
288
289 The 148 octet vl entry maps a volume group to a set of file server locations
290 for each volume in the volume group.  A volume group consists of a single
291 read-write volume, zero or one backup volumes, zero or more read-only volumes,
292 and zero or one temporary clone volumes.
293
294 The vl entry also holds information for volume administration.
295
296 All integer fields are in network byte order.
297
298 The layout of the vl entry is:
299
300         0                   1                   2                   3
301         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
302 octets +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
303      0 |                         volumeId[0] (rw)                      |
304        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
305        |                         volumeId[1] (ro)                      |
306        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
307        |                         volumeId[2] (bk)                      |
308        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
309     12 |                             flags                             |
310        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
311        |                           LockAfsId                           |
312        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
313        |                        LockAfsTimestamp                       |
314        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
315        |                            cloneId                            |
316        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
317        |                        nextIdHash[0] (rw)                     |
318        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
319        |                        nextIdHash[1] (ro)                     |
320        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
321        |                        nextIdHash[2] (bk)                     |
322        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
323     40 |                         nextNameHash                          |
324        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
325     44 |                             name                              |
326        +                                                               +
327        |                                                               |
328        ~                              ...                              ~
329        |                                                               |
330        +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
331    108 |               |      serverNumber table                       |
332        +-+-+-+-+-+-+-+-+                                               +
333    112 |                                                               |
334        +                                                               +
335        |                                                               |
336        +                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
337    120 |                               |                               |
338        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
339    124 |                      serverPartition table                    |
340        +                                                               +
341        |                                                               |
342        +                                               +-+-+-+-+-+-+-+-+
343    132 |                                               |               |
344        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
345    136 |                      serverFlags table                        |
346        +                                                               +
347        |                                                               |
348        +                                                               +
349    144 |                                                               |
350        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
351         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
352
353
354 volumeId[0] is the volume id allocated for the read-write volume in this volume
355 group.  (The VLF_RWEXITS flag is set when the read-write volume is created.)
356
357 volumeId[1] is the volume id allocated for read-only volumes in this volume
358 group.  This number is allocated when the entry is created. (The VLF_ROEXISTS
359 flag is set when a read-only volume is created.)
360
361 volumeId[2] is the volume id allocated for the backup volume in this volume
362 group, if one.  This number is allocated when the entry is created. (The
363 VLF_BACKEXISTS flag is set when a backup volume is created.)
364
365 flags is a bitmap which indicates the vl entry state:
366
367 0x0001  VLFREE          indicates this entry is on the free list
368 0x0002  VLDELETE        indicates this entry is deleted
369 0x0004  VLLOCKED        not used; always zero
370 0x0008  VLCONTBLOCK     always zero in vl entries
371 0x0010  VLOP_MOVE       locked for a move operation
372 0x0020  VLOP_RELEASE    locked for a release operation
373 0x0040  VLOP_BACKUP     locked for a backup clone operation
374 0x0080  VLOP_DELETE     locked for a delete or addsite operation
375 0x0100  VLOP_DUMP       locked for a dump or restore operation
376 0x1000  VLF_RWEXISTS    this group has a read-write volume
377 0x2000  VLF_ROEXISTS    this group has at least one read-only volume
378 0x4000  VLF_BACKEXISTS  this group has a backup clone
379 0x8000  VLF_DFSFILESET  not used; always cleared
380
381 High order bits of the flags field are reserved and should always be zero.
382
383 LockAfsId is not used. This field is reserved to hold the id of the operator
384 who locked the entry for a volume operation.
385
386 LockTimestamp is the time stamp on the entry lock.
387
388 cloneId is the volume id of the temporary clone volume, which may be
389 created during volume operations.
390
391 nextIdHash[0] is the logical address of the next vl entry on the
392 read-write volume id hash chain.
393
394 nextIdHash[1] is the logical address of the next vl entry on the
395 read-only volume id hash chain.
396
397 nextIdHash[2] is the logical address of the next vl entry on the backup
398 volume id hash chain.
399
400 nextNameHash the logical address of the next vl entry on the volume name
401 hash chain.
402
403 name is a 65 octet field which holds the volume name, as a null
404 terminated string.
405
406 serverNumber, serverPartition, and serverFlags fields form a 13 row by 3
407 column table. Each row describes a volume site. Empty rows are filled with
408 0xFF instead of zero.
409
410 serverNumber is a number from 0 to 254. The IpMappedAddr record at the
411 serverNumber offset has a reference to a multi-homed (mh) entry. The mh entry
412 holds the fileserver uuid and one or more IPv4 addresses of the fileserver.
413
414 serverPartition is a number from 0 to 255 which represents a file server
415 partition, from /vicepa to /vicepih.
416
417 serverFlags indicates the state of the volume site:
418
419 0x01  VLSF_NEWREPSITE    read-only volume added to vldb, but not released yet
420 0x02  VLSF_ROVOL         a read-only volume is present at this location (see Notes)
421 0x04  VLSF_RWVOL         a read-write volume is present at this location (see Notes)
422 0x08  VLSF_BACKVOL       a backup volume is present at this location (see Notes)
423 0x10  VLSF_UUID          not used in the vldb; always zero
424 0x20  VLSF_DONTUSE       out of date read-only volume
425 0x40  VLSF_RWREPLICA     reserved for volume is a read-write replica
426
427 Notes:
428
429 1. In practice, one, and only one, of the VLSF_ROVOL, VLSF_RWVOL, VLSF_BACKVOL
430    flags are set per table row.
431
432 2. In practice, the VLSF_BACKVOL flag is not used. Instead the VLF_BACKEXISTS
433    is set in the vl entry to indicate a backup clone is present on the same
434    fileserver and partition as the read-write volume. This saves an entry
435    in the table to allow for more read-only sites.
436
437
438 Multi-homed Extension Block
439
440 Multi-homed extension blocks are 8192 octets in size. The first 128 octets hold
441 a header, which is mostly unused.  The header is immediately followed by 63 mh
442 entry slots, each 128 octets in size.
443
444 Up to 4 blocks may be present in the vldb. The address of the first block is
445 held in the SIT field of the vldb header.  Addresses of the first and
446 additional blocks are held in the contaddr field of the first block.
447
448 Note: In the current format, the vldb is limited to 4 blocks, and 63 mh entries
449 per block, which means the vldb is limited to 252 different mh servers, which
450 is three less than the maximum number of server numbers (255).
451
452
453 Multi-homed Extension Block Header
454
455 The layout of the mh extension block is:
456
457         0                   1                   2                   3
458         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
459 octets +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
460      0 |                             count                             |
461        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
462      4 |                           reserved[0]                         |
463        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
464      8 |                           reserved[1]                         |
465        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
466     12 |                             flags                             |
467        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
468     16 |                           contaddr[0]                         |
469        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
470     20 |                           contaddr[1]                         |
471        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
472     24 |                           contaddr[2]                         |
473        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
474     28 |                           contaddr[3]                         |
475        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
476     32 |                            reserved                           |
477        +                                                               +
478        |                                                               |
479        ~                              ...                              ~
480    124 |                                                               |
481        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
482
483 count is not used.
484
485 reserved[0], reserved[1] should always be zero.
486
487 flags must have the VLCONTBLOCK bit set to indicate this is a 8192 octet
488 mh extension block. All other bits in this field should be zero.
489
490 contaddrs is a table of the addresses of the mh extension blocks, including
491 the first block.
492
493 reserved should always be zero.
494
495
496 Multi-homed Entry
497
498 The mh entry contains information for a single file server. Each mh entry
499 is 128 octets in size.
500
501         0                   1                   2                   3
502         0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
503 octets +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
504      0 |                         uuid.time_low                         |
505        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
506      4 |         uuid.time_mid         |   uuid.time_hi_and_version    |
507        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
508      8 | uuid.clock_hi | uuid.clock_lo |          uuid.node            |
509        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
510     12 |                                                               |
511        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
512     16 |                           uniquifier                          |
513        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
514     20 |                            addrs[0]                           |
515        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
516     24 |                            addrs[1]                           |
517        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
518     28 |                            addrs[2]                           |
519        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
520     32 |                            addrs[3]                           |
521        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
522     36 |                            addrs[4]                           |
523        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
524     40 |                            addrs[5]                           |
525        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
526     44 |                            addrs[6]                           |
527        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
528     48 |                            addrs[7]                           |
529        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
530     52 |                            addrs[8]                           |
531        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
532     56 |                            addrs[9]                           |
533        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
534     60 |                            addrs[10]                          |
535        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
536     64 |                            addrs[11]                          |
537        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
538     68 |                            addrs[12]                          |
539        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
540     72 |                            addrs[13]                          |
541        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
542     76 |                            addrs[14]                          |
543        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
544     80 |                             flags                             |
545        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
546     84 |                            reserved                           |
547        ~                               ...                             ~
548    124 |                                                               |
549        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
550
551
552 uuid is the universal unique id the fileserver used when registering
553 with the vldb.
554
555 uniquifier is a serial number of the mh entry. The first mh entry is assigned a
556 uniquifier of 1.  The uniquifier is incremented each time its containing entry
557 is modified.
558
559 addrs[0..14] holds a list of IPv4 addresses for this fileserver, each in
560 network byte order.  Zero indicates an empty slot.
561
562 flags is reserved and should always be zero.
563
564 reserved should always be zero.
565