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

From Public PIC Wiki
Jump to navigation Jump to search
 
(7 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 a add a space reservation is <tt>reserve</tt>.
+
== Create a Space Reservation ==
 +
* The command to add a space reservation is <tt>'''reserve space'''</tt>.
  
  reserve   [-vog=voGroup] [-vor=voRole] [-acclat=AccessLatency] [-retpol=RetentionPolicy] [-desc=Description] [-lgid=LinkGroupId] [-lg=LinkGroupName] <sizeInBytes> <lifetimeInSecs (use quotes around negative one)>
+
  '''reserve space -al=online|nearline [-desc=string] -lg=name [-lifetime=seconds] [-owner=user|fqan] -rp=replica|custodial size'''
  
As an example, to add a token to Atlas Tier2 T2ATLASPRODDISK, with 4TB, and storage class t0d1:
+
:* 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.
  
reserve -vog=/atlas -vor=production -acclat=ONLINE -retpol=REPLICA -desc=T2ATLASPRODDISK 4000000000000 "-1"
+
* As an example, to add a 4TB disk-only token named '''ATLASTESTDISK''' in the link group '''linkgroup-atlas'''
  
=Modify/update a token/space reservation=
+
reserve space -al=online -rp=replica -lg=linkgroup-atlas -owner=/atlas -desc=ATLASTESTDISK 4000000000000
<pre>
 
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
 
</pre>
 
  
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) :
+
== Update a Space Reservation ==
  
<pre>
+
'''update space [-desc=string] [-eternal] [-lifetime=long] [-owner=user|fqan] [-size=bytes] spacetoken'''
[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).
+
:'''''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.
  
=List tokens/space reservations=
+
* As an example, to update the space reservation ATLASTESTDISK to '''5TB'''
  
* 2 ways:
+
update space -desc=ATLASTESTDISK -size=5000000000000 <token_id>
  
:1. Per token:
+
:*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).
  
[dccore01.pic.es] (SrmSpaceManager) admin > ls -desc=T2ATLASPRODDISK
+
== Release Reservation ==
  
:2 By showing all:
+
'''release space token'''
  
[dccore03.pic.es] (SrmSpaceManager) admin > ls
+
== List Space Reservations ==
+
 
  '''''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]'''
'''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 '''
+
== List Link Groups ==
  '''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 '''
+
  '''ls link groups [-a] [-al=online|nearline] [-h] [-l] [-rp=output|replica|custodial] [name]'''
'''total number of reservations: 2'''
+
 
  '''total number of bytes reserved: 10737418250'''
+
== List File Reservations ==
+
 
LinkGroups:
+
  '''ls files [-a] [-h] [-limit=rows] [-owner=user|fqan] [-p] [-state=transferring|stored|flushed] ... [-token=long] [pnfsid|path]'''
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]