PR using MySQL
[
BaBar-Conditions |
]
- IR2 to PC to ER
Introduction
For run7 the BaBar conditions technology was switched from Objectivity to MySQL/Root.
The production databases (IR2,PCn,MASTER) were all converted to MySQL. Because of this
switch some changes were needed for sweeping conditions between the different production
federations.
IR2 to PC to ER
IR2 Snapshot
Every hour a snapshot is taken from IR2 (15 min past the hour). The tables belonging to
the IR2 origin are extracted using the MySQL dump method. The script
KanCondTakeIR2ToPC1 is run in the trscrontab.
Loading IR2 to PC1
PR is loading the IR2 snapshot to PC1 automatically if a new snapshot is needed.
A action has been added to OprCmd.pl that would allow a shifter to load a snapshot
by hand:
OprCmd.pl -iCdb ...... loadIR2ToPC1
Take PC1 to ER Snapshot
Two snapshots are taken from PC:
- Root snapshot to be used for ER processing
- MySQL dump of the PC1,IR2 origins for loading to the MASTER
Here we will describe the the root snapshot to be used by ER.
- An incremental snapshot is taken and the PC1-root snapshot is updated.
- The PC1-root snapshot is copied to another location becoming the ER-snapshot
The date the PC1 snapshot was taken is used as directory name.
- The following modifications are one to the ER-snapshot:
- The root files are renamed using the snapshot date, e.g.:
cdb_o256_c9_i0.root becomes CDB-20071210T140439-cdb_o256_c9_i0.root
- The boot file is updated using standard Babar LFN: /store/cdb/...
- The latest configuration (CfgDB) root file is copied into the ER-snapshot
directory
- The root snapshot is copied to bbr-xfer03:
/ddist/snapshots/pr/PC1/<snapshotDate>
where <snapshotDate> is the date the snapshot has been taken.
(e.g.: 20071210T140439)
- The latest snapshot is linked to current:
ls -l /ddist/snapshots/pr/PC1/current/
lrwxrwxrwx 1 bbdatsrv br 15 Dec 11 12:34 /ddist/snapshots/pr/PC1/current/ -> 20071210T140439/
Downloading an ER snapshot
- No semaphore files are needed. Because uniqe directory names are used and
files are not overwritten (as for objy snapshots).
- For right now the whole snapshot has to be copied and installed locally.
- The link /ddist/snapshots/pr/PC1/current/ should be used to find which
directory to copy, e.g.:
& cd /ddist/snapshots/pr/PC1/current/
& dir_to_transfer=$(pwd)
- Use the directory in the previous step to downlaod all the files.
- The current must not be used to transfer the files of a snapshot
as it might change.
Last modified: Wed Dec 12 07:37:31 PST 2007