|Work with the dCache system at JINR|
dCache User Guide
Taken from dcache.org. The authors represent the system in such a manner. It’s hard to tell better.
The purpose of this project is to create a system for storing and extracting enormous data distributed among a big number of diverse server units ordered in a virtual system with a tree of names of files accessible by various standard methods. Depending on its configuration, dCache provides methods for data exchange with servers organized in one or two levels. It provides storage, management of space, manipulations with pools, replication, definition of critical places of loading and file restoration in case of loss. Connection to the system of file storage simulates an unlimited space for storage with direct access. An exchange The data exchange with tapes is automatic and transparent for the user. In addition to specific protocols HEP (SRM, gFTP), data in dCache can be accessible through NFSv4.1 (pNFS) and via WebDAV.
The reality of LIT JINR
|4 installations of dCache are accessible at LIT and 3 of which 3 work in accordance with the rules and customs accepted in WLCG, two of them being intended only for VO CMS. The discussion of work with these systems is not a subject of the present manual.|
One system is allocated for the users registered on the LIT farms and VOs not included into WLCG. These are, for example, MPD, BES, Biomed, etc. Nowadays, this system is a single-level one, i.e. the volume of data it stores is restricted by reasonable limits. These limits - some tens TB -
establishes LIT management when allocating a space for a new VO.
A tree of names
|Irrespective of whether there has been allocated a space to the user in frames of VO or else the user works independently, her should be registered on a LIT farm LIT |
There he receives an identifier which is called below as <login>. For example, trofimov is a login of user Trofimov.
The registered users get access to files or to subdirectories
/pnfs/jinr.ru/data/user/<the first letter of login>/<login>
Hence, files of user trofimov are stored in
If trofimov worked in VO TVV, files would be in the directory /pnfs/jinr.ru/data/tvv... and farther as the VO will arrange them.
Special features of access to files
|Files in dCache are written only once and are read many times. No updating is supposed. The process of changing the file content looks as follows:|
- transfer the file from space dCache to local space;
- change the file;
- erase the file from dCache;
- write down the file from the local space in the space dCache under its old name.
Access is available exclusively from computers of the farm (lxpub...). For this purpose the protocol dcap or the utility of copying dccp is used. Access is performed through the processes run on server dCache
To avoid a course of work in linux, we will give an example of how all possible actions with files dCache are performed.
The contents of work
|User trofimov with the login on lxpub03 in a local directory has a file named testfile. It should be written in the dCache directory, then it should be read and then erased and finally one should check up whether it was erased or not. |
Sequence of actions with comments
|We look what trofimov’s directory has.
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
|We look what is the file testfile
lxpub03:~ > ls -l testfile
-rw-r--r-- 1 trofimov lhep 26317 Jan 29 20:20 testfile
|We copy the file
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
|We check-up if it is that.
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
|We read the file back
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
|We check-up if it is
lxpub03:~ > diff newfile testfile
|There was it. We erase it from dCache. For this purpose it is necessary to have an exported
library because the operation of record will be used.|
lxpub03:~ > LD_PRELOAD= libpdcap.so unlink gssdcap://lxse-dc01.jinr.ru:22126//pnfs/jinr.ru/data/user/t/trofimov/testfile
|We check-up where the file is. This can be made also with the help of a writing 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
This means everything works properly.
|The manual for the work with the dCache file system at JINR has been prepared by V.V.Trofimov.|