The Pnfs Wormholes

Pnfs Wormholes are a kind of hardlink from each directory inside pnfs to one directory inside pnfs which doesn't need to be mounted. We are using this feature to influence the behaviour of HSM applications from one central point (directory) independently of the actual mountpoint the corresponding host has chosen. Wormholes are assigned 'per database' which means that the wormhole of directory trees of two different databases may point to different targets. (which is very unlikely to happen). There is a small set of things you have to prepare to make wormholes available. What you need to know

Example

#
# create the config root
#
mkdir -p /pnfs/fs/admin/etc/configdir
#
# get the pfnsID of configdir
#
pnfsID=`cat /pnfs/fs/admin/etc/.(id)(configdir)`
#
#  create the actual configuration directories below configdir
#
mkdir /pnfs/fs/admin/etc/configdir/tools
mkdir /pnfs/fs/admin/etc/configdir/flags
#
# asign the config directory to the databases.
# lets say we have 4 databases 0...3
# and our $shmkey is 1122 
#
for c in 0 1 2 3 ; do
  $pnfs/tools/sclient getroot 1122 $c $pnfsID
done
#
# from now on 
# .(config)(tools) will point to /pnfs/fs/admin/etc/configdir/tools  and
# .(config)(flags) will point to /pnfs/fs/admin/etc/configdir/flags
#
#    ask the database for the installed wormhole link
#    ( just omit the last argument )
#
for c in 0 1 2 3 ; do
  $pnfs/tools/sclient getroot 1122 $c
done
#
#  you will learn the database id, the root id of that database and
#  wormhole link (pnfsID)
#