HowTo: Managing Space Reservation (Tokens)

From Public PIC Wiki
Revision as of 10:18, 6 August 2015 by Mcaubet (talk | contribs)
Jump to navigation Jump to search

Connect to dCache Admin interface

You have two options to send commands to dCache:

a) Using pCells, locate the SrmSpaceManager cell (under the srm-${hostname}Domain).

b) Logging to dccore.pic.es like this: ssh -2 -x -o StrictHostKeyChecking=no -l admin -c blowfish -p 22224 dccore.pic.es

Add a new token/space reservation

The command to add a space reservation is reserve space.

reserve space -al=online|nearline [-desc=string] -lg=name [-lifetime=seconds] [-owner=user|fqan] -rp=replica|custodial size 
If no lifetime is given, the reservation will never expire
size is defined in bytes, but accepts an optional by suffix using either SI or IEEE 1541 prefixes.

As an example, to add a 4TB disk-only token named ATLASTESTDISK in the link group linkgroup-atlas

reserve space -al=online -rp=replica -lg=linkgroup-atlas -owner=/atlas -desc=ATLASTESTDISK 4000000000000

Modify/update a token/space reservation

update space [-desc=string] [-eternal] [-lifetime=long] [-owner=user|fqan] [-size=bytes] spacetoken 

As an example, to update the space reservation ATLASTESTDISK to 5TB we would (please, note that we do not add 5TB, we set the new space reservation to 5TB) :

[dccore01.pic.es] (SrmSpaceManager) admin > ls -desc=T2ATLASPRODDISK
3517583 voGroup:/atlas voRole:production retentionPolicy:REPLICA accessLatency:ONLINE linkGroupId:4802067 size:4000000000000 created:Wed Jun 25 10:53:57 CEST 2008 lifetime:-1ms expiration:NEVER description:T2ATLASPRODDISK state:RESERVED used:1016764746531 allocated:0
[dccore01.pic.es] (SrmSpaceManager) admin >update space reservation -size=5TB 3517583

It's possible that you have several tokens with the very same description. Only one of them should be in state RESERVED, all others should be RELEASED. In case of doubt try to figure out which is the token ID of the token being used (ie: look at the monitoring at dcmon.pic.es).

List tokens/space reservations

  • 2 ways:
1. Per token:
[dccore01.pic.es] (SrmSpaceManager) admin > ls -desc=T2ATLASPRODDISK
2 By showing all:
[dccore03.pic.es] (SrmSpaceManager) admin > ls 

Reservations:
85046 voGroup:/atlas voRole:production retentionPolicy:REPLICA accessLatency:ONLINE linkGroupId:85047 size:10737418240 created:Fri Jul 25 15:34:25 CEST 2008  lifetime:-1ms expiration:NEVER
description:testGBA state:RESERVED used:792 allocated:0 
85048 voGroup:/atlas voRole:production retentionPolicy:REPLICA accessLatency:ONLINE linkGroupId:85047 size:10 created:Fri Jul 25 15:42:01 CEST 2008 lifetime:-1ms expiration:NEVER
description:testGBA2 state:RESERVED used:0 allocated:0 
total number of reservations: 2
total number of bytes reserved: 10737418250

LinkGroups:
90000 Name:linkgroup-pau FreeSpace:2196867381060 ReservedSpace:0 AvailableSpace:2196867381060 VOs:{/vo.pic.es:*} onlineAllowed:true nearlineAllowed:true replicaAllowed:true custodialAllowed:true  outputAllowed:true UpdateTime:Wed May 06 12:15:41 CEST 2009(1241604941766
118114 Name:linkgroup-magic FreeSpace:1253068653025 ReservedSpace:0 AvailableSpace:1253068653025 VOs:{magic001:*}{/magic:*} onlineAllowed:true nearlineAllowed:true replicaAllowed:true custodialAllowed:true outputAllowed:true UpdateTime:Wed May 06 12:15:41 CEST 2009(1241604941766)
85047 Name:linkgroup-atlas FreeSpace:4393452420740 ReservedSpace:10737417458 AvailableSpace:4382715003282 VOs:{/atlas:production}{/atlas/soft-valid:production}{atlas001:*} onlineAllowed:true nearlineAllowed:true replicaAllowed:true custodialAllowed:true outputAllowed:true UpdateTime:Wed May 06 12:15:41 CEST 2009(1241604941766)
1 Name:linkgroup-alice-t0d1 FreeSpace:2196875766314 ReservedSpace:0 AvailableSpace:2196875766314 VOs:{alice001:*}{/alice:*} onlineAllowed:true nearlineAllowed:false replicaAllowed:true custodialAllowed:false outputAllowed:true UpdateTime:Wed May 06 12:15:41 CEST 2009(1241604941766)
55778 Name:linkgroup-dteam FreeSpace:3427855158643 ReservedSpace:0 AvailableSpace:3427855158643 VOs:{/dteam:*}{dteam001:*} onlineAllowed:true nearlineAllowed:true replicaAllowed:true custodialAllowed:true outputAllowed:true UpdateTime:Wed May 06 12:15:41 CEST 2009(1241604941766)
total number of linkGroups: 5
total number of bytes reservable: 13457381962324
total number of bytes reserved  : 10737417458
last time all link groups were updated: Wed May 06 12:15:41 CEST 2009(1241604941766)