srm client¶
This page explains the use of the srm
client. For an overview of storage clients, see Storage clients.
Contents
SRM¶
The Storage Resource Manager (short SRM) has been designed to be a single interface for the management of both disk and tape storage resources. It provides options for copying files to/from the Grid storage, Staging files from tape, creating or removing files and so on. It uses SURLs as the physical filename to reference a file.
The srm client is one of the most popular Storage clients. However, srm- commands are using Java which has the tendency to allocate big amounts of memory and sometimes be slow, also because of the SRM protocol overhead. If transfer speed is important, use uberftp client, globus client or gfal client instead.
Note
To run the examples below you need to have a valid proxy, see StartGridSession.
Creating/listing¶
Listing directories on dCache:
$srmls srm://srm.grid.sara.nl:8443/pnfs/grid.sara.nl/data/lsgrid/
Listing directories on DPM:
$srmls srm://gb-se-lumc.lumc.nl:8446/dpm/lumc.nl/home/lsgrid/
Create a new directory on dCache:
$srmmkdir srm://srm.grid.sara.nl:8443/pnfs/grid.sara.nl/data/lsgrid/homer/newdir/
Create a new directory on DPM:
$srmmkdir srm://gb-se-lumc.lumc.nl:8446/dpm/lumc.nl/home/lsgrid/homer/newdir
Transferring data¶
Note
The -debug
option would show you extra logging information for your transfers.
Copy file from dCache to local machine:
## note the flag -server_mode=passive! $srmcp -server_mode=passive \ $ srm://srm.grid.sara.nl:8443/pnfs/grid.sara.nl/data/lsgrid/homer/zap.tar \ $ file:///`pwd`/zap.tar
Copy file from DPM to local machine:
## note the flag -server_mode=passive! $srmcp -server_mode=passive \ $ srm://gb-se-lumc.lumc.nl:8446/dpm/lumc.nl/home/lsgrid/homer/zap.tar \ $ file:///`pwd`/zap.tar
Copy file from local machine to dCache:
$srmcp -debug file:///`pwd`/zap.tar \ $ srm://srm.grid.sara.nl:8443/pnfs/grid.sara.nl/data/lsgrid/homer/zap.tar
Copy file from local machine to DPM:
$srmcp -debug file:///`pwd`/zap.tar \ $ srm://gb-se-lumc.lumc.nl:8446/dpm/lumc.nl/home/lsgrid/homer/zap.tar
Recursive transfer¶
Recursive transfer of files is not supported with the srm-*
client commands.
Parallel streams¶
Information not available yet.
Removing data¶
Remove a file from dCache:
$srmrm srm://srm.grid.sara.nl:8443/pnfs/grid.sara.nl/data/lsgrid/homer/zap.tar
Remove a file from DPM:
$srmrm srm://gb-se-lumc.lumc.nl:8446/dpm/lumc.nl/home/lsgrid/homer/zap.tar
Recursive delete¶
Recursive deletion of files is not supported with the srm-*
client commands. It is possible to remove a directory as long as it is empty, i.e. content files have been removed.