pnfs usage - E1039-Collaboration/e1039-wiki GitHub Wiki
Tips to Handle Files under PNFS
Permission denied
Read Failure due to When you try to read a file under PNFS, it sometimes fails due to Permission denied
. Below are two examples;
cd /pnfs/e906/production/digit/R007/01/25
cp digit_012528_R007.root /dev/null
cp: overwrite '/dev/null'? y
'digit_012528_R007.root' -> '/dev/null'
cp: error reading 'digit_012528_R007.root': Permission denied
root -b -l digit_012528_R007.root
root [0]
Attaching file digit_012528_R007.root as _file0...
SysError in <TFile::ReadBuffer>: error reading from file digit_012528_R007.root Permission denied
Error in <TFile::Init>: digit_012528_R007.root failed to read the file type data.
(TFile *) nullptr
Actually the problem is often not the file permission but the cache status. You can check the cache status of a file by executing the following command for example;
cd /pnfs/e906/production/digit/R007/01/25
/exp/seaquest/app/software/script/manip-pnfs-file.sh digit_012528_R007.root
If it shows digit_012528_R007.root: NEARLINE
, the file is not on the front-end cache but on the back-end tape.
You should then prestage the file, namely pulling the file from tape to cache, by the following command;
/exp/seaquest/app/software/script/manip-pnfs-file.sh -p digit_012528_R007.root
where the -p
option is to prestage the file.
The command finishes immediately, but a prestaging process runs in background and takes an unknown time (10 seconds...10 hours).
You should execute the above command time-to-time until the cache status changed to ONLINE_AND_NEARLINE
(or ONLINE
).