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