[LU-10561] "lfs mirror create -N --parent /path/file" does not inherit its parent's layout Created: 25/Jan/18  Updated: 15/Mar/18  Resolved: 27/Feb/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.11.0
Fix Version/s: Lustre 2.11.0

Type: Bug Priority: Major
Reporter: Zhenyu Xu Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: FLR

Issue Links:
Related
is related to LU-9771 FLR1: Landing tickets for File Level ... Resolved
Severity: 3
Rank (Obsolete): 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.


 Comments   
Comment by Jian Yu [ 31/Jan/18 ]

"--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.

Comment by Gerrit Updater [ 14/Feb/18 ]

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

Comment by Jinshan Xiong (Inactive) [ 16/Feb/18 ]

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.

Comment by Gerrit Updater [ 27/Feb/18 ]

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

Comment by Peter Jones [ 27/Feb/18 ]

Landed for 2.11

Generated at Sat Feb 10 02:36:11 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.