An example of operating with dCache .

In order to avoid the course of work in linux, we will give an example of how all possible actions are performed with dCache files.

The user trofimov, logged on lxpub03.jinr.ru in the local directory has a file testfile. It should be written to the directory dCache, then read it later and erase and check whether it is erased.

Sequence of actions with comments:

 

We look, what is in the directory at trofimov:
lxpub03:~ > LD_PRELOAD=libpdcap.so ls gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov

external iiii totest totest1 xxx xxx0022 xxx0044 xxx0045 xxx33 xxx3366 xxx3378 xxx3379 xxx345 xxx9988

See the file testfile:

lxpub03:~ > ls -l testfile
-rw-r–r– 1 trofimov lhep 26317 Jan 29 20:20 testfile

Upload the file at dCache :
lxpub03:~ > LD_PRELOAD=libpdcap.so dccp testfile gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov

26317 bytes (25.7 kiB) in 0 seconds

Checking:

lxpub03:~ > LD_PRELOAD=libpdcap.so ls gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov/testfile -l
-rw-r–r– 0 trofimov lhep 26317 Feb 15 13:22 dcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov/testfile

Download the file from dCache:

lxpub03:~ > LD_PRELOAD=libpdcap.so dccp gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov/testfile newfile

26317 bytes (25.7 kiB) in 0 seconds

Checking:
lxpub03:~ > diff newfile testfile
lxpub03:~ >
The file is correct.

Erasing file from dCache.
For this, you need to have an exported library, because the write operation will be used:
lxpub03:~ > LD_PRELOAD= libpdcap.so unlink gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov/testfile
Check where the file is located,
This can be done with the help of a recording service:
lxpub03:~ > LD_PRELOAD= libpdcap.so ls gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov/testfile

/bin/ls: cannot access gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov/testfile: No such file or directory

So everything works correctly.

The dCache file system manual at JINR has been prepared

Trofimov V.V. :  e-mail tvv@jinr.ru

Instruction dCache