Disk reconstruction method and device, equipment and storage medium
By distinguishing the stripes containing data and not containing data in the disk array, and using the initialized bitmap for disk reconstruction, the problem of inefficient reconstruction after disk failure in the disk array is solved, and more efficient disk reconstruction and initialization.
Patent Information
- Application Number
- CN202411375320.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-29
AI Technical Summary
When a disk failure in a disk array, the prior art needs to process strips without data during the reconstruction process, resulting in communication between multiple controllers, affecting the reconstruction efficiency.
By reconstructing the bitmap, classify the strips in the target member disk, distinguish the first strip containing data from the second strip containing data, only the first strip is reconstructed, and the second strip is replaced. The metadata with the tape is copied to the initialization bitmap, and the new disk is initialized using the initialization bitmap to reduce the use of the reconstructed bitmap.
It improves the efficiency of disk reconstruction, reduces the consumption of reconstructed bitmaps during reconstruction, speeds up the speed of strip initialization, and improves the overall performance of the disk.
Smart Images

Figure CN119292838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of disk management, and in particular to a disk reconstruction method, device, equipment and storage medium. Background Art
[0002] When a disk failure occurs in a Redundant Arrays of Independent Disks (RAID), the commonly used method is that the SCH (Scheduler) in the controller finds the stripes that need to be reconstructed, divides the stripes into tasks and submits them to the IOmgr (task processing) module for processing. The IOmgr module detects whether the stripes that need to be reconstructed have data, reconstructs the stripes with data, and updates the reconstruction metadata (at least two controllers update synchronously); for the stripes without data, the reconstruction metadata is updated (at least two controllers update synchronously), and the initialization metadata is updated (at least two controllers update synchronously) to mark that the stripe needs to be initialized. In this way, stripes without data need to be processed during the reconstruction process, which involves communication between multiple controllers and affects the reconstruction efficiency.
[0003] It can be seen that how to improve the reconstruction efficiency of disks in a disk array is a problem that those skilled in the art need to solve. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a disk reconstruction method, apparatus, device and storage medium, which can solve the problem of low efficiency of stripe initialization in disk reconstruction.
[0005] To solve the above technical problems, in a first aspect, an embodiment of the present invention provides a disk reconstruction method, which is applied to a controller and includes:
[0006] When a target member disk in the disk array fails, each stripe in the target member disk is classified based on the reconstruction bitmap to obtain a first stripe containing data and a second stripe containing no data;
[0007] Reconstructing data of a related stripe in the new disk based on the reconstruction bitmap and the first stripe;
[0008] After the reconstruction operation is completed, the metadata corresponding to the second stripe in the reconstruction bitmap is copied to the initialization bitmap corresponding to the new disk, and during the copying process, the stripe to be initialized in the new disk is determined by checking the reconstruction bitmap and the initialization bitmap, and then the stripe to be initialized is initialized to obtain the reconstructed disk corresponding to the target member disk.
[0009] Optionally, when a target member disk in the disk array fails, classifying the stripes in the target member disk based on the reconstruction bitmap to obtain a first stripe containing data and a second stripe containing no data includes:
[0010] When a target member disk in a disk array fails, the index corresponding to each stripe in the target member disk is determined based on the reconstruction bitmap, and each stripe is classified according to whether the index represents data to obtain a first stripe containing data and a second stripe containing no data.
[0011] Optionally, the reconstructing the data of the relevant stripe in the new disk based on the reconstructed bitmap and the first stripe includes:
[0012] Determine the data to be reconstructed contained in the target member disk based on the first stripe, and divide the space of the new disk based on the reconstruction bitmap to obtain a corresponding number of stripes;
[0013] A reconstruction operation is performed on the data to be reconstructed in the new disk based on the reconstruction bitmap, so as to reconstruct the data to be reconstructed into a related stripe of the new disk.
[0014] Optionally, the performing a reconstruction operation on the data to be reconstructed in the new disk based on the reconstruction bitmap to reconstruct the data to be reconstructed into a related stripe of the new disk includes:
[0015] Determine, by a scheduler, a reconstruction task to be executed at the current moment; the reconstruction task is a task for any first stripe in the reconstruction bitmap;
[0016] Execute the reconstruction task to reconstruct the data to be reconstructed of the corresponding first stripe into the corresponding stripe of the new disk, and after completing the reconstruction task, synchronize the metadata corresponding to the first stripe between the primary and standby controllers; the primary and standby controllers include the current controller and another controller that is processing the reconstruction operation of the target member disk.
[0017] Optionally, copying metadata corresponding to the second stripe in the reconstruction bitmap to an initialization bitmap corresponding to the new disk includes:
[0018] Determine the execution time period of the copy operation corresponding to the metadata of the second stripe in the reconstructed bitmap by a pre-set timer, and determine the copy progress position of the metadata of the next second stripe corresponding to the last second stripe copied in the previous execution time period at the start time of the execution time period; the second stripes all carry a first initialization mark indicating that they are to be initialized;
[0019] Searching for a second stripe carrying a first initialization mark from a second stripe corresponding to the metadata at the copy progress position of the reconstructed bitmap to obtain a target stripe of metadata to be copied;
[0020] A second initialization marker is added to the stripe corresponding to the target stripe in the new disk, metadata of the target stripe is copied from the reconstruction bitmap to the initialization bitmap, and the first initialization marker of the target stripe is deleted from the reconstruction bitmap.
[0021] Optionally, during the copying process, the reconstruction bitmap and the initialization bitmap are checked to determine the stripes to be initialized in the new disk, and then the stripes to be initialized are initialized to obtain the reconstructed disk corresponding to the target member disk, including:
[0022] During the copying process, it is determined whether there is a second stripe carrying the first initialization mark in the stripe corresponding to the reconstructed bitmap at the current moment, and a corresponding determination result is obtained;
[0023] If the judgment result indicates that there is a second stripe carrying the first initialization mark, a scheduler is used to determine a second stripe carrying the first initialization mark from the stripes corresponding to the reconstructed bitmap as the current stripe to be initialized at the current moment;
[0024] Initializing the corresponding stripe in the new disk based on the metadata corresponding to the current stripe in the reconstructed bitmap, deleting the first initialization mark corresponding to the current stripe, and then jumping to the step of determining whether there is a second stripe carrying the first initialization mark in the stripe corresponding to the reconstructed bitmap at the current moment;
[0025] If the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripe corresponding to the reconstruction bitmap at the current moment, and there is a stripe carrying the second initialization mark in the stripe corresponding to the initialization bitmap, then determining, by the scheduler, a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment;
[0026] Initialize the corresponding stripe in the new disk based on the metadata corresponding to the current stripe in the initialization bitmap, delete the second initialization mark corresponding to the current stripe, and then jump to the step of determining, by the scheduler, a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment;
[0027] If the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripe corresponding to the reconstruction bitmap, and there is no stripe carrying the second initialization mark in the stripe corresponding to the initialization bitmap, then it is determined that all the second stripes corresponding to the reconstruction bitmap have completed the corresponding initialization process, and the new disk finally obtained is determined as the reconstructed disk corresponding to the target member disk.
[0028] Optionally, the method further includes:
[0029] During the copying process, if a new member disk in the disk array fails, the timer is disabled, and the maximum copy performance of the controller at the current moment is used to perform a copy operation on the metadata corresponding to several of the second stripes in the reconstruction bitmap, so as to copy the relevant metadata to the initialization bitmap corresponding to the new disk.
[0030] In a second aspect, the present application provides a disk reconstruction device, applied to a controller, comprising:
[0031] A stripe classification module, used for classifying the stripes in the target member disk based on the reconstruction bitmap when a target member disk in the disk array fails, to obtain a first stripe containing data and a second stripe containing no data;
[0032] A data reconstruction module, used for reconstructing data of a related stripe in a new disk based on the reconstruction bitmap and the first stripe;
[0033] A stripe initialization module is used to copy the metadata corresponding to the second stripe in the reconstruction bitmap to the initialization bitmap corresponding to the new disk after the reconstruction operation is completed, and in the process of copying, determine the stripe to be initialized in the new disk by checking the reconstruction bitmap and the initialization bitmap, and then initialize the stripe to be initialized to obtain the reconstructed disk corresponding to the target member disk.
[0034] In a third aspect, the present application provides an electronic device, including:
[0035] Memory for storing computer programs;
[0036] A processor is used to execute the computer program to implement the steps of the disk reconstruction method as described above.
[0037] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the disk reconstruction method described above are implemented.
[0038] It can be seen that the present application is applied to a controller. When a target member disk of a disk array in the controller fails, each stripe in the target member disk is classified based on a reconstruction bitmap to obtain a first stripe containing data and a second stripe not containing data; then, based on the reconstruction bitmap and the first stripe, a reconstruction operation is performed on the data of the relevant stripe in the new disk; after the reconstruction operation is completed, the metadata corresponding to the second stripe in the reconstruction bitmap is copied to the initialization bitmap corresponding to the new disk, and during the copying process, the stripe to be initialized in the new disk is determined by checking the reconstruction bitmap and the initialization bitmap, and then the stripe to be initialized is initialized to obtain a reconstructed disk corresponding to the target member disk.
[0039] It can be seen from the above technical solution that the present application ignores the second stripe that does not contain data during the data reconstruction process of the disk, and only reconstructs the data of the first stripe containing data into the new disk; and after reconstructing the data of the first stripe into the new disk, a metadata copy operation is performed to copy the metadata corresponding to the second stripe in the reconstruction bitmap to the pre-built initialization bitmap, and the stripe corresponding to the new disk can be initialized subsequently through the initialization bitmap, which can minimize the occupancy of the reconstruction bitmap by the disk reconstruction process; further, in the metadata copy process, the present application can perform initialization operations on the relevant stripes of the new disk according to the metadata corresponding to the stripe to be initialized of the reconstruction bitmap or the initialization bitmap, which can further speed up the stripe initialization speed, reduce the occupancy of the reconstruction bitmap, and improve the disk reconstruction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A flow chart of a disk reconstruction method disclosed in this application;
[0042] Figure 2 A schematic diagram of a specific disk reconstruction module relationship disclosed in this application;
[0043] Figure 3 This is a schematic diagram of the structure of a disk reconstruction device disclosed in this application;
[0044] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0047] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0048] like Figure 1 As shown, the embodiment of the present application discloses a disk reconstruction method, which is applied to a controller, including:
[0049] Step S11: When a target member disk in a disk array fails, each stripe in the target member disk is classified based on a reconstruction bitmap to obtain a first stripe containing data and a second stripe containing no data.
[0050] When a member disk of a disk array fails, it is necessary to reconstruct the stripes in the failed target member disk; in the data reconstruction process, the present application first distinguishes between the first stripe containing data and the second stripe not containing data, and specifically, the stripes in the target member disk can be classified through a reconstruction bitmap, so as to reconstruct the first stripe containing data and ignore the second stripe not containing data. In a specific embodiment, when a target member disk in a disk array fails, the stripes in the target member disk are classified based on the reconstruction bitmap to obtain the first stripe containing data and the second stripe not containing data, which may include: when a target member disk in a disk array fails, the index corresponding to each stripe in the target member disk is determined based on the reconstruction bitmap, and the stripes are classified according to whether the index indicates that it contains data, so as to obtain the first stripe containing data and the second stripe not containing data. Specifically, when writing data, each member disk in the disk array can record the data writing status through the index; for example, when writing data, the LP and PL indexes are constructed, L is the LBA (Logical Block Address) seen by the user, and P is the LBA of the RAID. This PL is written to the disk together with the user data. When data reconstruction is required later, the LBA (P) of the disk array is calculated according to the specific stripe x. By querying whether this P has a corresponding L, it can be obtained whether this stripe x has data. Through such an index, the stripes in the failed target member disk can be classified to obtain the first stripe containing data and the second stripe without data.
[0051] Step S12: reconstructing data of related stripes in the new disk based on the reconstructed bitmap and the first stripe.
[0052] In the embodiment of the present application, for the first stripe containing data, the reconstruction bitmap can be used to directly perform data reconstruction operations in the new disk, so as to reconstruct the data of the first stripe in the failed target member disk into the relevant stripe in the new disk. In addition, the relevant information of the reconstructed stripe in the target member disk can be cleared in the reconstruction bitmap, and the remaining information is the relevant information of the second stripe in the target member disk that does not contain data and needs to be initialized.
[0053] In a specific embodiment, the reconstruction operation of the data of the relevant stripes in the new disk based on the reconstruction bitmap and the first stripe may include: determining the data to be reconstructed contained in the target member disk based on the first stripe, and dividing the space of the new disk based on the reconstruction bitmap to obtain a corresponding number of stripes; performing a reconstruction operation on the data to be reconstructed in the new disk based on the reconstruction bitmap to reconstruct the data to be reconstructed into the relevant stripes of the new disk. Specifically, the first stripe is a stripe containing data obtained by classification, and the data to be reconstructed contained in the corresponding target member disk, i.e., the data to be reconstructed, can be determined. It can be understood that for a new disk, it is necessary to first construct an initialization bitmap and divide the space of the new disk to obtain a number of stripes; then, a reconstruction operation is performed on the data to be reconstructed based on the reconstruction bitmap to reconstruct the data to be reconstructed into the stripes of the new disk.
[0054] In another specific embodiment, the reconstruction operation of the data to be reconstructed in the new disk based on the reconstruction bitmap to reconstruct the data to be reconstructed into the relevant stripes of the new disk may include: determining the reconstruction task to be executed at the current moment through the scheduler; the reconstruction task is a task for any first stripe in the reconstruction bitmap; executing the reconstruction task to reconstruct the data to be reconstructed of the corresponding first stripe into the corresponding stripe of the new disk, and synchronizing the metadata corresponding to the first stripe between the primary and standby controllers after completing the reconstruction task; the primary and standby controllers include the current controller and another controller that is processing the reconstruction operation of the target member disk. Specifically, the scheduler can sort out the data reconstruction tasks of several first stripes corresponding to the reconstruction bitmap and allocate the reconstruction tasks that need to be executed at the current moment; then the controller can execute the reconstruction task to reconstruct the data to be reconstructed of the corresponding first stripe in the target member disk into the corresponding stripe of the new disk; and the primary and standby controllers can cooperate to back up data, and the current controller and another controller can jointly process the reconstruction process of the target member disk, and the two controllers can synchronize data to avoid the situation where progress is lost due to the failure of one controller.
[0055] In a specific embodiment, when distinguishing whether a stripe contains data, the stripe is classified into a first stripe containing data and a second stripe not containing data. Here, the stripe classification is marked as a first stripe and a second stripe; then the second stripe carrying the classification mark can be directly regarded as a stripe to be initialized; the classification mark of the first stripe is deleted after the data of the first stripe is reconstructed, and then the metadata copy process is to copy the metadata corresponding to the second stripe carrying the classification mark from the reconstruction bitmap to the initialization bitmap, and mark the stripe of the new disk corresponding to the metadata copied to the initialization bitmap as a stripe to be initialized. The above steps can avoid the process of initializing the stripe of the target member disk corresponding to the reconstruction bitmap that does not contain data after data reconstruction, and the metadata copy process can be performed directly using the remaining classification marks.
[0056] Step S13: After the reconstruction operation is completed, the metadata corresponding to the second stripe in the reconstruction bitmap is copied to the initialization bitmap corresponding to the new disk, and during the copying process, the stripe to be initialized in the new disk is determined by checking the reconstruction bitmap and the initialization bitmap, and then the stripe to be initialized is initialized to obtain the reconstructed disk corresponding to the target member disk.
[0057] In the embodiment of the present application, the data carried by the first stripe in the target member disk can be reconstructed into the relevant stripe in the new disk through the above steps to achieve data reconstruction. Furthermore, after the above reconstruction operation is completed, the metadata of the second stripe in the target member disk that does not contain data can be updated; specifically, the metadata corresponding to the second stripe in the reconstruction bitmap is copied to the initialization bitmap corresponding to the new disk, so as to use the metadata copied to the initialization bitmap to initialize the relevant stripes in the new disk. Accordingly, in the process of copying metadata, the controller can use the metadata copied to the initialization bitmap or the metadata in the reconstruction bitmap to initialize the stripes in the new disk. By checking the initialization bitmap and the reconstruction bitmap, the stripes in the new disk that need to be initialized corresponding to the metadata copied to the initialization bitmap and the stripes in the new disk that need to be initialized corresponding to the metadata in the reconstruction bitmap that has not been copied can be screened out, ensuring that the second stripes that do not contain data in the target member disk are all initialized to the new disk, and finally the reconstructed disk corresponding to the target member disk can be obtained.
[0058] In a specific embodiment, copying the metadata corresponding to the second stripe in the reconstruction bitmap to the initialization bitmap corresponding to the new disk may include: determining the execution time period of the copy operation corresponding to the metadata of the second stripe in the reconstruction bitmap through a pre-set timer, and determining at the start time of the execution time period the copy progress position of the metadata of the next second stripe corresponding to the last second stripe copied in the previous execution time period; the second stripes all carry a first initialization mark representing the one to be initialized; starting from the second stripe corresponding to the metadata at the copy progress position of the reconstruction bitmap, searching for the second stripe carrying the first initialization mark to obtain the target stripe of the metadata to be copied; adding a second initialization mark to the stripe in the new disk corresponding to the target stripe, and copying the metadata of the target stripe from the reconstruction bitmap to the initialization bitmap, and deleting the first initialization mark of the target stripe in the reconstruction bitmap. Specifically, during the metadata copy process, the copy task is managed regularly by a timer, and the reconstruction bitmap can add a first initialization mark that indicates that initialization is required for the second stripe that does not contain data, and delete the first initialization mark after the corresponding metadata copy is completed, so that the stage of the stripe can be distinguished; first determine the execution time period of the copy operation that matches the metadata of the second stripe of the target member disk in the reconstruction bitmap. It can be understood that the time requirements for reconstruction are different when a common member disk fails and an uncommon member disk fails. Here, the disk's commonness level can be pre-set and the corresponding execution time period can be set. Further, after obtaining the execution time period corresponding to the failed target member disk, it is necessary to continue to copy the metadata existing in the reconstruction bitmap according to the progress of the copy in the previous execution time period, specifically, determine the copy progress position of the metadata of the next second stripe corresponding to the last second stripe copied in the previous execution time period; then, starting from the copy progress position, determine the first stripe carrying the first initialization mark as the target stripe of the metadata to be copied; then copy the metadata in the reconstruction bitmap corresponding to the target stripe to the corresponding stripe carrying the second initialization mark in the initialization bitmap, and the second initialization mark indicates that initialization is required. In a specific embodiment, for a new disk, the space of the new disk can be divided into several stripes according to a fixed length c; for each stripe, 1 bit of space is used to store information, 1 indicates that initialization is required, and 0 indicates that initialization is completed; these bits are stored in the power-off protected memory in the order of the stripe numbers; therefore, the corresponding bit can be found according to the stripe number x, and the position of the bit can also be used to know which stripe information this bit represents; the 1 here is the second initialization mark.
[0059] In another specific embodiment, during the copying process, the stripes to be initialized in the new disk are determined by checking the reconstruction bitmap and the initialization bitmap, and then the stripes to be initialized are initialized to obtain the reconstructed disk corresponding to the target member disk, which may include: during the copying process, judging whether there is a second stripe carrying a first initialization mark in the stripes corresponding to the reconstruction bitmap at the current moment, and obtaining a corresponding judgment result; if the judgment result indicates that there is a second stripe carrying the first initialization mark, a second stripe carrying the first initialization mark is determined from the stripes corresponding to the reconstruction bitmap by a scheduler as the current stripe to be initialized at the current moment; based on the metadata corresponding to the current stripe in the reconstruction bitmap, the corresponding stripes in the new disk are initialized, and the first initialization mark corresponding to the current stripe is deleted, and then the step of judging whether there is a second stripe carrying the first initialization mark in the stripes corresponding to the reconstruction bitmap at the current moment is jumped to; if the judgment result indicates that there is a second stripe carrying the first initialization mark in the stripes corresponding to the reconstruction bitmap at the current moment If there is no second stripe carrying the first initialization mark in the corresponding stripes, and there is a stripe carrying the second initialization mark in the stripes corresponding to the initialization bitmap, the scheduler determines a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment; initialize the corresponding stripe in the new disk based on the metadata corresponding to the current stripe in the initialization bitmap, delete the second initialization mark corresponding to the current stripe, and then jump to the step of determining a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment through the scheduler; if the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripes corresponding to the reconstruction bitmap, and there is no stripe carrying the second initialization mark in the stripes corresponding to the initialization bitmap, it is determined that the second stripes corresponding to the reconstruction bitmap have completed the corresponding initialization process, and the new disk finally obtained is determined as the reconstructed disk corresponding to the target member disk. Specifically, initializing the stripes in the new disk during the metadata copy process involves two situations: first, the metadata corresponding to the stripe that currently needs to be initialized is the metadata carrying the first initialization mark in the reconstruction bitmap, which has not yet been copied to the initialization bitmap; second, the metadata corresponding to the stripe that currently needs to be initialized is the metadata carrying the second initialization mark in the initialization bitmap, which has been copied from the reconstruction bitmap to the initialization bitmap.Furthermore, in order to reduce the time occupied by the reconstruction bitmap, firstly, based on the reconstruction bitmap, it is searched whether there is a second stripe carrying the first initialization mark, and it is judged whether there is a second stripe of this type at the current moment, and a corresponding judgment result is obtained; accordingly, if the judgment result indicates that there is a second stripe carrying the first initialization mark in the reconstruction bitmap, the second stripe is determined as the current stripe to be initialized at the current moment, and then the relevant stripes in the new disk need to be initialized based on the metadata corresponding to the current stripe in the reconstruction bitmap, and the first initialization mark corresponding to the current stripe needs to be deleted, indicating that the initialization has been completed. After that, it is judged again whether there is a second stripe carrying the first initialization mark in the stripe corresponding to the reconstruction bitmap, and the initialization process of the next stripe is entered. Correspondingly, if the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripe corresponding to the reconstruction bitmap at the current moment, it means that the corresponding stripes to be initialized in the reconstruction bitmap have completed metadata copying or have completed initialization; at this time, it is necessary to further determine whether there is a stripe carrying the second initialization mark in the stripe corresponding to the initialization bitmap. If so, it is necessary to determine a current stripe to be initialized at the current moment from the stripes corresponding to the initialization bitmap through the scheduler, and then use the metadata corresponding to the current stripe in the initialization bitmap to initialize the relevant stripes in the new disk, and delete the second initialization mark corresponding to the current stripe, indicating that the initialization has been completed. After that, the scheduler determines a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment, and enters the initialization process of the next stripe.
[0060] Furthermore, if the stripe corresponding to the reconstruction bitmap does not contain a second stripe carrying the first initialization mark, and the stripe corresponding to the initialization bitmap does not contain a stripe carrying the second initialization mark, it means that the stripes containing no data in the failed target member disk are also initialized to the new disk, thus obtaining the final reconstructed disk.
[0061] In a specific embodiment, it may also include: during the copying process, if a new member disk in the disk array fails, the timer is disabled, and the maximum copy performance of the controller at the current moment is used to perform a copy operation on the metadata corresponding to the plurality of second stripes in the reconstruction bitmap, so as to copy the relevant metadata to the initialization bitmap corresponding to the new disk. Specifically, during the metadata copying process, if another member disk in the disk array also fails and the reconstruction of the current target member disk has not been completed, the timer needs to be disabled, and the maximum copy performance of the current controller is used to copy the relevant metadata in the reconstruction bitmap to the initialization bitmap corresponding to the new disk. After the copying is completed, the reconstruction bitmap can be released so that another failed member disk can use the reconstruction bitmap to achieve disk reconstruction.
[0062] It can be seen that the present application ignores the second stripe that does not contain data during the data reconstruction process of the disk, and only reconstructs the data of the first stripe containing data into the new disk; and after reconstructing the data of the first stripe into the new disk, a metadata copy operation is performed to copy the metadata corresponding to the second stripe in the reconstruction bitmap to the pre-built initialization bitmap, and the stripe corresponding to the new disk can be initialized subsequently through the initialization bitmap, which can minimize the occupancy of the reconstruction bitmap by the disk reconstruction process; further, in the metadata copy process, the present application can perform initialization operations on the relevant stripes of the new disk according to the metadata corresponding to the stripe to be initialized of the reconstruction bitmap or the initialization bitmap, which can further speed up the stripe initialization speed, reduce the occupancy of the reconstruction bitmap, and improve the disk reconstruction efficiency.
[0063] like Figure 2 As shown, the embodiment of the present application will introduce in detail the relationship between the modules in the disk reconstruction method, specifically including:
[0064] It can be seen that when the disk reconstruction is performed in this embodiment, it is performed collaboratively by two controllers, wherein the SCH (scheduling) module is responsible for scheduling the execution of background tasks, obtaining the stripes that need to be reconstructed / initialized from the mm (memory management) module, encapsulating them into tasks one by one according to the stripes at a predetermined rate and delivering them to the IOmgr (task management) module; the IOreceive (read / write request reception) module is responsible for accepting IO (Input / Output, read / write) requests from the outside, encapsulating them into tasks one by one according to the stripes and delivering them to the IOmgr module; the IOrequest (read / write request delivery) module is responsible for delivering the IO requests of this module to the disk; the mm module stores the metadata required for the operation of the disk array and protects the data from controller power failure; the mmgr (data backup) module is responsible for data backup between controllers.
[0065] Specifically, when a member disk failure occurs in a disk array, all online controllers are silent at the same time. The IOreceive module puts all new IOs into the waiting queue instead of delivering them to the IOmgr module. The IOmgr module waits for all IO processing to be completed. Then the mm module reads whether the reconstruction bitmap is valid (the reconstruction bitmap is marked invalid after the metadata copy is completed). If the reconstruction bitmap is valid, after all the reconstruction bitmap data is copied to the initialization bitmap, the current copy position is reset to 0. Otherwise, the reconstruction bitmap is filled with all 1s, and the reconstruction bitmap is used to reconstruct the failed member disk. Furthermore, the SCH module prepares the configuration data required for reconstruction (builds a scheduler to find the strips that need to be reconstructed, and delivers the strips to the IO process for reconstruction at the appropriate time), and the SCH module reads the relevant data of the reconstruction bitmap from the mm module; then the controller exits silence, and the IOreceive module and the SCH module begin to deliver tasks to the IOmgr module. The IOmgr module handles the reconstruction task and reads the mm module data (reconstruction bitmap) to determine whether there is data that needs to be reconstructed in a certain area of the faulty member disk: the data area that needs to be reconstructed is reconstructed, and the data of the member disk is updated through the IOrequest module. After the reconstruction is completed, the metadata of the active and standby controllers (controller 1 and controller 2) is updated through the mmgr module; further, the IOmgr module notifies the SCH module that the task is completed, and the SCH module will read the next strip that needs to be reconstructed, and the above steps are repeated until the reconstruction of all stripes that need to be reconstructed is completed.
[0066] In a specific embodiment, when the IOreceive module receives a read or write request, it detects whether the current controller is in a silent state. If it is not in a silent state, the read request is delivered to the IOmgr module; the IOmgr module reads the metadata of the mm module to determine whether the current strip needs to be initialized / reconstructed. Accordingly, when the reconstruction is currently in progress, the metadata of the reconstruction bitmap of the mm module is read, and the metadata of the initialization bitmap of the mm module is read to obtain information on whether the relevant strip needs to be reconstructed / initialized. Accordingly, when the reconstruction is currently in the initialization state, the metadata of the reconstruction bitmap of the mm module is read, and the metadata of the initialization bitmap of the mm module is read. If any bitmap corresponds to the (first or second) initialization mark, it is considered that the strip needs to be initialized; the IOmgr module reconstructs and initializes according to whether reconstruction / initialization is required, and processes the host's IO request after the reconstruction / initialization is completed.
[0067] In a specific embodiment, if a controller fails and needs to exit, such as controller 1 failure, controller 2 starts to be silent and completes the IO processing that has not been completed; wait for controller 2 to complete the silence, update the new configuration information to controller 2, and enter the preparation stage of SCH to prepare for the configuration number required for reconstruction; specifically, controller 2 prepares the structure required by the scheduler (performs the reconstruction or initialization of the relevant stripes), and updates the stripes that need to be reconstructed / initialized to the scheduler. Then controller 2 enters the operation stage, starts to process the host business normally, and the scheduler starts to run.
[0068] In a specific embodiment, when a controller needs to join after recovery, for example, when controller 1 recovers, controller 2 starts to be silent and completes the IO processing that has not been completed; after waiting for controller 2 to complete the silence, controller 1 copies the power-off protection memory of controller 2 to its own power-off protection memory; after waiting for the copy to be completed, the new configuration information is updated to controllers 1 and 2, and the process goes to the preparation stage. Among them, controller 2 enters the silent mode, and the controller is also in silent mode when it just joins. The controller updates the cluster view and builds the domain (primary and standby) relationship according to the rules. After this view and domain relationship are built, they need to be applied to the two controllers. The two controllers complete the resynchronization of metadata according to this relationship in silent mode, and then find their own stripes (find several for concurrent execution) according to the new metadata and domain relationship, and wait for all controllers to exit the silence when they run to this step, which is equivalent to starting all controllers at the same time. Furthermore, in the preparation phase, controllers 1 and 2 prepare the structures required by the scheduler and update the stripes that need to be synchronized to the scheduler; the scheduler contains an array o[] for storing its own stripes, a variable valid for indicating the validity of o[], a variable active for indicating that o[] is executing, and a variable fail for indicating that o[] fails to execute; the scheduler can contain some identification information of the RAID for binding with a certain RAID, and some information of the RAID to accelerate the execution of logic; the scheduler can contain a timer for executing the scheduling logic; the scheduler can also contain some scheduling policies for controlling traffic. After that, controllers 1 and 2 enter the operation phase and start to process host services normally.
[0069] In a specific embodiment, the data copy operation of the controller during the normal operation initialization process is triggered by a timer to detect whether the reconstruction bitmap is valid. If the reconstruction bitmap is valid, the progress position of the current migration is read, and the metadata copy of the corresponding strip is performed: when a strip is read and marked in the reconstruction bitmap (carrying the first initialization mark), the corresponding position of the initialization bitmap is also marked (the second initialization mark), and then the mark of the reconstruction bitmap (the first initialization mark) is deleted. If the metadata copy is completed, the reconstruction bitmap is marked as invalid, and the current copy position is reset to 0; otherwise, the progress position of the current migration is recorded.
[0070] It can be seen that the present application ignores the second stripe that does not contain data during the data reconstruction process of the disk, and only reconstructs the data of the first stripe containing data into the new disk; and after reconstructing the data of the first stripe into the new disk, a metadata copy operation is performed to copy the metadata corresponding to the second stripe in the reconstruction bitmap to the pre-built initialization bitmap, and the stripe corresponding to the new disk can be initialized subsequently through the initialization bitmap, which can minimize the occupation of the reconstruction bitmap by the disk reconstruction process; further, in the metadata copy process, the present application can perform initialization operations on the relevant stripes of the new disk according to the metadata corresponding to the stripe to be initialized of the reconstruction bitmap or the initialization bitmap, which can further speed up the speed of stripe initialization, reduce the time required for reconstruction and the computing resources consumed, and improve the disk performance during the reconstruction process.
[0071] like Figure 3 As shown, the embodiment of the present application discloses a disk reconstruction device, which is applied to a controller, including:
[0072] The stripe classification module 11 is used for classifying the stripes in the target member disk based on the reconstruction bitmap when a target member disk in the disk array fails, and obtaining a first stripe containing data and a second stripe containing no data;
[0073] A data reconstruction module 12, configured to reconstruct data of a related stripe in the new disk based on the reconstruction bitmap and the first stripe;
[0074] The stripe initialization module 13 is used to copy the metadata corresponding to the second stripe in the reconstruction bitmap to the initialization bitmap corresponding to the new disk after the reconstruction operation is completed, and in the process of copying, determine the stripe to be initialized in the new disk by checking the reconstruction bitmap and the initialization bitmap, and then initialize the stripe to be initialized to obtain the reconstructed disk corresponding to the target member disk.
[0075] It can be seen that the present application ignores the second stripe that does not contain data during the data reconstruction process of the disk, and only reconstructs the data of the first stripe containing data into the new disk; and after reconstructing the data of the first stripe into the new disk, a metadata copy operation is performed to copy the metadata corresponding to the second stripe in the reconstruction bitmap to the pre-built initialization bitmap, and the stripe corresponding to the new disk can be initialized subsequently through the initialization bitmap, which can minimize the occupancy of the reconstruction bitmap by the disk reconstruction process; further, in the metadata copy process, the present application can perform initialization operations on the relevant stripes of the new disk according to the metadata corresponding to the stripe to be initialized of the reconstruction bitmap or the initialization bitmap, which can further speed up the stripe initialization speed, reduce the occupancy of the reconstruction bitmap, and improve the disk reconstruction efficiency.
[0076] In a specific embodiment, the strip classification module 11 may include:
[0077] A stripe classification unit is used to determine the index corresponding to each stripe in the target member disk based on the reconstruction bitmap when a target member disk in the disk array fails, and classify each stripe according to whether the index represents data, so as to obtain a first stripe containing data and a second stripe not containing data.
[0078] In a specific embodiment, the data reconstruction module 12 may include:
[0079] A space partitioning unit, configured to determine the to-be-reconstructed data contained in the target member disk based on the first stripe, and to partition the space of the new disk based on the reconstruction bitmap to obtain a corresponding number of stripes;
[0080] The data reconstruction submodule is used to perform a reconstruction operation on the data to be reconstructed in the new disk based on the reconstruction bitmap, so as to reconstruct the data to be reconstructed into a related stripe of the new disk.
[0081] In another specific embodiment, the data reconstruction submodule may include:
[0082] A reconstruction task determining unit, used to determine the reconstruction task to be executed at the current moment through a scheduler; the reconstruction task is a task for any first stripe in the reconstruction bitmap;
[0083] A reconstruction task execution unit is used to execute the reconstruction task to reconstruct the data to be reconstructed of the corresponding first stripe into the corresponding stripe of the new disk, and after completing the reconstruction task, synchronize the metadata corresponding to the first stripe between the primary and standby controllers; the primary and standby controllers include the current controller and another controller that is processing the reconstruction operation of the target member disk.
[0084] In a specific embodiment, the stripe initialization module 13 may include:
[0085] a copy progress position determination unit, configured to determine, by a preset timer, an execution time period of a copy operation corresponding to the metadata of the second stripe in the reconstructed bitmap, and determine, at the start of the execution time period, a copy progress position of the metadata of the next second stripe corresponding to the last second stripe copied in the previous execution time period; each of the second stripes carries a first initialization mark indicating a piece of material to be initialized;
[0086] a target stripe searching unit, configured to search for a second stripe carrying a first initialization mark from a second stripe corresponding to the metadata at the copy progress position of the reconstructed bitmap, to obtain a target stripe of the metadata to be copied;
[0087] The metadata copy unit is used to add a second initialization mark to the stripe corresponding to the target stripe in the new disk, and copy the metadata of the target stripe from the reconstruction bitmap to the initialization bitmap, and delete the first initialization mark of the target stripe in the reconstruction bitmap.
[0088] In another specific embodiment, the stripe initialization module 13 may include:
[0089] A stripe determination unit, used for determining whether there is a second stripe carrying a first initialization mark in the stripe corresponding to the reconstructed bitmap at the current moment during the copying process, and obtaining a corresponding determination result;
[0090] a first current stripe determining unit, configured to determine, through a scheduler, a second stripe carrying the first initialization marker from the stripes corresponding to the reconstructed bitmap as the current stripe to be initialized at the current moment when the judgment result indicates that there is a second stripe carrying the first initialization marker;
[0091] A first initialization unit is used to initialize the corresponding stripe in the new disk based on the metadata corresponding to the current stripe in the reconstructed bitmap, delete the first initialization mark corresponding to the current stripe, and then jump to the step of determining whether there is a second stripe carrying the first initialization mark in the stripe corresponding to the reconstructed bitmap at the current moment;
[0092] a second current stripe determining unit, configured to determine, through the scheduler, a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment when the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripes corresponding to the reconstructed bitmap at the current moment, and there is a stripe carrying the second initialization mark in the stripes corresponding to the initialization bitmap;
[0093] a second initialization unit, configured to initialize the corresponding stripe in the new disk based on the metadata corresponding to the current stripe in the initialization bitmap, delete the second initialization mark corresponding to the current stripe, and then jump to the step of determining, by the scheduler, a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment;
[0094] A disk determination unit is used to determine that each of the second stripes corresponding to the reconstruction bitmap has completed the corresponding initialization process when the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripe corresponding to the reconstruction bitmap, and there is no stripe carrying the second initialization mark in the stripe corresponding to the initialization bitmap, and determine the new disk finally obtained as the reconstructed disk corresponding to the target member disk.
[0095] In a specific embodiment, the device may further include:
[0096] During the copying process, if a new member disk in the disk array fails, the timer is disabled, and the maximum copy performance of the controller at the current moment is used to perform a copy operation on the metadata corresponding to several of the second stripes in the reconstruction bitmap, so as to copy the relevant metadata to the initialization bitmap corresponding to the new disk.
[0097] This embodiment also discloses a computer program product, including a computer program / instruction, which implements the steps of the above disk reconstruction method when executed by a processor.
[0098] Furthermore, the present application also discloses an electronic device. Figure 4This is a structural diagram of an electronic device according to an exemplary embodiment, and the content in the diagram cannot be regarded as any limitation on the scope of use of this application. The electronic device may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the disk reconstruction method disclosed in any of the aforementioned embodiments. In addition, the electronic device in this embodiment may specifically be an electronic computer.
[0099] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0100] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0101] The operating system 221 is used to manage and control various hardware devices on the electronic device and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the disk reconstruction method performed by the electronic device disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0102] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the above-disclosed disk reconstruction method. The specific steps of the method can refer to the corresponding contents disclosed in the above-disclosed embodiments, and will not be repeated here.
[0103] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0104] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0105] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0106] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0107] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A disk reconstruction method, characterized in that: Applicable to controllers, including: When a target member disk in the disk array fails, each stripe in the target member disk is classified based on the reconstruction bitmap to obtain a first stripe containing data and a second stripe containing no data; Reconstructing data of a related stripe in the new disk based on the reconstruction bitmap and the first stripe; After the reconstruction operation is completed, the metadata corresponding to the second stripe in the reconstruction bitmap is copied to the initialization bitmap corresponding to the new disk, and during the copying process, the stripe to be initialized in the new disk is determined by checking the reconstruction bitmap and the initialization bitmap, and then the stripe to be initialized is initialized to obtain the reconstructed disk corresponding to the target member disk.
2. The disk reconstruction method according to claim 1, characterized in that: When a target member disk in the disk array fails, classifying each stripe in the target member disk based on the reconstruction bitmap to obtain a first stripe containing data and a second stripe containing no data includes: When a target member disk in a disk array fails, the index corresponding to each stripe in the target member disk is determined based on the reconstruction bitmap, and each stripe is classified according to whether the index represents data to obtain a first stripe containing data and a second stripe containing no data.
3. The disk reconstruction method according to claim 1, characterized in that: The reconstructing the data of the relevant stripe in the new disk based on the reconstructed bitmap and the first stripe includes: Determine the data to be reconstructed contained in the target member disk based on the first stripe, and divide the space of the new disk based on the reconstruction bitmap to obtain a corresponding number of stripes; A reconstruction operation is performed on the data to be reconstructed in the new disk based on the reconstruction bitmap, so as to reconstruct the data to be reconstructed into a related stripe of the new disk.
4. The disk reconstruction method according to claim 3, characterized in that: The reconstructing the data to be reconstructed in the new disk based on the reconstruction bitmap to reconstruct the data to be reconstructed into a related stripe of the new disk includes: Determine, by a scheduler, a reconstruction task to be executed at the current moment; the reconstruction task is a task for any first stripe in the reconstruction bitmap; Execute the reconstruction task to reconstruct the data to be reconstructed of the corresponding first stripe into the corresponding stripe of the new disk, and after completing the reconstruction task, synchronize the metadata corresponding to the first stripe between the primary and standby controllers; the primary and standby controllers include the current controller and another controller that is processing the reconstruction operation of the target member disk.
5. The disk reconstruction method according to any one of claims 1 to 4, characterized in that: The step of copying the metadata corresponding to the second stripe in the reconstruction bitmap to the initialization bitmap corresponding to the new disk includes: Determine the execution time period of the copy operation corresponding to the metadata of the second stripe in the reconstructed bitmap by a pre-set timer, and determine the copy progress position of the metadata of the next second stripe corresponding to the last second stripe copied in the previous execution time period at the start time of the execution time period; the second stripes all carry a first initialization mark indicating that they are to be initialized; Searching for a second stripe carrying a first initialization mark from a second stripe corresponding to the metadata at the copy progress position of the reconstructed bitmap to obtain a target stripe of metadata to be copied; A second initialization marker is added to the stripe corresponding to the target stripe in the new disk, metadata of the target stripe is copied from the reconstruction bitmap to the initialization bitmap, and the first initialization marker of the target stripe is deleted from the reconstruction bitmap.
6. The disk reconstruction method according to claim 5, characterized in that: During the copying process, the reconstruction bitmap and the initialization bitmap are checked to determine the stripes to be initialized in the new disk, and then the stripes to be initialized are initialized to obtain the reconstructed disk corresponding to the target member disk, including: During the copying process, it is determined whether there is a second stripe carrying the first initialization mark in the stripe corresponding to the reconstructed bitmap at the current moment, and a corresponding determination result is obtained; If the judgment result indicates that there is a second stripe carrying the first initialization mark, a scheduler is used to determine a second stripe carrying the first initialization mark from the stripes corresponding to the reconstructed bitmap as the current stripe to be initialized at the current moment; Initializing the corresponding stripe in the new disk based on the metadata corresponding to the current stripe in the reconstructed bitmap, deleting the first initialization mark corresponding to the current stripe, and then jumping to the step of determining whether there is a second stripe carrying the first initialization mark in the stripe corresponding to the reconstructed bitmap at the current moment; If the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripe corresponding to the reconstruction bitmap at the current moment, and there is a stripe carrying the second initialization mark in the stripe corresponding to the initialization bitmap, then determining, by the scheduler, a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment; Initialize the corresponding stripe in the new disk based on the metadata corresponding to the current stripe in the initialization bitmap, delete the second initialization mark corresponding to the current stripe, and then jump to the step of determining, by the scheduler, a stripe carrying the second initialization mark from the stripes corresponding to the initialization bitmap as the current stripe to be initialized at the current moment; If the judgment result indicates that there is no second stripe carrying the first initialization mark in the stripe corresponding to the reconstruction bitmap, and there is no stripe carrying the second initialization mark in the stripe corresponding to the initialization bitmap, then it is determined that all the second stripes corresponding to the reconstruction bitmap have completed the corresponding initialization process, and the new disk finally obtained is determined as the reconstructed disk corresponding to the target member disk.
7. The disk reconstruction method according to claim 5, characterized in that: Also includes: During the copying process, if a new member disk in the disk array fails, the timer is disabled, and the maximum copy performance of the controller at the current moment is used to perform a copy operation on the metadata corresponding to several of the second stripes in the reconstruction bitmap, so as to copy the relevant metadata to the initialization bitmap corresponding to the new disk.
8. A disk reconstruction device, characterized in that: Applicable to controllers, including: A stripe classification module, used for classifying the stripes in the target member disk based on the reconstruction bitmap when a target member disk in the disk array fails, to obtain a first stripe containing data and a second stripe containing no data; A data reconstruction module, used for reconstructing data of a related stripe in a new disk based on the reconstruction bitmap and the first stripe; A stripe initialization module is used to copy the metadata corresponding to the second stripe in the reconstruction bitmap to the initialization bitmap corresponding to the new disk after the reconstruction operation is completed, and in the process of copying, determine the stripe to be initialized in the new disk by checking the reconstruction bitmap and the initialization bitmap, and then initialize the stripe to be initialized to obtain the reconstructed disk corresponding to the target member disk.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the disk reconstruction method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the disk reconstruction method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
RAID reconstruction method, storage medium and device
CN109739436A
Data reconstruction method, device and equipment and storage medium
CN111880963A
Hard disk fault processing method and device, equipment and storage medium
CN113360312A
Disk array reconstruction method and device, equipment, and medium
CN113625974A
Systems and methods for mapping for solid-state memory
US9009565B1
Cited By
Information synchronization method and device, medium and program product
CN119621443A
Information Synchronization Method, Device, Medium and Program Product
CN119621443B