Method for recovering data and electronic device
By identifying and utilizing status flag areas and periodic identifiers in the storage system to filter target sub-storage spaces, and by using the latest metadata and bitmap status to restore management data, the problem of long recovery times in traditional data recovery is solved, achieving efficient and fast data recovery.
Patent Information
- Application Number
- CN202511449124.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-10-11
AI Technical Summary
Traditional data recovery methods are too time-consuming after system failures, resulting in low data recovery efficiency and impacting business continuity and user experience.
By obtaining recovery instructions, candidate sub-storage spaces in the storage system are identified, target sub-storage spaces are selected using status flag areas and periodic identifiers, management data is recovered, and data recovery is performed using the latest reference metadata and bitmap status.
Quickly locate and restore the latest and complete data, avoiding full scans, significantly shortening recovery time, and improving data recovery efficiency and system reliability.
Smart Images

Figure CN120909849B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more particularly to a data recovery method and electronic device. Background Technology
[0002] All-flash arrays (AFAs) play a critical role in modern data center and cloud environments. However, one of the challenges facing storage systems is ensuring data security and rapid recovery under various failure scenarios, which directly impacts business continuity and user experience.
[0003] Traditional data recovery methods involve a full scan of metadata after a system failure to reconstruct the mapping between bitmaps and recovered data. This process is extremely time-consuming, often taking several hours to several days.
[0004] In other words, the data recovery methods provided in related technologies still suffer from the technical problem of low recovery efficiency. Summary of the Invention
[0005] This application provides a data recovery method and an electronic device to at least solve the technical problem of low data recovery efficiency in related technologies.
[0006] This application provides a data recovery method, comprising: obtaining a recovery instruction for instructing the recovery of management data of a storage system, wherein the management data includes metadata and bitmap status, the metadata being used to characterize the mapping relationship between virtual addresses and physical addresses of data in the storage system, the bitmap status being used to characterize the occupancy status of physical blocks in a target storage space, and the target storage space being used to store data in the storage system; identifying the status flag area corresponding to each sub-storage space in the target storage space, and determining the sub-storage space containing flag data in the status flag area as candidate sub-storage spaces, wherein each sub-storage space stores metadata and bitmap status written at different write cycles, and the flag data being used to indicate that the data stored in the sub-storage space is in an intact state; identifying the cycle identifier corresponding to each candidate sub-storage space, and determining the sub-storage space whose cycle identifier meets predetermined conditions as the target sub-storage space, wherein the cycle identifier is used to characterize the write cycle of the data stored in the sub-storage space; and recovering the management data using reference metadata and reference bitmap status stored in the target sub-storage space.
[0007] This application also provides a data recovery apparatus, comprising: an acquisition unit, configured to acquire a recovery instruction for instructing the recovery of management data of a storage system, wherein the management data includes metadata and bitmap status, the metadata being used to characterize the mapping relationship between virtual addresses and physical addresses of data in the storage system, the bitmap status being used to characterize the occupancy status of physical blocks in a target storage space, and the target storage space being used to store data in the storage system; a first determining unit, configured to identify the status flag area corresponding to each sub-storage space in the target storage space, and determine the sub-storage space containing flag data in the status flag area as candidate sub-storage spaces, wherein each sub-storage space stores metadata and bitmap status written at different write cycles, and the flag data being used to indicate that the data stored in the sub-storage space is in an intact state; a second determining unit, configured to identify the cycle identifier corresponding to each candidate sub-storage space, and determine the sub-storage space whose cycle identifier meets predetermined conditions as the target sub-storage space, wherein the cycle identifier is used to characterize the write cycle of the data stored in the sub-storage space; and a recovery unit, configured to recover the management data using reference metadata and reference bitmap status stored in the target sub-storage space.
[0008] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described data recovery methods when executing the computer program.
[0009] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described data recovery methods.
[0010] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described data recovery methods.
[0011] In this embodiment, a recovery instruction is obtained to instruct the recovery of management data of the storage system. The management data includes metadata and bitmap status. The metadata characterizes the mapping relationship between virtual and physical addresses of data in the storage system, and the bitmap status characterizes the occupancy status of physical blocks in the target storage space. The target storage space stores data in the storage system. The status flag area corresponding to each sub-storage space in the target storage space is identified. Sub-storage spaces containing flag data in their status flag areas are determined as candidate sub-storage spaces. Each sub-storage space stores metadata and bitmap status written at different write cycles. The flag data indicates that the data stored in the sub-storage space is in an intact state. The cycle identifier corresponding to each candidate sub-storage space is identified. Sub-storage spaces whose cycle identifiers meet predetermined conditions are determined as target sub-storage spaces. The cycle identifier characterizes the write cycle of the data stored in the sub-storage space. The management data is recovered using reference metadata and reference bitmap status stored in the target sub-storage space. This embodiment achieves the technical effect of improving data recovery efficiency and solves the technical problem of low data recovery efficiency. Attached Figure Description
[0012] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a data recovery method provided in this application embodiment;
[0014] Figure 2 A schematic diagram illustrating a data recovery method provided in an embodiment of this application;
[0015] Figure 3 A schematic diagram illustrating another data recovery method provided in an embodiment of this application;
[0016] Figure 4 A flowchart illustrating a physical block delayed release is provided in an embodiment of this application;
[0017] Figure 5 This is a schematic diagram of the structure of a data recovery device provided in an embodiment of this application; Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0019] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0020] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] As an alternative, the above data recovery methods include, for example... Figure 1 As shown, it includes:
[0022] S102, obtain a recovery instruction for instructing the recovery of management data of the storage system, wherein the management data includes metadata and bitmap status, the metadata is used to characterize the mapping relationship between virtual addresses and physical addresses of data in the storage system, the bitmap status is used to characterize the occupancy status of physical blocks in the target storage space, and the target storage space is used to store data in the storage system.
[0023] S104, identify the status flag area corresponding to each sub-storage space in the target storage space, and determine the sub-storage space containing flag data in the status flag area as candidate sub-storage space. Each sub-storage space stores metadata and bitmap status written at different write cycles. The flag data is used to indicate that the data stored in the sub-storage space is in a complete state.
[0024] S106, identify the cycle identifier corresponding to each candidate sub-storage space, and determine the sub-storage space whose cycle identifier meets the predetermined conditions as the target sub-storage space, wherein the cycle identifier is used to characterize the write cycle of the data stored in the sub-storage space.
[0025] S108, using the reference metadata and reference bitmap state stored in the target sub-storage space, restore the management data.
[0026] Optionally, the above recovery instruction is used to represent a special command received by the storage system, instructing the storage system to perform a data recovery operation, which is usually triggered by system failure or data inconsistency.
[0027] It should be noted that the aforementioned management data includes metadata and bitmap status used in the storage system to manage data. These are the core components of the storage system, used to record the mapping of virtual addresses to physical addresses and the occupancy of physical blocks.
[0028] Furthermore, the aforementioned metadata specifically refers to the data used in the storage system to describe and manage the actual data. It contains the mapping information between the virtual address and physical address of the data and is crucial for data recovery.
[0029] Optionally, the bitmap state described above is used to represent the physical block occupancy status of the target storage space in the storage system. The bitmap (usually a series of binary bits) is used to mark which physical blocks are occupied and which are free.
[0030] It should be noted that the target storage space mentioned above includes the physical area in the storage system used for persistent storage of data, which consists of a series of sub-storage spaces, each of which records data for one write cycle.
[0031] Furthermore, the aforementioned sub-storage space is a logical region within the target storage space, used to store metadata and bitmap states written during a specific write cycle.
[0032] Optionally, the aforementioned status flag area is used to represent a reserved area in each sub-storage space for storing marker data, indicating whether the data in that sub-storage space is complete.
[0033] It should be noted that the aforementioned flag data includes a special data format or flag used to indicate whether the data stored in the sub-storage space has been completely written.
[0034] Furthermore, the aforementioned candidate sub-storage space refers to a sub-storage space containing flag data in the status flag area, indicating data integrity, and is a potential candidate for data recovery.
[0035] Optionally, the aforementioned cycle identifier is used to represent a unique identifier for a write cycle, and is used to track and manage data in the write cycle.
[0036] It should be noted that the aforementioned predetermined conditions include a periodic identifier comparison strategy, used to filter target sub-storage spaces for data recovery. The process of identifying the periodic identifiers corresponding to each candidate sub-storage space and determining the sub-storage spaces whose periodic identifiers meet the predetermined conditions as target sub-storage spaces may include, but is not limited to: sorting each candidate sub-storage space according to the periodic identifier; and determining the candidate sub-storage space whose sorting order matches the target order as the target sub-storage space.
[0037] Furthermore, the aforementioned target sub-storage space refers to the candidate sub-storage space that periodically identifies and meets predetermined conditions, which will serve as the direct data source for data recovery operations.
[0038] For example, to avoid irreparable situations caused by write failures (i.e., writing to the target storage space), the write operation is not performed by overwriting in place during each cycle. Instead, multiple write areas (representing multiple sub-storage spaces) are pre-defined and used cyclically. A cursor is used to record the current position, for example, such as... Figure 2 As shown, 2-3 disk write areas are typically sufficient. After disk write is complete, the cursor points to the next disk write area. During the next write cycle, data is written to the new disk write area. In this way, if a write failure or incomplete write occurs in the most recent write cycle, the disk write information for this cycle is discarded, and the metadata and bitmap from the previous cycle are used as a reference for repair. To facilitate identification of whether disk write is complete within a cycle, a special flag area (used to indicate the aforementioned status flag area) is usually reserved in each disk write area. The size can be one sector or 4K. Before writing to disk in a write cycle, the data in the flag area is cleared, and then the metadata and bitmap are written to disk. After the write is complete, data in a specific format is written to the flag area again. If the flag area in a disk write area is empty, it means that the write process is not complete, and the metadata and bitmap of this disk write area are unavailable during recovery; if the flag area contains data in a specific format, it means that this disk write area is available.
[0039] Optionally, the aforementioned reference metadata and reference bitmap state are used to represent the metadata and bitmap state read from the target sub-storage space, which will be used to recover the management data of the storage system.
[0040] Optionally, as an alternative example, the above content can be illustrated by, but is not limited to, the following examples:
[0041] When a serious controller failure occurs and cached data is lost (used to represent the aforementioned management data), such as when performing a repair task, it is first necessary to scan each disk write area (used to represent the aforementioned sub-storage space), and determine whether the disk write area has been written to disk completely based on the marker area in the disk write area, that is, whether the metadata and bitmap are complete. The disk write area that has been written to disk completely is identified as the valid disk write area (used to represent the candidate sub-storage space).
[0042] Read the write count IDs recorded in the valid write areas and find the write area with the largest ID (used to represent the target sub-storage space).
[0043] Metadata and bitmaps are read from the disk partition with the largest ID, and used as the metadata and bitmaps after data repair. Then, the mapping relationship between virtual space and physical blocks is restored based on the metadata to support user data read and write. The space management module is restored based on the bitmap to support subsequent physical space allocation and reclamation tasks. Since the read metadata and bitmaps can be used directly without additional scanning, detection, or reconstruction, the repair task can be completed quickly, greatly improving repair efficiency.
[0044] Alternatively, as another optional example, the above content can be illustrated by, but is not limited to, the following examples:
[0045] Suppose an all-flash storage system experiences a critical failure, resulting in the loss of management data currently in the cache. To quickly recover the data, the system needs to perform the following operations:
[0046] Receive recovery command: The system detects data inconsistency or system failure and triggers a recovery command.
[0047] Scan Status Flag Area: The system begins scanning the status flag areas of all sub-storage spaces in the target storage space to find those sub-storage spaces that contain flag data indicating data integrity.
[0048] Determine candidate sub-storage spaces: Suppose that three sub-storage spaces containing flag data are found in the status flag area, they are marked as candidate sub-storage spaces.
[0049] Target sub-storage space selection: The system compares the cycle identifiers of the three candidate sub-storage spaces and determines the sub-storage space with the latest write cycle as the target for data recovery. This target sub-storage space contains the latest reference metadata and reference bitmap status.
[0050] Data recovery: The system reads the reference metadata and reference bitmap status in the target sub-storage space, uses this data to update or rebuild the management data of the storage system, and quickly restores the normal operation of the system.
[0051] In this embodiment, a recovery instruction is obtained to instruct the recovery of management data in the storage system. The management data includes metadata and bitmap status. The metadata characterizes the mapping relationship between virtual and physical addresses of data in the storage system, and the bitmap status characterizes the occupancy status of physical blocks in the target storage space. The target storage space stores data in the storage system. Status flag areas corresponding to each sub-storage space in the target storage space are identified. Sub-storage spaces containing flag data in their status flag areas are identified as candidate sub-storage spaces. Each sub-storage space stores metadata and bitmap status written at different write cycles. The flag data indicates that the data stored in the sub-storage space is in a complete state. Cycle identifiers corresponding to each candidate sub-storage space are identified. Sub-storage spaces whose cycle identifiers meet predetermined conditions are identified as target sub-storage spaces. The cycle identifier characterizes the write cycle of the data stored in the sub-storage space. The management data is recovered using reference metadata and reference bitmap status stored in the target sub-storage space. By combining the acquisition of the recovery instruction with the identification of status flag areas in this embodiment, the system can quickly locate the sub-storage space containing complete data, creating a favorable starting point for data recovery. The use of periodic identifiers combined with status flag areas allows the system to quickly filter out the sub-storage space that is closest to the pre-failure state and has complete data during the data recovery process, avoiding the inefficiency of full scans and greatly saving data recovery time. Utilizing reference metadata and bitmap status in the target sub-storage space for data recovery ensures that the recovery process is based on the latest and complete data, improving the accuracy and efficiency of data recovery and reducing the risk of data inconsistency or erroneous recovery. In summary, by combining the three core technical features of rapid response, efficient filtering, and accurate recovery, the embodiments of this application improve the efficiency of data recovery in all-flash storage systems, shorten the recovery time after a failure, thereby enhancing system reliability and business continuity, and solving the technical problem of low data recovery efficiency in related technologies.
[0052] As an optional approach, the sub-storage space that meets predetermined conditions based on the periodic identifier is identified as the target sub-storage space, including:
[0053] S1, sort each candidate sub-storage space according to the period identifier.
[0054] S2, determine the candidate sub-storage space whose sorting order is the target order as the target sub-storage space.
[0055] Optionally, the aforementioned period identifier is used to represent the timestamp or period number of data write operations in the storage system, which is an important basis for identifying data versions during data recovery.
[0056] It should be noted that the above sorting process is a data management strategy. It can, but is not limited to, comparing the period identifiers of each sub-storage space and then arranging the sub-storage spaces in ascending or descending order to locate the sub-storage space containing the latest data.
[0057] Optionally, the above-mentioned order is used to indicate the position of each sub-storage space in the sorted sub-storage space list. The higher the order, the newer the data is usually.
[0058] It should be noted that the target sequence number mentioned above is usually the highest sequence number (maximum cycle identifier) to ensure that the sub-storage space containing the latest complete data is used for recovery.
[0059] In this embodiment, candidate sub-storage spaces are sorted according to their period identifiers; the candidate sub-storage space whose sorting order matches the target order is determined as the target sub-storage space. By sorting the candidate sub-storage spaces and selecting the latest, complete sub-storage space based on its period identifier, the system can quickly locate the sub-storage space containing the latest period data, thus significantly reducing the time required for data recovery. This method avoids a full scan of all sub-storage spaces, focusing only on the latest period identifier, ensuring efficient data recovery.
[0060] As an optional approach, management data can be recovered using reference metadata and reference bitmap states stored in the target sub-storage space, including:
[0061] Adjust the metadata in the management data using reference metadata, and adjust the bitmap state in the management data using reference bitmap state.
[0062] If the metadata in the management data matches the reference metadata, and the bitmap state in the management data matches the reference bitmap state, then the recovery of the management data is considered complete.
[0063] It should be noted that the above adjustments refer to the process of updating or correcting the metadata and bitmap status in the management data based on the reference metadata and reference bitmap status to ensure that they match the reference information.
[0064] Optionally, matching the metadata in the aforementioned management data with the reference metadata can be used, but is not limited to, indicating that the metadata in the management data is consistent with the corresponding metadata in the reference metadata, and matching the bitmap state in the aforementioned management data with the reference bitmap state can be used, but is not limited to, indicating that the bitmap state in the management data is consistent with the corresponding part in the reference bitmap state.
[0065] In this embodiment, reference metadata is used to adjust the metadata in the management data, and a reference bitmap state is used to adjust the bitmap state in the management data. When the metadata in the management data matches the reference metadata, and the bitmap state in the management data matches the reference bitmap state, the recovery of the management data is considered complete. By using this embodiment, during data recovery, the reference metadata and reference bitmap state in the target sub-storage space are used to adjust the metadata and bitmap state in the management data, ensuring that the recovered management data is consistent with the data in the target sub-storage space. By comparing the management data with the reference data, the completion status of data recovery is detected and confirmed, which avoids errors and inconsistencies during the data recovery process and improves the reliability of the system.
[0066] As an optional approach, identifying the status flag areas corresponding to each sub-storage space in the target storage space includes:
[0067] S1, each sub-storage space is determined as the current sub-storage space.
[0068] S2 identifies the current status flag area in the current sub-storage space.
[0069] S3, if the current status flag area is empty, determine that the data stored in the current sub-storage space is incomplete.
[0070] S4. If the current flag data conforming to the target format is stored in the current status flag area, determine that the current sub-storage space is in an intact state.
[0071] Optionally, the aforementioned current sub-storage space refers to the sub-storage space that is being checked to determine the data status.
[0072] It should be noted that the aforementioned current status flag area refers to the status flag area within the current sub-storage space, which is used to check the data integrity of that sub-storage space.
[0073] Furthermore, the aforementioned target format is a standard format used to identify and verify the validity of the flag data in the status flag area. This format ensures the correctness of the data and the accuracy of the recovery process.
[0074] In this embodiment, each sub-storage space is designated as the current sub-storage space; the current status flag area in the current sub-storage space is identified; if the current status flag area is empty, it is determined that the data stored in the current sub-storage space is incomplete; if the current status flag area stores current flag data conforming to the target format, it is determined that the current sub-storage space is in complete condition. Using this embodiment, the existence of the status flag area allows the system to detect data integrity without deeply reading the actual data in the sub-storage space. If the status flag area is empty, it indicates that the data in the sub-storage space is incomplete or has not been fully written; if the status flag area contains flag data in the target format, it indicates that the data has been fully written. This mechanism provides a fast method for determining data integrity, avoids unnecessary data scanning, and effectively improves the efficiency of data recovery.
[0075] As an optional approach, before obtaining the recovery instructions that instruct the restoration of management data in the memory of the storage system, the following steps are also included:
[0076] S1, upon reaching the first write cycle, generates a first cycle identifier that matches the first write cycle.
[0077] S2 determines the first metadata and the first bit graph state stored in the cache space of the storage system before the first write cycle.
[0078] S3 writes the first bit diagram state carrying the first cycle identifier into the first sub-storage space in the target storage space.
[0079] S4, write the first metadata carrying the first cycle identifier to the first sub-storage space.
[0080] It should be noted that the first write cycle mentioned above refers to one cycle of the process of writing management data (i.e., metadata and bitmap state) in the storage system. It is a periodic point in time when the system records the data state.
[0081] Optionally, the aforementioned first cycle identifier is used to represent a unique identifier generated within the first write cycle, used to mark the time point when data is written, facilitating subsequent data recovery and management.
[0082] It should be noted that the aforementioned first metadata is the data stored in the cache space during the first write cycle. It contains metadata about user data, such as the mapping relationship between virtual addresses and physical addresses.
[0083] Optionally, the aforementioned first bitmap state is used to represent the bitmap state information stored in the cache space during the first write cycle, which reflects the occupancy of physical blocks in the target storage space.
[0084] Furthermore, the aforementioned cache space is a high-speed storage area in the storage system used for temporary data storage. Its purpose is to improve data processing speed, but the data in the cache is volatile and may be lost due to failure.
[0085] It should be noted that the aforementioned first sub-storage space is part of the target storage space and is used to store the metadata and bitmap state of the first write cycle.
[0086] Optionally, as an alternative example, the above content can be illustrated by, but is not limited to, the following examples:
[0087] Add a metadata write-to-disk counting module, such as Figure 3 As shown, before each batch of changed metadata in the cache is written to disk, the metadata management module 302 needs to execute step S302, first obtaining a unique identifier (ID) (used to represent the periodic identifier) from the counting module 304. This ID always keeps monotonically increasing and will not be repeated.
[0088] The metadata for this batch will be written to disk along with this ID. Before writing the metadata to disk, the counting module 304 needs to execute S304 to send the same ID to the bitmap management module 306 so that the bitmap management module can execute step S306 to perform the disk writing operation (i.e., write to the first sub-storage space) for the bitmap carrying the ID.
[0089] Next, the metadata management module 302 can execute step S308 to perform a disk write operation for the metadata of this batch carrying the ID.
[0090] Ultimately, metadata and bitmaps with the same ID are written to disk within the same write cycle or batch. This ensures that during subsequent disk reads, as long as complete metadata is available within the same cycle, a complete bitmap can be retrieved. It's important to note that bitmap writing can be either full or incremental, depending on the bitmap size. Full writing is preferable for smaller bitmaps, while incremental writing is better for larger ones. In practice, bitmap sizes are typically not very large, so full writing is generally preferred.
[0091] In this embodiment, upon reaching the first write cycle, a first cycle identifier matching the first write cycle is generated; the first metadata and the first bitmap state stored in the cache space of the storage system before the first write cycle are determined; the first bitmap state carrying the first cycle identifier is written to the first sub-storage space in the target storage space; and the first metadata carrying the first cycle identifier is written to the first sub-storage space. By generating a cycle identifier in each write cycle and writing the metadata and bitmap state of the current cycle to the sub-storage space of the target storage space using this embodiment, the system can periodically update and save critical management data. This ensures that even in the event of a system failure, it can quickly recover to the most recent complete state, reducing the complexity and time required for data recovery.
[0092] As an optional approach, generating a first cycle identifier that matches the first write cycle includes:
[0093] S1, obtain the historical cycle identifier corresponding to the historical write cycle that is before the first write cycle and adjacent to the first write cycle.
[0094] S2, the target value is added to the historical cycle identifier to obtain the first cycle identifier.
[0095] It should be noted that the target value mentioned above is used to represent the incremental value used to generate a new cycle identifier. It is usually 1, but it can also be other values to maintain the monotonically increasing nature of the cycle identifier. In this embodiment, no limitation is made on this.
[0096] In this embodiment, the historical cycle identifier corresponding to the historical write cycle preceding and adjacent to the first write cycle is obtained; a target value is added to the historical cycle identifier to obtain the first cycle identifier. By adding the target value to the historical cycle identifier, the system can generate new, continuous cycle identifiers, ensuring that the metadata and bitmap state of each write cycle have unique identifiers. This facilitates version control and data integrity checks during data recovery, preventing data errors caused by duplicate or confused identifiers.
[0097] As an optional approach, before writing the first bit graph state carrying the first cycle identifier into the first sub-memory space of the target memory space, the following steps are also included:
[0098] S1, upon receiving a request to reclaim the first data stored in the first physical block, the first data is removed from the first physical block, wherein the target storage space includes the first physical block.
[0099] S2, add the identifier information of the first physical block to the first linked list.
[0100] It should be noted that the first physical block mentioned above is the basic unit used to store data within the storage system, and it may contain user data or management data.
[0101] Furthermore, the aforementioned first data refers to user data s stored on the first physical block, which will be cleared during garbage collection to free up storage space.
[0102] Optionally, the aforementioned recycling request is used to indicate a garbage collection action initiated in the system, the purpose of which is to release physical blocks that are no longer needed so that new data can be written.
[0103] It should be noted that the first linked list mentioned above is a data structure used to temporarily store the identification information of physical blocks waiting to be released until they can be safely marked as unoccupied.
[0104] In this embodiment, upon receiving a request to reclaim first data stored in a first physical block, the first data is removed from the first physical block, where the target storage space includes the first physical block; the identification information of the first physical block is added to a first linked list. Using this embodiment, during garbage collection, the system adds the identification information of the physical block to the linked list, delaying its actual release until a specific periodic interval is elapsed before updating the bitmap state and marking the physical block as unoccupied. This method avoids data overwriting and writing redundant data, improving data security and storage space utilization efficiency.
[0105] As an optional approach, after adding the identifier information of the first physical block to the first linked list, the following steps are also included:
[0106] S1, when the target write cycle is reached, remove the identification information of the first physical block from the first linked list, wherein the cycle interval between the target write cycle and the first write cycle is the target interval.
[0107] S2, update the corresponding bit in the bitmap state currently stored in the cache space of the first physical block to the first value, wherein the first value is used to indicate that the first physical block is currently not occupied.
[0108] Optionally, the aforementioned target write cycle refers to the time period used for garbage collection and bitmap state updates during the operation of the storage system. It has a fixed interval from the first write cycle to ensure that the release of physical blocks and state updates do not occur immediately, thereby avoiding data overwrite issues.
[0109] Optionally, the target interval mentioned above is used to represent the time difference between the first write cycle and the target write cycle. This is a preset time period used to ensure data security.
[0110] Furthermore, the aforementioned first value is used to characterize the state where the physical block is not occupied. For example, in the bitmap state, the first value can be 0.
[0111] Optionally, the aforementioned cache space is used to represent a high-speed storage area in the storage system for temporary data storage. The data in the cache is volatile but used for fast read and write operations.
[0112] Optionally, as an optional example, the process of physical block delayed release can be illustrated by the following example, but not limited to:
[0113] Figure 4 This is a flowchart of a physical block delayed release, such as... Figure 4 The execution step S402 involves querying and recording the current write count ID after the physical block (e.g., the first physical block) is reclaimed. Then, step S404 is executed, temporarily attaching the reclaimed physical block to a temporary list (e.g., the first list). After the next cycle's flush is completed and the count is incremented, step S406 is executed to query the physical blocks in the temporary list and retrieve those that have been waiting for two cycles or more. Next, step S408 is executed to update the bitmap and continue the release process. Typically, a maximum delay of two cycles is sufficient. While longer delays improve data security, they can negatively impact physical block release efficiency. Waiting for two write cycles is sufficient to ensure data security during the repair process.
[0114] In this embodiment, upon reaching the target write cycle, the identifier information of the first physical block is removed from the first linked list, where the cycle interval between the target write cycle and the first write cycle is the target interval. The corresponding bit in the bitmap state currently stored in the cache space for the first physical block is updated to a first value, where the first value indicates that the first physical block is currently unoccupied. By setting a target write cycle, this embodiment allows the system to promptly remove physical block identifiers from the linked list and update the bitmap state, accurately reflecting the occupancy status of physical blocks. This helps avoid data inconsistency issues caused by untimely release of physical blocks.
[0115] As an optional approach, before writing the first bit graph state carrying the first cycle identifier into the first sub-memory space of the target memory space, the following steps are also included:
[0116] Clear all data stored in the first status flag area corresponding to the first sub-storage space.
[0117] Optionally, the above-mentioned clearing of all data stored in the first state flag area corresponding to the first sub-storage space is used to indicate that: before writing a new first bit map state to the first sub-storage space, the data in the first state flag area is cleared to ensure that the flag data written thereafter is the latest and has not been disturbed.
[0118] In this embodiment, all data stored in the first status flag area corresponding to the first sub-storage space is cleared. By employing this embodiment, before writing new data, any old data that may exist in the status flag area is cleared, ensuring that the status flag area accurately reflects the current data status in the sub-storage space. This method avoids confusion in the status flag area and improves the efficiency and accuracy of data recovery.
[0119] As an optional approach, after writing the first metadata carrying the first cycle identifier to the first sub-storage space, the method further includes:
[0120] First flag data conforming to the target format is written to the first status flag area, wherein the first flag data is used to indicate that the data stored in the first sub-storage space is in an intact state.
[0121] Optionally, the first flag data conforming to the target format is written to the first status flag area to indicate that after the data (such as the first bit map status and the first metadata) is written to the first sub-storage space, the system generates a first flag data conforming to a preset format to confirm whether the data is complete. This flag data is then written to a specific area (the first status flag area) of the first sub-storage space to mark the status of the data.
[0122] In this embodiment, first flag data conforming to the target format is written to the first status flag area. The first flag data indicates that the data stored in the first sub-storage space is in an intact state. Using this embodiment, after the metadata and bitmap status are written to the sub-storage space, flag data of a specific format is written to the status flag area, explicitly indicating that the data in the sub-storage space is in an intact state. This helps to quickly filter out usable sub-storage spaces in the early stages of data recovery, reducing the complexity and time required for data recovery.
[0123] As an optional approach, after writing the first metadata carrying the first cycle identifier to the first sub-storage space, the method further includes:
[0124] S1, when a second write cycle adjacent to the first write cycle is reached, a second cycle identifier matching the second write cycle is generated.
[0125] S2, determine the second metadata and the second bitmap state stored in the cache space of the storage system before the second write cycle.
[0126] S3 writes the second bitmap state carrying the second cycle identifier into the second sub-storage space in the target storage space.
[0127] S4, write the second metadata carrying the second cycle identifier to the second sub-storage space.
[0128] Optionally, the aforementioned second write cycle is used to represent the next data write cycle immediately following the first write cycle, which is the next point in time in the data management process.
[0129] It should be noted that the aforementioned second cycle identifier is a unique identifier associated with the second write cycle, used to mark all data written within that cycle, including metadata and bitmap state.
[0130] Furthermore, the aforementioned second metadata is data stored in the cache during the second write cycle. It contains the mapping information from the virtual address to the physical address of the newly written data and is a core part of data management.
[0131] Optionally, the second bitmap state mentioned above is used to represent the bitmap information stored in the cache during the second write cycle, which reflects the usage of physical blocks, such as which blocks are occupied and which blocks are idle.
[0132] It should be noted that the generation of the second cycle identifier that matches the second write cycle can be achieved, but is not limited to, through an internal system counter or timestamp generation mechanism, to ensure that each write cycle has a unique identifier.
[0133] Furthermore, the second metadata and second bitmap state that are stored in the cache space of the storage system before the second write cycle can be used, but are not limited to, to instruct the system to check all metadata and bitmap states to be written in the cache before starting the second write cycle to determine which ones belong to the second cycle.
[0134] Optionally, writing the second bitmap state carrying the second period identifier into the second sub-storage space in the target storage space indicates that the second bitmap state and the second period identifier are written together into a new sub-storage space in the target storage space to maintain data persistence and consistency.
[0135] It should be noted that writing the second metadata carrying the second period identifier to the second sub-storage space can be used, but is not limited to, to indicate that the system will persistently store the second metadata of the second period and the second bitmap state together with the second period identifier, which provides key information for subsequent data recovery.
[0136] In this embodiment, when a second write cycle adjacent to the first write cycle is reached, a second cycle identifier matching the second write cycle is generated; the second metadata and the second bitmap state stored in the cache space of the storage system before the second write cycle are determined; the second bitmap state carrying the second cycle identifier is written to the second sub-storage space in the target storage space; and the second metadata carrying the second cycle identifier is written to the second sub-storage space. By generating a new cycle identifier between adjacent write cycles using this embodiment, the system can continuously record and update the state of management data, avoiding data loss and version control issues, and improving data continuity and durability.
[0137] As an optional approach, generating a second cycle identifier that matches the second write cycle includes:
[0138] Get the first cycle identifier of the first write cycle.
[0139] The target value is added to the first cycle identifier to obtain the second cycle identifier.
[0140] In this embodiment, a first cycle identifier for the first write cycle is obtained; a target value is added to the first cycle identifier to obtain a second cycle identifier. By directly adding the identifier of the previous cycle, the system can quickly generate the identifier for the current cycle. This method is easy to implement and also ensures the continuity and uniqueness of the cycle identifier.
[0141] As an optional approach, after writing the first metadata carrying the first cycle identifier to the first sub-storage space, the method further includes: marking the cursor position of the sub-storage space associated with the target storage space as the position of the next sub-storage space corresponding to the first sub-storage space.
[0142] Before writing the second bitmap state carrying the second cycle identifier into the second sub-memory space in the target memory space, the method further includes: determining the location of the second sub-memory space based on the cursor position.
[0143] Optionally, the aforementioned sub-storage space cursor position is used to represent a pointer or marker in the target storage space for tracking the next write position, which helps the system determine which sub-storage space to write data to.
[0144] Optionally, as an alternative example, the above content can be illustrated by, but is not limited to, the following examples:
[0145] Assume an all-flash storage system has three sub-storage spaces, numbered A, B, and C, which are used cyclically to store bitmap state and metadata. After completing the write of the first cycle of data (identified as CID1), the system needs to:
[0146] Update cursor: The system updates the position of the sub-storage space cursor. Assuming it starts from A, after writing CID1 data, the cursor is marked to point to B, which means that B is the target sub-storage space for the next write cycle.
[0147] Writing CID1 data: The first graph state and the first metadata have been written to sub-storage space A, and the cursor then points to B, indicating that B is the target area for CID2 data.
[0148] CID2 data preparation phase: When the system enters the second write cycle and is ready to write CID2 data, it first determines the location of the second sub-storage space, namely sub-storage space B, based on the cursor position.
[0149] Write CID2 data: Subsequently, the system writes the second bitmap state and second metadata, along with the CID2 identifier, into sub-storage space B, completing the data write operation of the second cycle.
[0150] Cursor updated to C: After writing CID2 data to disk, the cursor position is updated to point to sub-storage space C, preparing to write CID3 data to disk.
[0151] In this embodiment, before writing the second bitmap state carrying the second cycle identifier into the second sub-storage space of the target storage space, the method further includes: determining the location of the second sub-storage space based on the cursor position. By using this embodiment, the system can determine the next location to write to the target sub-storage space through cursor recording, realizing the cyclical use of the write disk area, avoiding overuse of specific sub-storage spaces, simplifying the selection process of the target sub-storage space, and improving the efficiency of data recovery.
[0152] As an optional approach, obtaining recovery instructions for instructing the recovery of management data in the memory of the storage system includes:
[0153] In the event of a storage system failure, obtain recovery instructions to instruct the restoration of management data in the storage system's cache space.
[0154] It should be noted that the above-mentioned fault states include any state in the storage system that causes abnormal data processing or system malfunction, such as power failure, controller failure, data inconsistency, etc., and this embodiment does not limit these states.
[0155] In this embodiment, when the storage system is in a faulty state, a recovery instruction is obtained to instruct the recovery of management data in the storage system's cache space. By employing this embodiment, when a storage system failure occurs, the system can accurately detect and generate a recovery instruction pointing to the management data in the cache space that needs to be recovered. This ensures that data recovery operations can be initiated promptly, reducing business interruption time after a failure and improving the overall availability of the system.
[0156] As an alternative, the data recovery methods mentioned above also include:
[0157] Before writing the first graph state and first metadata to the target storage space, the first graph state is compressed and encoded.
[0158] When repairing the state of the first image, the state is decoded to restore its original form.
[0159] Optionally, the above compression encoding is used to represent techniques for reducing storage space requirements applied to the first bitmap state before it is written to the target storage space. It can be any standard compression algorithm, depending on the nature of the bitmap state and the data compression requirements.
[0160] It should be noted that the above decoding process includes reading the compressed first-bit image state and restoring it to its original form during data repair. The decoding algorithm must be compatible with the previously used compression encoding algorithm to ensure data integrity and readability.
[0161] Alternatively, as a specific implementation method, the following examples can be used for explanation and illustration, but are not limited to:
[0162] Imagine that the bitmap state in an all-flash storage system is extremely large under normal conditions, especially as the storage system scales up. To reduce storage space usage, the system can:
[0163] Bitmap state compression: Before the first bitmap state is written to the sub-storage space of the target storage space, an efficient compression algorithm is used to compress it, generating a compressed bitmap state. This not only reduces storage space requirements but also accelerates the writing process and improves the write performance of the storage system.
[0164] Post-compression storage: The compressed first-order graph state, along with the first metadata and the first cycle identifier, is written into the sub-storage space of the target storage space, and the status flag area is updated to indicate that the data in the sub-storage space has been compressed.
[0165] Recovery and Decompression: When the system needs to perform data repair and reads the first-bit image state, it will recognize that the state has been compressed. The system will use the corresponding decoding algorithm to decode the read first-bit image state, restore its original form, and then perform the data repair operation. This ensures the accuracy of the repair process and the consistency of the data.
[0166] By employing the embodiments of this application, the all-flash storage system can effectively reduce storage space usage, especially when the bitmap state is large. This not only reduces the demand for storage resources but also accelerates data writing and reading speeds, improving the overall performance of the storage system. During data repair, by decoding the compressed bitmap state, repair efficiency and storage efficiency can be improved without sacrificing data integrity and accuracy, demonstrating significant technical effects and improvements.
[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0168] Embodiments of this application also provide a data recovery apparatus, such as... Figure 5 As shown, the data recovery device includes:
[0169] The acquisition unit 502 is used to acquire a recovery instruction for instructing the recovery of management data of the storage system. The management data includes metadata and bitmap status. The metadata is used to characterize the mapping relationship between the virtual address and physical address of the data in the storage system. The bitmap status is used to characterize the occupancy status of physical blocks in the target storage space. The target storage space is used to store data in the storage system.
[0170] The first determining unit 504 is used to identify the status flag area corresponding to each sub-storage space in the target storage space, and to determine the sub-storage space containing flag data in the status flag area as a candidate sub-storage space. Each sub-storage space stores metadata and bitmap status written at different write cycles, and the flag data is used to indicate that the data stored in the sub-storage space is in an intact state.
[0171] The second determining unit 506 is used to identify the period identifier corresponding to each candidate sub-storage space, and to determine the sub-storage space whose period identifier meets the predetermined conditions as the target sub-storage space, wherein the period identifier is used to characterize the writing cycle of the data stored in the sub-storage space.
[0172] Recovery unit 508 is used to recover management data using reference metadata and reference bitmap status stored in the target sub-storage space.
[0173] Optionally, in this embodiment, the second determining unit includes: a sorting module, used to sort each candidate sub-storage space according to the period identifier; and a determining module, used to determine the candidate sub-storage space whose sorting order is the target order as the target sub-storage space.
[0174] Optionally, in this embodiment, the recovery unit includes: a data adjustment module, used to adjust the metadata in the management data using reference metadata, and to adjust the bitmap state in the management data using reference bitmap state; and a first determination module, used to determine that the recovery of the management data is complete when the metadata in the management data matches the reference metadata and the bitmap state in the management data matches the reference bitmap state.
[0175] Optionally, in this embodiment, the first determining unit includes: a second determining module, used to determine each sub-storage space as the current sub-storage space; an identification module, used to identify the current status flag area in the current sub-storage space; a third determining module, used to determine that the data stored in the current sub-storage space is incomplete when the current status flag area is empty; and a fourth determining module, used to determine that the current sub-storage space is in complete state when the current status flag area stores current flag data that conforms to the target format.
[0176] Optionally, in this embodiment, the above-mentioned apparatus further includes: a generation unit, configured to generate a first cycle identifier matching the first write cycle when the first write cycle is reached; a third determination unit, configured to determine the first metadata and the first bit graph state stored in the cache space of the storage system before the first write cycle; a writing unit, configured to write the first bit graph state carrying the first cycle identifier into the first sub-storage space in the target storage space; and a first writing unit, configured to write the first metadata carrying the first cycle identifier into the first sub-storage space.
[0177] Optionally, in this embodiment, the generation unit includes: an acquisition module, used to acquire a historical cycle identifier corresponding to a historical write cycle preceding and adjacent to the first write cycle; and a calculation module, used to accumulate a target value by adding the historical cycle identifier to obtain a first cycle identifier.
[0178] Optionally, in this embodiment, the above-mentioned device further includes: a data clearing unit, configured to clear the first data from the first physical block when a request for the reclamation of the first data stored in the first physical block is obtained, wherein the target storage space includes the first physical block; and an adding unit, configured to add the identification information of the first physical block to the first linked list.
[0179] Optionally, in this embodiment, the above-mentioned device further includes: a removal unit, configured to remove the identification information of the first physical block from the first linked list when the target write cycle is reached, wherein the cycle interval between the target write cycle and the first write cycle is the target interval; and an update unit, configured to update the bit corresponding to the bitmap state currently stored in the cache space of the first physical block to a first value, wherein the first value is used to indicate that the first physical block is currently not occupied.
[0180] Optionally, in this embodiment, the above-mentioned device further includes: a first data clearing unit, used to clear all data stored in the first status flag area corresponding to the first sub-storage space.
[0181] Optionally, in this embodiment, the above-mentioned device further includes: a second writing unit, used to write first flag data conforming to the target format to the first status flag area, wherein the first flag data is used to indicate that the data stored in the first sub-storage space is in an intact state.
[0182] Optionally, in this embodiment, the above-mentioned apparatus further includes: a first generation unit, configured to generate a second cycle identifier matching the second write cycle when a second write cycle adjacent to the first write cycle is reached; a fourth determination unit, configured to determine the second metadata and the second bitmap state stored in the cache space of the storage system before the second write cycle; a third writing unit, configured to write the second bitmap state carrying the second cycle identifier into the second sub-storage space in the target storage space; and a fourth writing unit, configured to write the second metadata carrying the second cycle identifier into the second sub-storage space.
[0183] Optionally, in this embodiment, the first generation unit includes: a first acquisition module, used to acquire a first cycle identifier of the first writing cycle; and a first calculation module, used to accumulate a target value on the first cycle identifier to obtain a second cycle identifier.
[0184] Optionally, in this embodiment, the above-mentioned device further includes: a marking unit, used to mark the cursor position of the sub-storage space associated with the target storage space as the position of the next sub-storage space corresponding to the first sub-storage space; and a fifth determining unit, used to determine the position of the second sub-storage space based on the cursor position.
[0185] Optionally, in this embodiment, the acquisition unit is further configured to: acquire a recovery instruction for instructing the recovery of management data in the cache space of the storage system when the storage system is in a fault state.
[0186] The description of the features in the embodiments corresponding to the above data recovery device can be found in the relevant descriptions of the embodiments corresponding to the data recovery method, and will not be repeated here.
[0187] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described data recovery method embodiments.
[0188] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described data recovery method embodiments when it is run.
[0189] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0190] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data recovery method embodiments.
[0191] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described data recovery method embodiments.
[0192] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0193] The data recovery method provided in this application has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A data recovery method, characterized in that, include: Obtain a recovery instruction for instructing the recovery of management data of the storage system, wherein the management data includes metadata and bitmap status, the metadata being used to characterize the mapping relationship between virtual addresses and physical addresses of data in the storage system, and the bitmap status being used to characterize the occupancy status of physical blocks in the target storage space, the target storage space being used to store data in the storage system; Identify the status flag area corresponding to each sub-storage space in the target storage space, and determine the sub-storage space containing flag data in the status flag area as candidate sub-storage space. Each of the sub-storage spaces stores metadata and bitmap status written at different write cycles. The flag data is used to indicate that the data stored in the sub-storage space is in an intact state. Identify the period identifier corresponding to each candidate sub-storage space, and sort each candidate sub-storage space according to the period identifier, wherein the period identifier is used to characterize the write cycle of the data stored in the sub-storage space; determine the candidate sub-storage space whose sorting order is the target order as the target sub-storage space; The metadata in the management data is adjusted using the reference metadata stored in the target sub-storage space, and the bitmap state in the management data is adjusted using the reference bitmap state stored in the target sub-storage space; when the metadata in the management data matches the reference metadata, and the bitmap state in the management data matches the reference bitmap state, the recovery of the management data is determined to be complete.
2. The data recovery method according to claim 1, characterized in that, The status flag area corresponding to each sub-storage space in the target storage space includes: Each of the aforementioned sub-storage spaces is designated as the current sub-storage space; Identify the current state flag area in the current sub-storage space; If the current status flag area is empty, it is determined that the data stored in the current sub-storage space is in an incomplete state; If the current flag data conforming to the target format is stored in the current state flag area, the current sub-storage space is determined to be in the complete state.
3. The data recovery method according to claim 1, characterized in that, Before obtaining the recovery instruction for instructing the recovery of management data in the memory of the storage system, the method further includes: When the first write cycle is reached, obtain the historical cycle identifier corresponding to the historical write cycle that is prior to the first write cycle and adjacent to the first write cycle. The target value is added to the historical period identifier to obtain the first period identifier; Determine the first metadata and the first bit graph state stored in the cache space of the storage system prior to the first write cycle; Write the state of the first bitmap carrying the first period identifier into the first sub-storage space in the target storage space; Write the first metadata carrying the first period identifier to the first sub-storage space.
4. The data recovery method according to claim 3, characterized in that, Before writing the first bitmap state carrying the first period identifier into the first sub-storage space in the target storage space, the method further includes: Upon receiving a request to reclaim first data stored in a first physical block, the first data is removed from the first physical block, wherein the target storage space includes the first physical block; Add the identifier information of the first physical block to the first linked list.
5. The data recovery method according to claim 4, characterized in that, After adding the identifier information of the first physical block to the first linked list, the method further includes: When the target write cycle is reached, the identification information of the first physical block is removed from the first linked list, wherein the cycle interval between the target write cycle and the first write cycle is the target interval; The bit corresponding to the current bitmap state of the first physical block in the cache space is updated to a first value, wherein the first value is used to indicate that the first physical block is currently not occupied.
6. The data recovery method according to claim 5, characterized in that, Before writing the first bitmap state carrying the first period identifier into the first sub-storage space in the target storage space, the method further includes: clearing all data stored in the first state flag area corresponding to the first sub-storage space. After writing the first metadata carrying the first cycle identifier to the first sub-storage space, the method further includes: generating a second cycle identifier matching the second write cycle when a second write cycle adjacent to the first write cycle is reached; determining the second metadata and the second bitmap state stored in the cache space of the storage system before the second write cycle; writing the second bitmap state carrying the second cycle identifier to the second sub-storage space in the target storage space; and writing the second metadata carrying the second cycle identifier to the second sub-storage space.
7. The data recovery method according to claim 6, characterized in that, After writing the first metadata carrying the first period identifier to the first sub-storage space, the method further includes: First flag data conforming to the target format is written to the first status flag area, wherein the first flag data is used to indicate that the data stored in the first sub-storage space is in an intact state.
8. The data recovery method according to any one of claims 1 to 7, characterized in that, The step of acquiring a recovery instruction for instructing the recovery of management data in the memory of the storage system includes: In the event of a failure in the storage system, a recovery instruction is obtained to instruct the recovery of the management data in the storage system's cache space.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the data recovery method as claimed in any one of claims 1 to 8 when executing the computer program.
Citation Information
Patent Citations
Metadata management method, storage system and related computer equipment
CN118885339A
Metadata storage method and device
CN119718216A