Difference between revisions of "DPM Utilities"

From GridPP Wiki
Jump to: navigation, search
(No difference)

Latest revision as of 14:23, 18 July 2006


This tool set consists of 3 utilities for manipulating the DPM's nameserver (DPNS). The three tools are:

  1. dpns-listsurls.py Lists the SURLs associated with a particular SFN, pool, disk server or filesystem.
  2. dpns-migratereplicas.py Move a block of replicas from one disk server/filesystem to another
  3. dpns-purgereplicas.py Purge SURLs and replica entries in DPNS for a particular disk server/filesystem

These tools are rather primitive, but will help manitain a DPM in case of, e.g., unrecoverable loss of a disk server.


These tools require a recent version of MySQL-python. Unfortunately the version of MySQL-python on SL3 is too old (and has a dependency on the SL packed MySQL 3 server, which might uninstall the gLite version of MySQL server 4.1). The tools have been developed and tested on SL4 and OS X. They should run on any platform which supports MySQL-python >= 1.0.0.




 UTILITY --help

for options and basic usage

Database User

Because of the requirements above, you'll probably not run these utilities directly on the MySQL server hosting the DPNS databases. So you will have to add a new user to MySQL wih permission to read and write the DPNS database. See, e.g., MySQL documentation, but something like this will do the trick:

 mysql> grant select, delete, update on cns_db.* to 'dpmutil'@'some.sl4.host' identified by 'password';

If you want to only use the dpns-listsurls.py utility then only select privilege is required.


These utilities are slightly less likely to stuff up your DPNS server than writing the SQL queries by hand, however they have not been that well tested and, in any case, it is good practice to backup your MySQL database before using them.


From Graeme's scripts page.


Graeme Stewart