WO2024113687A1 - Data recovery method and related apparatus - Google Patents

Data recovery method and related apparatus Download PDF

Info

Publication number
WO2024113687A1
WO2024113687A1 PCT/CN2023/093965 CN2023093965W WO2024113687A1 WO 2024113687 A1 WO2024113687 A1 WO 2024113687A1 CN 2023093965 W CN2023093965 W CN 2023093965W WO 2024113687 A1 WO2024113687 A1 WO 2024113687A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
stripe
check
data recovery
flushing
Prior art date
Application number
PCT/CN2023/093965
Other languages
French (fr)
Chinese (zh)
Inventor
李飞龙
许永良
孙明刚
Original Assignee
苏州元脑智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州元脑智能科技有限公司 filed Critical 苏州元脑智能科技有限公司
Publication of WO2024113687A1 publication Critical patent/WO2024113687A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1064Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in cache or content addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/16Protection against loss of memory contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

Definitions

  • the present application relates to the field of storage technology, and in particular to a data recovery method; and also to a data recovery device, equipment and a non-volatile readable storage medium.
  • RAID Redundant Array of Independent Disks
  • Soft RAID storage technology uses software to manage stripes and blocks in RAID arrays.
  • Hard RAID storage technology i.e. RAID card
  • RAID storage technology when an unexpected power failure occurs, write data loss failure is prone to occur.
  • a log-based access file system is currently used in RAID cards to solve the write data loss during unexpected power failure.
  • the purpose of the present application is to provide a data recovery method that can accelerate data recovery and improve the data writing performance of the RAID card.
  • Another purpose of the present application is to provide a data recovery device, equipment and non-volatile readable storage medium, all of which have the above technical effects.
  • the present application provides a data recovery method, comprising:
  • the cache node Scan the cache node, and determine the stripe whose data has not been flushed when the power is unexpectedly lost according to the data flushing information recorded by the cache node; the cache node is located in the non-volatile random access memory;
  • Reading data recovery information from a check element of a check data table is located in a non-volatile random access memory
  • the stripes for which data flushing is not completed when the power is unexpectedly lost include:
  • the stripes for which data flushing is not completed when power is lost unexpectedly are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
  • determining the stripes for which data flushing is not completed when power is lost unexpectedly includes:
  • the value of the bit corresponding to the stripe is the first value, it is determined that the stripe has not completed data flushing when the power is unexpectedly lost;
  • the value of the bit corresponding to the stripe is the second value, it is determined that the stripe has completed data flushing when the power is unexpectedly lost.
  • one bit in the bitmap metadata corresponds to one stripe.
  • the method further includes:
  • the stripes for which data flushing was not completed during the unexpected power failure are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
  • judging whether there is a stripe for which data flushing is not completed when power is off unexpectedly according to the value assigned to the control field includes:
  • control field is assigned a value of true, there are no stripes whose data is not flushed when power is lost unexpectedly;
  • control field is assigned a value of false, there are stripes that did not complete the data flushing when the power was unexpectedly lost.
  • the information to be refreshed when recording data in the cache node includes:
  • bit position corresponding to the stripe in the bitmap metadata associated with the control field in the cache node is set to the first value
  • bit position corresponding to the stripe in the bitmap metadata is set to the second value.
  • the information refreshed when the cache node records the data also includes:
  • control field is set to true
  • control field is assigned a value of false.
  • the cache node also includes a front pointer field and a back pointer field; the front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request.
  • the calculation result of the check block of the stripe is recorded in the check element.
  • the calculation result of the check block of the stripe recorded in the check element includes:
  • the corresponding bit position in the stripe field in the check element is set to a first preset value
  • the corresponding bit position in the stripe field is set to the second preset value.
  • one bit in the stripe field corresponds to one stripe.
  • the calculation result of the check block of the stripe recorded in the check element also includes:
  • check field in the check element is set to true
  • the check field is assigned a value of false.
  • a data recovery device comprising:
  • a determination module is used to scan cache nodes and determine the stripes for which data flushing has not been completed when power is unexpectedly lost according to the data flushing information recorded by the cache nodes; the cache nodes are located in a non-volatile random access memory;
  • a reading module used for reading data recovery information from a check element of a check data table; the check data table is located in a non-volatile random access memory;
  • the recovery module is used to recover the data of the stripe for which the data is not flushed according to the data recovery information.
  • the present application also provides a data recovery device, including:
  • a processor is used to implement the steps of any of the above data recovery methods when executing a computer program.
  • the present application also provides a non-volatile readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above data recovery methods are implemented. Steps.
  • the data recovery method provided in the present application includes: scanning cache nodes, and determining stripes for which data flushing has not been completed during an unexpected power outage based on data flushing information recorded by the cache nodes; the cache nodes are located in a non-volatile random access memory; reading data recovery information from a check element of a check data table; the check data table is located in a non-volatile random access memory; and recovering data of the stripes for which data flushing has not been completed based on the data recovery information.
  • the data recovery method maintains cache nodes and verification data tables in a non-volatile random access memory, records the data flush information of the stripe through the cache nodes during the data writing process, and records the data recovery information through the verification elements in the verification data table. After recovering from an unexpected power failure, the information recorded in the non-volatile random access memory can be read to complete the data recovery.
  • the file system does not need to be accessed during the entire data writing process, and the file system does not need to be accessed during data recovery, thereby accelerating the recovery of data lost in the RAID card due to an unexpected power failure and improving the RAID card data writing performance.
  • the data recovery device, equipment and non-volatile readable storage medium provided in this application all have the above-mentioned technical effects.
  • FIG1 is a schematic diagram of a flow chart of a data recovery method provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of a RAID card according to an embodiment of the present application.
  • FIG3 is a schematic diagram of a cache node provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of a verification data table provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a host I/O partitioning by stripes provided by an embodiment of the present application.
  • FIG6 is a schematic diagram of a specific data recovery solution provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a data recovery device provided in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a data recovery device provided in an embodiment of the present application.
  • the core of this application is to provide a data recovery method that can accelerate data recovery and improve the RAID card data writing performance.
  • Another core of this application is to provide a data recovery device, equipment and non-volatile readable storage medium, all of which have the above Describe the technical effects.
  • FIG. 1 is a flow chart of a data recovery method provided by an embodiment of the present application. Referring to FIG. 1 , the method includes:
  • S101 Scan cache nodes, and determine the stripes for which data flushing has not been completed when power is unexpectedly lost according to data flushing information recorded in the cache nodes; the cache nodes are located in a non-volatile random access memory;
  • this embodiment maintains a check data table and multiple cache nodes in the NVRAM (Non-Volatile Random Access Memory) of the RAID card.
  • the check data table includes multiple check elements.
  • the cache node is a structure used to identify a host I/O write request. One cache node identifies a host I/O write request.
  • the cache node is used to record data flush information.
  • the check data table manages the check elements in a one-dimensional linear table metadata organization method.
  • the check elements in the check data table can be used to record data recovery information.
  • the data recovery information includes the timestamp of the host I/O write request and other key information.
  • this embodiment stores the timestamp of the host I/O request and other key information in the check elements in the NVRAM.
  • the specific content of the key information is not described in detail in this embodiment, and the content of the key information recorded in the file log in the traditional solution can be referred to.
  • the improvement of this embodiment lies in the storage location of the timestamp and key information, rather than the specific content of the key information.
  • the host system in Figure 2 can be a workstation, a personal computer, a mobile phone, a laptop computer, a server, etc. Multiple host systems share storage resources in the storage system through a network, and the network can be a wide area network (WAN) connection, a storage area network (SAN), a local area network (LAN) connection, and a wireless WIFI connection.
  • the network can include one or more wirelessly connected networks, and storage systems composed of multiple RAID cards can be connected to form a large storage environment through Fibre Channel over Ethernet (FCoE), Fibre Channel, iSCSI, etc.
  • FCoE Fibre Channel over Ethernet
  • FCoE Fibre Channel over Ethernet
  • iSCSI iSCSI
  • the firmware layer in the RAID card includes drivers, RAID card kernel, and file system.
  • the driver in the firmware layer of the RAID card is used to parse commands issued by the host system, such as parsing write data commands and other commands in the host I/O request.
  • the file system is the file system in the solution mentioned above that the RAID card uses a log-based direct access file system to solve the problem of write data loss during unexpected power failure.
  • the system monitor monitoring system monitors various abnormal events in the RAID card.
  • the RAID card controller includes cache, NVRAM, I/O processor, hard disk controller, and hard disk connector.
  • the RAID card scans the cache nodes and determines the stripes for which data flushing was not completed at the time of the unexpected power failure based on the data flushing information recorded by the cache nodes.
  • determining, according to the data flushing information recorded by the cache node, the stripes for which data flushing has not been completed during the unexpected power failure includes:
  • the stripes for which data flushing is not completed when power is lost unexpectedly are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
  • control field shown in FIG3 is a control field, and the control field can be of bool type.
  • the control field is associated with bitmap metadata, and bitmap metadata is a data structure for managing stripes.
  • the value of the bit in the bitmap metadata reflects the data flushing status of the stripe.
  • determining the stripe for which data flushing is not completed when power is unexpectedly lost according to the bit in the bitmap metadata associated with the control field in the cache node may include:
  • the value of the bit corresponding to the stripe is the first value, it is determined that the stripe has not completed data flushing when the power is unexpectedly lost;
  • the value of the bit corresponding to the stripe is the second value, it is determined that the stripe has completed data flushing when the power is unexpectedly lost.
  • One bit in the bitmap metadata corresponds to one slice.
  • each bit of the bitmap metadata corresponds to a stripe.
  • the value of each bit reflects the flushing status of the data blocks and check blocks of the corresponding stripe. If the data blocks and check blocks of the stripe have been flushed to the disk, the value of the bit corresponding to this stripe in the bitmap metadata is the first value. If the data blocks and check blocks of the stripe are not all flushed to the disk, the value of the bit corresponding to this stripe in the bitmap metadata is the second value. The first value is different from the second value. By identifying the value of the bit, it can be determined whether the corresponding stripe has not completed the data flushing when an unexpected power failure occurs.
  • Data blocks refer to the disk partition that stores valid data sent by the host. The check block is obtained by the XOR operation of the data blocks in the stripe.
  • the first value may be 1, and the second value may be 0. If the data blocks and check blocks of the stripe have all been flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata is 1. If the data blocks and check blocks of the stripe have not all been flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata is 0.
  • determining the stripe for which data flushing is not completed when power is lost unexpectedly also includes:
  • the stripes for which data flushing is not completed during the unexpected power failure are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
  • This embodiment reflects the data flushing status of all stripes by assigning a value to the control field. Before flushing data to a stripe, first determine whether there is a stripe for which data flushing has not been completed based on the value assigned to the control field. On the basis of determining that there is a stripe for which data flushing has not been completed, optionally determine the specific stripe for which data flushing has not been completed based on the bit position of the bitmap metadata. If it is determined that there is no stripe for which data flushing has not been completed, there is no need to optionally determine the specific stripe for which data flushing has not been completed based on the bit position of the bitmap metadata.
  • judging whether there is a stripe for which data is not flushed when power is unexpectedly lost may include:
  • control field is assigned a value of true, there are no stripes whose data is not flushed when power is lost unexpectedly;
  • control field is assigned a value of false, there are stripes that did not complete the data flushing when the power was unexpectedly lost.
  • control field is assigned a value of true. If at least one stripe's data blocks and check blocks have not been fully flushed to disk, the control field is assigned a value of false.
  • data recovery information may be stored in a data field of a check element.
  • the data field shown in Figure 4 is a data field.
  • the RAID card After determining the specific stripe where the data has not been flushed, the RAID card starts the data recovery process in combination with the read data recovery information to recover the data of the stripe where the data has not been flushed.
  • the specific implementation process of the data recovery process is not described in detail in this application, and the description of the data recovery process in the traditional technical solution can be referred to.
  • it further includes:
  • the driver of the RAID card After receiving the host I/O write request sent by the host, the driver of the RAID card parses the host I/O write request and applies for the check element corresponding to this host I/O write request and the corresponding cache node from the check data table.
  • refreshing information by recording data in the cache node may include:
  • bit position corresponding to the stripe in the bitmap metadata associated with the control field in the cache node is set to the first value
  • bit position corresponding to the stripe in the bitmap metadata is set to the second value.
  • bit position corresponding to the stripe in the bitmap metadata is set to 1. If the data blocks and check blocks of the stripe have not all been flushed to disk, the bit position corresponding to the stripe in the bitmap metadata is set to 0.
  • the information for flushing the data recorded in the cache node may also include:
  • control field is set to true
  • control field is assigned a value of false.
  • the control field is assigned a value of true. If the bits corresponding to each stripe in the bitmap metadata are not all 1, the control field is kept false.
  • the cache node also includes a front pointer field and a back pointer field; the front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request.
  • This embodiment adopts a bidirectional linked list metadata organization method to manage cache nodes.
  • the pre_pointer field shown in Figure 3 is the front pointer field
  • the next_pointer field shown in Figure 3 is the back pointer field.
  • the front pointer field points to the cache node applied for the previous host I/O write request
  • the back pointer field points to the cache node applied for the next host I/O write request.
  • the cache nodes corresponding to multiple host I/O write requests can be connected together through the front pointer field and the back pointer field in the cache node.
  • it further includes:
  • the cache_ptr in Figure 3 is the cache field.
  • the data blocks of each stripe are written into the cache_ptr field in the cache node, pointing to a specific area in the cache.
  • it further includes:
  • the calculation result of the check block of the stripe is recorded in the check element.
  • the calculation result of the check block reflects whether the check block of the stripe has been obtained by performing an XOR operation on the data blocks of the stripe.
  • the calculation result of the check block of the stripe recorded in the check element may include:
  • the corresponding bit position in the stripe field in the check element is set to a first preset value
  • the corresponding bit position in the stripe field is set to the second preset value.
  • One bit in the stripe field corresponds to one stripe.
  • the stripe field is the stripe[32] field shown in FIG4 .
  • the stripe[32] field can be an array of int type.
  • An int type data contains 8 bits, and one bit corresponds to one stripe. If the check block has been calculated for the stripe, the corresponding bit is set to the first preset value. If the check block has not been calculated for the stripe, the corresponding bit is set to the second preset value. The first preset value is different from the second preset value.
  • the first preset value is 1, and the second preset value is 0. If the stripe has calculated the check block, the corresponding bit is set to 1. If the stripe has not calculated the check block, the corresponding bit is kept to 0.
  • recording the calculation result of the check block of the stripe in the check element may further include:
  • check field in the check element is set to true
  • the check field is assigned a value of false.
  • the check field is the parity_ok field shown in Figure 4.
  • the parity_ok field can be of bool type. When all the check blocks are calculated for the stripes after the write data is split, the parity_ok field is assigned to true. When all the check blocks are not calculated for the stripes after the write data is split, the check field remains false.
  • the host I/O write request can be divided into each stripe as shown in Figure 5.
  • the data blocks of stripe stripe1 are strip5, strip6, strip7 and strip8, and the check block is parity2.
  • it further includes:
  • the host sends a write data request to the RAID card, and the driver of the RAID card receives and parses the write data request sent by the host.
  • the main control thread of the RAID card controller divides the write data into stripes.
  • the parity blocks of each stripe after the division have not yet been calculated. Therefore, the bits of the stripe[32] field in the parity element corresponding to each stripe are set to 0, and the parity_ok field in the parity element is assigned to false.
  • the RAID card sends a data write completion signal to the host (i.e., responds to the host immediately).
  • the worker thread in the thread pool uses the data blocks of the stripe temporarily stored in the cache to perform an XOR operation to obtain the check block of the stripe, and then writes the check block to the cache. Since the check block of the stripe has been calculated, the bits of the stripe[32] field in the check element corresponding to each stripe are set to 1, and the parity_ok field in the check element is assigned to true. Since the data blocks and check blocks of the stripe have not been flushed to the physical disk at this time, all bits in the bitmap metadata associated with the control field in the requested cache node are set to 0, and the control field is assigned to false.
  • the worker thread in the thread pool flushes the data blocks and check blocks temporarily stored in the cache to the physical disk. Since the data blocks and check blocks have been flushed to the physical disk, the bitmap metadata associated with the control field in the cache node is flushed to the physical disk. Set all bits in the register to 1 and assign the control field to true.
  • the RAID card controller scans the cache nodes managed by the bidirectional linked list metadata organization method. If it is found that a bit in the bitmap metadata associated with the control field in a cache node is 0, it indicates that the data blocks and check blocks of the stripe temporarily stored in the cache have not been completely flushed to the disk. The data that has not been flushed to the physical disk is the specific data lost due to the unexpected power failure.
  • the data recovery method maintains cache nodes and verification data tables in a non-volatile random access memory, records the data flush information of the stripe through the cache nodes during the data writing process, and records the data recovery information through the verification elements in the verification data table. After recovering from an unexpected power outage, the information recorded in the non-volatile random access memory can be read to complete the data recovery.
  • the file system does not need to be accessed during the entire data writing process, and the file system does not need to be accessed during data recovery, thereby accelerating the recovery of data lost in the RAID card due to an unexpected power outage and improving the RAID card data writing performance.
  • the present application also provides a data recovery device, and the device described below can be referred to in correspondence with the method described above.
  • Figure 7 is a schematic diagram of a data recovery device provided in an embodiment of the present application. As shown in Figure 7, the device includes:
  • the determination module 10 is used to scan the cache nodes and determine the stripes whose data flushing is not completed when the power is unexpectedly lost according to the data flushing information recorded by the cache nodes; the cache nodes are located in the non-volatile random access memory;
  • the recovery module 30 is used to recover the data of the stripe for which data flushing has not been completed according to the data recovery information.
  • the determination module 10 is specifically used to:
  • the stripes for which data flushing is not completed when power is lost unexpectedly are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
  • the determination module 10 includes:
  • a first determining unit configured to determine that the stripe has not completed data flushing when power is unexpectedly lost if the value of the bit corresponding to the stripe is a first value
  • the second determining unit is configured to determine that the strip has completed data flushing when power is unexpectedly lost if the value of the bit corresponding to the strip is a second value.
  • one bit in the bitmap metadata corresponds to one stripe.
  • a first judgment module is used to judge whether there is a stripe for which data is not flushed when power is off unexpectedly according to the value assigned to the control field;
  • the determination module determines the stripe for which data flushing is not completed when power is lost unexpectedly according to the bit in the bitmap metadata associated with the control field in the cache node.
  • the first judgment module includes:
  • a first determining unit configured to determine that if the control field is set to true, there is no stripe for which data is not flushed when power is unexpectedly lost;
  • the second determining unit is used to determine that if the value assigned to the control field is false, there is a stripe whose data is not flushed when the power is unexpectedly lost.
  • the first recording module is used to apply for a cache node and refresh information when the cache node records data.
  • the second recording module is used to apply for a verification element and record data recovery information in the verification element.
  • the second recording module includes:
  • a first setting unit configured to set a bit position corresponding to the stripe in the bitmap metadata associated with the control field in the cache node to a first value if all the data blocks and the check blocks of the stripe have been flushed to the disk;
  • the second setting unit is used to set the bit position corresponding to the stripe in the bitmap metadata to a second value if the data blocks and the check blocks of the stripe are not all flushed to the disk.
  • the first assignment module is used to assign a control field to be true if the data blocks and the check blocks of each stripe have been flushed to the disk;
  • the second assignment module is used to assign a value of false to the control field if all data blocks and check blocks of at least one stripe are not flushed to the disk.
  • the cache node also includes a front pointer field and a back pointer field; the front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request.
  • the third recording module is used to record the calculation result of the check block of the stripe in the check element.
  • the third recording module includes:
  • a first recording unit configured to set a corresponding bit position in a stripe field in a check element to a first preset value if a check block of the stripe has been calculated
  • the second recording unit is used to set the corresponding bit position in the stripe field to a first preset value if the check block of the stripe is not calculated.
  • one bit in the stripe field corresponds to one stripe.
  • a third assignment module is used to assign a value of true to a check field in a check element if the check blocks of all stripes have been calculated;
  • the fourth assignment module is used to assign the check field to false if the check blocks of all the stripes are not calculated.
  • the write module is used to write the stripe data blocks into the cache field of the cache node.
  • the second judgment module is used to judge whether the data recovery is successful
  • the release module is used to release the cache node and the check element if the data recovery is successful.
  • the data recovery device maintains cache nodes and a verification data table in a non-volatile random access memory, records the data flush information of the stripe through the cache node during the data writing process, and records the data recovery information through the verification elements in the verification data table. After recovering from an unexpected power failure, the information recorded in the non-volatile random access memory can be read to complete the data recovery.
  • the file system does not need to be accessed during the entire data writing process, and the file system does not need to be accessed during data recovery, thereby accelerating the recovery of data lost in the RAID card due to an unexpected power failure and improving the RAID card data writing performance.
  • the present application also provides a data recovery device, as shown in FIG8 , the device includes a memory 1 and a processor 2 .
  • Memory 1 used for storing computer programs
  • Processor 2 is used to execute the computer program to implement the following steps:
  • Scan cache nodes and determine the stripes for which data flushing has not been completed during unexpected power failure based on data flushing information recorded in the cache nodes; the cache nodes are located in a non-volatile random access memory; read data recovery information from a check element of a check data table; the check data table is located in the non-volatile random access memory; and recover data of the stripes for which data flushing has not been completed based on the data recovery information.
  • the present application also provides a non-volatile readable storage medium, on which a computer program is stored.
  • a computer program is stored on a non-volatile readable storage medium, on which a computer program is stored.
  • Scan cache nodes and determine the stripes for which data flushing has not been completed during unexpected power failure based on data flushing information recorded in the cache nodes; the cache nodes are located in a non-volatile random access memory; read data recovery information from a check element of a check data table; the check data table is located in the non-volatile random access memory; and recover data of the stripes for which data flushing has not been completed based on the data recovery information.
  • the non-volatile readable storage medium may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
  • the steps of the methods or algorithms described in the embodiments disclosed herein may be implemented directly using hardware, software modules executed by a processor, or a combination of the two.
  • the software modules may be placed in random access memory (RAM), internal memory, read-only storage, or other storage mediums.
  • RAM random access memory
  • the memory may be stored in a memory device (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 technical field.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A data recovery method, relating to the technical field of storage, and comprising: scanning a cache node, and, according to data flushing information recorded by the cache node, determining a stripe of which the flushing of data has not been completed when an accidental power failure occurs, the cache node being located in a non-volatile random access memory (S101); reading data recovery information from check elements of a check data table, the check data table being located in the non-volatile random access memory (S102); and, according to the data recovery information, recovering data of the stripe of which the flushing of data has not been completed (S103). The method can accelerate the recovery of data and improve the data writing performance of a RAID card. Also disclosed are a data recovery apparatus and device, and a computer-readable storage medium, which all have the technical effects.

Description

一种数据恢复方法及相关装置A data recovery method and related device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2022年11月29日提交中国专利局,申请号为202211507999.X,申请名称为“一种数据恢复方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the China Patent Office on November 29, 2022, with application number 202211507999.X and application name “A data recovery method and related devices”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及存储技术领域,特别涉及一种数据恢复方法;还涉及一种数据恢复装置、设备以及非易失性可读存储介质。The present application relates to the field of storage technology, and in particular to a data recovery method; and also to a data recovery device, equipment and a non-volatile readable storage medium.
背景技术Background technique
随着科技的发展,存储技术也在飞速的改进。RAID(Redundant Array of Independent Disks,独立冗余磁盘阵列)技术是存储中的重要技术。目前业界有软RAID存储技术和硬RAID存储技术。软RAID存储技术是对RAID阵列中条带和分块的管理都使用软件实现。硬RAID存储技术(即RAID卡)使用硬件实现对数据的管理。在硬RAID存储技术中,当发生意外掉电的情况时,容易发生写数据丢失故障。为解决由于意外掉电导致的写数据丢失,目前在RAID卡中使用基于日志的访问文件系统来解决意外掉电期间的写数据丢失。每次收到主机I/O写请求时,将该写请求的时间戳以及其他的关键信息写入一个文件日志中。当写请求的数据被安全的写入到磁盘后清除日志文件中对应的日志。该方案需要依赖底层文件系统支持来进行日志记录,写数据写入之前和写入之后都需要读写文件系统中的日志文件。并且如果在写入数据过程中出现意外掉电的情况,若要恢复丢失的数据,需要从文件系统读取该写数据对应的日志文件,根据时间戳以及其他的关键信息恢复数据。上述方案会导致RAID卡更高的开销,影响数据恢复的速度与RAID写数据性能。With the development of science and technology, storage technology is also improving rapidly. RAID (Redundant Array of Independent Disks) technology is an important technology in storage. At present, there are soft RAID storage technology and hard RAID storage technology in the industry. Soft RAID storage technology uses software to manage stripes and blocks in RAID arrays. Hard RAID storage technology (i.e. RAID card) uses hardware to manage data. In hard RAID storage technology, when an unexpected power failure occurs, write data loss failure is prone to occur. In order to solve the write data loss caused by unexpected power failure, a log-based access file system is currently used in RAID cards to solve the write data loss during unexpected power failure. Every time a host I/O write request is received, the timestamp of the write request and other key information are written to a file log. When the data of the write request is safely written to the disk, the corresponding log in the log file is cleared. This solution needs to rely on the support of the underlying file system for logging, and the log file in the file system needs to be read and written before and after the write data is written. And if there is an unexpected power failure during the data writing process, to recover the lost data, it is necessary to read the log file corresponding to the written data from the file system and restore the data based on the timestamp and other key information. The above solution will lead to higher overhead of the RAID card, affecting the speed of data recovery and RAID data writing performance.
发明内容Summary of the invention
本申请的目的是提供一种数据恢复方法,能够加速恢复数据,提升RAID卡写数据性能。本申请的另一个目的是提供一种数据恢复装置、设备以及非易失性可读存储介质,均具有上述技术效果。The purpose of the present application is to provide a data recovery method that can accelerate data recovery and improve the data writing performance of the RAID card. Another purpose of the present application is to provide a data recovery device, equipment and non-volatile readable storage medium, all of which have the above technical effects.
为解决上述技术问题,本申请提供了一种数据恢复方法,包括:To solve the above technical problems, the present application provides a data recovery method, comprising:
扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;缓存节点位于非易失性随机访问存储器; Scan the cache node, and determine the stripe whose data has not been flushed when the power is unexpectedly lost according to the data flushing information recorded by the cache node; the cache node is located in the non-volatile random access memory;
从校验数据表的校验元素中读取数据恢复信息;校验数据表位于非易失性随机访问存储器;Reading data recovery information from a check element of a check data table; the check data table is located in a non-volatile random access memory;
根据数据恢复信息,恢复未完成数据下刷的条带的数据。Restore the data of the stripe for which data flushing has not been completed according to the data recovery information.
可选的,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带包括:Optionally, according to the data flushing information recorded by the cache node, it is determined that the stripes for which data flushing is not completed when the power is unexpectedly lost include:
根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。The stripes for which data flushing is not completed when power is lost unexpectedly are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
可选的,根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带包括:Optionally, according to the bit in the bitmap metadata associated with the control field in the cache node, determining the stripes for which data flushing is not completed when power is lost unexpectedly includes:
若与条带对应的比特位的值为第一数值,则确定意外掉电时条带未完成数据下刷;If the value of the bit corresponding to the stripe is the first value, it is determined that the stripe has not completed data flushing when the power is unexpectedly lost;
若与条带对应的比特位的值为第二数值,则确定意外掉电时条带已完成数据下刷。If the value of the bit corresponding to the stripe is the second value, it is determined that the stripe has completed data flushing when the power is unexpectedly lost.
可选的,位图元数据中一个比特位对应一个条带。Optionally, one bit in the bitmap metadata corresponds to one stripe.
可选的,根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带前还包括:Optionally, before determining the stripe for which data flushing is not completed when power is lost unexpectedly according to the bit in the bitmap metadata associated with the control field in the cache node, the method further includes:
根据控制字段的赋值,判断是否存在意外掉电时未完成数据下刷的条带;According to the value assigned to the control field, determine whether there are stripes whose data has not been flushed when the power is unexpectedly lost;
若存在,则根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。If it exists, the stripes for which data flushing was not completed during the unexpected power failure are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
可选的,根据控制字段的赋值,判断是否存在意外掉电时未完成数据下刷的条带包括:Optionally, judging whether there is a stripe for which data flushing is not completed when power is off unexpectedly according to the value assigned to the control field includes:
若控制字段的赋值为真,则不存在意外掉电时未完成数据下刷的条带;If the control field is assigned a value of true, there are no stripes whose data is not flushed when power is lost unexpectedly;
若控制字段的赋值为假,则存在意外掉电时未完成数据下刷的条带。If the control field is assigned a value of false, there are stripes that did not complete the data flushing when the power was unexpectedly lost.
可选的,还包括:Optionally, also include:
申请缓存节点,并在缓存节点记录数据下刷信息。Apply for a cache node and refresh information when the cache node records data.
可选的,还包括:Optionally, also include:
申请校验元素,并在校验元素记录数据恢复信息。Apply for a verification element and record data recovery information in the verification element.
可选的,在缓存节点记录数据下刷信息包括:Optionally, the information to be refreshed when recording data in the cache node includes:
若条带的数据分块与校验分块已全部下刷到磁盘,则将缓存节点中控制字段关联的位图元数据中与条带对应的比特位置为第一数值;If all the data blocks and check blocks of the stripe have been flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata associated with the control field in the cache node is set to the first value;
若条带的数据分块与校验分块未全部下刷到磁盘,则将位图元数据中与条带对应的比特位置为第二数值。If the data blocks and the check blocks of the stripe are not all flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata is set to the second value.
可选的,在缓存节点记录数据下刷信息还包括: Optionally, the information refreshed when the cache node records the data also includes:
若各条带的数据分块与校验分块均已下刷到磁盘,则将控制字段赋值为真;If the data blocks and check blocks of each stripe have been flushed to disk, the control field is set to true;
若至少一个条带的数据分块与校验分块没有全部下刷到磁盘,则将控制字段赋值为假。If the data blocks and check blocks of at least one stripe are not all flushed to disk, the control field is assigned a value of false.
可选的,缓存节点还包括前指针字段与后指针字段;前指针字段指向前一次主机I/O写请求时申请的缓存节点,后指针字段指向后一次主机I/O写请求时申请的缓存节点。Optionally, the cache node also includes a front pointer field and a back pointer field; the front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request.
可选的,还包括:Optionally, also include:
在校验元素中记录条带的校验分块的计算结果。The calculation result of the check block of the stripe is recorded in the check element.
可选的,在校验元素中记录条带的校验分块的计算结果包括:Optionally, the calculation result of the check block of the stripe recorded in the check element includes:
若已计算得到条带的校验分块,则将校验元素中的条带字段中对应的比特位置为第一预设值;If the check block of the stripe has been calculated, the corresponding bit position in the stripe field in the check element is set to a first preset value;
若没有计算得到条带的校验分块,则将条带字段中对应的比特位置为第二预设值。If the check block of the stripe is not calculated, the corresponding bit position in the stripe field is set to the second preset value.
可选的,条带字段中的一个比特位对应一个条带。Optionally, one bit in the stripe field corresponds to one stripe.
可选的,在校验元素中记录条带的校验分块的计算结果还包括:Optionally, the calculation result of the check block of the stripe recorded in the check element also includes:
若已经计算得到所有的条带的校验分块,则将校验元素中的校验字段赋值为真;If the check blocks of all stripes have been calculated, the check field in the check element is set to true;
若没有计算得到所有的条带的校验分块,则将校验字段赋值为假。If the check blocks of all stripes are not calculated, the check field is assigned a value of false.
可选的,还包括:Optionally, also include:
将条带的数据分块写入缓存节点的缓存字段。Write the stripe data blocks into the cache field of the cache node.
可选的,还包括:Optionally, also include:
判断数据恢复是否成功;Determine whether data recovery is successful;
若数据恢复成功,则释放缓存节点与校验元素。If the data is recovered successfully, the cache node and the check element are released.
为解决上述技术问题,本申请还提供了一种数据恢复装置,包括:In order to solve the above technical problems, the present application also provides a data recovery device, comprising:
确定模块,用于扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;缓存节点位于非易失性随机访问存储器;A determination module is used to scan cache nodes and determine the stripes for which data flushing has not been completed when power is unexpectedly lost according to the data flushing information recorded by the cache nodes; the cache nodes are located in a non-volatile random access memory;
读取模块,用于从校验数据表的校验元素中读取数据恢复信息;校验数据表位于非易失性随机访问存储器;A reading module, used for reading data recovery information from a check element of a check data table; the check data table is located in a non-volatile random access memory;
恢复模块,用于根据数据恢复信息,恢复未完成数据下刷的条带的数据。The recovery module is used to recover the data of the stripe for which the data is not flushed according to the data recovery information.
为解决上述技术问题,本申请还提供了一种数据恢复设备,包括:In order to solve the above technical problems, the present application also provides a data recovery device, including:
存储器,用于存储计算机程序;Memory for storing computer programs;
处理器,用于执行计算机程序时实现如上任一项的数据恢复方法的步骤。A processor is used to implement the steps of any of the above data recovery methods when executing a computer program.
为解决上述技术问题,本申请还提供了一种非易失性可读存储介质,非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上任一项的数据恢复方法的步 骤。In order to solve the above technical problems, the present application also provides a non-volatile readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above data recovery methods are implemented. Steps.
本申请所提供的数据恢复方法,包括:扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;缓存节点位于非易失性随机访问存储器;从校验数据表的校验元素中读取数据恢复信息;校验数据表位于非易失性随机访问存储器;根据数据恢复信息,恢复未完成数据下刷的条带的数据。The data recovery method provided in the present application includes: scanning cache nodes, and determining stripes for which data flushing has not been completed during an unexpected power outage based on data flushing information recorded by the cache nodes; the cache nodes are located in a non-volatile random access memory; reading data recovery information from a check element of a check data table; the check data table is located in a non-volatile random access memory; and recovering data of the stripes for which data flushing has not been completed based on the data recovery information.
可见,本申请所提供的数据恢复方法,在非易失性随机访问存储器中维护缓存节点与校验数据表,写数据过程中通过缓存节点记录条带的数据下刷信息,通过校验数据表中的校验元素记录数据恢复信息。从意外掉电恢复后,读取非易失性随机访问存储器中记录的信息,即可据此完成数据恢复。整个写数据流程中不需要访问文件系统,数据恢复时也不需要访问文件系统,从而可以加速恢复RAID卡中由于意外掉电而丢失的数据,提升RAID卡写数据性能。It can be seen that the data recovery method provided by the present application maintains cache nodes and verification data tables in a non-volatile random access memory, records the data flush information of the stripe through the cache nodes during the data writing process, and records the data recovery information through the verification elements in the verification data table. After recovering from an unexpected power failure, the information recorded in the non-volatile random access memory can be read to complete the data recovery. The file system does not need to be accessed during the entire data writing process, and the file system does not need to be accessed during data recovery, thereby accelerating the recovery of data lost in the RAID card due to an unexpected power failure and improving the RAID card data writing performance.
本申请所提供的数据恢复装置、设备以及非易失性可读存储介质均具有上述技术效果。The data recovery device, equipment and non-volatile readable storage medium provided in this application all have the above-mentioned technical effects.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对现有技术和实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the prior art and the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1为本申请实施例所提供的一种数据恢复方法的流程示意图;FIG1 is a schematic diagram of a flow chart of a data recovery method provided in an embodiment of the present application;
图2为本申请实施例所提供的一种RAID卡的架构图;FIG2 is a schematic diagram of a RAID card according to an embodiment of the present application;
图3为本申请实施例所提供的一种缓存节点的示意图;FIG3 is a schematic diagram of a cache node provided in an embodiment of the present application;
图4为本申请实施例所提供的一种校验数据表的示意图;FIG4 is a schematic diagram of a verification data table provided in an embodiment of the present application;
图5为本申请实施例所提供的一种主机I/O按条带切分示意图;FIG5 is a schematic diagram of a host I/O partitioning by stripes provided by an embodiment of the present application;
图6为本申请实施例所提供的一种具体的数据恢复方案的示意图;FIG6 is a schematic diagram of a specific data recovery solution provided in an embodiment of the present application;
图7为本申请实施例所提供的一种数据恢复装置的示意图;FIG7 is a schematic diagram of a data recovery device provided in an embodiment of the present application;
图8为本申请实施例所提供的一种数据恢复设备的示意图。FIG. 8 is a schematic diagram of a data recovery device provided in an embodiment of the present application.
具体实施方式Detailed ways
本申请的核心是提供一种数据恢复方法,能够加速恢复数据,提升RAID卡写数据性能。本申请的另一个核心是提供一种数据恢复装置、设备以及非易失性可读存储介质,均具有上 述技术效果。The core of this application is to provide a data recovery method that can accelerate data recovery and improve the RAID card data writing performance. Another core of this application is to provide a data recovery device, equipment and non-volatile readable storage medium, all of which have the above Describe the technical effects.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
请参考图1,图1为本申请实施例所提供的一种数据恢复方法的流程示意图,参考图1所示,该方法包括:Please refer to FIG. 1 , which is a flow chart of a data recovery method provided by an embodiment of the present application. Referring to FIG. 1 , the method includes:
S101:扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;缓存节点位于非易失性随机访问存储器;S101: Scan cache nodes, and determine the stripes for which data flushing has not been completed when power is unexpectedly lost according to data flushing information recorded in the cache nodes; the cache nodes are located in a non-volatile random access memory;
结合图2所示的RAID卡的架构图,本实施例在RAID卡的NVRAM(Non-Volatile Random Access Memory,非易失性随机访问存储器)中维护一个校验数据表与多个缓存节点。校验数据表包括多个校验元素。缓存节点是用于标识主机I/O写请求的结构体。一个缓存节点标识一次主机I/O写请求。缓存节点用于记录数据下刷信息。校验数据表采用一维线性表元数据组织方式管理校验元素。校验数据表中的校验元素可用于记录数据恢复信息。数据恢复信息包括主机I/O写请求的时间戳以及其他的关键信息。区别于将主机I/O写请求的时间戳以及其他的关键信息存放在文件系统的文件日志的传统技术方案,本实施例将主机I/O请求的时间戳以及其他的关键信息存放在NVRAM中的校验元素中。对于关键信息的具体内容,本实施例在此不做赘述,可以参考传统方案中在文件日志中所记录的关键信息的内容。也就是说,本实施例的改进点在于时间戳、关键信息的存放位置,而非关键信息的具体内容。In conjunction with the architecture diagram of the RAID card shown in FIG2 , this embodiment maintains a check data table and multiple cache nodes in the NVRAM (Non-Volatile Random Access Memory) of the RAID card. The check data table includes multiple check elements. The cache node is a structure used to identify a host I/O write request. One cache node identifies a host I/O write request. The cache node is used to record data flush information. The check data table manages the check elements in a one-dimensional linear table metadata organization method. The check elements in the check data table can be used to record data recovery information. The data recovery information includes the timestamp of the host I/O write request and other key information. Different from the traditional technical solution of storing the timestamp of the host I/O write request and other key information in the file log of the file system, this embodiment stores the timestamp of the host I/O request and other key information in the check elements in the NVRAM. The specific content of the key information is not described in detail in this embodiment, and the content of the key information recorded in the file log in the traditional solution can be referred to. In other words, the improvement of this embodiment lies in the storage location of the timestamp and key information, rather than the specific content of the key information.
图2中的主机系统可以是工作站、个人计算机、移动手机、笔记本电脑和服务器等,多个主机系统通过网络共享存储系统中的存储资源,网络可以采用广域网(WAN)连接、存储区域网络(SAN)、局域网(LAN)连接和无线WIFI连接等。网络可以包括一个或多个无线连接的网络,多个RAID卡组成的存储系统之间可以通过以太网光纤通道(FCoE)、光纤通道、iSCSI等连接组成一个大型的存储环境。The host system in Figure 2 can be a workstation, a personal computer, a mobile phone, a laptop computer, a server, etc. Multiple host systems share storage resources in the storage system through a network, and the network can be a wide area network (WAN) connection, a storage area network (SAN), a local area network (LAN) connection, and a wireless WIFI connection. The network can include one or more wirelessly connected networks, and storage systems composed of multiple RAID cards can be connected to form a large storage environment through Fibre Channel over Ethernet (FCoE), Fibre Channel, iSCSI, etc.
RAID卡中固件层包括驱动程序、RAID卡内核和文件系统等。RAID卡中固件层的驱动程序用于解析主机系统下发的命令,例如解析主机I/O请求中的写数据命令和其他命令。文件系统是前文中提到的RAID卡使用基于日志的直接访问文件系统来解决意外掉电期间的写数据丢失问题的方案中的文件系统。system monitor监控系统监控RAID卡中的各种异常事件。RAID卡控制器包括缓存cache、NVRAM、I/O处理器、硬盘控制器和硬盘连接器等。 The firmware layer in the RAID card includes drivers, RAID card kernel, and file system. The driver in the firmware layer of the RAID card is used to parse commands issued by the host system, such as parsing write data commands and other commands in the host I/O request. The file system is the file system in the solution mentioned above that the RAID card uses a log-based direct access file system to solve the problem of write data loss during unexpected power failure. The system monitor monitoring system monitors various abnormal events in the RAID card. The RAID card controller includes cache, NVRAM, I/O processor, hard disk controller, and hard disk connector.
意外掉电恢复后,RAID卡扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带。After the unexpected power failure is restored, the RAID card scans the cache nodes and determines the stripes for which data flushing was not completed at the time of the unexpected power failure based on the data flushing information recorded by the cache nodes.
在一些实施例中,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带包括:In some embodiments, determining, according to the data flushing information recorded by the cache node, the stripes for which data flushing has not been completed during the unexpected power failure includes:
根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。The stripes for which data flushing is not completed when power is lost unexpectedly are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
参考图3所示,图3中所示的control字段为控制字段,该控制字段可以为bool类型。control字段与位图元数据相关联,位图元数据是管理条带的一种的数据结构。位图元数据中的比特位的数值反应条带的数据下刷情况。As shown in FIG3 , the control field shown in FIG3 is a control field, and the control field can be of bool type. The control field is associated with bitmap metadata, and bitmap metadata is a data structure for managing stripes. The value of the bit in the bitmap metadata reflects the data flushing status of the stripe.
其中,根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带可以包括:Wherein, determining the stripe for which data flushing is not completed when power is unexpectedly lost according to the bit in the bitmap metadata associated with the control field in the cache node may include:
若与条带对应的比特位的值为第一数值,则确定意外掉电时条带未完成数据下刷;If the value of the bit corresponding to the stripe is the first value, it is determined that the stripe has not completed data flushing when the power is unexpectedly lost;
若与条带对应的比特位的值为第二数值,则确定意外掉电时条带已完成数据下刷。If the value of the bit corresponding to the stripe is the second value, it is determined that the stripe has completed data flushing when the power is unexpectedly lost.
位图元数据中一个比特位对应一个条带。One bit in the bitmap metadata corresponds to one slice.
本实施例中位图元数据的每一个比特位与一个条带相对应。每一个比特位的值反映对应的条带的数据分块与校验分块的下刷情况。如果条带的数据分块与校验分块均已下刷到磁盘,则位图元数据中与此条带对应的比特位的值为第一数值。如果条带的数据分块与校验分块没有全部下刷到磁盘,则位图元数据中与此条带对应的比特位的值为第二数值。第一数值与第二数值不同。通过识别比特位的数值即可确定出对应的条带是否在意外掉电发生时未完成数据下刷。数据分块是指磁盘分区中存放主机下发的有效数据。校验分块由条带中的数据分块异或运算得出。In this embodiment, each bit of the bitmap metadata corresponds to a stripe. The value of each bit reflects the flushing status of the data blocks and check blocks of the corresponding stripe. If the data blocks and check blocks of the stripe have been flushed to the disk, the value of the bit corresponding to this stripe in the bitmap metadata is the first value. If the data blocks and check blocks of the stripe are not all flushed to the disk, the value of the bit corresponding to this stripe in the bitmap metadata is the second value. The first value is different from the second value. By identifying the value of the bit, it can be determined whether the corresponding stripe has not completed the data flushing when an unexpected power failure occurs. Data blocks refer to the disk partition that stores valid data sent by the host. The check block is obtained by the XOR operation of the data blocks in the stripe.
第一数值可以为1、第二数值可以为0。如果条带的数据分块与校验分块均已下刷到磁盘,则位图元数据中与此条带对应的比特位置为1。如果条带的数据分块与校验分块没有全部下刷到磁盘,则位图元数据中与此条带对应的比特位置为0。The first value may be 1, and the second value may be 0. If the data blocks and check blocks of the stripe have all been flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata is 1. If the data blocks and check blocks of the stripe have not all been flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata is 0.
在一些实施例中,根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带前还包括:In some embodiments, according to the bit in the bitmap metadata associated with the control field in the cache node, determining the stripe for which data flushing is not completed when power is lost unexpectedly also includes:
根据控制字段的赋值,判断是否存在意外掉电时未完成数据下刷的条带;According to the value assigned to the control field, determine whether there are stripes whose data has not been flushed when the power is unexpectedly lost;
若存在,则根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。If it exists, the stripes for which data flushing is not completed during the unexpected power failure are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
本实施例通过控制字段的赋值来反映所有的条带的数据下刷情况。在确定具体的未完成 数据下刷的条带前,首先可根据控制字段的赋值判断是否有未完成数据下刷的条带,在判断出有未完成数据下刷的条带的基础上,再可选地根据位图元数据的比特位确定未完成数据下刷的具体条带。如果判断出没有未完成数据下刷的条带,则不需要再可选地根据位图元数据的比特位确定未完成数据下刷的具体条带。This embodiment reflects the data flushing status of all stripes by assigning a value to the control field. Before flushing data to a stripe, first determine whether there is a stripe for which data flushing has not been completed based on the value assigned to the control field. On the basis of determining that there is a stripe for which data flushing has not been completed, optionally determine the specific stripe for which data flushing has not been completed based on the bit position of the bitmap metadata. If it is determined that there is no stripe for which data flushing has not been completed, there is no need to optionally determine the specific stripe for which data flushing has not been completed based on the bit position of the bitmap metadata.
其中,根据控制字段的赋值,判断是否存在意外掉电时未完成数据下刷的条带可以包括:Wherein, judging whether there is a stripe for which data is not flushed when power is unexpectedly lost according to the value assigned to the control field may include:
若控制字段的赋值为真,则不存在意外掉电时未完成数据下刷的条带;If the control field is assigned a value of true, there are no stripes whose data is not flushed when power is lost unexpectedly;
若控制字段的赋值为假,则存在意外掉电时未完成数据下刷的条带。If the control field is assigned a value of false, there are stripes that did not complete the data flushing when the power was unexpectedly lost.
如果各个条带的数据分块与校验分块均已经下刷到磁盘,则控制字段的赋值为ture。如果至少有一个条带的数据分块与校验分块没有全部下刷到磁盘,则控制字段赋值为false。If all data blocks and check blocks of each stripe have been flushed to disk, the control field is assigned a value of true. If at least one stripe's data blocks and check blocks have not been fully flushed to disk, the control field is assigned a value of false.
S102:从校验数据表的校验元素中读取数据恢复信息;校验数据表位于非易失性随机访问存储器;S102: reading data recovery information from a check element of a check data table; the check data table is located in a non-volatile random access memory;
参考图4所示,数据恢复信息可存放于校验元素的数据字段。图4中所示的data字段为数据字段。Referring to Figure 4, data recovery information may be stored in a data field of a check element. The data field shown in Figure 4 is a data field.
S103:根据数据恢复信息,恢复未完成数据下刷的条带的数据。S103: According to the data recovery information, the data of the stripe for which the data is not flushed is recovered.
确定出未完成数据下刷的具体条带后,结合读取到的数据恢复信息,RAID卡启动数据恢复流程,恢复未完成数据下刷的条带的数据。对于数据恢复流程的具体实现过程,本申请在此不再赘述,可以参考传统技术方案中关于数据恢复流程的描述。After determining the specific stripe where the data has not been flushed, the RAID card starts the data recovery process in combination with the read data recovery information to recover the data of the stripe where the data has not been flushed. The specific implementation process of the data recovery process is not described in detail in this application, and the description of the data recovery process in the traditional technical solution can be referred to.
可选地,在一些实施例中,还包括:Optionally, in some embodiments, it further includes:
申请缓存节点,并在缓存节点记录数据下刷信息。Apply for a cache node and refresh information when the cache node records data.
申请校验元素,并在校验元素记录数据恢复信息。Apply for a verification element and record data recovery information in the verification element.
RAID卡的驱动程序接收主机发送的主机I/O写请求后,对主机I/O写请求进行解析,并从校验数据表中申请本次主机I/O写请求对应的校验元素以及申请对应的缓存节点。After receiving the host I/O write request sent by the host, the driver of the RAID card parses the host I/O write request and applies for the check element corresponding to this host I/O write request and the corresponding cache node from the check data table.
其中,在缓存节点记录数据下刷信息可以包括:Wherein, refreshing information by recording data in the cache node may include:
若条带的数据分块与校验分块已全部下刷到磁盘,则将缓存节点中控制字段关联的位图元数据中与条带对应的比特位置为第一数值;If all the data blocks and check blocks of the stripe have been flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata associated with the control field in the cache node is set to the first value;
若条带的数据分块与校验分块未全部下刷到磁盘,则将位图元数据中与条带对应的比特位置为第二数值。If the data blocks and the check blocks of the stripe are not all flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata is set to the second value.
例如,如果条带的数据分块与校验分块均已下刷到磁盘,则将位图元数据中与此条带对应的比特位置为1。如果条带的数据分块与校验分块没有全部下刷到磁盘,则位图元数据中与此条带对应的比特位置为0。 For example, if the data blocks and check blocks of the stripe have all been flushed to disk, the bit position corresponding to the stripe in the bitmap metadata is set to 1. If the data blocks and check blocks of the stripe have not all been flushed to disk, the bit position corresponding to the stripe in the bitmap metadata is set to 0.
此外,在缓存节点记录数据下刷信息还可以包括:In addition, the information for flushing the data recorded in the cache node may also include:
若各条带的数据分块与校验分块均已下刷到磁盘,则将控制字段赋值为真;If the data blocks and check blocks of each stripe have been flushed to disk, the control field is set to true;
若至少一个条带的数据分块与校验分块没有全部下刷到磁盘,则将控制字段赋值为假。If the data blocks and check blocks of at least one stripe are not all flushed to disk, the control field is assigned a value of false.
例如,如果位图元数据中各个条带对应的比特位均为1,则将控制字段赋值为ture。如果位图元数据中各个条带对应的比特位不全部为1,则保持控制字段为false。For example, if the bits corresponding to each stripe in the bitmap metadata are all 1, the control field is assigned a value of true. If the bits corresponding to each stripe in the bitmap metadata are not all 1, the control field is kept false.
可选地,在一些实施例中,缓存节点还包括前指针字段与后指针字段;前指针字段指向前一次主机I/O写请求时申请的缓存节点,后指针字段指向后一次主机I/O写请求时申请的缓存节点。Optionally, in some embodiments, the cache node also includes a front pointer field and a back pointer field; the front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request.
本实施例采取双向链表元数据组织方式管理缓存节点。参考图3所示,图3中所示的pre_pointer字段为前指针字段,图3中所示的next_pointer字段为后指针字段。前指针字段指向前一次主机I/O写请求时申请的缓存节点,后指针字段指向后一次主机I/O写请求时申请的缓存节点。通过缓存节点中的前指针字段和后指针字段可将多次主机I/O写请求对应的缓存节点连接在一起。This embodiment adopts a bidirectional linked list metadata organization method to manage cache nodes. Referring to Figure 3, the pre_pointer field shown in Figure 3 is the front pointer field, and the next_pointer field shown in Figure 3 is the back pointer field. The front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request. The cache nodes corresponding to multiple host I/O write requests can be connected together through the front pointer field and the back pointer field in the cache node.
可选地,在一些实施例中,还包括:Optionally, in some embodiments, it further includes:
将条带的数据分块写入缓存节点的缓存字段。Write the stripe data blocks into the cache field of the cache node.
参考图3所示,图3中的cache_ptr即为缓存字段。各个条带的数据分块写入缓存节点中cache_ptr字段,指向缓存中的具体区域。Referring to Figure 3, the cache_ptr in Figure 3 is the cache field. The data blocks of each stripe are written into the cache_ptr field in the cache node, pointing to a specific area in the cache.
可选地,在一些实施例中,还包括:Optionally, in some embodiments, it further includes:
在校验元素中记录条带的校验分块的计算结果。The calculation result of the check block of the stripe is recorded in the check element.
校验分块的计算结果反映的是否已经对条带的数据分块进行异或运算得到了条带的校验分块。The calculation result of the check block reflects whether the check block of the stripe has been obtained by performing an XOR operation on the data blocks of the stripe.
其中,在校验元素中记录条带的校验分块的计算结果可以包括:The calculation result of the check block of the stripe recorded in the check element may include:
若已计算得到条带的校验分块,则将校验元素中的条带字段中对应的比特位置为第一预设值;If the check block of the stripe has been calculated, the corresponding bit position in the stripe field in the check element is set to a first preset value;
若没有计算得到条带的校验分块,则将条带字段中对应的比特位置为第二预设值。If the check block of the stripe is not calculated, the corresponding bit position in the stripe field is set to the second preset value.
条带字段中的一个比特位对应一个条带。One bit in the stripe field corresponds to one stripe.
参考图4所示,条带字段即为图4中所示的stripe[32]字段,stripe[32]字段可以是int类型的数组,一个int类型数据包含8个bit位,一个bit位对应一个条带。如果条带已计算得出校验分块,则置位对应的bit位为第一预设值。如果条带没有计算得出校验分块,则置位对应的bit位为第二预设值。第一预设值与第二预设值不同。 As shown in FIG4 , the stripe field is the stripe[32] field shown in FIG4 . The stripe[32] field can be an array of int type. An int type data contains 8 bits, and one bit corresponds to one stripe. If the check block has been calculated for the stripe, the corresponding bit is set to the first preset value. If the check block has not been calculated for the stripe, the corresponding bit is set to the second preset value. The first preset value is different from the second preset value.
例如,第一预设值为1,第二预设值为0,如果条带已计算得出校验分块,则置位对应的bit位为1。如果条带没有计算得出校验分块,则保持对应的bit位为0。For example, the first preset value is 1, and the second preset value is 0. If the stripe has calculated the check block, the corresponding bit is set to 1. If the stripe has not calculated the check block, the corresponding bit is kept to 0.
可选地,在校验元素中记录条带的校验分块的计算结果可以还包括:Optionally, recording the calculation result of the check block of the stripe in the check element may further include:
若已经计算得到所有的条带的校验分块,则将校验元素中的校验字段赋值为真;If the check blocks of all stripes have been calculated, the check field in the check element is set to true;
若没有计算得到所有的条带的校验分块,则将校验字段赋值为假。If the check blocks of all stripes are not calculated, the check field is assigned a value of false.
参考图4所示,校验字段即为图4中所示的parity_ok字段。该parity_ok字段可以为bool类型。当写数据切分后的条带全部计算出校验分块后,赋值parity_ok字段为true。在写数据切分后的条带未全部计算出校验分块时,校验字段保持为false。主机I/O写请求按条带切分后的各个条带可参考图5所示,条带stripe1的数据分块为strip5、strip6、strip7以及strip8,校验分块为parity2。As shown in reference to Figure 4, the check field is the parity_ok field shown in Figure 4. The parity_ok field can be of bool type. When all the check blocks are calculated for the stripes after the write data is split, the parity_ok field is assigned to true. When all the check blocks are not calculated for the stripes after the write data is split, the check field remains false. The host I/O write request can be divided into each stripe as shown in Figure 5. The data blocks of stripe stripe1 are strip5, strip6, strip7 and strip8, and the check block is parity2.
可选地,在一些实施例中,还包括:Optionally, in some embodiments, it further includes:
判断数据恢复是否成功;Determine whether data recovery is successful;
若数据恢复成功,则释放缓存节点与校验元素。If the data is recovered successfully, the cache node and the check element are released.
结合图6所示的步骤S1至S12,以下阐述一种具体的实施方式:In conjunction with steps S1 to S12 shown in FIG6 , a specific implementation is described below:
主机向RAID卡发出写数据请求,RAID卡的驱动程序接收主机发出的写数据请求并解析。The host sends a write data request to the RAID card, and the driver of the RAID card receives and parses the write data request sent by the host.
根据解析的命令参数,从校验数据表中申请写数据请求对应的校验元素,申请缓存节点,并将申请的缓存节点加入到双向链表元数据组织方式管理的缓存节点中。According to the parsed command parameters, apply for the verification element corresponding to the write data request from the verification data table, apply for the cache node, and add the applied cache node to the cache node managed by the bidirectional linked list metadata organization method.
RAID卡控制器的主控线程将写数据切分为条带,切分后的各个条带还未有计算得出校验分块,因此将校验元素中stripe[32]字段对应各个条带的bit位都置位为0,赋值校验元素中parity_ok字段为false。The main control thread of the RAID card controller divides the write data into stripes. The parity blocks of each stripe after the division have not yet been calculated. Therefore, the bits of the stripe[32] field in the parity element corresponding to each stripe are set to 0, and the parity_ok field in the parity element is assigned to false.
将切分后的各个条带的数据分块写入缓存节点中cache_ptr字段。Write the data blocks of each split stripe into the cache_ptr field in the cache node.
RAID卡向主机发送数据写入完成信号(即立即响应主机)。The RAID card sends a data write completion signal to the host (i.e., responds to the host immediately).
线程池中的工作线程利用暂存在缓存中条带的数据分块异或运算得出条带的校验分块,然后将校验分块写入缓存中。由于已计算得出条带的校验分块,所以将校验元素中stripe[32]字段对应各个条带的bit位都置位为1,并赋值校验元素中的parity_ok字段为true。由于此时条带的数据分块和校验分块还没有下刷到物理磁盘,所以将与申请的缓存节点中control字段关联的位图元数据中的各个bit位都置位为0,并赋值control字段为false。The worker thread in the thread pool uses the data blocks of the stripe temporarily stored in the cache to perform an XOR operation to obtain the check block of the stripe, and then writes the check block to the cache. Since the check block of the stripe has been calculated, the bits of the stripe[32] field in the check element corresponding to each stripe are set to 1, and the parity_ok field in the check element is assigned to true. Since the data blocks and check blocks of the stripe have not been flushed to the physical disk at this time, all bits in the bitmap metadata associated with the control field in the requested cache node are set to 0, and the control field is assigned to false.
线程池中的工作线程将暂存在缓存中的数据分块和校验分块下刷到物理磁盘,由于数据分块和校验分块都已下刷到物理磁盘,所以将与缓存节点中control字段关联的位图元数据 中的各个bit位都置位为1,并赋值control字段为true。The worker thread in the thread pool flushes the data blocks and check blocks temporarily stored in the cache to the physical disk. Since the data blocks and check blocks have been flushed to the physical disk, the bitmap metadata associated with the control field in the cache node is flushed to the physical disk. Set all bits in the register to 1 and assign the control field to true.
判断校验元素中的parity_ok字段是否为true,并判断缓存节点中的control字段是否为true。如果parity_ok字段不为true或者缓存节点中的control字段不为true,则返回到S6。Determine whether the parity_ok field in the check element is true, and determine whether the control field in the cache node is true. If the parity_ok field is not true or the control field in the cache node is not true, return to S6.
释放校验元素资源到校验数据表中,并释放双向链表元数据组织方式管理的缓存节点到全局空闲缓存节点链表中。Release the check element resources to the check data table, and release the cache nodes managed by the bidirectional linked list metadata organization method to the global free cache node linked list.
如果某个时刻出现意外掉电事件,RAID卡控制器扫描双向链表元数据组织方式管理的缓存节点,如果检查出某个缓存节点中control字段关联的位图元数据中的某个bit位为0,则表明暂存在缓存中的该条带的数据分块和校验分块没有全部下刷到磁盘,没有下刷到物理磁盘的数据就是由于意外掉电丢失的具体数据。If an unexpected power failure occurs at a certain moment, the RAID card controller scans the cache nodes managed by the bidirectional linked list metadata organization method. If it is found that a bit in the bitmap metadata associated with the control field in a cache node is 0, it indicates that the data blocks and check blocks of the stripe temporarily stored in the cache have not been completely flushed to the disk. The data that has not been flushed to the physical disk is the specific data lost due to the unexpected power failure.
读取对应的校验元素data字段中存放的时间戳和关键信息,并启动数据恢复流程。Read the timestamp and key information stored in the corresponding verification element data field and start the data recovery process.
判断数据恢复是否成功,如果数据恢复成功,则跳转到S9释放相关资源。如果数据恢复失败,则可以结束。Determine whether the data recovery is successful. If the data recovery is successful, jump to S9 to release related resources. If the data recovery fails, the process ends.
综上,本申请所提供的数据恢复方法,在非易失性随机访问存储器中维护缓存节点与校验数据表,写数据过程中通过缓存节点记录条带的数据下刷信息,通过校验数据表中的校验元素记录数据恢复信息。从意外掉电恢复后,读取非易失性随机访问存储器中记录的信息,即可据此完成数据恢复。整个写数据流程中不需要访问文件系统,数据恢复时也不需要访问文件系统,从而可以加速恢复RAID卡中由于意外掉电而丢失的数据,提升RAID卡写数据性能。In summary, the data recovery method provided by the present application maintains cache nodes and verification data tables in a non-volatile random access memory, records the data flush information of the stripe through the cache nodes during the data writing process, and records the data recovery information through the verification elements in the verification data table. After recovering from an unexpected power outage, the information recorded in the non-volatile random access memory can be read to complete the data recovery. The file system does not need to be accessed during the entire data writing process, and the file system does not need to be accessed during data recovery, thereby accelerating the recovery of data lost in the RAID card due to an unexpected power outage and improving the RAID card data writing performance.
本申请还提供了一种数据恢复装置,下文描述的该装置可以与上文描述的方法相互对应参照。请参考图7,图7为本申请实施例所提供的一种数据恢复装置的示意图,结合图7所示,该装置包括:The present application also provides a data recovery device, and the device described below can be referred to in correspondence with the method described above. Please refer to Figure 7, which is a schematic diagram of a data recovery device provided in an embodiment of the present application. As shown in Figure 7, the device includes:
确定模块10,用于扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;缓存节点位于非易失性随机访问存储器;The determination module 10 is used to scan the cache nodes and determine the stripes whose data flushing is not completed when the power is unexpectedly lost according to the data flushing information recorded by the cache nodes; the cache nodes are located in the non-volatile random access memory;
读取模块20,用于从校验数据表的校验元素中读取数据恢复信息;校验数据表位于非易失性随机访问存储器;A reading module 20, used to read data recovery information from a check element of a check data table; the check data table is located in a non-volatile random access memory;
恢复模块30,用于根据数据恢复信息,恢复未完成数据下刷的条带的数据。The recovery module 30 is used to recover the data of the stripe for which data flushing has not been completed according to the data recovery information.
在上述一些实施例的基础上,作为一种具体的实施方式,确定模块10具体用于:Based on some of the above embodiments, as a specific implementation manner, the determination module 10 is specifically used to:
根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。 The stripes for which data flushing is not completed when power is lost unexpectedly are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
在上述一些实施例的基础上,作为一种具体的实施方式,确定模块10包括:Based on some of the above embodiments, as a specific implementation, the determination module 10 includes:
第一确定单元,用于若与条带对应的比特位的值为第一数值,则确定意外掉电时条带未完成数据下刷;A first determining unit, configured to determine that the stripe has not completed data flushing when power is unexpectedly lost if the value of the bit corresponding to the stripe is a first value;
第二确定单元,用于若与条带对应的比特位的值为第二数值,则确定意外掉电时条带已完成数据下刷。The second determining unit is configured to determine that the strip has completed data flushing when power is unexpectedly lost if the value of the bit corresponding to the strip is a second value.
在上述一些实施例的基础上,作为一种具体的实施方式,位图元数据中一个比特位对应一个条带。Based on some of the above embodiments, as a specific implementation method, one bit in the bitmap metadata corresponds to one stripe.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
第一判断模块,用于根据控制字段的赋值,判断是否存在意外掉电时未完成数据下刷的条带;A first judgment module is used to judge whether there is a stripe for which data is not flushed when power is off unexpectedly according to the value assigned to the control field;
若存在,则确定模块根据缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。If it exists, the determination module determines the stripe for which data flushing is not completed when power is lost unexpectedly according to the bit in the bitmap metadata associated with the control field in the cache node.
在上述一些实施例的基础上,作为一种具体的实施方式,第一判断模块包括:Based on some of the above embodiments, as a specific implementation manner, the first judgment module includes:
第一确定单元,用于若控制字段的赋值为真,则不存在意外掉电时未完成数据下刷的条带;A first determining unit, configured to determine that if the control field is set to true, there is no stripe for which data is not flushed when power is unexpectedly lost;
第二确定单元,用于若控制字段的赋值为假,则存在意外掉电时未完成数据下刷的条带。The second determining unit is used to determine that if the value assigned to the control field is false, there is a stripe whose data is not flushed when the power is unexpectedly lost.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
第一记录模块,用于申请缓存节点,并在缓存节点记录数据下刷信息。The first recording module is used to apply for a cache node and refresh information when the cache node records data.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
第二记录模块,用于申请校验元素,并在校验元素记录数据恢复信息。The second recording module is used to apply for a verification element and record data recovery information in the verification element.
在上述一些实施例的基础上,作为一种具体的实施方式,第二记录模块包括:Based on some of the above embodiments, as a specific implementation, the second recording module includes:
第一置位单元,用于若条带的数据分块与校验分块已全部下刷到磁盘,则将缓存节点中控制字段关联的位图元数据中与条带对应的比特位置为第一数值;A first setting unit, configured to set a bit position corresponding to the stripe in the bitmap metadata associated with the control field in the cache node to a first value if all the data blocks and the check blocks of the stripe have been flushed to the disk;
第二置位单元,用于若条带的数据分块与校验分块未全部下刷到磁盘,则将位图元数据中与条带对应的比特位置为第二数值。The second setting unit is used to set the bit position corresponding to the stripe in the bitmap metadata to a second value if the data blocks and the check blocks of the stripe are not all flushed to the disk.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
第一赋值模块,用于若各条带的数据分块与校验分块均已下刷到磁盘,则将控制字段赋值为真;The first assignment module is used to assign a control field to be true if the data blocks and the check blocks of each stripe have been flushed to the disk;
第二赋值模块,用于若至少一个条带的数据分块与校验分块没有全部下刷到磁盘,则将控制字段赋值为假。 The second assignment module is used to assign a value of false to the control field if all data blocks and check blocks of at least one stripe are not flushed to the disk.
在上述一些实施例的基础上,作为一种具体的实施方式,缓存节点还包括前指针字段与后指针字段;前指针字段指向前一次主机I/O写请求时申请的缓存节点,后指针字段指向后一次主机I/O写请求时申请的缓存节点。Based on some of the above embodiments, as a specific implementation method, the cache node also includes a front pointer field and a back pointer field; the front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
第三记录模块,用于在校验元素中记录条带的校验分块的计算结果。The third recording module is used to record the calculation result of the check block of the stripe in the check element.
在上述一些实施例的基础上,作为一种具体的实施方式,第三记录模块包括:Based on some of the above embodiments, as a specific implementation, the third recording module includes:
第一记录单元,用于若已计算得到条带的校验分块,则将校验元素中的条带字段中对应的比特位置为第一预设值;A first recording unit, configured to set a corresponding bit position in a stripe field in a check element to a first preset value if a check block of the stripe has been calculated;
第二记录单元,用于若没有计算得到条带的校验分块,则将条带字段中对应的比特位置为第一预设值。The second recording unit is used to set the corresponding bit position in the stripe field to a first preset value if the check block of the stripe is not calculated.
在上述一些实施例的基础上,作为一种具体的实施方式,条带字段中的一个比特位对应一个条带。Based on some of the above embodiments, as a specific implementation method, one bit in the stripe field corresponds to one stripe.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
第三赋值模块,用于若已经计算得到所有的条带的校验分块,则将校验元素中的校验字段赋值为真;A third assignment module is used to assign a value of true to a check field in a check element if the check blocks of all stripes have been calculated;
第四赋值模块,用于若没有计算得到所有的条带的校验分块,则将校验字段赋值为假。The fourth assignment module is used to assign the check field to false if the check blocks of all the stripes are not calculated.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
写入模块,用于将条带的数据分块写入缓存节点的缓存字段。The write module is used to write the stripe data blocks into the cache field of the cache node.
在上述一些实施例的基础上,作为一种具体的实施方式,还包括:Based on some of the above embodiments, as a specific implementation method, it also includes:
第二判断模块,用于判断数据恢复是否成功;The second judgment module is used to judge whether the data recovery is successful;
释放模块,用于若数据恢复成功,则释放缓存节点与校验元素。The release module is used to release the cache node and the check element if the data recovery is successful.
本申请所提供的数据恢复装置,在非易失性随机访问存储器中维护缓存节点与校验数据表,写数据过程中通过缓存节点记录条带的数据下刷信息,通过校验数据表中的校验元素记录数据恢复信息。从意外掉电恢复后,读取非易失性随机访问存储器中记录的信息,即可据此完成数据恢复。整个写数据流程中不需要访问文件系统,数据恢复时也不需要访问文件系统,从而可以加速恢复RAID卡中由于意外掉电而丢失的数据,提升RAID卡写数据性能。The data recovery device provided by the present application maintains cache nodes and a verification data table in a non-volatile random access memory, records the data flush information of the stripe through the cache node during the data writing process, and records the data recovery information through the verification elements in the verification data table. After recovering from an unexpected power failure, the information recorded in the non-volatile random access memory can be read to complete the data recovery. The file system does not need to be accessed during the entire data writing process, and the file system does not need to be accessed during data recovery, thereby accelerating the recovery of data lost in the RAID card due to an unexpected power failure and improving the RAID card data writing performance.
本申请还提供了一种数据恢复设备,参考图8所示,该设备包括存储器1和处理器2。The present application also provides a data recovery device, as shown in FIG8 , the device includes a memory 1 and a processor 2 .
存储器1,用于存储计算机程序;Memory 1, used for storing computer programs;
处理器2,用于执行计算机程序实现如下的步骤: Processor 2 is used to execute the computer program to implement the following steps:
扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;缓存节点位于非易失性随机访问存储器;从校验数据表的校验元素中读取数据恢复信息;校验数据表位于非易失性随机访问存储器;根据数据恢复信息,恢复未完成数据下刷的条带的数据。Scan cache nodes, and determine the stripes for which data flushing has not been completed during unexpected power failure based on data flushing information recorded in the cache nodes; the cache nodes are located in a non-volatile random access memory; read data recovery information from a check element of a check data table; the check data table is located in the non-volatile random access memory; and recover data of the stripes for which data flushing has not been completed based on the data recovery information.
对于本申请所提供的设备的介绍请参照上述方法实施例,本申请在此不做赘述。For an introduction to the equipment provided in this application, please refer to the above method embodiments, and this application will not go into details here.
本申请还提供了一种非易失性可读存储介质,该非易失性可读存储介质上存储有计算机程序,计算机程序被处理器执行时可实现如下的步骤:The present application also provides a non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:
扫描缓存节点,根据缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;缓存节点位于非易失性随机访问存储器;从校验数据表的校验元素中读取数据恢复信息;校验数据表位于非易失性随机访问存储器;根据数据恢复信息,恢复未完成数据下刷的条带的数据。Scan cache nodes, and determine the stripes for which data flushing has not been completed during unexpected power failure based on data flushing information recorded in the cache nodes; the cache nodes are located in a non-volatile random access memory; read data recovery information from a check element of a check data table; the check data table is located in the non-volatile random access memory; and recover data of the stripes for which data flushing has not been completed based on the data recovery information.
该非易失性可读存储介质可以包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The non-volatile readable storage medium may include: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
对于本申请所提供的非易失性可读存储介质的介绍请参照上述方法实施例,本申请在此不做赘述。For an introduction to the non-volatile readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置、设备以及非易失性可读存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the devices, equipment, and non-volatile readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。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.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储 器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in the embodiments disclosed herein may be implemented directly using hardware, software modules executed by a processor, or a combination of the two. The software modules may be placed in random access memory (RAM), internal memory, read-only storage, or other storage mediums. The memory may be stored in a memory device (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 technical field.
以上对本申请所提供的数据恢复方法、装置、设备以及非易失性可读存储介质进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围。 The data recovery method, device, equipment and non-volatile readable storage medium provided by the present application are 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 and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims (20)

  1. 一种数据恢复方法,其特征在于,包括:A data recovery method, comprising:
    扫描缓存节点,根据所述缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;所述缓存节点位于非易失性随机访问存储器;Scanning cache nodes, and determining stripes for which data flushing has not been completed when power is unexpectedly lost according to data flushing information recorded by the cache nodes; the cache nodes are located in a non-volatile random access memory;
    从校验数据表的校验元素中读取数据恢复信息;所述校验数据表位于所述非易失性随机访问存储器;Reading data recovery information from a check element of a check data table; the check data table is located in the non-volatile random access memory;
    根据所述数据恢复信息,恢复未完成数据下刷的所述条带的数据。The data of the stripe for which data flushing is not completed is restored according to the data recovery information.
  2. 根据权利要求1所述的数据恢复方法,其特征在于,所述根据所述缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带包括:The data recovery method according to claim 1, characterized in that the step of determining, based on the data flushing information recorded by the cache node, the stripes for which data flushing has not been completed during an unexpected power outage comprises:
    根据所述缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。The stripes for which data flushing is not completed when power is unexpectedly lost are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
  3. 根据权利要求2所述的数据恢复方法,其特征在于,根据所述缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带包括:The data recovery method according to claim 2, characterized in that, according to the bits in the bitmap metadata associated with the control field in the cache node, determining the stripes for which data flushing is not completed when power is lost unexpectedly comprises:
    若与所述条带对应的所述比特位的值为第一数值,则确定意外掉电时所述条带未完成数据下刷;If the value of the bit corresponding to the stripe is the first value, it is determined that the stripe has not completed data flushing when the power is unexpectedly lost;
    若与所述条带对应的所述比特位的值为第二数值,则确定意外掉电时所述条带已完成数据下刷。If the value of the bit corresponding to the stripe is the second value, it is determined that the stripe has completed data flushing when the power is unexpectedly lost.
  4. 根据权利要求3所述的数据恢复方法,其特征在于,所述位图元数据中一个比特位对应一个条带。The data recovery method according to claim 3 is characterized in that one bit in the bitmap metadata corresponds to one stripe.
  5. 根据权利要求1所述的数据恢复方法,其特征在于,所述根据所述缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带前还包括:The data recovery method according to claim 1, characterized in that before determining the stripe for which data flushing is not completed during an unexpected power failure according to the bit in the bitmap metadata associated with the control field in the cache node, the method further comprises:
    根据所述控制字段的赋值,判断是否存在意外掉电时未完成数据下刷的条带;According to the value assigned to the control field, determining whether there is a stripe for which data is not flushed when power is unexpectedly lost;
    若存在,则根据所述缓存节点中控制字段关联的位图元数据中的比特位,确定意外掉电时未完成数据下刷的条带。If so, the stripes for which data flushing is not completed during the unexpected power failure are determined according to the bits in the bitmap metadata associated with the control field in the cache node.
  6. 根据权利要求5所述的数据恢复方法,其特征在于,所述根据所述控制字段的赋值,判断是否存在意外掉电时未完成数据下刷的条带包括:The data recovery method according to claim 5, characterized in that judging whether there is a stripe for which data is not flushed when power is off unexpectedly according to the value assigned to the control field comprises:
    若所述控制字段的赋值为真,则不存在意外掉电时未完成数据下刷的条带;If the control field is set to true, there is no stripe whose data is not flushed when power is unexpectedly lost;
    若所述控制字段的赋值为假,则存在意外掉电时未完成数据下刷的条带。If the value assigned to the control field is false, there are stripes whose data is not flushed when power is unexpectedly lost.
  7. 根据权利要求1所述的数据恢复方法,其特征在于,还包括:The data recovery method according to claim 1, further comprising:
    申请所述缓存节点,并在所述缓存节点记录所述数据下刷信息。Apply for the cache node, and record the data in the cache node to refresh information.
  8. 根据权利要求1所述的数据恢复方法,其特征在于,还包括: The data recovery method according to claim 1, further comprising:
    申请所述校验元素,并在所述校验元素记录所述数据恢复信息。Apply for the verification element, and record the data recovery information in the verification element.
  9. 根据权利要求7所述的数据恢复方法,其特征在于,所述在所述缓存节点记录所述数据下刷信息包括:The data recovery method according to claim 7, characterized in that recording the data flush information in the cache node comprises:
    若所述条带的数据分块与校验分块已全部下刷到磁盘,则将所述缓存节点中控制字段关联的位图元数据中与所述条带对应的比特位置为第一数值;If all the data blocks and check blocks of the stripe have been flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata associated with the control field in the cache node is set to a first value;
    若所述条带的数据分块与校验分块未全部下刷到磁盘,则将所述位图元数据中与所述条带对应的比特位置为第二数值。If the data blocks and the check blocks of the stripe are not all flushed to the disk, the bit position corresponding to the stripe in the bitmap metadata is set to a second value.
  10. 根据权利要求9所述的数据恢复方法,其特征在于,所述在所述缓存节点记录所述数据下刷信息还包括:The data recovery method according to claim 9, characterized in that recording the data flush information in the cache node further comprises:
    若各所述条带的数据分块与校验分块均已下刷到磁盘,则将所述控制字段赋值为真;If the data blocks and the check blocks of each stripe have been flushed to the disk, the control field is set to true;
    若至少一个所述条带的数据分块与校验分块没有全部下刷到磁盘,则将所述控制字段赋值为假。If the data blocks and the check blocks of at least one of the stripes are not all flushed to the disk, the control field is assigned a value of false.
  11. 根据权利要求1所述的数据恢复方法,其特征在于,所述缓存节点还包括前指针字段与后指针字段;所述前指针字段指向前一次主机I/O写请求时申请的所述缓存节点,后指针字段指向后一次主机I/O写请求时申请的所述缓存节点。The data recovery method according to claim 1 is characterized in that the cache node also includes a front pointer field and a back pointer field; the front pointer field points to the cache node applied for the previous host I/O write request, and the back pointer field points to the cache node applied for the next host I/O write request.
  12. 根据权利要求1所述的数据恢复方法,其特征在于,还包括:The data recovery method according to claim 1, further comprising:
    在所述校验元素中记录所述条带的校验分块的计算结果。The calculation result of the check block of the stripe is recorded in the check element.
  13. 根据权利要求12所述的数据恢复方法,其特征在于,所述在所述校验元素中记录所述条带的校验分块的计算结果包括:The data recovery method according to claim 12, wherein recording the calculation result of the check block of the stripe in the check element comprises:
    若已计算得到所述条带的校验分块,则将所述校验元素中的条带字段中对应的比特位置为第一预设值;If the check block of the stripe has been calculated, the corresponding bit position in the stripe field in the check element is set to a first preset value;
    若没有计算得到所述条带的校验分块,则将所述条带字段中对应的比特位置为第二预设值。If the check block of the stripe is not calculated, the corresponding bit position in the stripe field is set to a second preset value.
  14. 根据权利要求13所述的数据恢复方法,其特征在于,所述条带字段中的一个比特位对应一个条带。The data recovery method according to claim 13 is characterized in that one bit in the stripe field corresponds to one stripe.
  15. 根据权利要求12所述的数据恢复方法,其特征在于,所述在所述校验元素中记录所述条带的校验分块的计算结果还包括:The data recovery method according to claim 12, characterized in that recording the calculation result of the check block of the stripe in the check element further comprises:
    若已经计算得到所有的所述条带的校验分块,则将所述校验元素中的校验字段赋值为真;If all the check blocks of the stripe have been calculated, assigning a value of true to the check field in the check element;
    若没有计算得到所有的所述条带的校验分块,则将所述校验字段赋值为假。If the check blocks of all the stripes are not calculated, the check field is assigned a value of false.
  16. 根据权利要求1所述的数据恢复方法,其特征在于,还包括: The data recovery method according to claim 1, further comprising:
    将所述条带的数据分块写入所述缓存节点的缓存字段。The data blocks of the stripe are written into the cache field of the cache node.
  17. 根据权利要求1所述的数据恢复方法,其特征在于,还包括:The data recovery method according to claim 1, further comprising:
    判断数据恢复是否成功;Determine whether data recovery is successful;
    若数据恢复成功,则释放所述缓存节点与所述校验元素。If the data recovery is successful, the cache node and the check element are released.
  18. 一种数据恢复装置,其特征在于,包括:A data recovery device, comprising:
    确定模块,用于扫描缓存节点,根据所述缓存节点记录的数据下刷信息,确定意外掉电时未完成数据下刷的条带;所述缓存节点位于非易失性随机访问存储器;A determination module, configured to scan cache nodes and determine, based on data flushing information recorded by the cache nodes, stripes for which data flushing has not been completed when power is unexpectedly lost; the cache nodes are located in a non-volatile random access memory;
    读取模块,用于从校验数据表的校验元素中读取数据恢复信息;所述校验数据表位于所述非易失性随机访问存储器;A reading module, used for reading data recovery information from a check element of a check data table; the check data table is located in the non-volatile random access memory;
    恢复模块,用于根据所述数据恢复信息,恢复未完成数据下刷的所述条带的数据。The recovery module is used to recover the data of the stripe for which data flushing has not been completed according to the data recovery information.
  19. 一种数据恢复设备,其特征在于,包括:A data recovery device, comprising:
    存储器,用于存储计算机程序;Memory for storing computer programs;
    处理器,用于执行所述计算机程序时实现如权利要求1至17任一项所述的数据恢复方法的步骤。A processor, configured to implement the steps of the data recovery method according to any one of claims 1 to 17 when executing the computer program.
  20. 一种非易失性可读存储介质,其特征在于,所述非易失性可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至17任一项所述的数据恢复方法的步骤。 A non-volatile readable storage medium, characterized in that a computer program is stored on the non-volatile readable storage medium, and when the computer program is executed by a processor, the steps of the data recovery method according to any one of claims 1 to 17 are implemented.
PCT/CN2023/093965 2022-11-29 2023-05-12 Data recovery method and related apparatus WO2024113687A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211507999.X 2022-11-29
CN202211507999.XA CN115599589B (en) 2022-11-29 2022-11-29 Data recovery method and related device

Publications (1)

Publication Number Publication Date
WO2024113687A1 true WO2024113687A1 (en) 2024-06-06

Family

ID=84852194

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/093965 WO2024113687A1 (en) 2022-11-29 2023-05-12 Data recovery method and related apparatus

Country Status (2)

Country Link
CN (1) CN115599589B (en)
WO (1) WO2024113687A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599589B (en) * 2022-11-29 2023-03-14 苏州浪潮智能科技有限公司 Data recovery method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840360A (en) * 2009-10-28 2010-09-22 创新科存储技术有限公司 Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system
CN104035830A (en) * 2014-06-24 2014-09-10 浙江宇视科技有限公司 Method and device for recovering data
CN110187830A (en) * 2019-04-22 2019-08-30 中国科学院计算技术研究所 A kind of method and system accelerating disk array reconstruction
WO2021072917A1 (en) * 2019-10-18 2021-04-22 苏州浪潮智能科技有限公司 Write hole protection method and system for raid, and storage medium
CN115599589A (en) * 2022-11-29 2023-01-13 苏州浪潮智能科技有限公司(Cn) Data recovery method and related device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10936441B2 (en) * 2017-12-15 2021-03-02 Microsoft Technology Licensing, Llc Write-ahead style logging in a persistent memory device
CN110673978B (en) * 2019-09-29 2023-01-10 苏州浪潮智能科技有限公司 Data recovery method and related device after power failure of double-control cluster
CN113391947B (en) * 2021-06-22 2022-12-02 深圳忆联信息系统有限公司 SSD RAID stripe power failure rapid recovery method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101840360A (en) * 2009-10-28 2010-09-22 创新科存储技术有限公司 Rapid reconstruction method and device of RAID (Redundant Array of Independent Disk) system
CN104035830A (en) * 2014-06-24 2014-09-10 浙江宇视科技有限公司 Method and device for recovering data
CN110187830A (en) * 2019-04-22 2019-08-30 中国科学院计算技术研究所 A kind of method and system accelerating disk array reconstruction
WO2021072917A1 (en) * 2019-10-18 2021-04-22 苏州浪潮智能科技有限公司 Write hole protection method and system for raid, and storage medium
CN115599589A (en) * 2022-11-29 2023-01-13 苏州浪潮智能科技有限公司(Cn) Data recovery method and related device

Also Published As

Publication number Publication date
CN115599589A (en) 2023-01-13
CN115599589B (en) 2023-03-14

Similar Documents

Publication Publication Date Title
US6523087B2 (en) Utilizing parity caching and parity logging while closing the RAID5 write hole
US7822922B2 (en) Accessing data storage systems without waiting for read errors
US7882081B2 (en) Optimized disk repository for the storage and retrieval of mostly sequential data
US7533298B2 (en) Write journaling using battery backed cache
US7185048B2 (en) Backup processing method
CN102033786B (en) Method for repairing consistency of copies in object storage system
WO2024148865A1 (en) Secure storage method, apparatus and device, and non-volatile readable storage medium
US9767117B2 (en) Method and system for efficient write journal entry management for a distributed file system
US6799284B1 (en) Reparity bitmap RAID failure recovery
JP2005301497A (en) Storage management system, restoration method and its program
US20130103902A1 (en) Method and apparatus for implementing protection of redundant array of independent disks in file system
US20080195808A1 (en) Data migration systems and methods for independent storage device expansion and adaptation
WO2024119774A1 (en) Raid card writing method, raid card writing system and related device
WO2024113687A1 (en) Data recovery method and related apparatus
WO2024113685A1 (en) Data recovery method for raid array and related apparatus
WO2024113702A1 (en) Data storage method and related device
CN115167782B (en) Temporary storage copy management method, system, equipment and storage medium
US20170277451A1 (en) Method to limit impact of partial media failure of disk drive and detect/report the loss of data for objects due to partial failure of media
US20220129346A1 (en) Data processing method and apparatus in storage system, and storage system
US7529966B2 (en) Storage system with journaling
JP2006031446A (en) Data storage device, data storage method and data storage program
US7930495B2 (en) Method and system for dirty time log directed resilvering
US20090185762A1 (en) Data structure for image file
JP2004185477A (en) Optical storage medium array device and data transfer method
US7925827B2 (en) Method and system for dirty time logging

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23895853

Country of ref document: EP

Kind code of ref document: A1