[lustre-discuss] [EXTERNAL] [BULK] Re: Wrong striping when creating files inside a directory with explicit layout
Andreas Dilger
adilger at thelustrecollective.com
Wed Dec 10 19:47:08 PST 2025
There is a patch https://review.whamcloud.com/61688 ("LU-12738 pfl: do not instantiate full PFL layout on append") from Vitaly included into 2.17 that no longer requires the "append layout" functionality, and instead fixes how the files are locked by the client.
That will remove this workaround from the filesystem, and reduce confusion for users and admins alike.
Cheers, Andreas
On Dec 11, 2025, at 09:27, Santiago Freire - InCo via lustre-discuss <lustre-discuss at lists.lustre.org> wrote:
Many thanks to everyone for their help! The strange behaviour I was seeing was in fact caused by creating the files in append mode. Creating the files in write mode, closing them and then opening them in append mode solved the issue.
Thanks again!
Santiago
On 12/8/25 16:14, Mohr, Rick wrote:
That is correct. The behavior can be different if you open in append mode versus just opening and then appending. For example, if you have a directory with default stripe count of 3, then running "touch foo; echo 'a' >> foo" will create a file with stripe count 3. But if the file is create by just running " echo 'a' >> foo", then the file will be created with stripe count 1 by default. The default striping for O_APPEND files can be controlled with the append_stripe_count parameter. See https://doc.lustre.org/lustre_manual.xhtml#file_striping.considerations for more details.
(Santiago: That could explain why you were getting files with stripe count 1. I missed the info about appending to files when I first read your message.)
--Rick
On 12/8/25, 10:36 AM, "lustre-discuss on behalf of Vicker, Darby J. (JSC-EG311)[AMENTUM TECHNOLOGY, INC] via lustre-discuss" <lustre-discuss-bounces at lists.lustre.org <mailto:lustre-discuss-bounces at lists.lustre.org> on behalf of lustre-discuss at lists.lustre.org <mailto:lustre-discuss at lists.lustre.org>> wrote:
The application creates files with standard POSIX I/O (open() followed by appends and writes), nothing exotic or MPI-IO-related.
If I remember correctly, files opened in append mode are treated differently by the lustre client and don’t necessarily obey the stripping set on its parent directory. I don’t recall the details at the moment but perhaps that is contributing to the behavior Santiago is experiencing?
_______________________________________________
lustre-discuss mailing list
lustre-discuss at lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/attachments/20251211/67609fb0/attachment.htm>
More information about the lustre-discuss
mailing list