SDM
People Publications Projects

Sample SRM client commands related to BeStMan2 configuration

SRM client commands can be found in bestman2/bin directory. They are full implementations of SRM v2.2 as generic SRM v2.2 clients, developed by Lawrence Berkeley National Laboratory. They have been tested for all current SRM v2.2 implementations such as BeStMan, BeStMan2, CASTOR, dCache, DPM, SRM/iRODS-SRB and StoRM. They are continuously being tested for compatibility and interoperability.

SRM-COPY

1. When BeStMan2 is configured with default values, and a file is requested to put into the BeStMan2 managed storage cache:

      srm-copy \
      file:////tmp/my.test.file \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/~/my.test.file

2. When BeStMan2 is configured with default values, and a file is requested to get from the BeStMan2 managed storage cache:

      srm-copy \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/srmuser/my.test.file \
      file:////tmp/my.test.file2

3. When BeStMan2 is configured with default values, and a file is requested to put into the user managed storage paths (e.g. /myproject/mydir):

      srm-copy \
      file:////tmp/my.test.file \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/myproject/mydir/my.test.file

SRM-LS

1. When BeStMan2 is configured with default values, and a file is requested from the BeStMan2 managed storage cache:

      srm-ls srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/srmuser/my.test.file

2. When BeStMan2 is configured with default values, and a file is requested from the user managed storage paths (e.g. /myproject/mydir):

      srm-ls srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/myproject/mydir/my.test.file

SRM-RM

1. When BeStMan2 is configured with default values, and a file is requested to be removed from the BeStMan2 managed storage cache:

      srm-rm srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/srmuser/my.test.file

2. When BeStMan2 is configured with default values, and a file is requested to be removed from the user managed storage paths (e.g. /myproject/mydir):

      srm-rm srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/myproject/mydir/my.test.file

SRM-MKDIR and SRM-RMDIR

1. When BeStMan2 is configured with default values, and a directory is requested to be created or removed from the BeStMan2 managed storage cache:

      srm-mkdir (or srm-rmdir) srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/srmuser/my.test.dir

2. When BeStMan2 is configured with default values, and a directory is requested to be created or removed from the user managed storage paths (e.g. /myproject/mydir):

      srm-mkdir (or srm-rmdir) srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/myproject/mydir/my.test.dir

SRMPING from FNAL client

1. When BeStMan2 is configured with default values, and FNAL SRM client srmping needs some extra flags:

      srmping  -2  -webservice_path=srm/v2/server  -debug srm://bestman.lbl.gov:8443 

Or

      srmping  -2 -debug srm://bestman.lbl.gov:8443/srm/v2/server

SRMLS from FNAL client

1. When BeStMan2 is configured with default values, and FNAL SRM client srmls needs some extra flags:
      srmls  -webservice_path=srm/v2/server srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/srmuser/my.test.file

SRMCP from FNAL client

1. When BeStMan2 is configured with default values, and FNAL SRM client srmcp needs some extra flags:

      srmcp -2  -webservice_path=srm/v2/server \
      srm://bestman.lbl.gov:8443 /srm/v2/server\?SFN=/srmcache/srmuser/my.test.file \
      file:////tmp/my.test.file

Or,

      srmcp -2   srm://bestman.lbl.gov:8443 /srm/v2/server\?SFN=/srmcache/srmuser/my.test.file \
      file:////tmp/my.test.file

SRMRM from FNAL client

1. When BeStMan2 is configured with default values, and FNAL SRM client srmrm needs some extra flags:

      srmrm -2  -webservice_path=srm/v2/server srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/srmuser/my.test.file

SRMMKDIR and SRMRMDIR from FNAL client

1. When BeStMan2 is configured with default values, and FNAL SRM client srmmkdir needs some extra flags:

      srmmkdir  (or srmrmdir)  -webservice_path=srm/v2/server \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/srmcache/srmuser/my.test.dir

LCG-CP from GLITE LCG-UTILS client

1. lcg-cp only works with SRM servers running with host certficate. If BeStMan2 server runs with http or srm service certificate, lcg-cp would not work and give an error.

2. When BeStMan2 is configured with default values, and a file is requested to put into the user managed storage paths (e.g. /myproject/atlas/mydir). GLITE SRM client lcg-cp needs some extra flags:

      lcg-cp   -v   -b    -U srmv2    --vo atlas  \
      file:////tmp/my.test.file \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/myproject/atlas/mydir/my.test.file

2. When BeStMan2 is configured with userSpaceKeywords, and a file is requested to put into the user managed storage paths (e.g. /myproject/atlas/mydir). GLITE SRM client lcg-cp needs some extra flags:

      lcg-cp   -v   -b    -U srmv2    --vo atlas  -S ATLASUSERSPACE1  \
      file:////tmp/my.test.file \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/mydir/my.test.file
      srm-copy \
      file:////tmp/my.test.file \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/mydir/my.test.file \
      -spacetoken ATLASUSERSPACE1

LCG-LS from GLITE LCG-UTILS client

1. lcg-ls only works with SRM servers running with host certficate. If BeStMan2 server runs with http or srm service certificate, lcg-ls would not work and give an error.

2. Examples:

      lcg-ls  -b    -D srmv2    -l  \
      srm://bestman.lbl.gov:8443/srm/v2/server\?SFN=/myproject/atlas/mydir/my.test.file