<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Andreas,</p>
<p>Thanks for the reply. For what it's worth, extending a file that
does not have layout set does work.</p>
<blockquote>
<p><font face="Courier New, Courier, monospace">% <b>rm -f
file.dat</b><br>
% <b>./no_stripe.exe file.dat</b><br>
fd=3<br>
% <b>lfs getstripe file.dat</b><br>
<font color="#ff0000">file.dat has no stripe info</font><br>
% <b>date >> file.dat</b><br>
% <b>lfs getstripe file.dat</b><br>
file.dat<br>
lmm_stripe_count: 1<br>
lmm_stripe_size: 1048576<br>
lmm_pattern: 1<br>
lmm_layout_gen: 0<br>
lmm_stripe_offset: 21<br>
obdidx objid objid group<br>
21 6143298 0x5dbd42 0<br>
<br>
%</font><br>
</p>
</blockquote>
The LD_PRELOAD is exactly what I am doing in my I/O library.
Unfortunately, one can not intercept the open() that results from a
call to fopen(). That open is hard linked to the open in libc and
not satisfied by the runtime linker. This is what is driving this
topic for me. I can not conveniently set the striping for a file
opened with fopen() and other functions where the open is called
from inside libc. I used to believe that not too many application
use stdio for heavy I/O, but I have been come across several
recently.<br>
<br>
John<br>
<br>
<div class="moz-cite-prefix">On 5/21/2016 12:51 AM, Dilger, Andreas
wrote:<br>
</div>
<blockquote
cite="mid:38EA9F32-3869-43BA-B215-EB2E5BA62FD5@intel.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div>This is probably getting to be more of a topic for
lustre-devel. </div>
<div><br>
</div>
<div>There currently isn't any way to do what you ask, since
(IIRC) it will cause an error for apps that try to write to the
files before the layout is set. </div>
<div><br>
</div>
<div>What you could do is to create an LD_PRELOAD library to
intercept the open() calls and set O_LOV_DELAY_CREATE and set
the layout explicitly for each file. This might be a win if each
file needs a different layout, but since it uses two RPCs per
file it would be slower than using the default layout. <br>
<br>
<div>Cheers, Andreas</div>
</div>
<div><br>
On May 18, 2016, at 16:46, John Bauer <<a
moz-do-not-send="true" href="mailto:bauerj@iodoctors.com"><a class="moz-txt-link-abbreviated" href="mailto:bauerj@iodoctors.com">bauerj@iodoctors.com</a></a>>
wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<p>Since today's topic seems to be Lustre striping, I will
revisit a previous line of questions I had.</p>
<p>Andreas had put me on to O_LOV_DELAY_CREATE which I have
been experimenting with. My question is : Is there a way to
flag a directory with O_LOV_DELAY_CREATE so that a file
created in that directory will be created with
O_LOV_DELAY_CREATE also. Much like a file can inherit a
directory's stripe count and stripe size, it would be
convenient if a file could also inherit O_LOV_DELAY_CREATE?
That way, for open()s that I can not intercept ( and thus
can not set O_LOV_DELAY_CREATE in oflags) , such as those
issued by <font face="Courier New, Courier, monospace">fopen</font>(),
I can then get the fd with
<font face="Courier New, Courier, monospace">fileno</font>()
and set the striping with<font face="Courier New, Courier,
monospace"> ioctl(fd, LL_IOC_LOV_SETSTRIPE, lum).</font></p>
<p><font face="Courier New, Courier, monospace">Thanks</font></p>
<p><font face="Courier New, Courier, monospace">John</font><br>
</p>
<pre class="moz-signature" cols="72">--
I/O Doctors, LLC
507-766-0378
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:bauerj@iodoctors.com">bauerj@iodoctors.com</a></pre>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>lustre-discuss mailing list</span><br>
<span><a moz-do-not-send="true"
href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a></span><br>
<span><a moz-do-not-send="true"
href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a></span><br>
</div>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
I/O Doctors, LLC
507-766-0378
<a class="moz-txt-link-abbreviated" href="mailto:bauerj@iodoctors.com">bauerj@iodoctors.com</a></pre>
</body>
</html>