Each file in pnfs
has a unique 12 byte long pnfsID. This
is comparable to the inode number in other filesystems. The
pnfsID used for a file will never be reused, even if the
file is deleted. dCache uses the pnfsID for all internal
references to a file.
The pnfsID of the file
<filename>
can be
obtained by reading the command-file
.(id)(<filename>)
in the directory of the file.
A file in pnfs
can be referred to by pnfsID for most
operations. For example, the name of a file can be obtained from
the pnfsID with the command nameof
as follows:
[user] $
cd /pnfs/site.de/any/sub/directory/
[user] $
cat '.(nameof)(0004000000000000002320B8)'
file.dat
And the pnfsID of the directory it resides in is obtained by:
[user] $
cat '.(parent)(0004000000000000002320B8)'
0004000000000000001DC9E8
This way, the complete path of a file may be obtained starting from the pnfsID. Precisely this is done by the tool pathfinder:
[user] $
. /usr/etc/pnfsSetup
[user] $
PATH=$PATH:$pnfs/tools
[user] $
cd /pnfs/site.de/another/dir/
[user] $
pathfinder 0004000000000000002320B8
0004000000000000002320B8 file.dat 0004000000000000001DC9E8 directory 000400000000000000001060 sub 000100000000000000001060 any 000000000000000000001080 usr 000000000000000000001040 fs 000000000000000000001020 root 000000000000000000001000 - 000000000000000000000100 - 000000000000000000000000 - /root/fs/usr/any/sub/directory/file.dat
The first two lines configure the pnfs
-tools correctly. The
path obtained by pathfinder does not agree
with the local path, since the latter depends on the mountpoint
(in the example /pnfs/site.de/
). The pnfsID
corresponding to the mountpoint may be obtained with
[user] $
cat '.(get)(cursor)'
dirID=0004000000000000001DC9E8 dirPerm=0000001400000020 mountID=000000000000000000001080
The dirID
is the pnfsID of the current
directory and mountID
that of the
mountpoint. In the example, the pnfs
server path /root/fs/usr/
is mounted on
/pnfs/site.de/
.