This tool set consists of 3 utilities for manipulating the DPM's nameserver (DPNS). The three tools are:
dpns-listsurls.pyLists the SURLs associated with a particular SFN, pool, disk server or filesystem.
dpns-migratereplicas.pyMove a block of replicas from one disk server/filesystem to another
dpns-purgereplicas.pyPurge 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.
for options and basic usage
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.