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

LEIBOVICI Thomas thomas.leibovici at cea.fr
Fri Feb 22 08:27:48 PST 2019


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



More information about the lustre-discuss mailing list