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

"lfs mirror create -N --parent /path/file" does not inherit its parent's layout

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.11.0
    • Lustre 2.11.0
    • 3
    • 9223372036854775807

    Description

      # lfs getstripe -d /mnt/lustre/dir
      stripe_count:  2 stripe_size:   4194304 pattern:       raid0 stripe_offset: 1
      
      # lfs mirror create -N --parent /mnt/lustre/dir/file3
      
      # lfs getstripe /mnt/lustre/dir/file
      /mnt/lustre/dir/file
        lcm_layout_gen:    1
        lcm_mirror_count:  1
        lcm_entry_count:   1
          lcme_id:             1
          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: 2
            lmm_objects:
            - 0: { l_ost_idx: 2, l_fid: [0x100020000:0x4:0x0] }
      
      

      My thought about the inheritance is:

      • If parent is a plain directory, the "-N --parent" should create a mirror contains a single component covering [0, eof) and inherit its stripe options.
      • If parent is a PFL directory, newly created mirror should inherit the whole components of its parent directory.
      • If parent is a FLR directory, newly created mirror should inherit one of the mirror of its parent.

      Attachments

        Issue Links

          Activity

            [LU-10561] "lfs mirror create -N --parent /path/file" does not inherit its parent's layout
            pjones Peter Jones added a comment -

            Landed for 2.11

            pjones Peter Jones added a comment - Landed for 2.11

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31298/
            Subject: LU-10561 flr: remove "--parent" option from lfs mirror command
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 905d37787638b94d02e58798f47677230253274a

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31298/ Subject: LU-10561 flr: remove "--parent" option from lfs mirror command Project: fs/lustre-release Branch: master Current Patch Set: Commit: 905d37787638b94d02e58798f47677230253274a

            This patch should be landed to 2.11 because it changes the command line utility. We don't want to introduce any confusion to the usage of mirror creation.

            jay Jinshan Xiong (Inactive) added a comment - This patch should be landed to 2.11 because it changes the command line utility. We don't want to introduce any confusion to the usage of mirror creation.

            Jian Yu (jian.yu@intel.com) uploaded a new patch: https://review.whamcloud.com/31298
            Subject: LU-10561 flr: remove "--parent" option from lfs mirror command
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 470fcdf189708fb3e99094a2ebea118812b6d7a0

            gerrit Gerrit Updater added a comment - Jian Yu (jian.yu@intel.com) uploaded a new patch: https://review.whamcloud.com/31298 Subject: LU-10561 flr: remove "--parent" option from lfs mirror command Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 470fcdf189708fb3e99094a2ebea118812b6d7a0
            yujian Jian Yu added a comment - - edited

            "--parent" option for "lfs mirror create/extend" command was originally designed to use default stripe options inherited from parent directory. However, if parent directory has composite layout, there will be inconsistency to choose the stripe options from which component to inherit. And if there is any other option specified, it's also inconsistent to inherit the layout of parent directory. So, we'd like to define the policy as follows:

            • If there is no option specified, then the file/directory to be created will inherit the layout of parent directory.
            • If there is any option specified, then the file/directory to be created will use the specified layout and inherit unspecified attributes from filesystem-wide default values.

            With the above policy, we'll remove "--parent" option and support specifying "none" to "--pool|-p" option to clear the pool name.

            yujian Jian Yu added a comment - - edited "--parent" option for "lfs mirror create/extend" command was originally designed to use default stripe options inherited from parent directory. However, if parent directory has composite layout, there will be inconsistency to choose the stripe options from which component to inherit. And if there is any other option specified, it's also inconsistent to inherit the layout of parent directory. So, we'd like to define the policy as follows: If there is no option specified, then the file/directory to be created will inherit the layout of parent directory. If there is any option specified, then the file/directory to be created will use the specified layout and inherit unspecified attributes from filesystem-wide default values. With the above policy, we'll remove "--parent" option and support specifying "none" to "--pool|-p" option to clear the pool name.

            People

              yujian Jian Yu
              bobijam Zhenyu Xu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: