Subversion Repositories planix.SVN

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.HTML "Venti Backups to Blu-Ray Discs"
2
.EQ
3
delim $$
4
.EN
5
.
6
.TL
7
Venti Backups to Blu-Ray Discs
8
.AU
9
Geoff Collyer
10
.AI
11
.MH
12
.SH
13
Overview
14
.PP
15
As a precaution against multiple disks in our
16
Plan 9
17
.I venti
18
server's RAID array failing at about the same time,
19
or other catastrophic failure, we record
20
.I venti
21
arenas,
22
after they are sealed,
23
onto dual-layer Blu-Ray discs (BDs).
24
One could use other large optical discs instead.
25
.PP
26
The advertised capacity of a dual-layer BD is 50GB,
27
but those aren't even disk-manufacturer's (decimal) gigabytes,
28
which would give a capacity of
29
$50 times 10 sup 9$ bytes,
30
which is roughly equivalent to 46.6 gigabytes,
31
as the term is used by everyone but disk manufacturers.
32
In the case of BDs,
33
even that is an exaggeration, with the actual capacity being
34
closer to $48.44 times 10 sup 9$ bytes,
35
so the claimed capacity should be read as `50 BD-gigabytes',
36
where a
37
.I BD-gigabyte
38
is 968,800,338 bytes.
39
The default
40
.I venti
41
arena size is 512MB, but for some reason our server is configured
42
with 1GB arenas, so we could fit 46 of them on a BD.
43
To leave a little extra room for lead-in, lead-out, inter-track gaps,
44
lossless-linking and the like,
45
we record 45 arenas per BD.
46
.PP
47
The scripts used and records kept are in
48
.CW /sys/lib/backup
49
and pertain to the file server on which they are stored.
50
You will probably want to edit
51
.CW funcs
52
to set default file server and Blu-ray device, at minimum.
53
.SH
54
Creating and Updating Backups
55
.PP
56
We start
57
.I cdfs
58
after inserting a disc (virgin or partially-written),
59
then use
60
.I venti/rdarena
61
to copy the next sealed but not backed-up arena
62
to the start of the unwritten portion of the BD by writing to
63
.CW /mnt/cd/wd/x .
64
We don't fixate data BDs, as that seems to tickle a bug,
65
perhaps in our Sony Blu-Ray burners, that only records the first track
66
in the disc index upon fixation.
67
.PP
68
One can find out which arenas are sealed and which are open by viewing
69
.CW http://\fIventi-server\fP/index .
70
We also periodically print the most recent
71
.I fossil
72
dump scores and save the paper with the discs.
73
.PP
74
All of this is packaged up as scripts in
75
.CW /sys/lib/backup ,
76
notably
77
.CW backup .
78
A typical invocation would be just
79
.DS
80
.ft CW
81
cd /sys/lib/backup
82
backup
83
.ft
84
.DE
85
which will guide its invoker as to which discs to insert into a Blu-ray
86
burner and when.
87
This works for a first full backup and for subsequent incremental backups
88
of just the newly-sealed arenas.
89
There is provision for burning multiple backup sets, the default being
90
.CW set1 .
91
To burn a second set, we would
92
.DS
93
.ft CW
94
mkdir /sys/lib/backup/set2
95
backup -s set2
96
.ft
97
.DE
98
.CW backup
99
and related scripts keep track of which BD is current and how many
100
tracks are recorded, and which arenas have been dumped to BD.
101
.PP
102
We have recorded two sets of BD backups, one of which will go to
103
Antwerp to seed their
104
.I venti
105
server and also serve as off-site backup for Murray Hill.
106
.SH
107
Restoring from Backups
108
.PP
109
After a disaster, or when setting up a new
110
.I venti
111
server from BD backups,
112
the first step is to get Plan 9 running on the new
113
.I venti
114
server.
115
This could be done by installing into a smallish (2GB)
116
.I fossil
117
partition from a Plan 9 installation CD, if necessary.
118
One would then initialise the new disk partitions per
119
.I venti-fmt (8)
120
and read all the arenas on all the BDs into the new
121
.I venti
122
by running
123
.I venti/wrarena
124
once per BD track (arena).
125
.br
126
.ne 3
127
.PP
128
To add the contents of a backup BD to a (possibly fresh)
129
.I venti
130
store,
131
shut down the
132
.I venti
133
server,
134
format the arenas partition, then
135
run
136
.DS
137
.ft CW
138
restore \fIfirst-arena-number\fP
139
.ft
140
.DE
141
after inserting a BD into the Blu-ray drive.
142
Repeat this for each BD in the backup set.
143
When all the arenas have been restored,
144
it will be necessary to build a new
145
.I venti
146
index,
147
the usual steps being to run
148
.I checkarenas ,
149
.I fmtisect ,
150
.I fmtbloom ,
151
.I fmtindex ,
152
and
153
.I "buildindex -b" ,
154
all from
155
.I venti-fmt (8).
156
Then the
157
.I venti
158
server may be restarted.
159
.PP
160
Once the
161
.I venti
162
storage has been restored,
163
a new
164
.I fossil
165
partition (perhaps the existing one or another one)
166
can be initialised from the last
167
.I fossil
168
dump score corresponding to the last arena on BD
169
(see
170
.I fossil/flfmt
171
in
172
.I fossil (4)):
173
.DS
174
.ft CW
175
fossil/flfmt -v c388...32b5 /dev/sdC0/fossil
176
.ft
177
.DE