Skip to content

dCache/dcap

Repository files navigation

The dCache dccp client
~~~~~~~~~~~~~~~~~~~~~~

* Using dccp as a dcap client

$/opt/d-cache/dcap/bin/dccp    /etc/group dcap://door.example.org:22125/pnfs/example.org/data/dteam/test6
Command failed!
Server error message for [1]: "path /pnfs/example.org/data/dteam/test6 not found" (errno 10001).
597 bytes in 0 seconds

* Using dccp as a gsidcap client

$/opt/d-cache/dcap/bin/dccp    /etc/group gsidcap://door.example.org:22128/pnfs/example.org/data/dteam/test5
Command failed!
Server error message for [1]: "path /pnfs/example.org/data/dteam/test5 not found" (errno 10001).
597 bytes in 0 seconds

* Using debug flags with dccp

$/opt/d-cache/dcap/bin/dccp -d 63   /etc/group dcap://door.example.org:22128/pnfs/example.org/data/dteam/test3
Dcap Version version-1-2-42 Jul 10 2007 19:56:02
Using system native stat64 for /etc/group.
Allocated message queues 0, used 0

Using environment variable as configuration
Allocated message queues 1, used 1

Creating a new control connection to door.example.org:22128.
Activating IO tunnel. Provider: [libgsiTunnel.so].
Added IO tunneling plugin libgsiTunnel.so for door.example.org:22128.
Setting IO timeout to 20 seconds.
Connected in 0.00s.
Removing IO timeout handler.
Sending control message: 0 0 client hello 0 0 2 42 -uid=501 -pid=32253 -gid=501
Server reply: welcome.
dcap_pool:  POLLIN on control line [3] id=1
Connected to door.example.org:22128
Sending control message: 1 0 client stat "dcap://door.example.org:22128/pnfs/example.org/data/dteam/test3" -uid=501
Command failed!
Server error message for [1]: "path /pnfs/example.org/data/dteam/test3 not found" (errno 10001).
[-1] unpluging node
Removing unneeded queue [1]
[-1] destroying node
Real file name: /etc/group.
Using system native open for /etc/group.
extra option:  -alloc-size=597 
[Fri Sep  7 17:50:56 2007] Going to open file dcap://door.example.org:22128/pnfs/example.org/data/dteam/test3 in cache.
Allocated message queues 2, used 1

Using environment variable as configuration
Activating IO tunnel. Provider: [libgsiTunnel.so].
Added IO tunneling plugin libgsiTunnel.so for door.example.org:22128.
Using existing control connection to door.example.org:22128.
Setting hostname to clinton.example.org.
Sending control message: 2 0 client open "dcap://door.example.org:22128/pnfs/example.org/data/dteam/test3" w -mode=0644 -truncate door.example.org 33122 -timeout=-
1 -onerror=default  -alloc-size=597  -uid=501
Polling data for destination[6] queueID[2].
Got callback connection from door.example.org:35905 for session 2, myID 2.
cache_open -> OK
Enabling checksumming on write.
Cache open succeeded in 0.62s.
[7] Sending IOCMD_WRITE.
Entered sendDataMessage.
Polling data for destination[7] queueID[2].
[7] Got reply 4x12 bytes len.
[7] Reply: code[6] response[1] result[0].
get_reply: no special fields defined for that type of response.
[7] Got reply 4x12 bytes len.
[7] Reply: code[7] response[1] result[0].
get_reply: no special fields defined for that type of response.
[7] Expected position: 597 @ 597 bytes written.
Using system native close for [5].
[7] unpluging node
File checksum is: 460898156
Sending CLOSE for fd:7 ID:2.
Setting IO timeout to 300 seconds.
Entered sendDataMessage.
Polling data for destination[7] queueID[2].
[7] Got reply 4x12 bytes len.
[7] Reply: code[6] response[4] result[0].
get_reply: no special fields defined for that type of response.
Server reply: ok destination [2].
Removing IO timeout handler.
Removing unneeded queue [2]
[7] destroing node
597 bytes in 0 seconds

Debugging
~~~~~~~~~

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

export DCACHE_DEBUG=255

Using the client interposition library
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

dcap is a POSIX like interface for accessing dCache, allowing unmodified 
applications to access dCache 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 dCache aware applications access files within dCache 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 

The LD_PRELOAD environment variable overrides the operating system calls.

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

cp /etc/group gsidcap://door.example.org:22128/pnfs/example.org/data/dteam/myFile
ls gsidcap://door.example.org:22128/pnfs/example.org/data/dteam/DirOrFile
head gsidcap://door.example.org:22128/pnfs/example.org/data/dteam/myFile
rm gsidcap://door.example.org:22128/pnfs/example.org/data/dteam/MyFile