Migration to DOME/DPM

these are notes about the migration to dome based on the experience of the French sites that have already migrated.
The instructions for the migration are documented in

you can also have a look at this presentation

Here you can find additional instructions comments

How to setup things for which spacetokens are not used

DOME requires to define quotatokens. For the VOs for which spacetokens are already defined they can be translated into quotatoken (basically adding a path to the spacetoken definition) using the quotatokenmod command.

On the other hand, if the VO (or anyways the group of files you are create the QT for) does not use spacetoken (e.g. CMS space) you need to create a QT from scratch, prepare the space counters and include the existing files in the ST.

Once created the QT (let's say the token name is CMS) and ran the dmlite-mysql-dirspaces.py script to get the quotatoke occupation, you need to do the following.

Get the Ino of the base directory of the QT e.g.

[root@polgrid4 ~]# dpns-ls -id /dpm/in2p3.fr/home/cms
                  10 /dpm/in2p3.fr/home/cms
[root@polgrid4 ~]#

Update the spacetoke counter according to the size of the corresponding QT base directory. So on the DB

    dpm_db.dpm_space_reserv r,
    cns_db.Cns_file_metadata d 
    r.u_space = r.t_space - d.filesize 
    u_token = 'CMS' and d.fileid = 10;

Once done this, you need to put in the ST all the files that ought to belong to that token.

update Cns_file_replica set setname = 'aaaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeee' where sfn like '%/cms/%';

where aaaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeee is the quotatoken id. This may take a lot of time, depending on the sie of your storage.

Keep ST and QT consistency

normally ST used space counter (t_space - u_space in the dpm_space_reserv table) and QT counters (the size of the base directory) should stay in sync but there are some cases they may diverge (in particular when writing/deleting with mixed protocols like atlas does).

Temporary workarounds are: restart dpm daemons, reinitialize the ST counter with the above query.