Hi Derek,
There is a general call-out mechanism in the olbd but I never really
considered doing it for xrootd; figuring people would just replace the
libXrdofs.so if they really needed something like that. Which, of course, is
what you are doing. So, until I come up with a call-out mechanism, you can
probably just intercept close() in the ofs layer and signal the migrator
(after the file is closed, ofcourse) to migrate the file. In your case, it
will work because only one person will have the file open. The generalized
solution allows for multiple opens with only the last one triggering the
call-out. To do this successfully, would mean that the call-out has to occur
at the ofs or oss layer. What is your preference (i.e., ofs or oss). The
next question is the natur of the callout. We have three solutions:
a) Invoke a script (simple but high overhead),
b) Start a program and pipe the events to it (simple relatively low
overhead -- my prefered solution),
c) Send a udp message somewhere (simple, low overhead but not always
reliable).
Let me know,
Andy
----- Original Message -----
From: "Derek Feichtinger" <[log in to unmask]>
To: "Andrew Hanushevsky" <[log in to unmask]>;
<[log in to unmask]>
Cc: "Fons Rademakers" <[log in to unmask]>; "Federico Carminati"
<[log in to unmask]>; "'Andreas Joachim Peters'"
<[log in to unmask]>
Sent: Tuesday, May 03, 2005 6:58 AM
Subject: Hook for triggering migration
> Hi, Andy
>
> We want to use xrootd as a general file transfer tool (especially since we
> can
> now also use it with the prototype of the authorization scheme we came up
> with), so we need to run part of a storage element as a MSS-connected
> xrootd
> read/write pool. Castor as a back end is most important for now and we
> need
> to get this prototype setup in working condition fast.
>
> We would like to have a way to trigger migration to Castor upon closing of
> a
> newly written file. I have studied the MPS shipped with xrootd, where the
> migration is done via a daemon periodically polling on the cache and
> looking
> for special files, but it would be better in our case if there was a hook
> for
> executing the migration directly, i.e. if one could provide a script
> analogous to the stagecmd script.
> The migration in this case is just a copy from one disk pool to another
> (the
> castor stager pool) and will either finish fast or return an error. Castor
> does much of the MPS logic itself when finally migrating the files to
> tape.
>
> Would it be possible for you to implement such a hook (or point us to
> where
> this hook had best be inserted in the architecture)?
>
> Thanks,
> Derek
>
> --
> Dr. Derek Feichtinger Tel: +41 22 767 10 07
> LCG/ARDA Group email: [log in to unmask]
> CERN
> http://people.web.psi.ch/feichtinger
> CH-1211 Genève 23
>
>
>
|