Starting from this webpage:

We seem to have two files named pnfsSetup :

[root@gfe02 ~]# locate pnfsSetup
/opt/d-cache/config/pnfsSetup
/usr/etc/pnfsSetup

/usr/etc/pnfsSetup contains the variable shmservers which needs to be higher that the number of databases that will be used (restart pnfs services, if changed). (We are crrently in the clear.)

[root@gfe02 ~] . /usr/etc/pnfsSetup
[root@gfe02 ~] PATH=${pnfs}/tools:$PATH

[root@gfe02 ~]# mdb show
ID Name Type Status Path
----------------------------------------------
0 admin r enabled (r) /opt/pnfsdb/pnfs/databases/admin
1 data1 r enabled (r) /opt/pnfsdb/pnfs/databases/data1
2 dteam r enabled (r) /opt/pnfsdb/pnfs/databases/dteam
3 cms r enabled (r) /opt/pnfsdb/pnfs/databases/cms
4 atlas r enabled (r) /opt/pnfsdb/pnfs/databases/atlas
5 alice r enabled (r) /opt/pnfsdb/pnfs/databases/alice
6 lhcb r enabled (r) /opt/pnfsdb/pnfs/databases/lhcb
7 sixt r enabled (r) /opt/pnfsdb/pnfs/databases/sixt
8 zeus r enabled (r) /opt/pnfsdb/pnfs/databases/zeus
9 na48 r enabled (r) /opt/pnfsdb/pnfs/databases/na48
10 calice r enabled (r) /opt/pnfsdb/pnfs/databases/calice
11 ilc r enabled (r) /opt/pnfsdb/pnfs/databases/ilc
12 biomed r enabled (r) /opt/pnfsdb/pnfs/databases/biomed
13 babar r enabled (r) /opt/pnfsdb/pnfs/databases/babar
14 dzero r enabled (r) /opt/pnfsdb/pnfs/databases/dzero
15 t2k r enabled (r) /opt/pnfsdb/pnfs/databases/t2k
16 hone r enabled (r) /opt/pnfsdb/pnfs/databases/hone
17 ltwo r enabled (r) /opt/pnfsdb/pnfs/databases/ltwo
18 pheno r enabled (r) /opt/pnfsdb/pnfs/databases/pheno
19 geant4 r enabled (r) /opt/pnfsdb/pnfs/databases/geant4
20 gin r enabled (r) /opt/pnfsdb/pnfs/databases/gin
21 ops r enabled (r) /opt/pnfsdb/pnfs/databases/ops


Let's add our friends from supernemo:

mdb create supernemo /opt/pnfsdb/pnfs/databases/supernemo
[root@gfe02 ~]# mdb update
Starting supernemo

[root@gfe02 ~]# mdb show
ID Name Type Status Path
----------------------------------------------
0 admin r enabled (r) /opt/pnfsdb/pnfs/databases/admin
[....]
22 supernemo r enabled (r) /opt/pnfsdb/pnfs/databases/supernemo

[root@gfe02 data]# pwd
/pnfs/hep.ph.ic.ac.uk/data
[root@gfe02 data]# ls
alice babar calice dteam geant4 hone lhcb na48 pheno t2k
atlas biomed cms dzero gin ilc ltwo ops sixt zeus

[root@gfe02 data]# mkdir '.(22)(supernemo)'

The supernemo directory is still owned by root, but customarily it should be the first user of each VO:
[root@gfe02 data]# ls -l
total 11
drwxr-xr-x 1 lt2-alice001 lt2-alice 512 Mar 2 2007 alice

chown lt2-snemo001:lt2-snemo supernemo
Done for: supernemo (supernemo.vo.eu-egee.org), ngs (ngs.ac.uk), london (vo.londongrid.ac.uk), camont, cedar, fusion, gridpp, mice, total (totalep).

The wormhole

Do this for number 22-30 (all the new databases):
[root@gfe02 data]# pwd
/pnfs/hep.ph.ic.ac.uk/data
[root@gfe02 data]# sclient getroot ${shmkey} 0
0 000000000000000000001000 0000000000000000000010E0
[root@gfe02 data]# sclient getroot ${shmkey} 22 0000000000000000000010E0
22 001600000000000000001000 0000000000000000000010E0
[...]
[root@gfe02 data]# sclient getroot ${shmkey} 30 0000000000000000000010E0
30 001E00000000000000001000 0000000000000000000010E0

The Tags
Check what was done before:
[root@gfe02 dteam]# cat '.(tag)(OSMTemplate)'
StoreName dteam
[root@gfe02 dteam]# cat '.(tag)(sGroup)'
dteam

Now what do I do with our friends from supernemo.vo.eu-egee.org etc ?

cd supernemo
[root@gfe02 supernemo]# echo 'StoreName supernemo' > '.(tag)(OSMTemplate)'
[root@gfe02 supernemo]# echo 'supernemo' > '.(tag)(sGroup)'

etc etc. kpwd
Here's the cron job:
[root@gfe02 cron.d]# more edg-mkgridmap
PATH=/sbin:/bin:/usr/sbin:/usr/bin
17 3,9,15,21 * * * root /opt/edg/sbin/edg-mkgridmap --output=/etc/grid-security/grid-mapfile --safe >> /var/log/edg-mkgridmap.log 2>&1 || /opt/d-cache/bin/grid-mapfile2dcache-kpwd
/opt/d-cache/bin/grid-mapfile2dcache-kpwd is a perl script. Just my luck.
(a) Update edg-mkgridmap:
/etc/cron.d/edg-mkgridmap calls /opt/edg/sbin/edg-mkgridmap, which calls /opt/edg/libexec/edg-mkgridmap/edg-makegridmap.pl
I have not quite been able to work out what the $EDG_MKGRIDMAP_OPTIONS are, but I have an inkling that it uses /opt/edg/etc/edg-mkgridmap.conf
Other files that will need editing:
/etc/grid-security/grid-vorolemap
/etc/grid-security/storage-authzdb
/opt/d-cache/etc/glue-1.3.xml (what do I do with the fully qualified names ?)
/opt/d-cache/config/PoolManager.conf