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

DoM files should not need LSOM sync for valid attributes on the MDS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.12.0
    • Lustre 2.12.0
    • 3
    • 9223372036854775807

    Description

      Currently, Lazy size on MDT (LSOM) creates and stores file attributes on the MDS for Data on MDT files, just like all other files, and we need to llsom_sync to get the file attributes for DoM files to be correct. The file metadata for DoM files is on the MDS already and is valid. Thus, we shouldn’t have to sync to get the LSOM data to match the DoM file metadata.

      From the example below, we can see that the number of blocks in the LSOM data for the DoM file mdt_file_2 is only updated after we run llsom_sync

      # lfs setstripe -E 4M -L mdt /lustre/scratch/mdt_file_2
      # dd if=/dev/urandom of=/lustre/scratch/mdt_file_2 bs=25k count=2
      2+0 records in
      2+0 records out
      51200 bytes (51 kB) copied, 0.00100831 s, 50.8 MB/s
      
      # lfs getsom /lustre/scratch/mdt_file_2
      file: /lustre/scratch/mdt_file_2 size: 51200 blocks: 0 flags: 4
      
      # llsom_sync /lustre/scratch -vvvv -vvv -u cl1 -m scratch-MDT0000
      Start receiving records
      Processed changelog record index:5894 type:CREAT(0x1) FID:[0x200000401:0x99d:0x0]
      Processed changelog record index:5895 type:LYOUT(0xc) FID:[0x200000401:0x99d:0x0]
      Processed changelog record index:5896 type:XATTR(0xf) FID:[0x200000401:0x99d:0x0]
      Processed changelog record index:5897 type:CLOSE(0xb) FID:[0x200000401:0x99d:0x0]
      Start to sync 1 records.
      record 1652041866429631028:5897, updated LSOM for fid [0x200000401:0x99d:0x0] size:51200 blocks:112
      Processed changelog record index:5898 type:CLOSE(0xb) FID:[0x200000401:0x99d:0x0]
      Start to sync 1 records.
      record 1652041866429970184:5898, updated LSOM for fid [0x200000401:0x99d:0x0] size:51200 blocks:112
      Processed changelog record index:5909 type:XATTR(0xf) FID:[0x200000401:0x99d:0x0]
      Processed changelog record index:5910 type:XATTR(0xf) FID:[0x200000401:0x99d:0x0]
      Processed changelog record index:5911 type:CLOSE(0xb) FID:[0x200000401:0x99d:0x0]
      Start to sync 1 records.
      record 1652041916629724290:5911, updated LSOM for fid [0x200000401:0x99d:0x0] size:51200 blocks:112
      finished reading [scratch-MDT0000]
      Start to sync 0 records.
      [root@trevis-62vm4 ~]# lfs getsom /lustre/scratch/mdt_file_2
      file: /lustre/scratch/mdt_file_2 size: 51200 blocks: 112 flags: 4
      

      Also, for DoM files, shouldn’t the flag = 1; SOM_FL_STRICT = 0x0001 - Known strictly correct, FLR or DoM file (SoM guaranteed). In the case above, the flag never changes from 4, SOM_FL_LAZY = 0x0004 - Approximate, may never have been strictly correct, need to sync SOM data to achieve eventual consistency.

      Attachments

        Issue Links

          Activity

            People

              qian_wc Qian Yingjin
              jamesanunez James Nunez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: