Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-13062

OST offset defaults to 0 when coying a PFL via xattrs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • Lustre 2.17.0
    • Lustre 2.12.3
    • 3
    • 9223372036854775807

    Description

       I have a small tool (attached) that duplicates Lustre files using raw xattrs (i.e standard mknod + setxattr).

      With this method, PFL components that were initialized on the original file seem to always be created on OST index 0 on the duplicated file.

      For example, let's say that we have 4 OSTs and we create a PFL file comp_file with 2 components and explicit OST offsets 2 and 3.

        $ lfs setstripe -E 1M -c 2 -i 2 -E -1 -c -1 -i 3 comp_file
        $ lfs getstripe comp_file
        comp_file
        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:  2
            lmm_stripe_size:   65536
            lmm_pattern:       raid0
            lmm_layout_gen:    0
            lmm_stripe_offset: 2
            lmm_objects:
            - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x7c:0x0] }
            - 1: { l_ost_idx: 3, l_fid: [0x100030000:0x53:0x0] }
      
          lcme_id:             2
          lcme_mirror_id:      0
          lcme_flags:          0
          lcme_extent.e_start: 1048576
          lcme_extent.e_end:   EOF
            lmm_stripe_count:  -1
            lmm_stripe_size:   65536
            lmm_pattern:       raid0
            lmm_layout_gen:    0
            lmm_stripe_offset: 3
      

      Calling the small tool to duplicate this layout into a new file comp_file_dup sets the first lmm_stripe_offset to 0.

      $ ./simple_lustre_dup comp_file comp_file_dup
      $ lfs getstripe comp_file_dup
       comp_file_dup
       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: 2
       lmm_stripe_size: 65536
       lmm_pattern: raid0
       lmm_layout_gen: 0
       lmm_stripe_offset: 0
       lmm_objects:
       - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x357:0x0] }
       - 1: { l_ost_idx: 1, l_fid: [0x100010000:0x367:0x0] }
      lcme_id: 2
       lcme_mirror_id: 0
       lcme_flags: 0
       lcme_extent.e_start: 1048576
       lcme_extent.e_end: EOF
       lmm_stripe_count: -1
       lmm_stripe_size: 65536
       lmm_pattern: raid0
       lmm_layout_gen: 0
       lmm_stripe_offset: 3
      

       

      As was explained to me by Andreas, it makes sense to ignore the offset on duplication but -1 would be a better default value, letting the MDS choose the most appropriate OST.

      According to Andreas this might be related to

      LU-2809 llite: Do not return layout_gen for getxattr

      LU-9484 llite: eat -EEXIST on setting trusted.lov

      Attachments

        Issue Links

          Activity

            People

              tappro Mikhail Pershin
              barthelemy Clément Barthelemy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: