In this section, we show how an end-user might interact with SRM space reservations; these operations include discovering what tokens are available, querying the status of a token, uploading data using a token and releasing a token.
A user may wish to identify all space tokens (the unique IDs) that have been created and into which she can place data. The srm-get-space-tokens does this:
Create a proxy certificate with gks membership[user@ui-node] $
voms-proxy-init -voms gks Enter GRID pass phrase: Your identity:Your DN is here
Creating temporary proxy ................................... Done Contacting dgrid-voms.fzk.de:15025 [/O=GermanGrid/OU=FZK/CN=host/dgrid-voms.fzk.de] "gks" Done Creating proxy .............................................. Done Your proxy is valid until Sun Sep 7 10:25:36 2008 List all tokens that this user has access to[user@ui-node] $
srm-get-space-tokens srm://:8443 WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm Space Reservation Tokens: 10000 Create a proxy certificate with dech membership
dcache-node
.fzk.de[user@ui-node] $
voms-proxy-init -voms dech Enter GRID pass phrase: Your identity:Your DN is here
Creating temporary proxy ................................... Done Contacting glite-io.scai.fraunhofer.de:15025 [/O=GermanGrid/OU=Fraunhofer SCAI/CN=host/glite-io.scai.fraunhofer.de] "dech" Done Creating proxy .............................................. Done Your proxy is valid until Sun Sep 7 10:35:36 2008 List all tokens that this user has access to[user@ui-node] $
srm-get-space-tokens srm://:8443 WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm Space Reservation Tokens: 10000 10001
dcache-node
.fzk.de
By changing which VO membership is presented to the SRM interface, different set of SRM space tokens are returned.
The definition of a space reservations includes an optional
description field. This is specified by the
-desc
option when reserving space through the
administrator interface.
When creating the two spaces, both were given the same
description: DISK
.
[user@ui-node] $
srm-get-space-tokens -space_desc=DISK srm://:8443 WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm Space Reservation Tokens: 10001
dcache-node
.fzk.de
Having identified various space reservations, the user wishes to know more information about them. The srm-get-space-metadata command queries the SRM for current information about the reservation.
Query the first space token[user@ui-node] $
srm-get-space-metadata srm://:8443 10000 WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm Space Reservation with token=10001 owner:VoGroup=/gks VoRole=NULL totalSize:30000 guaranteedSize:30000 unusedSize:30000 lifetimeAssigned:-1 lifetimeLeft:-1 accessLatency:ONLINE retentionPolicy:REPLICA Then query the second space token
dcache-node
.fzk.de[user@ui-node] $
srm-get-space-metadata srm://:8443 10001 WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm Space Reservation with token=10001 owner:VoGroup=/dech VoRole=NULL totalSize:30000 guaranteedSize:30000 unusedSize:30000 lifetimeAssigned:-1 lifetimeLeft:-1 accessLatency:ONLINE retentionPolicy:REPLICA
dcache-node
.fzk.de
Note that anyone is allowed to query a space token.
Writing space into a reservation will cause data to be copied into dCache, but also that the available space will decrease.
[user@ui-node] $
srmcp -2 -space_token=10001 -retention_policy=REPLICA -access_latency=ONLINE file:////etc/group srm://:8443/pnfs/fzk.de/data/dech/test-group WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm Copy a second file using the same token.
dcache-node
.fzk.de[user@ui-node] $
srmcp -2 -space_token=10001 -retention_policy=REPLICA -access_latency=ONLINE file:////bin/arch srm://:8443/pnfs/fzk.de/data/dech/test-arch WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm Use SRM to list the files.
dcache-node
.fzk.de[user@ui-node] $
srmls -2 srm://:8443/pnfs/fzk.de/data/dech WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm 0 /pnfs/fzk.de/data/dech// 611 /pnfs/fzk.de/data/dech//test-group 4576 /pnfs/fzk.de/data/dech//test-arch
dcache-node
.fzk.de
The end user may release the reservation when they are finished with it.
[user@ui-node] $
srm-release-space -space_token=10001 srm://:8443 WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm And verify that the token is gone.
dcache-node
.fzk.de[user@ui-node] $
srm-get-space-tokens srm://:8443 WARNING: SRM_PATH is defined, which might cause a wrong version of srm client to be executed WARNING: SRM_PATH=/opt/d-cache/srm
dcache-node
.fzk.de
It is also possible to release the space reservation through
the administrator interface using the
release
command.