Using ifdh_fetch and SRM tools interactively¶
To use SRM tools interactively, you need several items:
- A copy of the SRM tools installed on the system you're using
- kerberos tools and get-cert
- a ups products area with ifdhc installed
- A suitable grid proxy in your environment
Then you can use srm: url's with ifdh commands in your interactive sessions for testing, and/or use the 'ifdh_fetch' script to get files from enstore via dcache. If you have the following files on your system:
/usr/krb5/bin/get-cert /usr/krb5/bin/kinit /usr/bin/voms-proxy-info
you probably have the tools you need, and you can skip the "Getting ... installed on your system" steps.
Getting srm tools installed on your system¶
If someone manages the system in question, you can ask them to install the
osg_client RPM; if you are doing the install yourself, see the instructions at the opensciencegrid wiki.
Note: the OSG folks do not support MacOS, but there are instructions for installing version 2.0 of the toolkit on MacOS. Proceed with caution.
Sorry. Install VirtualBox or some such and run FermiLinux in it.
Getting kerberos tools and get-cert¶
If you're running Fermi Linux, you probably already have these tools; but you can
yum install krb5-fermi-getcert if you do not have a /usr/krb5/bin/get-cert. For other Linux distros, see here for details.
See the instructions for getting get-cert; the basic kerberos utilities come with MacOS.
Getting a ups area with ifdhc¶
If you are on a node that has /grid/fermiapp/products mounted, you can simply
source /grid/fermiapp/products/etc/setups setup ifdhc v1_2_1
to get the ifdhc package and the ifdh_fetch script. Otherwise you can fetch the tarball from
ftp://ftp.fnal.gov/bootstrap/v3_0/that matches your OS, and unwind it somewhere on your
source /somewhere/setups setup upd upd install -G -c ifdhc v1_2_1 setup ifdhc v1_2_1
Getting a grid proxy in your environment¶
Here is what to run to get an analysis role proxy for the minerva experiment. For other experiments or roles you would use different text instead of "minerva" and "Analysis", below. If you logged in via kerberos or otherwise already have a kerberos credential, you can omit the "kinit", below.
voms-proxy-init -rfc -noregen -voms fermilab:/fermilab/$EXPERIMENT/Role=$ROLE
kinit command will of course prompt you for your kerberos credentials; the voms-proxy-info should give output like:
$ voms-proxy-info -all subject : /DC=gov/DC=fnal/O=Fermilab/OU=People/CN=Marc W. Mengel/CN=UID:mengel/CN=proxy issuer : /DC=gov/DC=fnal/O=Fermilab/OU=People/CN=Marc W. Mengel/CN=UID:mengel identity : /DC=gov/DC=fnal/O=Fermilab/OU=People/CN=Marc W. Mengel/CN=UID:mengel type : proxy strength : 1024 bits path : /tmp/x509up_u1733 timeleft : 11:50:04 key usage : Digital Signature, Key Encipherment === VO fermilab extension information === VO : fermilab subject : /DC=gov/DC=fnal/O=Fermilab/OU=People/CN=Marc W. Mengel/CN=UID:mengel issuer : /DC=org/DC=doegrids/OU=Services/CN=http/voms.fnal.gov attribute : /fermilab/minerva/Role=Analysis/Capability=NULL attribute : /fermilab/minerva/Role=NULL/Capability=NULL attribute : /fermilab/Role=NULL/Capability=NULL attribute : /fermilab/nova/Role=NULL/Capability=NULL timeleft : 11:50:04 uri : voms.fnal.gov:15001
Of course, with your user name, full name, experiment and role as appropriate.
If you have the osg_client software installed, and have followed the instructions at the Getting_Started_on_GPCF page to setup gpsn01 for grid proxies, you can simply:
export EXPERIMENT=minerva export X509_USER_PROXY=/tmp/$USER.$EXPERIMENT.proxy scp gpsn01.fnal.gov:/scratch/$USER/grid/$USER.$EXPERIMENT.proxy /tmp voms-proxy-info -all
to copy your current proxy from gpsn01.fnal.gov to the local system.
Fetching files with ifdh_fetch¶
First make sure you've sourced the approprate
setups script, and done a
setup ifdh, then you can just
and it should fetch the file you requested via enstore, SAM, and srcmcp right to the current directory; this may of course take a while if the file has to be fetched from tape. You can check the progress here for the actual srm copy, and here or here for the enstore copy status.