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

lfs mirror read returns wrong number of bytes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Using 'lfs mirror read' on a stale mirror may return fewer bytes than it should.

      k:lustre# rm f0 f0.mirror~2 
      k:lustre# dd if=/dev/urandom of=f0 bs=1M count=1
      1+0 records in
      1+0 records out
      1048576 bytes (1.0 MB) copied, 0.0147195 s, 71.2 MB/s
      k:lustre# md5sum f0
      f48d2d25f34b5afe5ea60b48da362b8d  f0
      k:lustre# lfs mirror extend -N -p ddn_ssd f0
      k:lustre# echo XXX > f0
      k:lustre# lfs mirror read --mirror-id=1 f0 | wc
            1       1       4
      k:lustre# lfs mirror read --mirror-id=2 f0 | wc
            0       1       4
      k:lustre# lfs mirror split --mirror-id=2 f0
      k:lustre# stat f0 f0.mirror~2 
        File: ‘f0’
        Size: 4         	Blocks: 8          IO Block: 4194304 regular file
      Device: 2c54f966h/743766374d	Inode: 144115205289279535  Links: 1
      Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
      Access: 2020-12-01 12:45:59.000000000 -0600
      Modify: 2020-12-01 12:46:23.000000000 -0600
      Change: 2020-12-01 12:46:23.000000000 -0600
       Birth: -
        File: ‘f0.mirror~2’
        Size: 1048576   	Blocks: 2048       IO Block: 4194304 regular file
      Device: 2c54f966h/743766374d	Inode: 144115205289279538  Links: 1
      Access: (0600/-rw-------)  Uid: (    0/    root)   Gid: (    0/    root)
      Access: 2020-12-01 12:46:57.000000000 -0600
      Modify: 2020-12-01 12:46:57.000000000 -0600
      Change: 2020-12-01 12:46:57.000000000 -0600
       Birth: -
      k:lustre# md5sum f0.mirror~2
      f48d2d25f34b5afe5ea60b48da362b8d  f0.mirror~2
      

      Attachments

        Activity

          People

            wc-triage WC Triage
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: