Using the Data Carousel

Using the Data Carousel

The sofware uses ORNL Batch System and Phenix's Carousel Software.

A database, brahms_carousel, was created on RCF's MySql Server, rmds01.rcf.bnl.gov with 2 users, brahms_c_admin and brahms_c_user.

The Function of the Data Carousel

The data carousel should be used by all BRAHMS users to retrieve data from the HPSS. The purpose of the data carousel is to organize the requests of users to retrieve data. User file requests are stored in a MySQL database. The data carousel consists of a collection of perl scripts (written by Jerome Lauret) which provides the user with a simple way to submit requests.

Getting Started

From rcf.rhic.bnl.gov log into one of our rcas machines.

The perl scripts can be executed from any of the rcas nodes.

Ours are rcas0001-rcas0010

The first step is to:

ssh rmds06g.rcf.bnl.gov

You will not be able to actually login to this machine. The purpose of executing this command is to add this machine to your .ssh/known_hosts file. The command only needs to be executed once from your account for the data carousel to work.

Now you need to create a file containing your requests from HPSS. This file is a list of input and output files, where the input file is the name of the file as it appears in the HPSS, and the output file specifies where you want to write it to disk. The format of the file should be the following:

[filename (with full path) in HPSS] [pftp://username@machine/output_filename]

For example, we will call this file "file.lis":

/home/bramsink/raw/2000/05/04/run000933seq001.dat pftp://bramreco@rmine001.rcf.bnl.gov/brahms/data03/scratch/data_files/run000933seq001.dat 
/home/bramsink/raw/2000/05/04/run000941seq000.dat pftp://bramreco@rmine001.rcf.bnl.gov/brahms/data03/scratch/data_files/run000941seq000.dat 
/home/bramsink/raw/2000/05/04/run000941seq001.dat pftp://bramreco@rmine001.rcf.bnl.gov/brahms/data03/scratch/data_files/run000941seq001.dat 

!! NOTE !! For speed (and to avoid writing over NFS), you should write to the machine where the disk physically sits.

For instance, if you want to write your files to /brahms/data01,02,03 your output should be pftp://user@rmine001/brahms/dataxx/....

N.B. WRITINGT TO rmine001 IS CURRENTLY BROKEN (JAN 2001) so you'll have to use a rcas00* node

If you want to write to a /home directory local to one of the rcas nodes, your output should be pftp://user@rcas0xx/home/....

Running the Scripts

Now you are ready to execute hpss_user.pl (this should already be in your path).

/opt/brahms -> /afs/rhic/@sys/opt/brahms

/opt/brahms/bin/hpss_user.pl -> ../carousel/bin/hpss_user.pl

I put this in my .login, maybe it should be in the brahms_login

if (-e /opt/brahms) then set path = ($path /opt/brahms/bin) endif
hpss_user.pl -f file.lis

!! NOTE !! This script will alter your ~/.shosts file and your ~/.netrc file. If these files do not already exist in your area, they will be automatically created. If they do already exist in your area, then they will simply be appended. The .shosts file must contain an entry to allow bramreco to come into your account, and the .netrc file allows you to access HPSS (via pftp) without prompting you for a username and password.

What Happens Next?

On the server end (rmds06), brahmreco runs hpss_server.pl. This script is invoked every 20 minutes by a cron job and can transfer 10 files at a time. The hpss_server.pl script inspects the MySQL database and provides a list of input and output files to the script offline_submit (written by Tom Throwe). The script offline_submit runs the HPSS batch software developed at ORNL to retrieve files from the HPSS.

Viewing your requests in MySQL database

To see what is in the HPS carousel database use Konstantin's Viewer improved on 5June2000:

HPSS Carousel Viewer.

Or type:


on rcf and the rcas's: mysql -hrmds01 -ubrahms_c_user -prdb_for_user brahms_carousel
on pii3: mysql -hrmds01.rcf.bnl.gov -ubrahms_c_user -prdb_for_user brahms_carousel

To see the list of tables:

show tables;

To see what is in the Entries table:

select * from Entries;

You should be able to see an entry for your request. The entry contains a status which tells you whether your request could not be processed successfully.

Status = 0
Entered by user
Status = 1
Submitted to server scripts
Status = 2
Previously submitted and successfully restored
Status = 3
Failed to restore

For more information about SQL commands, see, for instance, the MySQL reference pages.

If all goes well, you should see your files show up soon!

To see what's in HPSS:

Any user on one of our rcas*.rcf.bnl.gov,

~bramreco/mdc1/scripts/ftpeek.csh /home/bramsink
drwxr-x--- 3 bramsink brahms 512 Jan 29 2000 brmdc
drwxr-x--- 3 bramsink brahms 512 Sep 8 1998 mdc1
drwxr-x--- 3 bramsink brahms 512 Dec 28 1998 mdc2
drwxr-x--- 4 bramsink brahms 512 Aug 1 1999 raw
~bramreco/mdc1/scripts/ftpeek.csh /home/bramsink/raw
drwxr-x--- 4 bramsink brahms 512 Aug 1 1999 1999
drwxr-x--- 14 bramsink brahms 512 Jan 30 2000 2000