wiki:manuals/dCache_clients/client_interposition
Last modified 11 years ago Last modified on 09/23/09 15:08:55

Using the client interposition library

DCAP is a POSIX like interface for accessing D-cache, allowing unmodified applications to access D-cache transparently. This access method uses a proprietary data transfer protocol, which can emulate POSIX access across the LAN or WAN.

Unfortunately the client requires inbound connectivity and so it is not practical to use this protocol over the WAN as most sites will not allow inbound connectivity to worker nodes.

To make non D-cache aware applications access files within D-cache through DCAP all that is needed is setting a couple of environment variables listed below.

export LD_PRELOAD=/opt/d-cache/dcap/lib/libpdcap.so 
export DCACHE_IO_TUNNEL=/opt/d-cache/dcap/lib/libgsiTunnel.so                

The LD_PRELOAD environment variable overrides the operating system calls, and the DCACHE_IO_TUNNEL variable informs the DCAP components how to tunnel requests.

After the environment variables are set as above the following commands should work.

cp /etc/group gsidcap://dev01.gridpp.rl.ac.uk:22128/pnfs/gridpp.rl.ac.uk/data/dteam/myFile
ls gsidcap://dev01.gridpp.rl.ac.uk:22128/pnfs/gridpp.rl.ac.uk/data/dteam/DirOrFile
head gsidcap://dev01.gridpp.rl.ac.uk:22128/pnfs/gridpp.rl.ac.uk/data/dteam/myFile
rm gsidcap://dev01.gridpp.rl.ac.uk:22128/pnfs/gridpp.rl.ac.uk/data/dteam/MyFile

Debugging

The dcap libraries and dccp client use a bit mask variable.

export DCACHE_DEBUG=255

255 is the highest level of debugging, but may prove unstable, I would recommend lower levels with 1,2,4,8.