Remote Production
How to export SP databases to SLAC :
When the disk allocated for MC production is getting
full, it is necessary to export the database files to SLAC and to recover
the disk space in order to continue production.
The different steps are the following :
-
Suspend the production (in principle this is not
strictly necessary, but it is preferable until further notice)
-
Export all the database files to disk and/or tapes
with the BdbDistTools package
-
Identify the database files which are marked as full/complete
by Objectivity
-
Delete these files
-
Resume production
-
Transfer the files or tapes to SLAC
The database files will have to be transferered on
datamove3.slac.stanford.edu. A standard BaBar account is not allowed to
log on there so you will have to use the special bbrdist account.
-
First, you need to generate a RSA key on your home
computer following Paul's
recipe
-
In /objy/databases/MC-Import, you will find a directory
corresponding to your site (if it is not, ask me), all the database files
should go there, under a directory named according to the date of the transfer
: yyyymmdd - Look at examples in the ccin2p3 directory.
-
Please note that you are not allowed to ftp from
your site to this space, you need to log on datamove3 and ftp-get the files
from there.
In the following I assume that the SP federation
is located in SP2PRODBOOT
and that you have a working space WORKING.
Exporting the database files :
Most of the following is extracted from the BdbDistTools
documentation. I strongly recommended to refer to the original documentation.
Scanning the federation :
This is now done in 2 steps in order to have a separate
export for the collections
srtpath 8.6.1 SunOS5-Optimize-Profile
cd WORKING
sp2prodboot
BdbDistBrowser -verbose Events -group SP -nocol
|& tee sp2.scn
Organizing the tdf file (transfer description
file) :
BdbDistTdfFilter sp2.scn -ignore > sp2.tdf
Preparing the export :
BdbDistSummary sp2.tdf
This will give you the total size used by the
export
Running the export :
At this point, you can decide to write the database
files to export to disk or to try to write them directly to tapes. If you
have enough disk space, I recommend to write the files on disk.
BdbDistCenter -wait -(no)comp -lftp -export
sp2-export -work WORKING -use sp2.tdf |& tee sp2-export.log
If you plan to write the files on tapes, you should
not use the "comp" (compression) option. If you plan to use ftp to transfer
the files, then you should use the -comp option (-comp is the default !)
This will create a description file : sp2-export.tdf
* Important : If you plan to transfer
the files with ftp, there is no need to create large archive tar files,
so you may use the -noarchive option in BdbDistCenter to avoid this time
consuming step.
In order to save the exported files to tape, you
should do the following :
BdbDistWriteTape -tape DLTIV -label LABEL1:LABEL2:LABEL3
-tdf WORKING/sp2-export -checkonly
DLTIV is for DLT7000, it should be changed to
REDWOOD for Redwoods !
This will give you the number of tapes needed.
You can then pass the final BdbDistWriteTape command with the correct number
of tapes.
BdbDistWriteTape -tape -verbose DLTIV -label
LABEL1:LABEL2 -tdf WORKING/sp2-export |& tee tape.log
If you need to write the tapes directly without
writting on disk, you can use the -label and the -tape options directly
in BdbDistCenter
Error recovery :
Note that in case of failure, the system is foreseen
to restart from where it stopped, sometimes it is not what you want, in
this case, you need to delete the .rec files in the WORKING directory
Transfer to SLAC :
The tapes should be sent to SLAC (att: Charlotte
Hee) or the files transfered to the MC-Import disk area on datamove3. The
tdf files should also be transfered at this location as they are necessary
to load the database files into the SLAC federation.
Once the databases are at SLAC, please notify
Dominique Boutigny, we will take care to load the events in the federation.
Very Important :
Please be sure to create a README
file in the datamove3 import directory, containing a short description
of the import and indicating the run numbers.
Recovering the disk space :
In order to recover some disk space to continue the
production, you need to identify the full/closed database that will not
be used anymore by Objectivity.
The search for full database is done with :
sp2prodboot
BdbBrowseFullDbs
This will list the databses together with their
DBID. You can then safely delete the databases by running :
oodeletedb -force -id DBID
for all the listed databases
Please note that you should set the environment
variable BDB_MAX_NR_ACTIVE_DBS
to 1
in order to have this step working properly
|