[LU-14514] lod_declare_layout_del() does not check for deletion of last non stale mirror Created: 11/Mar/21  Updated: 24/Mar/22  Resolved: 13/Dec/21

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

Type: Bug Priority: Critical
Reporter: John Hammond Assignee: Zhenyu Xu
Resolution: Fixed Votes: 0
Labels: bjhpflr

Issue Links:
Related
is related to LU-15691 Interop sanity-flr test_44b: split mi... Resolved
is related to LU-14512 prohibit extend file with stale mirror Closed
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The lod layer does not check that we are not deleting the last non stale mirror of a file.



 Comments   
Comment by John Hammond [ 12/Mar/21 ]
# cd /mnt/lustre
# echo XXX > f0
# lfs mirror extend -N -c1 f0
# echo XXXX > f0
# lfs getstripe f0
f0
  lcm_layout_gen:    3
  lcm_mirror_count:  2
  lcm_entry_count:   2
    lcme_id:             65537
    lcme_mirror_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: 1
      lmm_objects:
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x15:0x0] }

    lcme_id:             131073
    lcme_mirror_id:      2
    lcme_flags:          init,stale
    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:0x17:0x0] }

# lfs mirror split --mirror-id=1 f0
# lfs getstripe f0
f0
  lcm_layout_gen:    4
  lcm_mirror_count:  1
  lcm_entry_count:   1
    lcme_id:             131073
    lcme_mirror_id:      2
    lcme_flags:          init,stale
    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:0x17:0x0] }

# cat f0
cat: f0: Resource temporarily unavailable
#
# lfs setstripe --comp-set -I 2 --comp-flags=^stale f0
lfs setstripe: cannot clear 'stale' flags from component. Please use lfs-mirror-resync(1) instead
# lfs mirror resync f0
lfs mirror: 'f0' is not a FLR file.
Comment by John Hammond [ 12/Mar/21 ]

bobijam could you take a look at this?

Comment by Gerrit Updater [ 12/Mar/21 ]

Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/42024
Subject: LU-14514 flr: mirror split should not make stale file
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ad24e6e727a5ff9328c62bbaad76a8c2ba6efe04

Comment by Gerrit Updater [ 13/Dec/21 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/42024/
Subject: LU-14514 flr: mirror split should not make stale file
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 83c790cbf2f8f7452e1382051564af6f155b47cf

Comment by Peter Jones [ 13/Dec/21 ]

Landed for 2.15

Comment by Gerrit Updater [ 20/Feb/22 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/46564
Subject: LU-14514 tests: skip sanity-flr test_44b for interop
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 66f0aafcae4fde3d6d1f4c934af33edffab0f480

Comment by Gerrit Updater [ 05/Mar/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46564/
Subject: LU-14514 tests: skip sanity-flr test_44b for interop
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c70b1b1e283d0a34527dc8353e3a66fabf2d9cdd

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