Archiving BaBar User Data on Tape at RAL
The tape robot at RAL is currently accessed via
the Atlas Datastore (ADS).
This simulates "virtual tapes" of different sizes, and takes care of writing them to different real tapes.
You don't have to worry about real tapes, so here we refer to virtual tapes only.
All BaBar tapes are owned by the "BABAR" ADS username.
In the examples that follow, values in
will need to be modified for your own circumstances.
You need to remember the original tape name (
- If this is the first time you have used the Datastore to create BaBar
tapes, then you should contact Tim 'n Manny to be authorised to write into
the Datastore. You will be allocated a 3-character tape name prefix (eg.
to ensure that your tape names don't conflict with others'.
Please let us know if you want the files to be readable by other BaBarians.
- It is usually easiest to put all your data into one or more tar files,
since this will preserve the original file names and modification dates.
It is also vital that you don't create too many small virtual tapes,
since this is not handled efficiently.
An average size greater than 50MB should be fine.
The ADS limits the maximum file size, currently to 160GB.
tar cvf /pool/file.tar /stage/babar-user1/adye
is the name of the tar file to write. The name doesn't matter, but
if you have many GBytes of data, then you'll have to find somewhere
with enough space to temporarily put the tar file (the
/pool disk on
the front-end machines usually has ~20GB free).
Remember to delete the tar file from disk once it is written to tape!
It is also possible to pipe the output of tar directly into onto tape,
though doing it in two steps allows you to check that the tar file contains what you expect
tar tvf /pool/file.tar).
See the tape command man page for more information.
is the directory tree to archive. For more fine-tuned selections, see the
tar man page.
If the data isn't already compressed (as ROOT files are),
it will help to compress the tar file (use
- For each tar file, issue the command
datastore create BABAR UA3001 100GB
is a virtual tape name. Each tar file you write should have its own tape, eg.
The name should start with your 3-character prefix (see above),
but not be longer than 6 alphanumeric characters (yes, I know this is a
is the size that will be allocated for the file.
This should be larger than the size of your tar file (and a bit larger for safety),
but don't go overboard (if you make it too large, it may take longer to find the space,
though no space will be wasted once the file gets onto physical tape).
It's probably easiest to use the size of your largest tar file (if you have several
to archive) plus 20%.
- You can check that the tape has been created with
datastore qsimple BABAR UA3+
UA3+ specifies the virtual
tapes to list, ie. for all tapes with prefix
+" may be used in place of the usual "
*" wildcard - this
prevents it being expanded as a shell file glob.)
- The tar file can then be written to the virtual tape
tape -w -f /pool/file.tar BABAR UA3001
- You can check that the tape has filled up by querying it again with the
datastore qsimple command above.
UA3001 in this case).
You can list all your tapes with the
datastore qsimple command above.
To read from tape, use
You can use any tar file name - it does not have to be the same as
the original. You can list the original tar file contents with
tape -f /pool/file.tar BABAR UA3001
If you have several virtual tapes to write,
you can use a Datastore "pool". This may improve access times and
simplify subsequent management of the virtual tapes.
tar tvf /pool/file.tar
All virtual tapes that logically belong together
can go in the same pool (even if archived at different times),
which must be named with <=8 characters.
datastore pool add BABAR Q2B-R18
POOL Q2B-R18 to
datastore create command.
modified 19th January 2006 by Tim Adye, <T.J.Adye@rl.ac.uk>