next up previous contents
Next: SE and Data Storage Up: SE Usage to Store Previous: Storing Data on SE   Contents


File Naming Conventions

User jobs usually create files with file names that are meaningful in the usage context. Suppose the user is storing some source code files to be shared in the Grid, we might expect file names like Config.C, Tracking.C. etc.

In a Grid environment such names are defined LFN (Logical File Name). By default LFN are assigned as mappings, while the system creates special names that grant physical file names uniqueness.
If a user stores a file with a command of the following type:

$ edg-rm --vo myvo cr file:///home/user/Ctest.C \
-d grid005.pd.infn.it -l lfn:MY-Ctest.C

The middleware creates two items: the file name and the file guid that are checked with the command:

$ edg-rm --vo myvo listReplicas lfn:MY-Ctest.C
srm://SE-dns/myvo/generated/2003/09/18/filea99f5b2a......

The file name is not a physical file name but a soft link to the guid.

As shown in the example, the file name on the SE for our logical file name MY-Ctest.C is file4259968c-1f58-11d8-ab78-d38fa2b63747, a unique string made of a constant prefix (file) and a variable random character string. The name is associated to the immutable guid 56c3e03d-1f58-11d8-ab78-d38fa2b63747.
For each SE and for each VO files are stored at the VO root directory in the form:
/access-point/vo-name/
that for the alice VO is:
/flatfiles/SE00/alice/
Files stored at the default destination are available at the subdirectory generated followed by year, month, day and Replica Manager file name, according to the following schema:
generated/year/month/day/name
Thus if a file was stored on 25-nov-2003, it is located at:
/flatfiles/SE00/alice/generated/2003/11/25/
Usually files are accessed using the LFN name, therefore users are not involved in the directory location of files at any single SE.

If the users want to assign customized names to the files they store at any SE, the file destination must be a SURL, as in the following example:

#!/bin/bash
#
# create master copy of Master-test.rm with user defined name
#
edg-rm -v --vo=alice copyAndRegisterFile  \
            file:$HOME/MyRmng/MyTest.rm \
            -l lfn:Alice-JJ001-MyTest.rm  \
            -d srm://adc0021.cern.ch/flatfiles/SE00/alice/JJ001-MyTest.rm

Add to file name and LFN flags that grant unique file name, otherwise previous files with the same name might be overwritten. When files are created with a customized name, they are stored at the VO directory. In this case use grep to select your file names as the directory stores the whole file set of the VO and the list will be very long:

#!/bin/bash
#
edg-rm -i --vo=alice list \
    srm://adc0021.cern.ch/flatfiles/SE00/alice/ | grep MYTest


next up previous contents
Next: SE and Data Storage Up: SE Usage to Store Previous: Storing Data on SE   Contents
luvisetto 2003-12-17