[lustre-discuss] [EXTERNAL] [BULK] Re: Wrong striping when creating files inside a directory with explicit layout
Santiago Freire - InCo
sfreire at fing.edu.uy
Wed Dec 10 16:00:19 PST 2025
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?
>
>
More information about the lustre-discuss
mailing list