Difference between revisions of "HowTo: Managing Space Reservation (Tokens)"

From Public PIC Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Connect to dCache Admin interface =
+
= Introduction =
  
You have two options to send commands to dCache:
+
* In all this document we will refer to the Space Reservation administration. Space Reservation is also known as Token.
  
a) Using '''pCells''', locate the '''''SrmSpaceManager''''' cell (under the srm-${hostname}Domain).
+
== Connect to the SrmSpaceManager Admin Console ==
 +
* Two options:
 +
:'''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'''''
  
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 =
+
= Managing the Space Reservation =
The command to add a space reservation is <tt>'''reserve space'''</tt>.
+
== Create a Space Reservation ==
 +
* The command to add a space reservation is <tt>'''reserve space'''</tt>.
  
  reserve space -al=online|nearline [-desc=string] -lg=name [-lifetime=seconds] [-owner=user|fqan] -rp=replica|custodial size  
+
  '''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
+
:* If no '''''lifetime''''' is given, the reservation will never expire
:'''''size''''' is defined in bytes, but accepts an optional by suffix using either '''[https://es.wikipedia.org/wiki/IEEE_1541-2002 SI or IEEE 1541]''' prefixes.
+
:* '''''size''''' is defined in bytes, but accepts an optional by suffix using either '''[https://es.wikipedia.org/wiki/IEEE_1541-2002 SI or IEEE 1541]''' prefixes.
  
As an example, to add a 4TB disk-only token named '''ATLASTESTDISK''' in the link group '''linkgroup-atlas'''
+
* 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
 
  reserve space -al=online -rp=replica -lg=linkgroup-atlas -owner=/atlas -desc=ATLASTESTDISK 4000000000000
  
= Modify/update a token/space reservation =
+
== Update a Space Reservation ==
<pre>
+
 
update space [-desc=string] [-eternal] [-lifetime=long] [-owner=user|fqan] [-size=bytes] spacetoken  
+
'''update space [-desc=string] [-eternal] [-lifetime=long] [-owner=user|fqan] [-size=bytes] spacetoken'''
</pre>
+
 
 +
:'''''size''''' is defined in bytes, but accepts an optional by suffix using either '''[https://es.wikipedia.org/wiki/IEEE_1541-2002 SI or IEEE 1541]''' prefixes.
 +
 
 +
* As an example, to update the space reservation ATLASTESTDISK to '''5TB'''
 +
 
 +
update space -desc=ATLASTESTDISK -size=5000000000000 <token_id>
  
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) :
+
:*Is 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).
  
<pre>
+
== Release Reservation ==
[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
 
</pre>
 
  
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).
+
'''release space token'''
  
=List tokens/space reservations=
+
== List Space Reservations ==
  
* 2 ways:
+
'''ls spaces [-a] [-al=online|nearline] [-e] [-h] [-l] [-lg=string] [-limit=rows] [-owner=user|fqan] [-rp=replica|custodial] [-state=reserved|released|expired] ... [token|pattern]'''
  
:1. Per token:
+
== List Link Groups ==
  
  [dccore01.pic.es] (SrmSpaceManager) admin > ls -desc=T2ATLASPRODDISK
+
  '''ls link groups [-a] [-al=online|nearline] [-h] [-l] [-rp=output|replica|custodial] [name]'''
  
:2 By showing all:
+
== List File Reservations ==
  
[dccore03.pic.es] (SrmSpaceManager) admin > ls
+
  '''ls files [-a] [-h] [-limit=rows] [-owner=user|fqan] [-p] [-state=transferring|stored|flushed] ... [-token=long] [pnfsid|path]'''
 
  '''''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)
 

Latest revision as of 10:45, 6 August 2015

Introduction

  • In all this document we will refer to the Space Reservation administration. Space Reservation is also known as Token.

Connect to the SrmSpaceManager Admin Console

  • Two options:
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


Managing the Space Reservation

Create a 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

Update a Space Reservation

update space [-desc=string] [-eternal] [-lifetime=long] [-owner=user|fqan] [-size=bytes] spacetoken
size is defined in bytes, but accepts an optional by suffix using either SI or IEEE 1541 prefixes.
  • As an example, to update the space reservation ATLASTESTDISK to 5TB
update space -desc=ATLASTESTDISK -size=5000000000000 <token_id>
  • Is 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).

Release Reservation

release space token

List Space Reservations

ls spaces [-a] [-al=online|nearline] [-e] [-h] [-l] [-lg=string] [-limit=rows] [-owner=user|fqan] [-rp=replica|custodial] [-state=reserved|released|expired] ... [token|pattern]

List Link Groups

ls link groups [-a] [-al=online|nearline] [-h] [-l] [-rp=output|replica|custodial] [name]

List File Reservations

ls files [-a] [-h] [-limit=rows] [-owner=user|fqan] [-p] [-state=transferring|stored|flushed] ... [-token=long] [pnfsid|path]