-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xrdfs stat call help #1837
Comments
The Offline and BackUpExists status can be signal in the 'st_rdev' element of the 'struct stat' structure that the server fills to return information about a file. I'm not certain where to suggest you fill this, the easiest place could depend on your configuration and particularly if you're customising xrootd, e.g. with plugins. I did just see your earlier question on the cta-dev list, so I'm making some assumptions about your configuration: I believe you may be using the standard Ofs & Oss (i.e. mostly standard xrootd server), on top of GPFS as the filesystem, and probably using a custom 'preplib'? - in that case I believe you could additionally use a 'statlib': There is some information about configuring a "statlib" here: https://xrootd.slac.stanford.edu/doc/dev56/ofs_config.htm (section 5.9). To signal Offline or BackUpExists one has to set st_rdev to 0 (strictly speaking XRDSFS_RDVMASK bits have to be 0), and then set XRDSFS_OFFLINE (to indicate offline) or XRDSFS_HASBKUP (to indicate BackUpExists). |
Hi, our end point is indeed uses xrootd on top of posix compliant file system (GPFS over NFSv4). From your response is that I should put into the config |
On Tue, 29 Nov 2022, maksiks wrote:
> From your response is that I should put into the config
oss.statlib /cms/.../statlib.py
where statlib.py would by my custom script that will return what is needed?
Not quite. The plugin needs to be written in C++. An example of such a
plugin can be found in xrootd/src/XrdOss/XrdOssSIgpfsT.cc which is a stat
plugin for gpfs that is used to prohibit access to files that no longer
online. The way you package a stat plugin (i.e. create a shared library)
is shown in xrootd/src/XrdPlugins.cmake (see variable LIB_XRD_GPFS).
Your plugin needs to set the following flags in st_rdev XRDSFS_OFFLINE and
XRDSFS_HASBKUP, as appropriate. These are defined in XrdSfs/XrdSfsFlags.hh
…
--
Reply to this email directly or view it on GitHub:
#1837 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
I do understand your predicament. I have forwarded this ticket to OSG for consideration. |
Another question that came up: the set of flags this call produces is based on certain commands that are issued for FS or it is just the type of FS that determines the response? Is there any way we can manipulate our FS responses that would produce right set of flags? |
The FS determines the response by setting appropriate flags. Since the FS
is really a plugin, the plugin can do whatever it wants. Generally, peope
use the standard plugin which is no smarter than EXT3 -- the least common
demninator.
Andy
…On Fri, 2 Dec 2022, maksiks wrote:
Another question that came up: the set of flags this call produces is based on certain commands that are issued for FS or it is just the type of FS that determines the response? Is there any way we can manipulate our FS responses that would produce right set of flags?
--
Reply to this email directly or view it on GitHub:
#1837 (comment)
You are receiving this because you were assigned.
Message ID: ***@***.***>
|
I believe this ticket or was handled by OSG so I am closing this. |
Hi Everyone,
Is there any way for me to manipulate what flags xrdfs stat call returns?
Right now below is what this call returns for our files, as you can see
Flags: 48 (IsReadable|IsWritable)
I need to add to them Offline and BackUpExists flags. How do I do that?
Thank you, --Max
xrdfs root://dtn20.nese.rc.fas.harvard.edu:1094/ stat /store/data/Run2022D/ParkingDoubleMuonLowMass0/RAW/v1/000/357/538/00000/01d5d7e3-4fa1-4dba-bf06-8fc9bf9c9cb0.root
Path: /store/data/Run2022D/ParkingDoubleMuonLowMass0/RAW/v1/000/357/538/00000/01d5d7e3-4fa1-4dba-bf06-8fc9bf9c9cb0.root
Id: 520000709958041673
Size: 3704685885
MTime: 2022-11-23 02:14:22
CTime: 2022-11-23 02:14:22
ATime: 2022-11-23 02:14:24
Flags: 48 (IsReadable|IsWritable)
Mode: 0600
Owner: xrootd
Group: xrootd
The text was updated successfully, but these errors were encountered: