Details

    • Technical task
    • Resolution: Done
    • Blocker
    • None
    • Lustre 2.11.0
    • 9223372036854775807

    Description

      Now lfs mirror extend should be able to extend a plain file to mirrored file by using command like:

      lfs mirror extend -N2 -E 1M -E eof -c 2 file

      while 'file' is a file with plain layout. This has already been verified in FLR branch, please check the test case sanity-flr:test_0d().

      We also need to verify this command works on an older file system. For example, a file system is formatted in 2.10, and then create regular files with plain and PFL layout in it, and then upgrade Lustre to 2.11, and then use the above command to convert plain files to mirrored, which should work fine.

      Attachments

        Activity

          [LU-10285] Make sure that FLR is able to extend a plain file on older file system

          Test has been successful.

          jgmitter Joseph Gmitter (Inactive) added a comment - Test has been successful.
          sarah Sarah Liu added a comment -

          Tested this scenario and it passed.
          Here are the steps
          1. setup system as 2.10.2 #51 ldiskfs, create 2 file, 1 is plain, 1 is PFL

          [root@onyx-77 lustre]# lfs getstripe foo-plain 
          foo-plain
          lmm_stripe_count:  1
          lmm_stripe_size:   1048576
          lmm_pattern:       1
          lmm_layout_gen:    0
          lmm_stripe_offset: 0
          	obdidx		 objid		 objid		 group
          	     0	             4	          0x4	             0
          
          [root@onyx-77 lustre]# lfs getstripe foo-pfl 
          foo-pfl
            lcm_layout_gen:  3
            lcm_entry_count: 2
              lcme_id:             1
              lcme_flags:          init
              lcme_extent.e_start: 0
              lcme_extent.e_end:   1048576
                lmm_stripe_count:  1
                lmm_stripe_size:   1048576
                lmm_pattern:       1
                lmm_layout_gen:    0
                lmm_stripe_offset: 1
                lmm_objects:
                - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x5:0x0] }
          
              lcme_id:             2
              lcme_flags:          init
              lcme_extent.e_start: 1048576
              lcme_extent.e_end:   EOF
                lmm_stripe_count:  1
                lmm_stripe_size:   1048576
                lmm_pattern:       1
                lmm_layout_gen:    0
                lmm_stripe_offset: 0
                lmm_objects:
                - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x5:0x0] }
          
          [root@onyx-77 lustre]# 
          

          2. Upgrade the system to 2.11 #3677 without format
          3. run the above extend command on both files

          [root@onyx-77 lustre]# lfs getstripe foo-plain 
          foo-plain
            lcm_layout_gen:    2
            lcm_mirror_count:  3
            lcm_entry_count:   5
              lcme_id:             65537
              lcme_flags:          init
              lcme_extent.e_start: 0
              lcme_extent.e_end:   EOF
                lmm_stripe_count:  1
                lmm_stripe_size:   1048576
                lmm_pattern:       raid0
                lmm_layout_gen:    0
                lmm_stripe_offset: 0
                lmm_objects:
                - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x4:0x0] }
          
              lcme_id:             131073
              lcme_flags:          init
              lcme_extent.e_start: 0
              lcme_extent.e_end:   1048576
                lmm_stripe_count:  1
                lmm_stripe_size:   1048576
                lmmattern:       raid0
                lmm_layout_gen:    0
                lmm_stripe_offset: 1
                lmm_objects:
                - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x22:0x0] }
          
              lcme_id:             131074
              lcme_flags:          0
              lcme_extent.e_start: 1048576
              lcme_extent.e_end:   EOF
                lmm_stripe_count:  2
                lmm_stripe_size:   1048576
                lmm_pattern:       raid0
                lmm_layout_gen:    65535
                lmm_stripe_offset: -1
          
              lcme_id:             196609
              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: 0
                lmm_objects:
                - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x22:0x0] }
          
              lcme_id:             196610
              lcme_flags:          0
              lcme_extent.e_start: 1048576
              lcme_extent.e_end:   EOF
                lmm_stripe_count:  2
                lmm_stripe_size:   1048576
                lmm_pattern:       raid0
                lmm_layout_gen:    65535
                lmm_stripe_offset: -1
          
          [root@onyx-77 lustre]# lfs getstripe foo-pfl
          foo-pfl
            lcm_layout_gen:    2
            lcm_mirror_count:  3
            lcm_entry_count:   6
              lcme_id:             65537
              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: 1
                lmm_objects:
                - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x5:0x0] }
          
              lcme_id:             65538
              lcme_flags:          init
              lcme_extent.e_start: 1048576
              lcme_extent.e_end:   EOF
                lmm_stripe_count:  1
                lmm_stripe_size:   1048576
                lmm_pattern:       raid0
                lmm_layout_gen:    0
                lmm_stripe_offset: 0
                lmm_objects:
                - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x5:0x0] }
          
              lcme_id:             131073
              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: 1
                lmm_objects:
                - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x23:0x0] }
          
              lcme_id:             131074
              lcme_flags:          init
              lcme_extent.e_start: 1048576
              lcme_extent.e_end:   EOF
                lmm_stripe_count:  2
                lmm_stripe_size:   1048576
                lmm_pattern:       raid0
                lmm_layout_gen:    0
                lmm_stripe_offset: 0
                lmm_objects:
                - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x23:0x0] }
                - 1: { l_ost_idx: 1, l_fid: [0x100010000:0x24:0x0] }
          
              lcme_id:             196609
              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: 0
                lmm_objects:
                - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x24:0x0] }
          
              lcme_id:             196610
              lcme_flags:          init
              lcme_extent.e_start: 1048576
              lcme_extent.e_end:   EOF
                lmm_stripe_count:  2
                lmm_stripe_size:   1048576
                lmm_pattern:       raid0
                lmm_layout_gen:    0
                lmm_stripe_offset: 1
                lmm_objects:
                - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x25:0x0] }
                - 1: { l_ost_idx: 0, l_fid: [0x100000000:0x25:0x0] }
          
          sarah Sarah Liu added a comment - Tested this scenario and it passed. Here are the steps 1. setup system as 2.10.2 #51 ldiskfs, create 2 file, 1 is plain, 1 is PFL [root@onyx-77 lustre]# lfs getstripe foo-plain foo-plain lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: 1 lmm_layout_gen: 0 lmm_stripe_offset: 0 obdidx objid objid group 0 4 0x4 0 [root@onyx-77 lustre]# lfs getstripe foo-pfl foo-pfl lcm_layout_gen: 3 lcm_entry_count: 2 lcme_id: 1 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 1048576 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: 1 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x5:0x0] } lcme_id: 2 lcme_flags: init lcme_extent.e_start: 1048576 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: 1 lmm_layout_gen: 0 lmm_stripe_offset: 0 lmm_objects: - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x5:0x0] } [root@onyx-77 lustre]# 2. Upgrade the system to 2.11 #3677 without format 3. run the above extend command on both files [root@onyx-77 lustre]# lfs getstripe foo-plain foo-plain lcm_layout_gen: 2 lcm_mirror_count: 3 lcm_entry_count: 5 lcme_id: 65537 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 0 lmm_objects: - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x4:0x0] } lcme_id: 131073 lcme_flags: init lcme_extent.e_start: 0 lcme_extent.e_end: 1048576 lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmmattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x22:0x0] } lcme_id: 131074 lcme_flags: 0 lcme_extent.e_start: 1048576 lcme_extent.e_end: EOF lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 65535 lmm_stripe_offset: -1 lcme_id: 196609 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: 0 lmm_objects: - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x22:0x0] } lcme_id: 196610 lcme_flags: 0 lcme_extent.e_start: 1048576 lcme_extent.e_end: EOF lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 65535 lmm_stripe_offset: -1 [root@onyx-77 lustre]# lfs getstripe foo-pfl foo-pfl lcm_layout_gen: 2 lcm_mirror_count: 3 lcm_entry_count: 6 lcme_id: 65537 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: 1 lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x5:0x0] } lcme_id: 65538 lcme_flags: init lcme_extent.e_start: 1048576 lcme_extent.e_end: EOF lmm_stripe_count: 1 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 0 lmm_objects: - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x5:0x0] } lcme_id: 131073 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: 1 lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x23:0x0] } lcme_id: 131074 lcme_flags: init lcme_extent.e_start: 1048576 lcme_extent.e_end: EOF lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 0 lmm_objects: - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x23:0x0] } - 1: { l_ost_idx: 1, l_fid: [0x100010000:0x24:0x0] } lcme_id: 196609 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: 0 lmm_objects: - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x24:0x0] } lcme_id: 196610 lcme_flags: init lcme_extent.e_start: 1048576 lcme_extent.e_end: EOF lmm_stripe_count: 2 lmm_stripe_size: 1048576 lmm_pattern: raid0 lmm_layout_gen: 0 lmm_stripe_offset: 1 lmm_objects: - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x25:0x0] } - 1: { l_ost_idx: 0, l_fid: [0x100000000:0x25:0x0] }

          People

            sarah Sarah Liu
            jay Jinshan Xiong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: