[LU-13404] ‘lfs mirror read’ does not write to output file Created: 31/Mar/20  Updated: 14/Apr/20  Resolved: 14/Apr/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.12.3, Lustre 2.14.0
Fix Version/s: Lustre 2.14.0

Type: Bug Priority: Minor
Reporter: James Nunez (Inactive) Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

lfs mirror read’ has a -o/--outfile option that you can specify the output file that the contents of the mirror will be saved to. Yet, we get an error when we try to save a mirror to an output file.

# lfs getstripe /mnt/lustre/test-framework.sh
/mnt/lustre/test-framework.sh
  lcm_layout_gen:    2
  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:0x3:0x0] }

    lcme_id:             131073
    lcme_mirror_id:      2
    lcme_flags:          init
    lcme_extent.e_start: 0
    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:0x4:0x0] }
      - 1: { l_ost_idx: 0, l_fid: [0x100000000:0x3:0x0] }

[root@trevis-62vm1 tests]# lfs mirror read -N 2 -o /mnt/lustre/mirror-tf /mnt/lustre/test-framework.sh
lfs mirror: cannot stat file '/mnt/lustre/mirror-tf': No such file or directory


 Comments   
Comment by Andreas Dilger [ 31/Mar/20 ]

This looks like a bug in "check_same_file()". Clearly, if one of the files doesn't exist, it can't be the same file as the other one... Patch forthcoming.

Comment by Gerrit Updater [ 01/Apr/20 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38108
Subject: LU-13404 utils: fix lfs mirror duplicate file check
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: eac8aefa77d2b81a311b42e2bea1e8b6f4c95156

Comment by Gerrit Updater [ 14/Apr/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38108/
Subject: LU-13404 utils: fix lfs mirror duplicate file check
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8befc64e5aabe9b9bdca49f51830f25b3f747019

Comment by Peter Jones [ 14/Apr/20 ]

Landed for 2.14

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