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