CN109901953B - Data reconstruction method and device - Google Patents

Data reconstruction method and device Download PDF

Info

Publication number
CN109901953B
CN109901953B CN201910119237.4A CN201910119237A CN109901953B CN 109901953 B CN109901953 B CN 109901953B CN 201910119237 A CN201910119237 A CN 201910119237A CN 109901953 B CN109901953 B CN 109901953B
Authority
CN
China
Prior art keywords
disk
cluster topology
data
failed
storage node
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910119237.4A
Other languages
Chinese (zh)
Other versions
CN109901953A (en
Inventor
张天洁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd Chengdu Branch
Original Assignee
New H3C Technologies Co Ltd Chengdu Branch
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 New H3C Technologies Co Ltd Chengdu Branch filed Critical New H3C Technologies Co Ltd Chengdu Branch
Priority to CN201910119237.4A priority Critical patent/CN109901953B/en
Publication of CN109901953A publication Critical patent/CN109901953A/en
Application granted granted Critical
Publication of CN109901953B publication Critical patent/CN109901953B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Hardware Redundancy (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data reconstruction method and device, and belongs to the field of distributed storage. The data reconstruction method comprises the following steps: receiving data to be reconstructed, which are returned by storage nodes related to the failed disk in other storage nodes of the distributed storage system based on the first cluster topology information; the first cluster topology information is generated when the failed disk exists in the disks and is used for representing that the hot spare disk is added into the cluster topology, and the first cluster topology information carries the identification of the failed disk; and storing the data to be reconstructed into the hot standby disk. Therefore, data reconstruction is rapidly realized, data reconstruction amount is effectively reduced because only one-time data reconstruction is needed, and data reconstruction time is effectively shortened.

Description

Data reconstruction method and device
Technical Field
The present application relates to the field of distributed storage, and in particular, to a data reconstruction method and apparatus.
Background
In the distributed storage system, once a disk in a certain storage node fails, data reconstruction is required to be performed in order to recover data, but 2 processes are required in the data reconstruction process. Specifically, first, when a disk fails, lost data is generated on other disks; second, after a new disk is inserted, the data is reconstructed again to this new disk. However, in both processes, the amount of data that needs to be reconstructed is the amount of data that the failed disk has written. For example, if disk a is an 8TB disk, and 6TB data has been written, then 2 times data reconstruction requires 12TB of data to be written. And reconstruction of the data is time consuming. However, for distributed storage, it may take approximately 0.5 to 1 hour to reconstruct 1TB of data, and then approximately 6 to 12 hours to reconstruct 12TB of data. Assuming that during data reconstruction, failure events for other disks occur again, for a 2-copy configuration, there is a risk of losing data. In addition, when data is reconstructed, a large amount of disk performance (the maximum IOPS (number of times of read/write Operations Per Second) and bandwidth Per disk are fixed) is consumed, which affects the service of the user, and in a severe case, slow response or stuck response of the application system may be caused.
Disclosure of Invention
In view of this, the present application provides a data reconstruction method and apparatus.
In a first aspect, a data reconstruction method provided in an embodiment of the present application is applied to a storage node of a distributed storage system, where the storage node includes a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology, and the method includes: receiving data to be reconstructed, returned by storage nodes associated with a failed disk in other storage nodes of the distributed storage system based on first cluster topology information; the first cluster topology information is generated when the failed disk exists in the disks and is used for representing that the hot spare disk is added into the cluster topology, and the first cluster topology information carries the identifier of the failed disk; and storing the data to be reconstructed into the hot standby disk.
In the above embodiment, by setting the hot spare disk on the storage node, and adding the hot spare disk into the cluster topology when the disk fails, and generating the first cluster topology information, the storage node where the failed disk is located may receive the data to be reconstructed returned by the storage node associated with the failed disk in the other storage nodes of the distributed storage system based on the first cluster topology information, and store the data to be reconstructed into the hot spare disk. Because only one-time data reconstruction is needed, the data reconstruction amount is effectively reduced, the data reconstruction time is effectively shortened, and meanwhile, the data reliability and the system availability of the distributed storage system are effectively improved because the data reconstruction amount is small and the data reconstruction time is short.
With reference to the first aspect, an embodiment of the present application provides a first possible implementation manner of the first aspect, and before receiving the data to be reconstructed, the method further includes: determining that any one of the plurality of disks fails; adding the hot standby disk into the cluster topology; generating the first cluster topology information based on the failed disk and the hot standby disk added to the cluster topology; and sending the first cluster topology information to the other storage nodes.
In the above embodiment, the storage node itself determines that any one of the plurality of disks has failed; adding the hot standby disk into the cluster topology; generating first cluster topology information based on the failed disk and the hot standby disk added into the cluster topology; and sending the first cluster topology information to other storage nodes. In other words, each storage node determines the disk state of the storage node, and when the disk of the storage node fails, the hot spare disk is added into the cluster topology, and the first cluster topology information is generated and sent to other storage nodes.
With reference to the first possible implementation manner of the first aspect, an embodiment of the present application provides a second possible implementation manner of the first aspect, where the determining that any one of the multiple disks fails includes: receiving monitoring information sent by a monitoring node, wherein the monitoring information comprises identification information used for representing whether one disk in the plurality of disks fails; and determining that any one of the plurality of disks fails according to the identification information.
In the above embodiment, the storage node receives the monitoring information sent by the monitoring node, so as to monitor whether one disk failure exists in the multiple disks of the storage node through the monitoring node, thereby monitoring the storage node without wasting resources; any one of the disks is determined to be invalid only according to identification information in monitoring information sent by the monitoring node, so that the resource occupancy rate of the storage node can be effectively reduced, and meanwhile, the monitoring through a special monitoring node can improve the monitoring pertinence of the disks in the storage node, so that the probability of missing detection is reduced.
With reference to the first aspect, an embodiment of the present application provides a third possible implementation manner of the first aspect, and before receiving the data to be reconstructed, the method further includes: receiving the first cluster topology information sent by a monitoring node; the first cluster topology information is generated after the monitoring node adds the hot spare disk into the cluster topology when monitoring the failed disk.
In the above embodiment, the first cluster topology information sent by the monitoring node is received; the first cluster topology information is generated after the monitoring node adds the hot spare disk into the cluster topology when monitoring the failed disk. The storage node is not required to monitor the storage node or the neighbor storage node, so that the data processing pressure of the storage node can be effectively reduced, the CPU occupancy rate is further reduced, the storage node only needs to store data, and the storage efficiency of the storage node is further improved.
With reference to the first aspect or any one implementation manner of the first aspect, an embodiment of the present application provides a fourth possible implementation manner of the first aspect, where the method further includes: receiving second cluster topology information, wherein the second cluster topology information is generated when a disk fails in the other storage nodes, the second cluster topology information is used for representing that a hot spare disk of the storage node with the disk failure is added into the cluster topology, and the second cluster topology information carries the identification of the failed disk on the other storage nodes; determining whether the failed disk is a disk associated with the failed disk according to the identification of the failed disk on the other storage nodes; and if so, sending the data associated with the failed disk to the other storage nodes.
In the above embodiment, when a failed disk exists in any one of the other storage nodes, if data associated with the failed disk exists, the storage node may send the data associated with the failed disk to the other storage nodes, thereby ensuring that the data associated with the failed disk can be reconstructed in time.
In a second aspect, a data reconstruction method provided in an embodiment of the present application is applied to a distributed storage system, where the distributed storage system includes a plurality of storage nodes and a monitoring node, and the storage nodes include a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology, and the method includes: the monitoring nodes respectively monitor the running state of each disk in each storage node; when the running state of any disk is monitored to be a failure state, the monitoring node adds the hot spare disk in the storage node corresponding to the failure disk with the running state being the failure state into the cluster topology to generate first cluster topology information; and the monitoring node sends the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed into the hot spare disk.
In the above embodiment, the monitoring node monitors the running state of each disk in each storage node; when the running state of any disk is monitored to be a failure state, adding the hot spare disk in the storage node corresponding to the failure disk with the running state being the failure state into the cluster topology to generate first cluster topology information; and sending the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed into the hot spare disk. The data reconstruction is realized in the hot spare disk, the data reconstruction amount is effectively reduced because only one-time data reconstruction is needed, the data reconstruction time is effectively shortened, and meanwhile, the data reliability and the system availability of the distributed storage system are effectively improved because the data reconstruction amount is small and the data reconstruction time is short.
In a third aspect, an apparatus for reconstructing data provided in an embodiment of the present application is applied to a storage node of a distributed storage system, where the storage node includes a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology, and the apparatus includes: the receiving module is used for receiving data to be reconstructed, returned by storage nodes associated with the failed disk in other storage nodes of the distributed storage system based on the first cluster topology information; the first cluster topology information is generated when the failed disk exists in the disks and is used for representing that the hot spare disk is added into the cluster topology, and the first cluster topology information carries the identifier of the failed disk; and the reconstruction module is used for storing the data to be reconstructed into the hot standby disk.
With reference to the third aspect, an embodiment of the present application provides a first possible implementation manner of the third aspect, where the apparatus further includes: the first processing module is used for determining that any one of the plurality of disks fails before the receiving module receives the data to be reconstructed; the second processing module is used for adding the hot standby disk into the cluster topology; a generating module, configured to generate the first cluster topology information based on the failed disk and the hot spare disk added to the cluster topology; and the sending module is used for sending the first cluster topology information to the other storage nodes.
With reference to the third aspect, an embodiment of the present application provides a second possible implementation manner of the third aspect, where the first processing module is further configured to receive monitoring information sent by a monitoring node, where the monitoring information includes identification information used to characterize whether one disk failure exists in the multiple disks; and determining that any one of the plurality of disks fails according to the identification information.
With reference to the third aspect, an embodiment of the present application provides a third possible implementation manner of the third aspect, where the apparatus further includes: the receiving submodule is used for receiving the first cluster topology information sent by the monitoring node before the receiving module receives the data to be reconstructed; the first cluster topology information is generated after the monitoring node adds the hot spare disk into the cluster topology when monitoring the failed disk.
With reference to any one implementation manner of the third aspect, an example of the present application provides a fourth possible implementation manner of the third aspect, where the apparatus further includes: a third processing module, configured to receive second cluster topology information, where the second cluster topology information is generated when a disk failure occurs in the other storage nodes, the second cluster topology information is used to represent that a hot spare disk of a storage node with a disk failure has been added to the cluster topology, and the second cluster topology information carries an identifier of a failed disk on the other storage node; determining whether the failed disk is a disk associated with the failed disk according to the identification of the failed disk on the other storage nodes; and if so, sending the data associated with the failed disk to the other storage nodes.
In a fourth aspect, an apparatus for reconstructing data provided in an embodiment of the present application is applied to a distributed storage system, where the distributed storage system includes a plurality of storage nodes and a monitoring node, and the storage nodes include a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology, and the apparatus includes: the monitoring module is used for monitoring the running state of each disk in each storage node; the processing module is used for adding the hot standby disk in the storage node corresponding to the failed disk with the failure state into the cluster topology to generate first cluster topology information when the operation state of any disk is monitored to be the failure state; and the sending module is configured to send the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed in the hot spare disk.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a schematic diagram of a prior art data store;
FIG. 2 is a schematic diagram of reconstruction of data in the prior art;
fig. 3 is a flowchart of a data reconstruction method according to an embodiment of the present application;
FIG. 4 is a schematic illustration of data storage in the data reconstruction method shown in FIG. 3;
FIG. 5 is a schematic diagram of data reconstruction in the data reconstruction method shown in FIG. 3;
fig. 6 is a flowchart of another data reconstruction method provided in an embodiment of the present application;
fig. 7 is a schematic functional block diagram of a data reconstruction apparatus according to an embodiment of the present application;
fig. 8 is a functional block diagram of another data reconstruction device according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
In a conventional distributed system, each data management group maps its respective copy data to multiple disks, e.g., to 2 disks in a 2-copy configuration; or in the erasure code configuration of (4, 2), to 6 disks. The following describes the process of mapping data to multiple disks by taking the example of storing the same 2-copy data:
as shown in fig. 1, the data management group 1 stores one of the 2 copies in the disk 3 in the storage node 1 and the other copy in the disk 14 in the storage node 2 (the disk 14 is located between the disk 13 and the disk 15 in the storage node 2, i.e., the black-filled disk in the storage node 2). The data management group 22 stores one copy of the 2 copies in disk 4 in storage node 1 and another copy in disk 52 in storage node 6. The data management group 31 stores one of the 2 copies in disk 14 in storage node 2 and another copy in disk 48 in storage node 6. The data management group 55 stores one of the 2 copies in disk 6 in storage node 1 and another copy in disk 28 in storage node 4. The data management group 106 stores one of the 2 copies in disk 14 in storage node 2 and another copy in disk 39 in storage node 5.
Assume that when a disk 14 fails, to recover the lost copy, the affected data management group recalculates the corresponding disk to replace the failed disk 14 and recovers the lost data on the new disk using the respective copy. As shown in fig. 2, the affected data management groups 1, 31, 106 respectively calculate the disks 20, 15, 29 to replace the failed disk 14 by an algorithm (e.g., a pseudo-random algorithm (a common pseudo-random algorithm such as a coherent HASH algorithm, a CRUSH algorithm, etc.)) and reconstruct (copy) the data on the disks using the respective remaining copies. For example, in a 2-copy configuration, 2 disks are mapped; in the erasure code configuration of (4, 2), 6 disks are mapped. When the user uses the disk to replace the failed disk 14, the data reconstruction is performed again, and the data on the original disk 14 is written into the newly replaced disk. After the new disk is inserted, the mapping relationship between the data management groups 1, 31, 106 and the disk is restored to the mapping relationship before the failure of the disk 14. Thus, the data on the original disk 14 is written again to the newly replaced disk 14, and the redundant data on the disks 15, 20, 29 is deleted. Resulting in data reconstruction that requires at least two processes, such that data reconstruction requires a significant expenditure of time and resources. Therefore, the present embodiment provides a data reconstruction method to shorten the time taken for data reconstruction and save the resources required for data reconstruction.
Please refer to fig. 3, which is a flowchart of a data reconstruction method provided in an embodiment of the present application, where the data reconstruction method is applied to a storage node of a distributed storage system, where the storage node includes a plurality of disks located in a cluster topology of the distributed storage system and a hot standby disk not located in the cluster topology. Optionally, the cluster topology includes association information between each storage node and disk information in the storage nodes.
Optionally, at least one hot standby disk is included in one storage node.
Of course, the number of the hot standby disks can be set by those skilled in the art according to actual requirements. In addition, hard disk failures are common events. According to statistics, the annual fault rate of the hard disk is about 4%. Assuming that a distributed storage system includes 10 storage nodes, each storage node includes 36 hard disks, the distributed storage system has 360 hard disks, and about 14 hard disks are expected to fail each year, that is, 1 hard disk per month is expected to fail in the whole distributed storage system on average. In practice, however, for a 36-disk storage node, taking 1 disk out for hot standby has a utilization rate of about 97.2% (35/36), while taking 2 disks for hot standby has a utilization rate that drops to 94.4% (34/36), which is uneconomical; in addition, if 2 disks are taken out for hot standby, the method has the advantage that when a certain storage node damages 2 hard disks at the same time, the reconstruction data amount can be optimized, but actually, the probability that a certain storage node damages 2 hard disks at the same time in one day (24 hours) of the year is only 0.002, and only a small probability event is needed.
The specific flow shown in fig. 3 will be described in detail below.
Step S101, receiving data to be reconstructed returned by storage nodes related to the failed disk in other storage nodes of the distributed storage system based on the first cluster topology information.
The first cluster topology information is generated when a failed disk exists in the plurality of disks. And the first cluster topology information is used for representing that the hot standby disk is added into the cluster topology, and the first cluster topology information carries the identification of the failed disk.
Alternatively, a failed disk refers to a failed disk (i.e., a disk that is not capable of data storage).
In the application, other storage nodes can confirm whether the storage nodes have the data associated with the failed disk through the identification of the failed disk.
Optionally, the first cluster topology information carries replacement information for characterizing replacement events of the failed disk and the hot spare disk.
As an implementation scenario, if no disk fails in all storage nodes in the current cluster, information exchange is performed between the cluster devices by synchronizing third cluster topology information, where the third cluster topology information does not carry replacement information for characterizing replacement events of failed disks and hot spare disks.
In practical applications, there are various implementations of generating the first cluster topology information, which will be described in the following by way of example.
In a possible embodiment, before step S101, the data reconstruction method provided in the embodiment of the present application further includes: the storage node determines that any one of the plurality of disks fails; adding the hot standby disk into the cluster topology; generating the first cluster topology information based on the hot spare disk and the failed disk added to the cluster topology; and sending the first cluster topology information to the other storage nodes.
As an embodiment, determining that any one of the plurality of disks fails comprises: receiving monitoring information sent by a monitoring node, wherein the monitoring information comprises identification information used for representing whether one disk in the plurality of disks fails; and determining that any one of the plurality of disks fails according to the identification information.
The identification information is used for uniquely identifying the failed disk.
Alternatively, the identification information may be a string, such as "disk 14 failed".
Of course, the identification information may also be a character. For example, the corresponding character of the disk 14 is 0, and when the identification information is 0, the disk 14 is characterized to be failed. Here, the number of the carbon atoms is not particularly limited.
In this embodiment of the application, the monitoring node may determine whether a disk in each storage node fails by receiving heartbeat data sent by the multiple disks in each storage node within a preset time period, for example, if a certain disk a in a certain storage node does not send heartbeat data to the monitoring node within a time period greater than the preset time period, the monitoring node considers that the disk a fails.
Of course, in practical use, the operating status of the disks in each storage node may also be monitored by other means. For example, monitoring information is sent to the monitoring node through mutual monitoring among the storage nodes, and the monitoring node judges whether a disk fails or not according to the monitoring information.
It should be noted that the setting of the preset time period may be determined according to the computing capability of the storage node, and may also be set according to a user requirement, which is not limited specifically herein.
For example, as shown in fig. 4, it is assumed that the storage node 1 and the storage node 2 are mutually neighboring nodes, all disks in the storage node 1 send heartbeat data to a disk in the storage node 2, if the storage node 1 does not receive heartbeat data returned by a certain disk (for example, the disk 14) in the storage node within a preset time period, the storage node 1 sends the event (that is, the disk 14 in the storage node 2 does not return data) to the monitoring node, and the monitoring node determines that the disk 14 in the storage node 2 is failed according to the event.
In the embodiment of the application, the storage node monitors whether one disk in a plurality of disks of the storage node is invalid or not through the monitoring node by receiving the monitoring information sent by the monitoring node, so that the storage node does not need to waste resources to monitor the storage node, and only needs to determine that any disk in the plurality of disks is invalid according to the identification information in the monitoring information sent by the monitoring node, thereby effectively reducing the resource occupancy rate of the storage node.
Another embodiment of determining that any one of the plurality of disks has failed comprises: the storage node monitors that any one of a plurality of disks of the storage node is failed.
As an implementation scenario, the storage node may send heartbeat data to each disk of itself to determine whether response data returned by each disk according to the heartbeat data is received within a preset time period, and if not, it indicates that the disk fails (i.e., the disk fails). For example, a certain disk B in a certain storage node has no response data returned within more than a preset time period, i.e., the disk B is considered to be failed.
Of course, the storage node may monitor the operating status of each disk in each of itself in other manners. For example, monitoring information is returned to the storage node through mutual monitoring between the disks, and the storage node judges whether the disk fails or not according to the monitoring information.
It should be noted that, no matter which embodiment is adopted, after a storage node determines that any one of multiple disks of the storage node has failed, the storage node will add the hot standby disk to the cluster topology; generating the first cluster topology information based on the hot spare disk and the failed disk added to the cluster topology; and sending the first cluster topology information to the other storage nodes.
Optionally, the failed disk is replaced from the cluster topology by generally using a hot spare disk to inherit the logic number of the failed disk, so that when data is reconstructed, the data to be reconstructed can be reconstructed in the hot spare disk inheriting the failed disk. In terms of hardware, the hot standby disk is inserted into the storage node in advance to be the same as the connection state of other disks except for the failed disk in the storage node, so that the data can be received and stored to be reconstructed.
Of course, in practical use, the first cluster topology information may also be generated by a dedicated monitoring node.
Specifically, before step S101, the data reconstruction method provided in the embodiment of the present application further includes: receiving the first cluster topology information sent by a monitoring node; the first cluster topology information is generated after the monitoring node adds the hot spare disk into the cluster topology when monitoring the failed disk.
For avoiding repeated description, for the implementation of how the monitoring node monitors the disk failure, reference may be made to the foregoing detailed description for determining that any disk failure exists in the multiple disks, and no further description is given here.
As an implementation scenario, when a monitoring node is an independent server, the monitoring node may obtain hot spare information of each storage node in real time (or each storage node backs up its own hot spare information in the monitoring node in advance), so that when the monitoring node monitors that the running state of any disk of a certain storage node is a failure state, the monitoring node can quickly add the hot spare disk in the storage node corresponding to the disk with the running state being the failure state into the cluster topology (for example, the failure disk can be replaced from the cluster topology by replacing a preset number of the hot spare disk with a logical number of the failure disk (the disk with the failure state), thereby adding the hot spare disk into the cluster topology).
As another implementation scenario, the monitoring node may be deployed in a certain storage node or a certain number of storage nodes in a plurality of storage nodes in the distributed storage system, and at this time, the monitoring node may obtain the hot spare disk information in each storage node by sending an access request, so that when it is monitored that the operating state of any one disk of a certain storage node is a failure state, the preset number of the hot spare disk in the storage node corresponding to the disk whose operating state is the failure state can be quickly replaced with the logic number of the failed disk (the disk in the failure state), thereby implementing replacement of the failed disk from the cluster topology, and further implementing addition of the hot spare disk into the cluster topology.
In the embodiment of the application, whether a disk failure exists in a plurality of disks of the storage node is monitored through the monitoring node, when the failed disk is monitored, the hot spare disk is added into the cluster topology, the first cluster topology information is generated, so that the storage node is not required to waste resources to monitor the storage node, the resource occupancy rate of the storage node can be effectively reduced, meanwhile, the monitoring is carried out through the special monitoring node, the monitoring pertinence of the disks in the storage node can be improved, and the probability of missing detection is reduced.
It should be noted that, no matter which embodiment of generating the first cluster topology information is adopted, after receiving the first cluster topology information, the other storage nodes may determine, according to the first cluster topology information, whether a target disk associated with the failed disk exists in the multiple disks of the other storage nodes (for example, the other storage nodes send the failure information to a data management group associated with the other storage nodes, receive confirmation information returned by the data management group according to the failure information, determine, according to the confirmation information, whether a target disk associated with the failed disk exists in the multiple disks in the storage nodes), if a target disk associated with the failed disk exists, the storage node having the target disk associated with the failed disk returns to-be-reconstructed data associated with the failed disk in the target disk to the storage node having the failed disk, and after receiving the data to be reconstructed, the storage node with the failed disk stores the data to be reconstructed into the hot spare disk so as to reconstruct the data in the failed disk in the hot spare disk.
Alternatively, the target disk refers to a certain disk of all disks in other storage nodes except the storage node where the failed disk exists. For example, as shown in fig. 4, the storage node where the failed disk exists is storage node 2, where the failed disk is 14, and the disks associated with the failed disk 14 include disk 3, disk 39, and disk 48, that is, the target disks are disk 3, disk 39, and disk 48.
Optionally, the target disk stores therein duplicate data of the same data management group as the failed disk stored before the failure. For example, as shown in fig. 4, before the failed disk 14 fails, it is assumed that the data management group 1 has 2 copy data, one copy data of which is stored in the failed disk 14 in the storage node 2, and the other copy data of the data management group 1 is stored in the target disk 3 of the storage node 1.
Optionally, the failure information includes, but is not limited to, a logical number of the failed disk and replacement information to replace the failed disk with a hot spare disk.
Of course, in actual use, the failure information may also include the storage node information to which the failed disk belongs. For example, as the logic number of the failed disk in fig. 4 is 14, the storage node to which the failed disk belongs is the storage node 2.
Optionally, the sending, by the other storage node, the failure information to the data management group associated with the other storage node includes: and other storage nodes except the storage node with the failed disk respectively send failure information to a data management group associated with each storage node. For example, the storage node 1 as described in fig. 4 transmits failure information to the data management group 1, the data management group 22, and the data management group 55.
Optionally, each storage node records information of all data management groups that store data in a disk of the node. For example, identification information of the data management group. For example, as shown in fig. 4, the storage node 1 has recorded therein a data management group 1, a data management group 22, and a data management group 55 for storing data in the node.
Optionally, determining whether a target disk associated with the failed disk exists in the multiple disks in the storage node according to the confirmation information includes: acquiring preset characters carried in the confirmation information; and determining whether a target disk associated with the failed disk exists in a plurality of disks in the storage node according to the preset characters.
Optionally, the confirmation information further includes identification information of the data management group and corresponding disk information.
Optionally, the identification information of the data management group is used to uniquely identify the data management group. The disk information includes a disk number.
Alternatively, the preset character may be 1 or 0. If the preset character is 1, the data management group which represents the returned confirmation information stores the copy data in the failure disk, otherwise, if the preset character is 0, the data management group which represents the returned confirmation information does not store the copy data in the failure disk. For example, when the preset character is 1, the target disk associated with the failed disk is determined from the current storage node according to the identification information and the disk information in the confirmation information.
For example, as shown in fig. 4, after receiving the confirmation information returned by the data management group 1, the data management group 22, and the data management group 55, the storage node 1 acquires the preset character in the confirmation information, and when the preset character is assumed to be 1, acquires the identification information and the disk information in the confirmation information, and assumes that the identification information is the data management group 1 and the disk information is the disk 3, thereby determining that the confirmation information is returned by the data management group 1 and the corresponding disk is the disk 3.
Continuing with the above example as an example, as shown in fig. 4, since only disk 3 among all disks in the storage node 1 stores the copy data of the data management group 1, disk 4 stores the copy data of the data management group 22, and disk 6 stores the copy data of the data management group 55, the storage node 1 sends failure information to the data management group 1, data management group 22, and data management group 55 associated with each disk of itself to notify that the data management group 1, data management group 22, and data management group 55 that the disk 14 has failed. After the data management group 1, the data management group 22, and the data management group 55 receive the failure information, the data management group 1, the data management group 22, and the data management group 55 determine whether or not there is data stored in the disk 14 based on the failure information, and return confirmation information. And the storage node 1 determines whether a target disk associated with the failed disk exists according to the confirmation information. The manner of determining whether the other storage nodes have the target disk associated with the failed disk is the same as that of the storage node 1, and is not described herein again.
In the embodiment of the application, failure information is sent to the data management group associated with the other storage nodes; receiving confirmation information returned by the data management group according to the failure information; and determining whether a target disk associated with the failed disk exists in the disks in the storage node according to the confirmation information. Therefore, whether the target disk associated with the failed disk exists in the storage node is quickly determined, and the processing time is further shortened.
As an embodiment, step S101 includes: and receiving data to be reconstructed returned by the storage nodes related to the data management group corresponding to the failed disk before failure in other storage nodes of the distributed storage system based on the first cluster topology information.
Continuing with the above example as an example, as shown in fig. 1, assuming that the disk 14 in the storage node 2 fails, the disk 14 stores the data of the data management group 1, the data management group 31, and the data management group 106 before the failure, that is, the data management group corresponding to the disk 14 before the failure is the data of the data management group 1, the data management group 31, and the data management group 106, where the storage node associated with the data management group 1 includes the storage node 1 and the storage node 2, the storage node associated with the data management group 31 includes the storage node 6 and the storage node 2, and the storage node associated with the data management group 106 includes the storage node 5 and the storage node 2. Due to the failure of the disk 14 in the storage node 2, the storage node 2 receives the data to be reconstructed returned by the storage nodes 1, 5 and 6 associated with the data management group corresponding to the failed disk 14 before the failure based on the first cluster topology information. That is, the storage node 2 receives the copy data stored in the data management group 1 associated with the disk 14 in itself returned by the storage node 1, and receives the copy data stored in the data management group 106 associated with the disk 14 in itself returned by the storage node 5, and receives the copy data stored in the data management group 31 associated with the disk 14 in itself returned by the storage node 6.
Of course, in actual use, the data to be reconstructed may also be returned by the data management group. Specifically, continuing with fig. 1 as an example, assuming that a disk 14 in a storage node 2 fails, the disk 14 stores data of a data management group 1, a data management group 31, and a data management group 106 before the failure, that is, the data management group corresponding to the disk 14 before the failure is data of the data management group 1, the data management group 31, and the data management group 106, where the storage node associated with the data management group 1 includes the storage node 1 and the storage node 2, the storage node associated with the data management group 31 includes the storage node 6 and the storage node 2, and the storage node associated with the data management group 106 includes the storage node 5 and the storage node 2. Due to the failure of the disk 14 in the storage node 2, after the data management group 1 receives the notification information sent by the storage node 1, the data management group 1 sends the duplicate data (i.e., the data to be reconstructed) stored in the storage node 1 and corresponding to the disk 14 before the failure to the storage node 2. The data management group 31, upon receiving the notification information sent by the storage node 6, sends the copy data (i.e., the data to be reconstructed) stored in the storage node 6 and corresponding to the disk 14 before failure to the storage node 2. After receiving the notification information sent by the storage node 5, the data management group 106 sends the copy data (i.e., the data to be reconstructed) stored in the storage node 5 and corresponding to the disk 14 before failure to the storage node 2. And the storage node 2 may store all received duplicate data in the hot spare disk, so as to reconstruct the data lost when the disk 14 fails.
The notification information is used for representing that the data management group associated with the storage node has data loss. For example, the notification message sent by the storage node 1 is "copy data of the data management group XX in the storage node 2 is lost", so that after receiving the message, the data management group 1 sends the copy data stored in the storage node 1 to the hot spare disk of the storage node 2 for data reconstruction.
Optionally, the data to be reconstructed is copy data corresponding to the data management group stored by the failed disk before the failure.
In the embodiment of the application, only the data to be reconstructed, which is returned by the storage node associated with the data management group corresponding to the failed disk before failure in the other storage nodes of the distributed storage system according to the first cluster topology information, is received, so that the received amount of the data can be reduced, and the interference data sent by other storage nodes except the storage node associated with the data management group corresponding to the failed disk before failure does not need to be received, thereby improving the accuracy of data reconstruction, shortening the data processing time and saving data transmission resources.
And step S102, storing the data to be reconstructed into the hot standby disk.
Optionally, the data to be reconstructed are sequentially stored in the hot spare disk according to the time sequence of the received data to be reconstructed.
For example, as shown in fig. 4 and fig. 5, the time that the storage node 2 receives the data to be reconstructed sent by the storage node 1 is t1, the time that the storage node 2 receives the data to be reconstructed sent by the storage node 5 is t2, and the time that the storage node 2 receives the data to be reconstructed sent by the storage node 6 is t3, and if, on a time axis, t1 is before t2 but t1 is after t3, the storage node 2 stores the data to be reconstructed sent by the storage node 6 to the hot standby disk 14, then stores the data to be reconstructed sent by the storage node 1 to the hot standby disk 14, and finally stores the data to be reconstructed sent by the storage node 5 to the hot standby disk 14 according to the time sequence of receiving the data to be reconstructed.
In the embodiment of the application, the data to be reconstructed are stored in the hot spare disk in sequence according to the time sequence of the received data to be reconstructed, so that data loss or data errors caused by chaos of data storage can be effectively avoided, and data reconstruction cannot be realized.
Of course, in actual use, the data to be reconstructed sent by the multiple storage nodes may also be simultaneously stored to the hot standby disk by the occurrence of multithread concurrence.
In the embodiment of the application, the data to be reconstructed sent by the plurality of storage nodes is simultaneously stored to the hot standby disk through the concurrent occurrence of multiple threads, so that the storage time can be effectively reduced, and the storage efficiency can be improved.
In a possible embodiment, after step S102, the data reconstruction method provided in the embodiment of the present application further includes: and when the user inserts a new disk to replace the failed disk, taking the newly inserted new disk as the current hot spare disk.
When a new disk is inserted, the information of the new disk is not added into the cluster topology. Therefore, even after a new disk is inserted, the data written into the hot standby disk does not need to be migrated to the newly inserted new disk.
In another possible embodiment, the data reconstruction method provided in the embodiment of the present application further includes: receiving second cluster topology information, wherein the second cluster topology information is generated when a disk fails in the other storage nodes, the second cluster topology information is used for representing that a hot spare disk of the storage node with the disk failure is added into the cluster topology, and the second cluster topology information further comprises the identification of the failed disk on the other storage nodes; determining whether the failed disk is a disk associated with the failed disk according to the identification of the failed disk on the other storage nodes; and if the failed disk is the disk associated with the failed disk, sending the data associated with the failed disk to the other storage nodes.
Optionally, the second cluster topology information may be sent by the monitoring node.
Of course, in practical use, the second cluster topology information may also be sent by a certain storage node in the distributed storage system. Here, the number of the carbon atoms is not particularly limited.
In this embodiment of the present application, second cluster topology information is received, where the second cluster topology information is generated when a disk failure occurs in the other storage nodes, the second cluster topology information is used to characterize that a hot spare disk of a storage node with a disk failure has been added to the cluster topology, and the second cluster topology information further includes identifiers of failed disks on the other storage nodes; determining whether the failed disk is a disk associated with the failed disk according to the identification of the failed disk on the other storage nodes; and when the failed disk is the disk associated with the failed disk, sending data associated with the failed disk to the other storage nodes. When any one of the other storage nodes has the failed disk, the data associated with the failed disk can be sent to the other storage nodes, and the data associated with the failed disk can be timely reconstructed.
Optionally, matching the identifier of the failed disk on the other storage node with the identifiers corresponding to the multiple disks in the storage node; and if not, representing that the disk which is associated with the failed disk does not exist.
For example, if the identifier of the failed disk is M, and the identifiers associated with the failed disk may be M1 and M2, the identifier M of the failed disk is associated with the identifier M1 corresponding to any one of the multiple disks in the failed disk, that is, the disk existing in the failed disk and associated with the failed disk is represented.
According to the data reconstruction method provided by the embodiment of the application, the hot standby disk is arranged on the storage node, when the disk fails, the hot standby disk is added into the cluster topology, the first cluster topology information is generated, the storage node where the failed disk is located can receive data to be reconstructed, returned by the storage node associated with the failed disk based on the first cluster topology information, in other storage nodes of the distributed storage system, and store the data to be reconstructed into the hot standby disk. Because only one-time data reconstruction is needed, the data reconstruction amount is effectively reduced, the data reconstruction time is effectively shortened, and meanwhile, the data reliability and the system availability of the distributed storage system are effectively improved because the data reconstruction amount is small and the data reconstruction time is short.
Please refer to fig. 6, which is a flowchart of a data reconstruction method on a monitoring node side according to an embodiment of the present application, where the method is applied to a distributed storage system, the distributed storage system includes a plurality of storage nodes and a monitoring node, and the storage nodes include a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology. The specific flow shown in fig. 6 will be described in detail below.
Step S201, the monitoring node monitors the operating state of each disk in each storage node.
The operation state comprises a failure state for representing the failure of the disk and a normal state for representing the normal operation of the disk.
Optionally, the specific monitoring process of the monitoring node may refer to part of contents described in the steps included before step S101, and details are not described here again.
Step S202, when the running state of any disk is monitored to be the failure state, the monitoring node adds the hot spare disk in the storage node corresponding to the failure disk with the running state being the failure state into the cluster topology to generate first cluster topology information.
As an implementation scenario, the monitoring node may be installed in any one or more storage nodes in the distributed storage system. Step S202 includes: when monitoring that the running state of any disk is in a failure state, a monitoring node in any one or more storage nodes installed in a distributed storage system adds the hot spare disk in the storage node corresponding to the failure disk with the running state in the failure state into the cluster topology to generate first cluster topology information.
As another implementation scenario, the monitoring node may be operated in a server alone, that is, the monitoring node is not located in any one or more storage nodes in the distributed storage system.
Step S203, the monitoring node sends the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed in the hot spare disk.
For avoiding repeated description, for a specific implementation of how the monitoring node adds the hot standby disk to the cluster topology, reference may be made to the above specific description of adding the hot standby disk to the cluster topology by the monitoring node, and no further description is given here.
According to the data reconstruction method provided by the embodiment of the application, the running state of each disk in each storage node is monitored through a monitoring node; when the running state of any disk is monitored to be a failure state, adding the hot spare disk in the storage node corresponding to the failure disk with the running state being the failure state into the cluster topology to generate first cluster topology information; and sending the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives the data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed into the hot spare disk. The data reconstruction is realized in the hot spare disk, the data reconstruction amount is effectively reduced because only one-time data reconstruction is needed, the data reconstruction time is effectively shortened, and meanwhile, the data reliability and the system availability of the distributed storage system are effectively improved because the data reconstruction amount is small and the data reconstruction time is short.
Referring to fig. 7, fig. 7 illustrates a data reconstruction apparatus using the data reconstruction method illustrated in fig. 3 in a one-to-one correspondence. As shown in fig. 7, the data reconstruction apparatus 300 is applied to a storage node of a distributed storage system, where the storage node includes a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology, and the data reconstruction apparatus 300 includes a receiving module 310 and a reconstruction module 320. The implementation functions of the receiving module 310 and the reconstructing module 320 correspond to the corresponding steps in the data reconstructing method shown in fig. 3, and for avoiding redundancy, detailed descriptions are not needed in this embodiment.
A receiving module 310, configured to receive data to be reconstructed, which is returned by a storage node associated with a failed disk in other storage nodes of the distributed storage system based on the first cluster topology information; the first cluster topology information is generated when the failed disk exists in the disks, and is used for representing that the hot spare disk is added into the cluster topology, and the first cluster topology information carries the identifier of the failed disk.
In a possible embodiment, the data reconstruction device 300 further comprises: the first processing module is configured to determine that any disk in the multiple disks is failed before the receiving module 310 receives data to be reconstructed, which is returned by a storage node associated with a failed disk in other storage nodes of the distributed storage system based on the first cluster topology information; the second processing module is used for adding the hot standby disk into the cluster topology; a generating module, configured to generate the first cluster topology information based on the failed disk and the hot spare disk added to the cluster topology; and the sending module is used for sending the first cluster topology information to the other storage nodes.
Optionally, the first processing module is further configured to receive monitoring information sent by a monitoring node, where the monitoring information includes identification information used to characterize whether one disk failure exists in the multiple disks; and determining that any one of the plurality of disks fails according to the identification information.
In a possible embodiment, the data reconstruction device 300 further comprises: the receiving submodule is configured to receive, before the receiving module 310 receives data to be reconstructed, which is returned by a storage node associated with a failed disk in other storage nodes of the distributed storage system based on first cluster topology information, the first cluster topology information sent by a monitoring node; the first cluster topology information is generated after the monitoring node adds the hot spare disk into the cluster topology when monitoring the failed disk.
A reconstructing module 320, configured to store the data to be reconstructed in the hot spare disk.
In a possible embodiment, the data reconstruction device 300 further comprises: a third processing module, configured to receive second cluster topology information, where the second cluster topology information is generated when a disk failure occurs in the other storage nodes, the second cluster topology information is used to represent that a hot spare disk of a storage node with a disk failure has been added to the cluster topology, and the second cluster topology information further includes identifiers of failed disks on the other storage nodes; determining whether the failed disk is a disk associated with the failed disk according to the identification of the failed disk on the other storage nodes; and if so, sending the data associated with the failed disk to the other storage nodes.
Referring to fig. 8, fig. 8 shows a data reconstruction apparatus using the data reconstruction method shown in fig. 6. As shown in fig. 8, the data reconstruction apparatus 400 is applied to a storage node of a distributed storage system, where the distributed storage system includes a plurality of storage nodes and a monitoring node, and the storage node includes a plurality of disks located in a cluster topology of the distributed storage system and a hot standby disk not located in the cluster topology. The data reconstruction device 400 includes a monitoring module 410, a processing module 420, and a transmitting module 430. The implementation functions of the monitoring module 410, the processing module 420 and the sending module 430 correspond to the corresponding steps in the data reconstruction method shown in fig. 6 one to one, and for avoiding redundancy, detailed descriptions are not provided in this embodiment.
A monitoring module 410, configured to monitor an operating status of each disk in each storage node.
The processing module 420 is configured to, when it is monitored that the operation state of any one disk is the failure state, add the hot spare disk in the storage node corresponding to the failure disk with the operation state being the failure state into the cluster topology to generate first cluster topology information.
A sending module 430, configured to send the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed in the hot spare disk.
As shown in fig. 9, a schematic diagram of a server 500 is shown. The server 500 is, for example, a storage node in the foregoing distributed storage system, where the server 500 includes a memory 502, a plurality of magnetic disks 506, a hot spare disk 505, a processor 504, and a computer program 503 stored in the memory 502 and capable of running on the processor 504, and when the computer program 503 is executed by the processor 504, the data reconstruction method shown in fig. 3 is implemented, and the data to be reconstructed is sent to the hot spare disk 505, which is not described herein again to avoid repetition. Alternatively, when being executed by the processor 504, the computer program 503 implements the functions of each module/unit in the data reconstruction apparatus shown in fig. 7, and sends the data to be reconstructed to the hot standby disk 505, which is not described herein again to avoid repetition.
Illustratively, the computer program 503 may be partitioned into one or more modules/units, which are stored in the memory 502 and executed by the processor 504 to accomplish the present application. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 503 in the server 500. For example, the computer program 503 may be divided into the receiving module 310 and the reconstructing module 320 shown in fig. 7, and specific functions of each module are described in the data reconstructing method shown in fig. 3 or the data reconstructing apparatus shown in fig. 7, which are not described herein again.
The Memory 502 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 502 is used for storing a program, and the processor 504 executes the program after receiving an execution instruction, and the method defined by the flow disclosed in any of the foregoing embodiments of the present application may be applied to the processor 504, or implemented by the processor 504.
The processor 504 may be an integrated circuit chip having signal processing capabilities. The Processor 504 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Optionally, the hot spare disk 505 is configured to replace a failed disk when the disk fails, so that data reconstruction of data in the failed disk is performed in the hot spare disk 505.
Alternatively, the disk 506 may be a solid state disk, a mechanical disk, or a hybrid disk. Disk 506 is used to store duplicate data for a data management group.
It is understood that the configuration shown in fig. 9 is merely a schematic diagram of the configuration of the server 500, and that the server 500 may include more or less components than those shown in fig. 9. The components shown in fig. 9 may be implemented in hardware, software, or a combination thereof.
An embodiment of the present application further provides a storage medium, where instructions are stored in the storage medium, and when the instructions are run on a computer, when the computer program is executed by a processor, the data reconstruction method shown in fig. 3 is implemented, and details are not repeated here to avoid repetition. Alternatively, the computer program is executed by a processor to implement the data reconstruction method shown in fig. 6, and is not described here again to avoid repetition. Alternatively, when being executed by a processor, the computer program implements the functions of each module/unit in the data reconstruction apparatus shown in fig. 7, and is not described herein again for avoiding repetition. Alternatively, when being executed by a processor, the computer program implements the functions of each module/unit in the data reconstruction apparatus shown in fig. 8, and is not described herein again for avoiding repetition.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method of the various implementation scenarios of the present application.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

Claims (12)

1. A data reconstruction method is applied to a storage node of a distributed storage system, wherein the storage node comprises a plurality of disks located in a cluster topology of the distributed storage system and a hot standby disk not located in the cluster topology, and the method comprises the following steps:
receiving data to be reconstructed, returned by storage nodes associated with a failed disk in other storage nodes of the distributed storage system based on first cluster topology information; the first cluster topology information is generated when the failed disk exists in the disks and is used for representing that the hot spare disk is added into the cluster topology, and the first cluster topology information carries the identifier of the failed disk;
and storing the data to be reconstructed into the hot standby disk.
2. The method of claim 1, wherein prior to receiving the data to be reconstructed, the method further comprises:
determining that any one of the plurality of disks fails;
adding the hot standby disk into the cluster topology;
generating the first cluster topology information based on the failed disk and the hot standby disk added to the cluster topology;
and sending the first cluster topology information to the other storage nodes.
3. The method of claim 2, wherein determining that any one of the plurality of disks has failed comprises:
receiving monitoring information sent by a monitoring node, wherein the monitoring information comprises identification information used for representing whether one disk in the plurality of disks fails;
and determining that any one of the plurality of disks fails according to the identification information.
4. The method of claim 1, wherein prior to receiving the data to be reconstructed, the method further comprises:
receiving the first cluster topology information sent by a monitoring node; the first cluster topology information is generated after the monitoring node adds the hot spare disk into the cluster topology when monitoring the failed disk.
5. The method according to any one of claims 1-4, further comprising:
receiving second cluster topology information, wherein the second cluster topology information is generated when a disk fails in the other storage nodes, the second cluster topology information is used for representing that a hot spare disk of the storage node with the disk failure is added into the cluster topology, and the second cluster topology information carries the identification of the failed disk on the other storage nodes;
determining whether the failed disk is a disk associated with the failed disk according to the identification of the failed disk on the other storage nodes;
and if so, sending the data associated with the failed disk to the other storage nodes.
6. A data reconstruction method applied to a distributed storage system, where the distributed storage system includes a plurality of storage nodes and a monitoring node, the storage nodes include a plurality of disks located in a cluster topology of the distributed storage system and a hot standby disk not located in the cluster topology, and the method includes:
the monitoring nodes respectively monitor the running state of each disk in each storage node;
when the running state of any disk is monitored to be a failure state, the monitoring node adds the hot spare disk in the storage node corresponding to the failure disk with the running state being the failure state into the cluster topology to generate first cluster topology information;
and the monitoring node sends the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed into the hot spare disk.
7. A data reconstruction apparatus, applied to a storage node of a distributed storage system, where the storage node includes a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology, the apparatus comprising:
the receiving module is used for receiving data to be reconstructed, returned by storage nodes related to the failed disk in other storage nodes of the distributed storage system based on the first cluster topology information; the first cluster topology information is generated when the failed disk exists in the disks and is used for representing that the hot spare disk is added into the cluster topology, and the first cluster topology information carries the identifier of the failed disk;
and the reconstruction module is used for storing the data to be reconstructed into the hot standby disk.
8. The apparatus of claim 7, further comprising:
the first processing module is used for determining that any one of the plurality of disks fails before the receiving module receives the data to be reconstructed;
the second processing module is used for adding the hot standby disk into the cluster topology;
a generating module, configured to generate the first cluster topology information based on the failed disk and the hot spare disk added to the cluster topology;
and the sending module is used for sending the first cluster topology information to the other storage nodes.
9. The apparatus according to claim 8, wherein the first processing module is further configured to receive monitoring information sent by a monitoring node, where the monitoring information includes identification information for indicating whether there is a disk failure in the plurality of disks; and determining that any one of the plurality of disks fails according to the identification information.
10. The apparatus of claim 7, further comprising:
the receiving submodule is used for receiving the first cluster topology information sent by the monitoring node before the receiving module receives the data to be reconstructed; the first cluster topology information is generated after the monitoring node adds the hot spare disk into the cluster topology when monitoring the failed disk.
11. The apparatus of any one of claims 7-10, further comprising:
a third processing module, configured to receive second cluster topology information, where the second cluster topology information is generated when a disk failure occurs in the other storage nodes, the second cluster topology information is used to represent that a hot spare disk of a storage node with a disk failure has been added to the cluster topology, and the second cluster topology information carries an identifier of a failed disk on the other storage node; determining whether the failed disk is a disk associated with the failed disk according to the identification of the failed disk on the other storage nodes; and if so, sending the data associated with the failed disk to the other storage nodes.
12. A data reconstruction apparatus, applied to a distributed storage system, where the distributed storage system includes a plurality of storage nodes and a monitoring node, where the storage nodes include a plurality of disks located in a cluster topology of the distributed storage system and a hot spare disk not located in the cluster topology, and the apparatus includes:
the monitoring module is used for monitoring the running state of each disk in each storage node;
the processing module is used for adding the hot standby disk in the storage node corresponding to the failed disk with the failure state into the cluster topology to generate first cluster topology information when the operation state of any disk is monitored to be the failure state;
and the sending module is configured to send the first cluster topology information to each storage node, so that the storage node corresponding to the failed disk receives data to be reconstructed returned by other storage nodes in the distributed storage system according to the first cluster topology information, and stores the data to be reconstructed in the hot spare disk.
CN201910119237.4A 2019-02-14 2019-02-14 Data reconstruction method and device Active CN109901953B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910119237.4A CN109901953B (en) 2019-02-14 2019-02-14 Data reconstruction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910119237.4A CN109901953B (en) 2019-02-14 2019-02-14 Data reconstruction method and device

Publications (2)

Publication Number Publication Date
CN109901953A CN109901953A (en) 2019-06-18
CN109901953B true CN109901953B (en) 2022-07-08

Family

ID=66944968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910119237.4A Active CN109901953B (en) 2019-02-14 2019-02-14 Data reconstruction method and device

Country Status (1)

Country Link
CN (1) CN109901953B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354923A (en) * 2012-02-09 2013-10-16 华为技术有限公司 Method, device and system for data reconstruction
CN104461791A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Information processing method and device
CN106341448A (en) * 2016-08-15 2017-01-18 乐视控股(北京)有限公司 Distributed storage method, device and system
CN106471461A (en) * 2014-06-04 2017-03-01 纯存储公司 Automatically reconfigure storage device memorizer topology
CN106933707A (en) * 2017-03-15 2017-07-07 李经纬 A kind of data storage device data restoration methods and system
CN109271115A (en) * 2018-10-11 2019-01-25 重庆晨鲸科技有限公司 Store sharing method, device, block chain distributed network topology

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10514982B2 (en) * 2014-08-21 2019-12-24 Datrium, Inc. Alternate storage arrangement in a distributed data storage system with key-based addressing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354923A (en) * 2012-02-09 2013-10-16 华为技术有限公司 Method, device and system for data reconstruction
CN106471461A (en) * 2014-06-04 2017-03-01 纯存储公司 Automatically reconfigure storage device memorizer topology
CN104461791A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Information processing method and device
CN106341448A (en) * 2016-08-15 2017-01-18 乐视控股(北京)有限公司 Distributed storage method, device and system
CN106933707A (en) * 2017-03-15 2017-07-07 李经纬 A kind of data storage device data restoration methods and system
CN109271115A (en) * 2018-10-11 2019-01-25 重庆晨鲸科技有限公司 Store sharing method, device, block chain distributed network topology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于备份的RAID1在线重构框架;徐伟;《计算机应用与软件》;20180315(第03期);38-43+54 *

Also Published As

Publication number Publication date
CN109901953A (en) 2019-06-18

Similar Documents

Publication Publication Date Title
US8522073B2 (en) Distributed storage of recoverable data
US10114580B1 (en) Data backup management on distributed storage systems
CN107844268B (en) Data distribution method, data storage method, related device and system
CN106776130B (en) Log recovery method, storage device and storage node
CN111031096B (en) Distributed storage system construction method based on mimicry defense
US20060080574A1 (en) Redundant data storage reconfiguration
US11307776B2 (en) Method for accessing distributed storage system, related apparatus, and related system
US20160006461A1 (en) Method and device for implementation data redundancy
CN109656896B (en) Fault repairing method and device, distributed storage system and storage medium
US20130031221A1 (en) Distributed data storage system and method
CN109726036B (en) Data reconstruction method and device in storage system
CN111124264A (en) Method, apparatus and computer program product for reconstructing data
US11809295B2 (en) Node mode adjustment method for when storage cluster BBU fails and related component
CN104679623A (en) Server hard disk maintaining method, system and server monitoring equipment
US20070174671A1 (en) Restoring data to a distributed storage node
CN112748856A (en) Method of managing disc, electronic device, and computer program product
CN116974489A (en) Data processing method, device and system, electronic equipment and storage medium
CN109901953B (en) Data reconstruction method and device
CN111752892B (en) Distributed file system and implementation method, management system, equipment and medium thereof
WO2020034695A1 (en) Data storage method, data recovery method, apparatus, device and storage medium
CN105323271A (en) Cloud computing system, and processing method and apparatus thereof
CN111488124A (en) Data updating method and device, electronic equipment and storage medium
CN107045426B (en) Multi-copy reading method and system
CN115756955A (en) Data backup and data recovery method and device and computer equipment
CN114880165A (en) Data recovery method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant