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

LFSCK support for mirrored files

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Critical
    • Lustre 2.12.0
    • None
    • 9223372036854775807

    Description

      PFID EA should already have enough information to restore mirrored files in a catastrophic failure where the metadata on the MDT is lost. After FLR is introduced, the filter_fid contains the following information:

      struct ost_layout {                                                             
              __u32   ol_stripe_size;                                                 
              __u32   ol_stripe_count;                                                
              __u64   ol_comp_start;                                                  
              __u64   ol_comp_end;                                                    
              __u32   ol_comp_id;                                                     
      } __attribute__((packed)); 
      
      struct filter_fid {                                                             
              struct lu_fid           ff_parent;                                      
              struct ost_layout       ff_layout;                                      
              __u32                   ff_layout_version;                              
              __u32                   ff_range; /* range of layout version that       
                                                 * write are allowed */               
      } __attribute__((packed)); 
      

      And component ID is composed of SEQ_ID and MIRROR_ID as follows:

      #define SEQ_ID_MAX              0x0000FFFF                                      
      #define SEQ_ID_MASK             SEQ_ID_MAX                                      
      /* bit 30:16 of lcme_id is used to store mirror id */                           
      #define MIRROR_ID_MASK          0x7FFF0000                                      
      #define MIRROR_ID_SHIFT         16  
      

      With the above information, the LFSCK just needs to use FID to identify the OST objects that belong to the same file, and use mirror ID, the upper 16 bit in component ID, to identify the components that belong to the same mirror, and the use SEQ ID and ol_comp_start, ol_comp_end in ost_layout to compose components in one mirror.

      The problem is how to identify and restore stale components. By checking the information of ff_layout_version and ff_range, it should be easy to know whether the file was being written at the time of failure; but it seems to be difficult to identify if a previous resync was complete. Therefore, we probably need more information for this purpose.

      Attachments

        Activity

          People

            yong.fan nasf (Inactive)
            jay Jinshan Xiong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: