Print

Print


ciao!

thanks for you attention (as fast as usual!)

so 

a) is indeed done in the sense that   xrd <myglobalredirector> locateall <file only on tape>      does not return CNAF as a possibility. It was done adding an if to (for reference)

int XrdCmsBaseFS::Exists(char *Path, int fnPos, int UpAT){
…

   if (!Config.ossFS->Stat(Path, &buf, Opts))
      {
        if ((buf.st_mode & S_IFMT) == S_IFREG) {
       		 if (buf.st_size>0 && buf.st_blocks==0){
                	// i want to kill this one, I return -1 
                	return -1;
		}
	}

…
}



b) indeed this was what I was hoping: returning -ENOENT in Open_ufs would simulate non existing file, hence trigger normal stagein.

I am trying to prepare what you asked, but I need the machine to be restarted remotely before (lost contact …..). Will send asap

thanks again !


tom



On Mar 12, 2013, at 2:13 PM, Andrew Hanushevsky <[log in to unmask]> wrote:

> Hi Tommaso,
> 
> I am a bit (but only a bit) confused.
> 
> a) You need a change in the cmsd lookup to indicate that a file is not there if it is on tape. You already have such a patch in hand (though we will shortly standardize that kind of feature).
> 
> b) You want the file to be staged if it in ontape but only using your special interface. At the face of it, returning ENOENT in open_ufs should trigger a stage call if the path was marked with stage.
> 
> c) Behaviour that you indicate would be indicative of configuratioo problem.
> 
> So, (I know this is painful) please send me the config file on that server (i.e. the one that will be doing the staging) as well as the server log when it goes into the 1 second retry loop that includes the open request (you should run the server with -d option so we can see all of the history).
> 
> Now, all that said, I am in transit back to Geneva and won't be able to look at the information until late this evening.
> 
> Andy
> 
> On Tue, 12 Mar 2013, Tommaso Boccali wrote:
> 
>> Hi,
>> 	I am trying to patch Xrootd for a specific use case, for a site with GPFS + TSM backend.
>> 
>> The system is somehow different from a standard disk + tape, since GPFS reports (via posix) the files always present, even if they are tape only.
>> In principle, one could forget and let GPFS do the magic: if a fopen is issued to GPFS for a file only on tape, recall is automatically triggered etc ?
>> 
>> BUT: the tape system cannot really afford this kind of random recalls, and there is a specific interface to queue recalls and combine them in a smart way (for example, do all the recalls in the same cassette etc).
>> 
>> So I am trying to patch xrootd for this (I was already successful in instrumenting cmsd not to publicize files just on tape?)
>> 
>> Main idea is to use a standard stagein technique, via
>> 
>> frm.xfr.copycmd out /bin/true 0
>> frm.xfr.copycmd in stats noalloc /opt/xrootd/bin/copy.sh $SRC $DST
>> frm.xfr.copymax 200
>> 
>> where the script enqueues the recall to the proper mechanism.
>> 
>> The patch is needed since xrootd uses frm interface when the file is missing, and this is never the case for a tape only file since GPFS always shows all the files ?
>> 
>> So my patch would be to simply tell xrootd that a file on GPFS, but with stat buf.blocks == 0, should be considered as absent, and hence trigger frm.
>> 
>> I was optimistic that a simple change like checking the # of blocks in 
> XrdOssApi:Open_ufs would be sufficient, like
>> 
>>   struct stat buf;
>>   if (!stat(path,&buf)) {
>>     if ((buf.st_mode & S_IFMT) == S_IFREG) {
>>       if (buf.st_size>0 && buf.st_blocks==0){
>>         // i want to kill this one, I return not existing
>>       std::cerr<<" APPLYING MY FIX!!!!!!!!!!"<<std::endl;
>>         return -ENOENT;
>>       }
>>     }
>>   }
>> 
>> and indeed it works, in the sense that the file is recognized as
> present BUT on disk only, and hence the same error code as for missing files is returned (-ENOENT).
>> 
>> Problem is that, later, no recall command is issued for the file, and
> an open is issued continuously with 1 sec delay. So probably what I did
> is not enough. I will file a request for enhancement (as I already did
> for the cmsd part), but in case someone sees a trivial cause for this behavior, I would be happy to test a solution.
>> 
>> thanks
>> 
>> tommaso
>> 
>> 
>> 
>> 
>> ########################################################################
>> Use REPLY-ALL to reply to list
>> 
>> To unsubscribe from the XROOTD-L list, click the following link:
>> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1
>> 


########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1