How to use CASTOR?

Home HELP E-mail Notes Meetings Search

You can use CASTOR to store data on tapes. For a complete documentation of CASTOR , you can go to this web

Each user have his own area set to use CASTOR per default. The CASTOR directory for a user use the following structure:

/castor/cern.ch/user/first_letter_of_username/username

For example : /castor/cern.ch/user/j/joel

Listing of your CASTOR directory

To list what is under your castor directory, you can use the command nsls.

For example :  
nsls -l /castor/cern.ch/user/j/joel
drwxr-xr-x 0 joel z5 0 Jan 07 17:00 HPCP02
mrw-r--r--   1 joel z5           1108544413 Nov 26 17:49 np.tar.bz2

Write to CASTOR

To write to castor in the command line, you can use the command rfcp.

For example:
rfcp /localdisk/joel/myfile.tar /castor/cern.ch/user/j/joel/tar/myfile.tar

Inside Gaudi, you can give the following line in your job option :

FILE = '/castor/cern.ch/user/j/joel/tar/myfile.tar' 

Read from CASTOR

To read from castor in the command line, you can use the command rfcp.

For example:
rfcp /castor/cern.ch/user/j/joel/tar/myfile.tar /localdisk/joel/myfile.tar 

Inside Gaudi, you can give the following line in your job option :

FILE = '/castor/cern.ch/user/j/joel/tar/myfile.tar' 

Query the stager to check if a CASTOR file is on disk or not

With the command stageqry , you can find if the CASTOR file that you want to read or write is on the disk pool or not.

For example :

stageqry -M 361122.data 
File name State Nbacc. Size Pool
361122.data STAGED 1 92.6/600 lhcbdata

stageqry -M /castor/cern.ch/lhcb/mc/D216202
File name State Nbacc. Size Pool
D216202 STAGED 1 1010.3/1011 lhcbdata


Last update 25 Jan 2006 by Joel Closier