[LU-17088] mirror extend to create a file with different DOM size Created: 05/Sep/23  Updated: 14/Oct/23  Resolved: 23/Sep/23

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

Type: Bug Priority: Major
Reporter: Zhenyu Xu Assignee: Zhenyu Xu
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

LU-11421 requested that multiple DOM components are allowed only with the same size, and mirror extend should not append another DOM component with different size.

# lfs setstripe -E64k -L mdt -Eeof /mnt/lustre/file

# lfs mirror extend -N -E1M -L mdt -Eeof /mnt/lustre/file

# lfs getstripe /mnt/lustre/file
/mnt/lustre/file
  lcm_layout_gen:    3
  lcm_mirror_count:  2
  lcm_entry_count:   4
    lcme_id:             65537
    lcme_mirror_id:      1
    lcme_flags:          init
    lcme_extent.e_start: 0
    lcme_extent.e_end:   65536
      lmm_stripe_count:  0
      lmm_stripe_size:   65536
      lmm_pattern:       mdt
      lmm_layout_gen:    0
      lmm_stripe_offset: 0

    lcme_id:             65538
    lcme_mirror_id:      1
    lcme_flags:          0
    lcme_extent.e_start: 65536
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  1
      lmm_stripe_size:   65536
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: -1

    lcme_id:             131073
    lcme_mirror_id:      2
    lcme_flags:          init,stale
    lcme_extent.e_start: 0
    lcme_extent.e_end:   1048576
      lmm_stripe_count:  0
      lmm_stripe_size:   1048576
      lmm_pattern:       mdt
      lmm_layout_gen:    0
      lmm_stripe_offset: 0

    lcme_id:             131074
    lcme_mirror_id:      2
    lcme_flags:          0
    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: -1

# cat /mnt/lustre/file
cat: /mnt/lustre/file: Invalid argument

# dmesg
[82972.256548] LustreError: 112613:0:(lov_object.c:669:lov_init_composite()) lustre-clilov-ffff8fb210559800: DOM entries with different sizes
[82972.259975] LustreError: 112613:0:(lov_ea.c:633:dump_lsm()) lsm 00000000320cd603, objid 0x0:0, maxbytes 0x400000fe000, magic 0x0BD60BD0, refc: 2, entry: 4, mirror: 1, flags: 1,layout_gen 3
[82972.264191] LustreError: 112613:0:(lov_ea.c:655:dump_lsm()) [0x0, 0x10000): id: 65537, flags: 10, magic 0x0BD10BD0, layout_gen 0, stripe count 0, sstripe size 65536, pool: []
[82972.268485] LustreError: 112613:0:(lov_ea.c:655:dump_lsm()) [0x10000, 0xffffffffffffffff): id: 65538, flags: 0, magic 0x0BD10BD0, layout_gen 65535, stripe count 1, sstripe size 65536, pool: []
[82972.272944] LustreError: 112613:0:(lov_ea.c:655:dump_lsm()) [0x0, 0x100000): id: 131073, flags: 11, magic 0x0BD10BD0, layout_gen 0, stripe count 0, sstripe size 1048576, pool: []
[82972.276985] LustreError: 112613:0:(lov_ea.c:655:dump_lsm()) [0x100000, 0xffffffffffffffff): id: 131074, flags: 0, magic 0x0BD10BD0, layout_gen 65535, stripe count 1, sstripe size 1048576, pool: []
[82972.281335] LustreError: 112613:0:(lov_object.c:1303:lov_layout_change()) lustre-clilov-ffff8fb210559800: cannot apply new layout on [0x200000402:0x1:0x0] : rc = -22
[82972.285438] LustreError: 112613:0:(lcommon_cl.c:196:cl_file_inode_init()) lustre: failed to initialize cl_object [0x200000402:0x1:0x0]: rc = -22
[82972.289076] LustreError: 112613:0:(llite_lib.c:3594:ll_prep_inode()) new_inode -fatal: rc -22

# rm /mnt/lustre/file
rm: cannot remove '/mnt/lustre/file': Invalid argument


 Comments   
Comment by Gerrit Updater [ 05/Sep/23 ]

"Zhenyu Xu <bobijam@hotmail.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52269
Subject: LU-17088 dom: don't create different size DOM component
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8c03a05d6a036f03da3764a3c29aacc4cd3bbcaa

Comment by Gerrit Updater [ 23/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52269/
Subject: LU-17088 dom: don't create different size DOM component
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: e2539c0667525aff8d985d018c4ed077d95ba882

Comment by Peter Jones [ 23/Sep/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:32:32 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.