[lustre-discuss] EINVAL error when writing to a PFL file (lustre 2.12.0)

Patrick Farrell pfarrell at whamcloud.com
Fri Feb 22 08:33:38 PST 2019


Thomas,


This is expected, but it's also something we'd like to fix - See LU-9341.


Basically, append tries to instantiate the layout from 0 to infinity, and it fails because your layout is incomplete (ie doesn't go to infinity).

May I ask why you're creating a file with an incomplete layout?  Do you have a use case in mind?


- Patrick

________________________________
From: lustre-discuss <lustre-discuss-bounces at lists.lustre.org> on behalf of LEIBOVICI Thomas <thomas.leibovici at cea.fr>
Sent: Friday, February 22, 2019 10:27:48 AM
To: lustre-discuss at lists.lustre.org
Subject: [lustre-discuss] EINVAL error when writing to a PFL file (lustre 2.12.0)

Hello,

Is it expected to get an error when appending a PFL file made of 2
regions [0 - 1M] and [1M to 6M]
even if writing in this range?

I get an error when appending it, even when writting in the very first
bytes:

[root at vm0]# lfs setstripe  -E 1M -c 1 -E 6M -c 2 /mnt/lustre/m_fou3

[root at vm0]# lfs getstripe /mnt/lustre/m_fou3
/mnt/lustre/m_fou3
   lcm_layout_gen:    2
   lcm_mirror_count:  1
   lcm_entry_count:   2
     lcme_id:             1
     lcme_mirror_id:      0
     lcme_flags:          init
     lcme_extent.e_start: 0
     lcme_extent.e_end:   1048576
       lmm_stripe_count:  1
       lmm_stripe_size:   1048576
       lmm_pattern:       raid0
       lmm_layout_gen:    0
       lmm_stripe_offset: 3
       lmm_objects:
       - 0: { l_ost_idx: 3, l_fid: [0x100030000:0x9cf:0x0] }

     lcme_id:             2
     lcme_mirror_id:      0
     lcme_flags:          0
     lcme_extent.e_start: 1048576
     lcme_extent.e_end:   6291456
       lmm_stripe_count:  2
       lmm_stripe_size:   1048576
       lmm_pattern:       raid0
       lmm_layout_gen:    0
       lmm_stripe_offset: -1

[root at vm0]# stat -c %s /mnt/lustre/m_fou3
14

* append fails:

[root at vm0]# echo qsdkjqslkdjkj >> /mnt/lustre/m_fou3
bash: echo: write error: Invalid argument

# strace indicates that write() gets the error:

write(1, "qsdkjqslkdjkj\n", 14)         = -1 EINVAL (Invalid argument)

* no error in case of an open/truncate:

[root at vm0]# echo qsdkjqslkdjkj > /mnt/lustre/m_fou3

OK

Is it expected or should I open a ticket?

Thomas

_______________________________________________
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/20190222/e1f721f0/attachment-0001.html>


More information about the lustre-discuss mailing list