HowTo: Managing Space Reservation (Tokens)

From Public PIC Wiki
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 -rp=replica|custodial -lg=<name> -owner=user|fqan -desc=<string> -lifetime=<seconds>  <size>
If no lifetime is given, the reservation will never expire

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 reservation  [-size=<size>]  [-lifetime=<lifetime>] [-vog=<vogroup>] [-vor=<vorole>] <spaceToken> 
                                                     # set new size and/or lifetime for the space token 
                                                      # valid examples of size: 1000, 100kB, 100KB, 100KiB, 100MB, 100MiB, 100GB, 100GiB, 10.5TB, 100TiB 
                                                     # see http://en.wikipedia.org/wiki/Gigabyte for explanation 
                                                     # lifetime is in seconds ("-1" means infinity or permanent reservation

As an example, to update Atlas Tier2 T2ATLASPRODDISK 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)