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

          [LU-10288] LFSCK support for mirrored files
          pjones Peter Jones made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          yong.fan nasf (Inactive) made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]
          jgmitter Joseph Gmitter (Inactive) made changes -
          Fix Version/s New: Lustre 2.12.0 [ 13495 ]
          jgmitter Joseph Gmitter (Inactive) made changes -
          Assignee Original: Joseph Gmitter [ jgmitter ] New: nasf [ yong.fan ]
          jgmitter Joseph Gmitter (Inactive) made changes -
          Assignee Original: WC Triage [ wc-triage ] New: Joseph Gmitter [ jgmitter ]
          adilger Andreas Dilger made changes -
          Description Original: 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:

          {code}
          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));
          {code}

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

          {code}
          #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
          {code}

          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 comp_{start,end} in the {{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.

          I need more time to think about this.
          New: 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:

          {code}
          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));
          {code}

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

          {code}
          #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
          {code}

          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.
          jgmitter Joseph Gmitter (Inactive) made changes -
          Parent Original: LU-9771 [ 47229 ]
          Issue Type Original: Technical task [ 7 ] New: Improvement [ 4 ]
          jay Jinshan Xiong (Inactive) made changes -
          Labels New: FLR2
          jay Jinshan Xiong (Inactive) made changes -
          Parent New: LU-9771 [ 47229 ]
          Issue Type Original: Task [ 3 ] New: Technical task [ 7 ]
          jay Jinshan Xiong (Inactive) created issue -

          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: