Data management method and device, computer equipment and storage medium

By dividing RAID data into different categories and adopting appropriate storage solutions, the repetition and time-consuming writing operations when storing RAID data is solved, and the effect of quickly recovering RAID data is achieved.

CN119847425APending Publication Date: 2025-04-18INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411783715.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

When storing RAID data, write operations need to be repeated, resulting in storage space loss, and introducing logs makes stored procedures very time-consuming.

Method used

By dividing the target data of the disk array into three categories: static information, quasi-static information and dynamic information, and adopting different saving plans based on these categories, the grouped data is written to the corresponding storage location. After storage failure recovery, the data to be recovered is obtained according to the preset read order, and the data of the disk array is recovered using this data.

Benefits of technology

It solves the problems of storage space loss and time-consuming storage procedures caused by repeated write operations when storing RAID data, and realizes the rapid and accurate recovery of RAID data to maximize data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847425A_ABST
    Figure CN119847425A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a data management method and device, computer equipment and a storage medium, and the method comprises the following steps: obtaining target data of a disk array; grouping the target data to obtain corresponding grouped data under each preset category; writing the grouped data into the corresponding storage positions; after the storage fault corresponding to the disk array is recovered, data to be recovered are obtained in the storage position according to the preset reading sequence, the data to be recovered are utilized to recover the data of the disk array, and the data to be recovered are contained in the target data. The problems that when RAID data are stored, write-in operation needs to be repeatedly carried out, so that storage space loss is caused, and the storage process is very time-consuming due to log introduction are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data management method, device, computer equipment and storage medium. Background Art

[0002] Storage is to provide data storage products for enterprises, and data security is the most critical requirement for storage products. RAID (Redundant Arrays of Independent Disks) is the core module of data storage products, which is used to organize the back-end hard disks in a specific way and provide I / O (Input / Output) services to the outside world. RAID improves the overall performance of the system by caching and optimizing data and distributing it across multiple hard disks. In the event of a serious storage failure, the fault recovery capability of RAID is crucial. For example, if a storage controller fails, the RAID data needs to be restored quickly and completely. Therefore, in the process of managing data, it is necessary to ensure that RAID key information is not lost during storage. After the storage failure is resolved, RAID data recovery is completed based on the stored RAID key information.

[0003] When storing RAID data currently, it is necessary to combine the Journal of the file system and regard a data storage operation as a transaction. When storing RAID stripe data, first record the log, save the transaction type and related data, write it to a specific area of ​​the back-end hard disk (or configure a high-performance hard disk separately), and then submit the data to the stripe and write it to the back-end hard disk. When all the stripe data is written to the hard disk, clear the log data. However, after the introduction of the log, the above process will introduce double data writing operations to save all data. Not only does it require a separate space to store the log data, causing storage space loss, but the log flushing operation is very time-consuming, seriously affecting system performance.

[0004] Therefore, the related art has the problem that when storing RAID data, the write operation needs to be repeated, resulting in loss of storage space, and the introduction of logs makes the storage process very time-consuming. Summary of the invention

[0005] In view of this, the present invention provides a data management method, apparatus, computer device and storage medium to solve the problem that when storing RAID data, repeated write operations are required, resulting in storage space loss, and the introduction of logs makes the storage process very time-consuming.

[0006] In a first aspect, the present invention provides a data management method, comprising:

[0007] Get the target data of the disk array;

[0008] Group the target data to obtain corresponding grouped data under each preset category;

[0009] Writing the packet data into the corresponding storage location;

[0010] After the storage failure corresponding to the disk array is recovered, the data to be recovered is obtained in the storage location according to the preset reading order, and the data of the disk array is recovered using the data to be recovered, wherein the data to be recovered is included in the target data.

[0011] The data management method provided in this embodiment divides the target data of the disk array into corresponding grouped data under each preset category. Balancing factors such as cost, performance, and recovery efficiency, a different preservation scheme is adopted for each grouped data, and the grouped data is written to the corresponding storage location. After the storage failure corresponding to the disk array is recovered, the data to be recovered is obtained in the storage location according to the preset reading order, ensuring that after a storage controller failure, unexpected power failure, abnormal system reset, and other failures occur, the saved grouped data can be used to quickly and accurately restore the RAID data, thereby maximizing data security. It solves the problem that when storing RAID data, the write operation needs to be repeated, resulting in loss of storage space, and the introduction of logs makes the storage process very time-consuming.

[0012] In some optional implementations, writing the packet data into a corresponding storage location includes:

[0013] Saving the first group data to a first storage device;

[0014] When the storage system is abnormal, the first grouped data is moved from the first storage device to the second storage device, wherein the first grouped data in the second storage device is used to restore the data in the first storage device after the storage system is restarted.

[0015] In some optional implementations, writing the packet data into a corresponding storage location includes:

[0016] storing the second group data and the third group data in the first storage device and the third storage device respectively;

[0017] When the storage system is abnormal, the second grouped data and the third grouped data are moved from the first storage device to the second storage device, wherein the second grouped data in the second storage device is used to restore the data of the first storage device after the storage system is restarted;

[0018] According to a preset time interval, preset data in the third grouped data is rewritten into the third storage device, wherein the preset data is used to determine the progress of the first preset task, and the first preset task is used to restore the data of the disk array.

[0019] In this implementation, factors such as cost, performance, and recovery efficiency are balanced, and different preservation schemes are adopted for different grouped data to ensure that after the storage failure corresponding to the disk array is restored, the RAID data can be quickly and accurately restored, thereby maximizing data security.

[0020] In some optional implementations, obtaining the data to be recovered in the storage location according to a preset reading order, and restoring the data of the disk array using the data to be recovered includes:

[0021] Acquire first intermediate data in a first storage device according to a preset reading order;

[0022] Using the first intermediate data as the data to be verified, and verifying the data to be verified using a preset verification process;

[0023] In the case where the first intermediate data passes the verification, the first intermediate data is used as the data to be restored, and the data of the disk array is restored using the data to be restored;

[0024] If the first intermediate data fails to pass the verification, obtaining the second intermediate data in the second storage device according to a preset reading order;

[0025] Using the second intermediate data as the data to be verified, and verifying the data to be verified using a preset verification process;

[0026] In the case where the second intermediate data passes the verification, the second intermediate data is used as the data to be restored, and the data of the disk array is restored using the data to be restored;

[0027] When the second intermediate data fails to pass the verification, the data to be restored is obtained from the third storage device according to a preset reading order, and the data of the disk array is restored using the data to be restored.

[0028] In this embodiment, the preset reading order is determined by balancing factors such as cost, performance, and recovery efficiency. According to the preset reading order, the data to be recovered is obtained in the first storage device, the second storage device, or the third storage device to recover the data of the disk array, and the data RAID data is quickly and accurately recovered to maximize data security.

[0029] In some optional implementations, the preset verification process includes verifying the readability of the data to be verified and the data integrity of the data to be verified. Verifying the data to be verified using the preset verification process includes:

[0030] In the case of receiving the first indication information, determining that the data to be verified has passed the verification, wherein the first indication information is used to indicate that the data to be verified has readability and data integrity;

[0031] When the second indication information is received, it is determined that the verification of the data to be verified has failed, wherein the second indication information is used to indicate that the data to be verified is not readable or does not have data integrity.

[0032] In some optional implementations, after obtaining the data to be restored from the third storage device and restoring the data of the disk array using the data to be restored, the method further includes:

[0033] Acquire the data to be restored in the third storage device, and acquire the preset data from the data to be restored;

[0034] Determine the progress of the first preset task according to the preset data, and continue to execute the first preset task according to the progress of the first preset task;

[0035] The first preset task includes: obtaining first data of a verification hard disk and second data of other hard disks from data of the disk array, determining third data of a failed hard disk based on the first data and the second data, and writing the third data into the new hard disk after replacing the failed hard disk with a new hard disk, wherein the other hard disks are hard disks other than the verification hard disk, the failed hard disk and the new hard disk.

[0036] In this embodiment, the progress of the first preset task is determined according to the preset data, and the first preset task is continuously executed, so that the items corresponding to the completed first preset task do not need to be completed repeatedly, thereby improving the RAID data recovery efficiency.

[0037] In some optional implementations, the target data is grouped to obtain corresponding grouped data under each preset category, including:

[0038] Determine the data type of the target data;

[0039] Get the mapping relationship between preset categories and data types;

[0040] According to the data type and the mapping relationship, the target preset category corresponding to the target data is determined, and the target data is placed in the grouped data corresponding to the target preset category.

[0041] In this embodiment, the mapping relationship between the data type of the target data and the preset category is determined, and the target data is grouped, so that different data groups can be saved to different storage devices according to factors such as balancing cost, performance, and recovery efficiency.

[0042] In some optional implementations, obtaining target data of a disk array includes:

[0043] Determine a second preset task corresponding to the disk array;

[0044] During the process of the disk array executing the second preset task, process data corresponding to the second preset task is obtained, and the process data is used as target data.

[0045] In a second aspect, the present invention provides a data management device, comprising:

[0046] An acquisition module, used for acquiring target data of the disk array;

[0047] A grouping module is used to group the target data to obtain the corresponding grouped data under each preset category;

[0048] A writing module, used for writing the packet data into a corresponding storage location;

[0049] The data recovery module is used to obtain the data to be recovered in the storage location according to the preset reading order after the storage failure corresponding to the disk array is recovered, and use the data to be recovered to recover the data of the disk array, wherein the data to be recovered is included in the target data.

[0050] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data management method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0051] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data management method of the first aspect or any corresponding embodiment thereof.

[0052] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the data management method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 is a flow chart of a data management method according to an embodiment of the present invention;

[0055] Figure 2 is a flow chart of RAID data recovery according to an embodiment of the present invention;

[0056] Figure 3 is a flow chart of a RAID data recovery method in a fault scenario according to an embodiment of the present invention;

[0057] Figure 4 is a structural block diagram of a data management device according to an embodiment of the present invention;

[0058] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0060] In addition to ensuring the data security of RAID in basic fault scenarios, the fault recovery capability of RAID is also crucial when a serious fault occurs in the storage system. Serious faults include: storage controller failure, unexpected power failure, abnormal system reset, and multiple fault superposition. No matter what fault occurs, RAID data needs to be restored quickly and completely to ensure that RAID key information is not lost, and RAID data recovery is completed based on this after the storage system fault is repaired. RAID key information includes: RAID configuration information, I / O data, metadata, etc. For RAID configuration information, the current common practice is to select more than 2 hard disks, and reserve a certain amount of space on each hard disk to store RAID configuration information. For the preservation of I / O data and metadata, different storage vendors choose different solutions, for example: introducing non-volatile memory, when RAID updates data, first write the data to the non-volatile memory, and then update it, first write the data to the non-volatile memory, then write the data to the hard disk, and then clear the data in the non-volatile memory. Although the above solution can ensure that RAID data can be successfully restored after storage failure recovery, in certain specific failure scenarios, such as accidental storage system reset, non-volatile memory failure, and RAID member failure, the RAID reconstruction progress is not saved, and the RAID data must be reorganized while the failed disk data must be reconstructed from scratch, which takes a long time.

[0061] Based on the above content, an embodiment of the present invention provides a data management method. According to the RAID data organization and task management method, RAID key information is divided into three categories: static information, quasi-static information, and dynamic information. Factors such as cost, performance, and recovery efficiency are balanced, and different storage solutions are adopted for each type of information, and written to the corresponding storage medium. Ensure that in the event of storage controller failure, unexpected power failure, abnormal system reset, and multiple failure superposition scenarios, the information in the storage medium can be used to quickly restore the complete RAID data. This achieves the technical effect of quickly and accurately recovering RAID data and maximizing data security.

[0062] According to an embodiment of the present invention, a data management embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device with data processing capabilities, such as a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0063] In this embodiment, a data management method is provided. Figure 1 is a flow chart of a data management method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0064] Step S101, obtaining target data of the disk array.

[0065] Specifically, the target data, for example, includes data of the type of disk array (RAID) configuration attribute information, RAID member information, RAID member disk status, I / O data, metadata, reconstruction / copyback status, reconstruction progress, copyback progress (such as bitmap), etc. The specific composition of the target data is set according to actual needs to ensure that after a storage system failure, the target data can be used to restore the RAID data. The above target data in the RAID is obtained.

[0066] Step S102, grouping the target data to obtain corresponding grouped data under each preset category.

[0067] Specifically, the preset categories include static information, dynamic information, quasi-static information, etc. Static information is information that is valid for a long time, dynamic information is information that changes in real time and has a short validity period, and quasi-static information is information that changes in real time but is used in conjunction with some static information. Static information is generally determined when the configuration or status changes and remains unchanged for a long time. It will become invalid after dynamic processing is completed.

[0068] The target data is grouped according to the timeliness of the information. For example, the RAID member disk information, RAID configuration attribute information, member disk status, reconstruction / copyback status, etc. in the target data are divided into a group. The preset categories of the data in this group are all static information, and this group is the grouped data corresponding to the static information; I / O data, metadata, RAID operation status, etc. are divided into a group. The preset categories of the data in this group are all dynamic information, and this group is the grouped data corresponding to the dynamic information; reconstruction progress, copyback progress, etc. are divided into a group. The preset categories of the data in this group are all quasi-static information, and this group is the grouped data corresponding to the quasi-static information.

[0069] Step S103, writing the packet data into the corresponding storage location.

[0070] Specifically, the packet data includes, for example, packet data corresponding to static information, packet data corresponding to dynamic information, and packet data corresponding to quasi-static information.

[0071] For the grouped data corresponding to the static information and the grouped data corresponding to the quasi-static information, they can be saved in the RAM (Random Access Memory) memory after they are generated. When the storage system loses power / shuts down / exits abnormally, they can be moved to a non-volatile storage device, such as the FLASH disk in the storage system controller. In addition, in order to recover data to the maximum extent, the grouped data corresponding to the static information and the grouped data corresponding to the quasi-static information can also be written to the back-end hard disk. When a serious failure occurs in the storage system, the RAID data can be reorganized through the information saved in the back-end hard disk to recover the RAID data to the maximum extent.

[0072] For the grouped data corresponding to dynamic information, since the dynamic information changes in real time and has a short validity period, it needs to be quickly restored to the RAID. Therefore, when the storage system is operating normally, it is stored in the RAM memory. When the storage system loses power / shuts down / exits abnormally, it is moved to a non-volatile storage device. Since the grouped data corresponding to dynamic information changes in real time and has a short validity period, it does not need to be written to the backend hard disk.

[0073] Step S104, after the storage failure corresponding to the disk array is recovered, the data to be recovered is obtained in the storage location according to a preset reading order, and the data of the disk array is recovered using the data to be recovered, wherein the data to be recovered is included in the target data.

[0074] Specifically, the preset reading order is, for example, RAM memory, FLASH disk, and backend hard disk. RAM memory stores complete information, which is not released when the process is restarted. In the case of a minor fault, the complete data of the RAID can be quickly restored. The FLASH disk in the controller stores complete information, and in the case of shutdown / power failure / abnormal system exit, the complete data of the RAID can be restored. The backend hard disk stores the most critical information, and in the scenario of multiple faults superimposed, the data can be restored to the maximum extent and at the fastest speed, and the data in the RAID that has been written to the backend hard disk can be restored.

[0075] Storage failures corresponding to the disk array include: storage controller failure, unexpected power failure, abnormal system reset, multiple failure superposition, etc. After the storage failure corresponding to the disk array is restored, the data to be restored is obtained in the storage location according to the above preset reading order, and the data to be restored is restored using the data to be restored, for example: first read the target data stored in the RAM memory, if the target data stored in the RAM memory is valid, use it as the data to be restored, and use the data to be restored to restore the data of the disk array; if the target data stored in the RAM memory is invalid, read the target data stored in the FLASH disk, if the target data stored in the FLASH disk is valid, use it as the data to be restored, and use the data to be restored to restore the data of the disk array; if the target data stored in the FLASH disk is invalid, read the target data stored in the back-end hard disk and use it as the data to be restored, and use the data to be restored to restore the data of the disk array.

[0076] The data management method provided in this embodiment divides the target data of the disk array into corresponding grouped data under each preset category. Balancing factors such as cost, performance, and recovery efficiency, a different preservation scheme is adopted for each grouped data, and the grouped data is written to the corresponding storage location. After the storage failure corresponding to the disk array is recovered, the data to be recovered is obtained in the storage location according to the preset reading order, ensuring that after a storage controller failure, unexpected power failure, abnormal system reset, and other failures occur, the saved grouped data can be used to quickly and accurately restore the RAID data, thereby maximizing data security. It solves the problem that when storing RAID data, the write operation needs to be repeated, resulting in loss of storage space, and the introduction of logs makes the storage process very time-consuming.

[0077] In some optional implementations, writing the packet data into a corresponding storage location includes:

[0078] Saving the first group data to a first storage device;

[0079] When the storage system is abnormal, the first grouped data is moved from the first storage device to the second storage device, wherein the first grouped data in the second storage device is used to restore the data in the first storage device after the storage system is restarted.

[0080] Specifically, the first grouped data is determined according to the classification of the target data. For example, if the target data is divided into static information, dynamic information, and quasi-static information, the first grouped data may be data corresponding to the dynamic information; if the target data is divided into configuration data and read-write data, the first grouped data may be configuration data or read-write data.

[0081] Taking the case where the first group data is data corresponding to the dynamic information as an example, the storage method of the first group data is shown in Table 1.

[0082] Table 1. Storage method of dynamic information.

[0083]

[0084] According to Table 1, the storage medium for dynamic information is RAM memory + FLASH disk in the controller. The writing time for writing dynamic information into the storage medium is in RAM memory when the system is operating normally. When shutdown / power failure / system abnormal exit occurs, it is moved to the FLASH disk.

[0085] The first storage device is, for example, a RAM memory. The second storage device is, for example, a FLASH disk in a controller. In combination with the contents of Table 1, the process of writing the packet data to the corresponding storage location includes: when the storage system is operating normally, the first packet data is saved in the RAM memory and the location is fixed. When the service process is restarted, the storage system locks the RAM memory and does not recycle it. After the process is started, the data is directly available without re-importing or calculating, and the recovery efficiency is the highest.

[0086] When the storage system experiences power outage / shutdown / abnormal exit, etc., the storage system is abnormal. The storage system is temporarily powered by the built-in battery, and the first group of data in the RAM memory is moved to the FLASH disk in the controller. When the storage system is restarted, this information is restored to a specific location in the RAM memory to ensure that the first group of data is not lost.

[0087] In some optional implementations, writing the packet data into a corresponding storage location includes:

[0088] storing the second group data and the third group data in the first storage device and the third storage device respectively;

[0089] When the storage system is abnormal, the second grouped data and the third grouped data are moved from the first storage device to the second storage device, wherein the second grouped data in the second storage device is used to restore the data of the first storage device after the storage system is restarted;

[0090] According to a preset time interval, preset data in the third grouped data is rewritten into the third storage device, wherein the preset data is used to determine the progress of the first preset task, and the first preset task is used to restore the data of the disk array.

[0091] Specifically, the second grouped data and the third grouped data are determined according to the classification of the target data. For example, if the target data is divided into static information, dynamic information, and quasi-static information, the second grouped data may be data corresponding to the static information, and the third grouped data may be data corresponding to the quasi-static information.

[0092] Taking the case where the second grouped data is data corresponding to static information and the third grouped data is data corresponding to quasi-static information as an example, the storage method of the second grouped data and the third grouped data is shown in Table 2.

[0093] Table 2 Storage methods of static information and quasi-static information.

[0094]

[0095] According to Table 2, the storage media for static information and quasi-static information are RAM memory, FLASH disk in the controller, and back-end hard disk. The writing time for writing static information to the storage media is when the RAID configuration, RAID member changes, etc. are changed, the information is generated, saved in RAM, and written to the back-end hard disk. When shutdown / power failure / system abnormal exit occurs, the RAM content is moved to the FLASH disk. The writing time for writing quasi-static information to the storage media is when the reconstruction / copyback task is started, the information is generated, saved in RAM, and written to the back-end hard disk. It is written to the hard disk in subsequent cycles, and moved to the FLASH disk when shutdown / power failure / system abnormal exit occurs.

[0096] The first storage device is, for example, a RAM memory. The second storage device is, for example, a FLASH disk in the controller. The third storage device is, for example, a back-end hard disk.

[0097] Combined with the contents of Table 2, the process of writing the second packet data into the corresponding storage location includes: the second packet data is generated when creating RAID, modifying RAID attributes, and changing RAID members. After the second packet data is generated, the second packet data is saved in the RAM memory. When the storage system has problems such as power failure / shutdown / abnormal exit, the storage system is abnormal, and the storage system is temporarily powered by the storage built-in battery, and the second packet data in the RAM memory is moved to the FLASH disk in the controller. When the storage system is restarted, the information is restored to the specific location of the RAM memory to ensure that the second packet data is not lost. In addition, when a more serious fault occurs, such as system power failure and FLASH disk failure, the RAID data cannot be restored by the above method. Therefore, in order to restore the RAID data to the maximum extent, while the second packet data is saved in the RAM memory, the second packet data is synchronously written to the specific area of ​​the back-end hard disk (when the system is initialized, a part of the hard disk area is reserved), so that when the above-mentioned serious fault occurs, the RAID data can be reorganized through the information saved by the back-end hard disk. In addition, the second packet data can be written to multiple back-end hard disks, which are redundant to each other.

[0098] Combined with the contents of Table 2, the process of writing the third grouped data into the corresponding storage location is similar to that of the second grouped data, including: the third grouped data is generated when the reconstruction / copyback is started, and after the third grouped data is generated, the third grouped data is saved in the RAM memory. When the storage system has problems such as power failure / shutdown / abnormal exit, the storage system is abnormal, and the storage system is temporarily powered by the storage built-in battery, and the third grouped data in the RAM memory is moved to the FLASH disk in the controller. When the storage system is restarted, the information is restored to the specific location of the RAM memory to ensure that the third grouped data is not lost. In addition, when a more serious fault occurs, such as system power failure and FLASH disk failure, the RAID data cannot be restored in the above manner. Therefore, in order to restore the RAID data to the maximum extent, while the third grouped data is saved in the RAM memory, the third grouped data is synchronously written to the specific area of ​​the back-end hard disk (when the system is initialized, a part of the hard disk area is reserved), so that when the above-mentioned serious fault occurs, the RAID data can be reorganized through the information saved by the back-end hard disk. In addition, the third grouped data can be written to multiple back-end hard disks, which are redundant to each other.

[0099] In addition, the preset time interval is, for example, 30 seconds, and the preset data is, for example, the progress of reconstruction and the progress of copying back. In order to minimize the impact on performance, the preset data in the third grouped data is rewritten to the third storage device according to the preset time interval. In this way, during the reconstruction / copying back process, when a system power outage and a FLASH disk failure occur, the RAID data is reorganized through the information of the back-end hard disk, and reconstruction can continue. The completed part does not need to be reconstructed again, thereby improving data recovery efficiency. Reconstruction means that when a member disk fails, the data of the failed disk is recalculated using the data of other member disks and the check disk and written to the hot spare disk. The progress of the reconstruction is the mark information and proportion of the completed part.

[0100] The progress of the first preset task can be determined according to the preset data. The first preset task is, for example, a reconstruction task and a copyback task. The reconstruction task includes: when a RAID member disk fails, the data of the failed disk is recalculated using the data of other member disks and the check disk and written to the hot spare disk. The copyback task includes: after replacing the failed disk with a new hard disk, the data of the hot spare disk is copied to the new hard disk, so that the RAID is restored to the member distribution when it was created.

[0101] In this implementation, factors such as cost, performance, and recovery efficiency are balanced, and different preservation schemes are adopted for different grouped data to ensure that after the storage failure corresponding to the disk array is restored, the RAID data can be quickly and accurately restored, thereby maximizing data security.

[0102] In some optional implementations, obtaining the data to be recovered in the storage location according to a preset reading order, and restoring the data of the disk array using the data to be recovered includes:

[0103] Acquire first intermediate data in a first storage device according to a preset reading order;

[0104] Using the first intermediate data as the data to be verified, and verifying the data to be verified using a preset verification process;

[0105] In the case where the first intermediate data passes the verification, the first intermediate data is used as the data to be restored, and the data of the disk array is restored using the data to be restored;

[0106] If the first intermediate data fails to pass the verification, obtaining the second intermediate data in the second storage device according to a preset reading order;

[0107] Using the second intermediate data as the data to be verified, and verifying the data to be verified using a preset verification process;

[0108] In the case where the second intermediate data passes the verification, the second intermediate data is used as the data to be restored, and the data of the disk array is restored using the data to be restored;

[0109] When the second intermediate data fails to pass the verification, the data to be restored is obtained from the third storage device according to a preset reading order, and the data of the disk array is restored using the data to be restored.

[0110] Specifically, the first storage device is, for example, a RAM memory. The second storage device is, for example, a FLASH disk in a controller. The third storage device is, for example, a back-end hard disk. According to the above embodiments, the integrity of the RAID key information is reduced from the RAM memory, the FLASH disk, and the back-end hard disk. Therefore, in order to quickly recover the RAID data, the most complete information is preferentially used to recover the RAID data, and the preset reading order is, for example, RAM memory, FLASH disk, and back-end hard disk.

[0111] Combination Figure 2 To illustrate this embodiment, the process of restoring RAID data according to the preset reading order includes:

[0112] Start data recovery. According to the preset reading order, read the RAM information in the RAM memory as the first intermediate data. Use the first intermediate data as the data to be verified, and use the preset verification process to verify the data to be verified to determine whether the RAM information is valid. If the first intermediate data verification passes, it means that the RAM information is valid, and the RAM information is used as the data to be recovered, and the data to be recovered is used to recover the data of the disk array, and the process ends. If the first intermediate data verification fails, read the FLASH information in the FLASH disk as the second intermediate data according to the preset reading order. Use the second intermediate data as the data to be verified, and use the preset verification process to verify the data to be verified to determine whether the FLASH information is valid. If the second intermediate data verification passes, it means that the FLASH information is valid, and use the FLASH information as the data to be recovered, and use the data to be recovered to recover the data of the disk array, and the process ends. If the second intermediate data verification fails, read the hard disk information in the back-end hard disk according to the preset reading order, directly use the hard disk information as the data to be recovered, and use the data to be recovered to reorganize the RAID data, complete the recovery of the disk array data, and the process ends.

[0113] In this embodiment, the preset reading order is determined by balancing factors such as cost, performance, and recovery efficiency. According to the preset reading order, the data to be recovered is obtained in the first storage device, the second storage device, or the third storage device to recover the data of the disk array, and the data RAID data is quickly and accurately recovered to maximize data security.

[0114] In some optional implementations, the preset verification process includes verifying the readability of the data to be verified and the data integrity of the data to be verified. Verifying the data to be verified using the preset verification process includes:

[0115] In the case of receiving the first indication information, determining that the data to be verified has passed the verification, wherein the first indication information is used to indicate that the data to be verified has readability and data integrity;

[0116] When the second indication information is received, it is determined that the verification of the data to be verified has failed, wherein the second indication information is used to indicate that the data to be verified is not readable or does not have data integrity.

[0117] Specifically, when the data to be verified is verified using a preset verification process, the readability and data integrity of the data to be verified need to be verified respectively. For example: first determine whether the data to be verified can be read. If it cannot be read, it is determined that the data to be verified is not readable, and the second indication information is directly generated. If the data to be verified can be read, the verification information included in the data to be verified is read, and the verification information is, for example, the CRC (Cyclic Redundancy Check) check code of the data to be verified, the hash value of the data to be verified calculated using a hash function, etc. Determine whether the data to be verified is complete based on the verification information, for example: calculate a new check value based on the data to be verified in the same calculation method as the verification information, compare the check value and the verification information, if they are the same, the data to be verified is complete, if they are not the same, the data to be verified is incomplete. If the data to be verified is incomplete, the data to be verified does not have data integrity, and the second indication information is directly generated. If the data to be verified is readable and has data integrity, the first indication information is generated.

[0118] The storage system determines whether the data to be verified has passed verification based on the received first indication information and the second indication information. If the first indication information is received, the data to be verified has passed verification; if the second indication information is received, it is determined that the data to be verified has failed verification.

[0119] In some optional implementations, the specific process of verifying the data to be verified may also include steps A1 to A4.

[0120] Step A1, obtaining and verifying all data fragments contained in the data to be verified according to the sequence numbers of the data fragments in the data to be verified.

[0121] Specifically, after the data to be verified is written into the corresponding storage device, the data to be verified can be divided into several data segments, and each data segment has its own verification information, such as a verification code, etc., so that the verification of the entire data to be verified becomes the verification of each data segment, which can not only improve the accuracy of the verification, but also know which specific data segment has a problem. The serial number of the data segment is, for example: 1, 2, 3, 4, 5, 6... In addition, in order to increase the difference between the verification information of each data segment, the data to be verified can be divided into several data segments of different sizes, that is, the data lengths of each data segment are not equal.

[0122] Step A2: perform verification processing on each data segment to obtain current verification information of each data segment. According to the sequence number of the data segment, determine the current data segment and the next data segment of the current data segment in turn, and read the reference verification information of the current data segment from the next data segment.

[0123] Specifically, since each data fragment carries the verification information of the previous data fragment, data integrity verification can be achieved through the cooperation between two adjacent data fragments. For example: the current data fragment is the data fragment with sequence number 1, and the next data fragment is the data fragment with sequence number 2; the current data fragment is the data fragment with sequence number 4, and the next data fragment is the data fragment with sequence number 5, and so on.

[0124] Step A3, respectively compare the current verification information and the reference verification information of each data segment. If they are the same, the data segment passes the verification; if they are different, the data segment fails the verification.

[0125] Step A4: If there are data segments that fail the verification, the data segments that fail the verification are counted and prompt information is generated.

[0126] In this embodiment, by dividing the data to be verified into data segments and then verifying each data segment separately, not only can the accuracy of the verification be improved, but it can also be known which specific data segment fails the verification. If the data segment that fails the verification does not affect the integrity of the RAID data, the RAID data can be restored with only the data segment that passes the verification, thereby quickly and accurately restoring the RAID data and maximizing data security.

[0127] In some optional implementations, after obtaining the data to be restored from the third storage device and restoring the data of the disk array using the data to be restored, the method further includes:

[0128] Acquire the data to be restored in the third storage device, and acquire the preset data from the data to be restored;

[0129] Determine the progress of the first preset task according to the preset data, and continue to execute the first preset task according to the progress of the first preset task;

[0130] The first preset task includes: obtaining first data of a verification hard disk and second data of other hard disks from data of the disk array, determining third data of a failed hard disk based on the first data and the second data, and writing the third data into the new hard disk after replacing the failed hard disk with a new hard disk, wherein the other hard disks are hard disks other than the verification hard disk, the failed hard disk and the new hard disk.

[0131] Specifically, the preset data may be, for example, the progress of reconstruction and the progress of copyback. The first preset task may be, for example, a reconstruction task and a copyback task. Because the preset data is the progress of reconstruction / copyback, the progress of the first preset task may be directly determined according to the preset data. And the first preset task may be continued to be executed according to the progress of the first preset task.

[0132] If the first preset task is a reconstruction task, the execution process includes: when a RAID member disk fails, recalculating the third data of the failed disk data, i.e., the failed hard disk, using data of other member disks and the check disk, wherein the other member disks are other hard disks and the check disk is the check hard disk. Writing the third data to the hot spare disk. The other hard disks are at least one hard disk other than the check hard disk, the failed hard disk, and the new hard disk.

[0133] If the first preset task is a reconstruction task, the execution process includes: after replacing the failed hard disk with a new hard disk, copying the third data stored in the hot spare disk to the new hard disk, so that the RAID is restored to the member distribution at the time of creation.

[0134] In this embodiment, the progress of the first preset task is determined according to the preset data, and the first preset task is continuously executed, so that the items corresponding to the completed first preset task do not need to be completed repeatedly, thereby improving the RAID data recovery efficiency.

[0135] In some optional implementations, the target data is grouped to obtain corresponding group data under each preset category, including:

[0136] Determine the data type of the target data;

[0137] Get the mapping relationship between preset categories and data types;

[0138] According to the data type and the mapping relationship, the target preset category corresponding to the target data is determined, and the target data is placed in the grouped data corresponding to the target preset category.

[0139] Specifically, the data type of the target data is determined, such as: disk array (RAID) configuration attribute information, RAID member information, RAID member disk status, I / O data, metadata, reconstruction / copyback status, reconstruction progress, copyback progress, etc. Preset categories include: static information, quasi-static information, dynamic information, etc.

[0140] Obtain a mapping relationship between a preset category and a data type. For example, a mapping relationship exists between a preset category and a data type, indicating that the data type belongs to the preset category. The mapping relationship is shown in Table 3.

[0141] Table 3 Preset mapping relationship between categories and data types.

[0142]

[0143] According to Table 3, there are mapping relationships between static information and RAID configuration attribute information, RAID member information, RAID member disk status, and reconstruction / copyback status, respectively; there are mapping relationships between quasi-static information and reconstruction progress and copyback progress, respectively; there are mapping relationships between dynamic information and I / O data, metadata, and RAID operating status, respectively.

[0144] According to the data type and the mapping relationship, the target preset category corresponding to the target data is determined. For example, there is a mapping relationship between static information and RAID configuration attribute information, and RAID configuration attribute information belongs to static information. Therefore, the target data whose data type is RAID configuration attribute information has a target preset category of static information. The target data is placed in the grouped data corresponding to the target preset category, for example, the target data whose data type is RAID configuration attribute information is placed in the grouped data corresponding to the static information.

[0145] In this embodiment, the mapping relationship between the data type of the target data and the preset category is determined, and the target data is grouped, so that different data groups can be saved to different storage devices according to factors such as balancing cost, performance, and recovery efficiency.

[0146] In some optional implementations, obtaining target data of a disk array includes:

[0147] Determine a second preset task corresponding to the disk array;

[0148] During the process of the disk array executing the second preset task, process data corresponding to the second preset task is obtained, and the process data is used as target data.

[0149] Specifically, the main tasks of RAID are divided into five categories: configuration management, data processing, hard disk fault tolerance, inspection, and performance optimization. Therefore, the second preset task corresponding to the disk array (RAID) is determined. The second preset task is, for example: configuration management, data processing, hard disk fault tolerance, inspection, performance optimization, etc.

[0150] If the second preset task is configuration management, then during the process of RAID executing configuration management, RAID is mainly responsible for organizing multiple hard disks in a specific way and monitoring the status of RAID. Key information includes RAID configuration attribute information, RAID member information, RAID member disk status, etc. These key information are obtained as process data, and the process data is used as target data.

[0151] If the second preset task is data processing, during the process of RAID executing data processing, RAID is mainly responsible for data striping and its distribution on multiple hard disks, mutual exclusive access control of the same stripe, etc. The key information includes I / O data and metadata. These key information are obtained as process data, and the process data is used as target data.

[0152] If the second preset task is fault tolerance, during the process of RAID performing fault tolerance, RAID is mainly responsible for reconstruction / copyback after hard disk failure. Key information includes reconstruction / copyback status and progress (such as bitmap), etc. These key information are obtained as process data, and the process data is used as target data.

[0153] If the second preset task is inspection and performance optimization, inspection is responsible for periodically checking the consistency of underlying data, and performance optimization is responsible for data caching, task scheduling, etc. These two tasks generally do not involve key information. If there is key information in the actual process, the key information is also obtained first as process data, and the process data is used as target data. If the second preset task is other tasks, the process is the same as above and will not be repeated here.

[0154] In some optional implementations, a RAID data recovery method in a fault scenario is provided, which can solve the same technical problems as steps S101 to S104, such as Figure 3 As shown, the process includes the following steps:

[0155] Extraction of key information; preservation of key information; recovery of RAID data after failure.

[0156] Specifically, according to the role of RAID, RAID key information is extracted, and static information, quasi-static information, and dynamic information are defined according to the timeliness of key information, and these information are classified. According to the classification of key information, information of different categories is saved to different media, RAM memory, built-in FLASH disk, and back-end hard disk, and the timing of writing to the media is designed according to the information generation time / system operation status. RAM memory saves complete information, and the process restart does not release it. In the case of minor faults, complete data can be quickly restored; the FLASH disk in the controller saves complete information, and complete data can be restored in the case of shutdown / power failure / system abnormal exit; the back-end hard disk saves the most critical information, and in the scenario of multiple faults superimposed, data can be restored to the maximum extent and at the fastest speed, and the data written to the hard disk can be restored. At the same time, key information is stored in the dual-control mirror. After the fault is recovered, the data recovery method is selected according to the information saved in different media, and RAM memory information is used to restore data first; when RAM information is invalid, data is restored through FLASH disk information; when FLASH information is also invalid, RAID data is reorganized through the information of the back-end hard disk, and reconstruction / copyback tasks are continued to be completed to restore RAID data consistency as soon as possible.

[0157] In this implementation, based on the RAID data organization and task management methods, key information is divided into three categories: static information, quasi-static information, and dynamic information. Factors such as cost, performance, and recovery efficiency are balanced, and different storage solutions are adopted for each type of information to ensure that data can be recovered quickly and accurately in the event of storage controller failure, unexpected power failure, abnormal system reset, and multiple failure scenarios, thereby maximizing data security.

[0158] In the present embodiment, a data management device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0159] This embodiment provides a data management device, such as Figure 4 As shown, including:

[0160] The acquisition module 401 is used to acquire target data of the disk array;

[0161] The grouping module 402 is used to group the target data to obtain corresponding group data under each preset category;

[0162] A writing module 403, used to write the packet data into a corresponding storage location;

[0163] The data recovery module 404 is used to obtain the data to be recovered in the storage location according to the preset reading order after the storage failure corresponding to the disk array is recovered, and to restore the data of the disk array using the data to be recovered, wherein the data to be recovered is included in the target data.

[0164] In some optional implementations, the writing module 403 writes the packet data into the corresponding storage location, including:

[0165] Saving the first group data to a first storage device;

[0166] When the storage system is abnormal, the first grouped data is moved from the first storage device to the second storage device, wherein the first grouped data in the second storage device is used to restore the data in the first storage device after the storage system is restarted.

[0167] In some optional implementations, the writing module 403 writes the packet data into the corresponding storage location, including:

[0168] storing the second group data and the third group data in the first storage device and the third storage device respectively;

[0169] When the storage system is abnormal, the second grouped data and the third grouped data are moved from the first storage device to the second storage device, wherein the second grouped data in the second storage device is used to restore the data of the first storage device after the storage system is restarted;

[0170] According to a preset time interval, preset data in the third grouped data is rewritten into the third storage device, wherein the preset data is used to determine the progress of the first preset task, and the first preset task is used to restore the data of the disk array.

[0171] In some optional implementations, the data recovery module 404 obtains the data to be recovered in the storage location according to a preset reading order, and recovers the data of the disk array using the data to be recovered, including:

[0172] Acquire first intermediate data in a first storage device according to a preset reading order;

[0173] Using the first intermediate data as the data to be verified, and verifying the data to be verified using a preset verification process;

[0174] In the case where the first intermediate data passes the verification, the first intermediate data is used as the data to be restored, and the data of the disk array is restored using the data to be restored;

[0175] If the first intermediate data fails to pass the verification, obtaining the second intermediate data in the second storage device according to a preset reading order;

[0176] Using the second intermediate data as the data to be verified, and verifying the data to be verified using a preset verification process;

[0177] In the case where the second intermediate data passes the verification, the second intermediate data is used as the data to be restored, and the data of the disk array is restored using the data to be restored;

[0178] When the second intermediate data fails to pass the verification, the data to be restored is obtained from the third storage device according to a preset reading order, and the data of the disk array is restored using the data to be restored.

[0179] In some optional implementations, the data recovery module 404 presets a verification process including verifying the readability of the data to be verified and the data integrity of the data to be verified, and the data to be verified is verified using the preset verification process, including:

[0180] In the case of receiving the first indication information, determining that the data to be verified has passed the verification, wherein the first indication information is used to indicate that the data to be verified has readability and data integrity;

[0181] When the second indication information is received, it is determined that the verification of the data to be verified has failed, wherein the second indication information is used to indicate that the data to be verified is not readable or does not have data integrity.

[0182] In some optional embodiments, the device further comprises:

[0183] A data acquisition module, used to acquire the data to be restored in the third storage device, and acquire preset data from the data to be restored;

[0184] A task execution module is used to determine the progress of a first preset task according to preset data, and continue to execute the first preset task according to the progress of the first preset task; the first preset task includes: obtaining first data of a verification hard disk and second data of other hard disks from data of a disk array, determining third data of a failed hard disk according to the first data and the second data, and after replacing the failed hard disk with a new hard disk, writing the third data into the new hard disk, wherein the other hard disks are hard disks other than the verification hard disk, the failed hard disk and the new hard disk.

[0185] In some optional implementations, the grouping module 402 groups the target data to obtain group data corresponding to each preset category, including:

[0186] Determine the data type of the target data;

[0187] Get the mapping relationship between preset categories and data types;

[0188] According to the data type and the mapping relationship, the target preset category corresponding to the target data is determined, and the target data is placed in the grouped data corresponding to the target preset category.

[0189] In some optional implementations, the acquisition module 401 acquires target data of the disk array, including:

[0190] Determine a second preset task corresponding to the disk array;

[0191] During the process of the disk array executing the second preset task, process data corresponding to the second preset task is obtained, and the process data is used as target data.

[0192] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0193] The data management device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0194] The embodiment of the present invention also provides a computer device having the above Figure 4 The data management device shown.

[0195] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0196] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include an integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0197] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0198] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0199] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0200] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0201] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0202] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0203] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined in this application.

Claims

1. A data management method, characterized in that: The method comprises: Get the target data of the disk array; Grouping the target data to obtain corresponding grouped data under each preset category; Writing the packet data into a corresponding storage location; After the storage failure corresponding to the disk array is recovered, the data to be recovered is obtained in the storage location according to a preset reading order, and the data of the disk array is recovered using the data to be recovered, wherein the data to be recovered is included in the target data.

2. The method according to claim 1, characterized in that Writing the packet data into a corresponding storage location comprises: Saving the first group data to a first storage device; When the storage system is abnormal, the first grouped data is moved from the first storage device to a second storage device, wherein the first grouped data in the second storage device is used to restore the data in the first storage device after the storage system is restarted.

3. The method according to claim 2, characterized in that Writing the packet data into a corresponding storage location comprises: Saving the second group data and the third group data to the first storage device and the third storage device respectively; When the storage system is abnormal, the second grouped data and the third grouped data are moved from the first storage device to the second storage device, wherein the second grouped data in the second storage device is used to restore the data of the first storage device after the storage system is restarted; Rewrite preset data in the third grouped data into the third storage device according to a preset time interval, wherein the preset data is used to determine the progress of a first preset task, and the first preset task is used to restore data of the disk array.

4. The method according to claim 3, characterized in that The method of acquiring the data to be recovered in the storage location according to the preset reading order, and recovering the data of the disk array using the data to be recovered, includes: Acquire first intermediate data in the first storage device according to the preset reading order; Using the first intermediate data as the data to be verified, and verifying the data to be verified using a preset verification process; In the case where the first intermediate data passes the verification, the first intermediate data is used as the data to be restored, and the data of the disk array is restored by using the data to be restored; If the first intermediate data fails verification, acquiring second intermediate data in the second storage device according to the preset reading order; Using the second intermediate data as the data to be verified, and verifying the data to be verified using the preset verification process; If the second intermediate data passes verification, the second intermediate data is used as the data to be restored, and the data of the disk array is restored using the data to be restored; In the case that the second intermediate data fails to pass the verification, the data to be restored is obtained from the third storage device according to the preset reading order, and the data of the disk array is restored using the data to be restored.

5. The method according to claim 4, characterized in that The preset verification process includes verifying the readability of the data to be verified and the data integrity of the data to be verified, and verifying the data to be verified by using the preset verification process includes: In the case of receiving the first indication information, determining that the data to be verified has passed the verification, wherein the first indication information is used to indicate that the data to be verified has readability and data integrity; When the second indication information is received, it is determined that the data to be verified has failed verification, wherein the second indication information is used to indicate that the data to be verified is not readable or does not have data integrity.

6. The method according to claim 4, characterized in that After obtaining the data to be restored from the third storage device and restoring the data of the disk array using the data to be restored, the method further includes: Acquire the data to be restored in the third storage device, and acquire the preset data from the data to be restored; Determining the progress of the first preset task according to the preset data, and continuing to execute the first preset task according to the progress of the first preset task; The first preset task includes: obtaining first data of a verification hard disk and second data of other hard disks from the data of the disk array, determining third data of a failed hard disk based on the first data and the second data, and after replacing the failed hard disk with a new hard disk, writing the third data into the new hard disk, wherein the other hard disks are hard disks other than the verification hard disk, the failed hard disk and the new hard disk.

7. The method according to claim 1, characterized in that The target data is grouped to obtain corresponding group data under each preset category, including: Determine the data type of the target data; Obtaining a mapping relationship between the preset category and the data type; According to the data type and the mapping relationship, a target preset category corresponding to the target data is determined, and the target data is placed in grouped data corresponding to the target preset category.

8. The method according to claim 1, characterized in that The step of obtaining target data of the disk array includes: Determining a second preset task corresponding to the disk array; During the process of the disk array executing the second preset task, process data corresponding to the second preset task is acquired, and the process data is used as target data.

9. A data management device, characterized in that: The device comprises: An acquisition module, used for acquiring target data of the disk array; A grouping module, used to group the target data to obtain corresponding grouped data under each preset category; A writing module, used for writing the packet data into a corresponding storage location; A data recovery module is used to obtain the data to be recovered in the storage location according to a preset reading order after the storage failure corresponding to the disk array is recovered, and to restore the data of the disk array using the data to be recovered, wherein the data to be recovered is included in the target data.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data management method according to any one of claims 1 to 8 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data management method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Disk reconfiguration method and disk reconfiguration device

    CN103049400A

  • Hierarchical data optimization method and apparatus for hybrid disk

    CN106484330A

  • Disk array data recovery method and system, storage medium and equipment

    CN113986608A

  • PMR function optimization method of SSD

    CN115454351A

  • Disk subsystem and method for restoring data in disk subsystem

    JP2000276308A

Cited By

  • Data recovery method and device of storage device, medium and product

    CN120469852A

  • RAID data processing method and device, chip, electronic equipment, storage medium and computer program product

    CN120704958A

  • Abnormal data processing method and device, storage medium and electronic equipment

    CN120723520A

  • Data processing method and device, electronic equipment and storage medium

    CN121455406A