Distributed data inspection method and device, electronic equipment and storage medium

By using ckg as a unit concurrent inspection method in distributed storage systems, the problems of low inspection efficiency and great impact on disk performance in traditional technologies are solved, and efficient silent error detection and repair are achieved.

CN119473117APending Publication Date: 2025-02-18RUIJIE NETWORKS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310995253.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Traditional data sharding inspection methods cannot guarantee the continuity of disk reading and writing, affect disk performance, have low patrol efficiency, and are difficult to detect and repair silent errors in time, resulting in data loss.

Method used

By introducing disk slice groups (ckgs) into a distributed storage system, each ckg consists of multiple slices, from different disks, and inspects concurrently using ckg as units to ensure the effective execution of inspection instructions and the continuity of data.

Benefits of technology

It improves the patrol efficiency of distributed data, reduces the impact on disk performance, and can promptly detect and fix silent errors to avoid data loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473117A_ABST
    Figure CN119473117A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed data inspection method and device, electronic equipment and a storage medium, and belongs to the technical field of data storage, the method comprises the following steps: receiving an inspection instruction sent by a main storage node, the inspection instruction being used for indicating a disk slice group ckg corresponding to data to be inspected, each ckg is formed by selecting a preset number of slices from a plurality of slices divided by a plurality of disks of the distributed storage system, and the preset number of slices in each ckg are respectively from different disks; in response to the inspection instruction, determining the ckg of the current round of inspection from the at least one ckg allocated to the respective corresponding slave storage node; and informing a ckg inspection execution unit corresponding to the ckg in the current round of inspection in each corresponding slave storage node, and performing inspection on the ckg in the current round of inspection. Therefore, the inspection efficiency of the distributed data can be improved, the continuity of reading and writing the data by the disk is ensured, and the influence on the performance of the disk is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage technology, and in particular to a distributed data inspection method, device, electronic device and storage medium. Background Art

[0002] During the use of the disk, in addition to routine failures such as hardware errors and power supply problems that can be captured and alarmed normally, some errors that cannot be warned may also occur. Users do not discover that the data is wrong or damaged until they use it. This type of error is a silent error.

[0003] Since silent disk errors cannot be discovered by users in a timely manner, if the copies or redundant data in the storage system also fail at the same time, data will be lost, causing immeasurable losses to users. Therefore, it is particularly important to discover and repair silent data errors in a timely manner.

[0004] In traditional technology, inspection is mainly based on data sharding. However, the location of the sharded data cannot be guaranteed to correspond one-to-one with the actual physical location of the disk. In other words, the inspection scheme using data sharding cannot guarantee the continuity of disk reading and writing, which affects disk performance and has low inspection efficiency.

[0005] Therefore, how to improve the inspection efficiency of distributed data and reduce the impact on disk performance is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The embodiments of the present application provide a distributed data inspection method, device, electronic device and storage medium to improve the inspection efficiency of distributed data and reduce the impact on disk performance.

[0007] In a first aspect, an embodiment of the present application provides a distributed data inspection method, which is applied to a slave storage node of a distributed storage system, wherein the distributed storage system includes a master storage node and a plurality of slave storage nodes connected to the master storage node, and the method includes:

[0008] Receive a patrol instruction sent by the primary storage node, the patrol instruction is used to indicate a disk slice group ckg corresponding to the data to be patrolled, wherein each ckg is composed of a preset number of slices selected from a plurality of slices divided by a plurality of disks of the distributed storage system, and the preset number of slices in each ckg are from different disks;

[0009] In response to the inspection instruction, determining a ckg for this round of inspection from at least one ckg allocated to each corresponding slave storage node;

[0010] Notify the ckg inspection execution units corresponding to the ckg of the current round of inspection in the corresponding slave storage nodes, and perform inspection on the ckg of the current round of inspection, wherein one ckg corresponds to one ckg inspection execution unit.

[0011] In some embodiments, determining the ckg for the current round of inspection from at least one ckg allocated to the corresponding slave storage nodes includes:

[0012] Determine the ckg for the current round of inspection from the at least one ckg according to the total number of inspection errors;

[0013] After notifying the ckg inspection execution units corresponding to the ckg of the current round of inspection in the respective slave storage nodes and inspecting the ckg of the current round of inspection, the method further includes:

[0014] If it is determined that an inspection error occurs in the ckg of this round of inspection, the number of times the ckg to be inspected has errors is recorded and stored in a distributed database, wherein the distributed database is used to store the total number of inspection errors that occur in each ckg, and is communicated with the master storage node and each slave storage node.

[0015] In some embodiments, each slave storage node runs multiple virtual disks Vdisks, each Vdisk is composed of a preset number of ckgs;

[0016] The step of determining a ckg for the current round of inspection from at least one ckg allocated to each corresponding slave storage node comprises:

[0017] Notify the Vdisk inspection execution units corresponding to each Vdisk in the corresponding slave storage nodes to determine the ckg for the current inspection according to the total number of inspection errors from at least one allocated ckg, wherein one Vdisk corresponds to one Vdisk inspection execution unit.

[0018] In some embodiments, the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction includes at least one of multiple ckgs corresponding to all data; and at least one of the multiple ckgs corresponding to all data includes a ckg corresponding to data with a silent error.

[0019] In some embodiments, the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically; or

[0020] The patrol instruction is configured to be sent by the main storage node when the main storage node determines that any data has a silent error during reading or writing.

[0021] In some embodiments, when the inspection instruction is configured to be sent by the master storage node at a preset time or periodically, the step of determining the ckg for this round of inspection from at least one ckg allocated to each corresponding slave storage node in response to the inspection instruction includes:

[0022] According to the identifier of each ckg in the inspection instruction, the ckg for the current inspection round is determined from at least one ckg allocated to the corresponding slave storage node.

[0023] In some embodiments, when the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically, the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction is the ckg corresponding to all the data;

[0024] The step of determining the ckg for the current round of inspection from at least one ckg allocated to the corresponding slave storage node in response to the inspection instruction further includes:

[0025] Determine a first ckg from at least one ckg allocated to the corresponding slave storage node according to the identifier of each ckg in the inspection instruction;

[0026] Determine the inspection priority of the first ckg according to the total number of inspection errors corresponding to the first ckg according to the positive correlation principle;

[0027] According to the inspection priority of the first ckg, a preset number of ckgs screened in descending order are determined as the ckgs for the current round of inspection.

[0028] In some embodiments, the patrol instruction is configured to be sent by the main storage node at a preset time or periodically, and the disk slice group ckg where the data to be patrolled indicated by the patrol instruction is located is the ckg corresponding to the partial data, wherein the ckg corresponding to the partial data is determined by the main storage node based on the patrol priority of the ckg of all the data, and a preset number of ckgs are screened from the ckg of all the data in order from high to low, and the patrol priority of the ckg of all the data is determined by the main storage node based on the total number of patrol errors of each ckg in the distributed database according to the positive correlation principle.

[0029] In some embodiments, the notifying the ckg inspection execution units corresponding to the ckg of the current inspection in the respective slave storage nodes and inspecting the ckg of the current inspection includes:

[0030] Notify each Vdisk inspection execution unit in the corresponding slave storage node to distribute the ckg of the current inspection to the ckg inspection execution unit corresponding to the ckg of the current inspection, and perform inspection on the ckg of the current inspection.

[0031] In some embodiments, distributing the ckg of the current round of inspection to the ckg inspection execution unit corresponding to the ckg of the current round of inspection, and inspecting the ckg of the current round of inspection includes:

[0032] Distribute the ckg of the current round of inspection to the ckg inspection execution units corresponding to the ckg of the current round of inspection and send inspection instructions to each ckg inspection execution unit, so that each ckg inspection execution unit responds to the inspection instruction and reads the data stored in the ckg corresponding to the ckg inspection execution unit, wherein the data includes the user's original data and the checksum of the original data, and the backup data of the user's original data and the checksum of the original data;

[0033] respectively calculating a checksum of the original data and a checksum of the backup data, and comparing the checksum of the original data with the checksum of the original data to obtain a first comparison result;

[0034] Comparing the checksum of the backup data with the check code of the backup data to obtain a second comparison result;

[0035] Based on the first comparison result and the second comparison result, an inspection result is determined and corresponding processing is performed when the inspection result is abnormal.

[0036] In some embodiments, determining the inspection result and performing corresponding processing when the inspection result is abnormal includes:

[0037] If the first comparison result and the second comparison result are consistent, it is determined that no silent error occurs in the data;

[0038] If any comparison result is inconsistent, repair the data with inconsistent comparison results according to the data with consistent comparison results;

[0039] The repaired data is rewritten into the ckg, and the number of inspection errors occurring in the ckg is recorded, and the recording result is stored in a distributed database.

[0040] In some embodiments, the inspection instruction includes a bandwidth of the inspection read data IO preset by the quality of service Qos, so that each ckg inspection execution unit responds to the inspection instruction and reads the data file stored in each fragment in the ckg corresponding to the ckg inspection execution unit according to the bandwidth of the inspection read data IO preset by the Qos;

[0041] Among them, the pre-set patrol read data IO bandwidth is that when the disk bandwidth reaches full load, the patrol read data IO bandwidth is not greater than the first threshold of the disk service IO bandwidth; when the disk traffic does not reach full load, the patrol read data IO bandwidth matches the required maximum bandwidth value.

[0042] In a second aspect, an embodiment of the present application provides a distributed data inspection device, which is applied to a slave storage node of a distributed storage system, wherein the distributed storage system includes a master storage node and a plurality of slave storage nodes connected to the master storage node, including:

[0043] a receiving module, configured to receive a patrol instruction sent by the primary storage node, wherein the patrol instruction is used to indicate a disk slice group ckg corresponding to the data to be patrolled, wherein each ckg is composed of a preset number of slices selected from a plurality of slices divided by a plurality of disks of the distributed storage system, and the preset number of slices in each ckg are from different disks;

[0044] A determination module, configured to determine, in response to the inspection instruction, a ckg for the current inspection from at least one ckg allocated to the respective corresponding slave storage nodes;

[0045] The inspection module is used to notify the ckg inspection execution units corresponding to the ckg of the current inspection in the corresponding slave storage nodes, and to inspect the ckg of the current inspection, wherein one ckg corresponds to one ckg inspection execution unit.

[0046] In some embodiments, the determining module is specifically configured to:

[0047] From the at least one ckg, the ckg for the current round of inspection is determined according to the total number of inspection errors.

[0048] The inspection module is also used for:

[0049] If it is determined that an inspection error occurs in the ckg of this round of inspection, the number of times the ckg to be inspected has errors is recorded and stored in a distributed database, wherein the distributed database is used to store the total number of inspection errors that occur in each ckg, and is communicated with the master storage node and each slave storage node.

[0050] In some embodiments, each slave storage node runs multiple virtual disks Vdisks, each Vdisk is composed of a preset number of ckgs; the determination module is specifically used to:

[0051] Notify the Vdisk inspection execution units corresponding to each Vdisk in the corresponding slave storage nodes to determine the ckg for the current inspection according to the total number of inspection errors from at least one allocated ckg, wherein one Vdisk corresponds to one Vdisk inspection execution unit.

[0052] In some embodiments, the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction includes at least one of multiple ckgs corresponding to all data; and at least one of the multiple ckgs corresponding to all data includes a ckg corresponding to data with a silent error.

[0053] In some embodiments, the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically; or

[0054] The patrol instruction is configured to be sent by the main storage node when the main storage node determines that any data has a silent error during reading or writing.

[0055] In some embodiments, when the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically, the determination module is specifically configured to:

[0056] According to the identifier of each ckg in the inspection instruction, the ckg for the current inspection round is determined from at least one ckg allocated to the corresponding slave storage node.

[0057] In some embodiments, when the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically, the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction is the ckg corresponding to all the data, and the determination module is further used to:

[0058] Determine a first ckg from at least one ckg allocated to the corresponding slave storage node according to the identifier of each ckg in the inspection instruction;

[0059] Determine the inspection priority of the first ckg according to the total number of inspection errors corresponding to the first ckg according to the positive correlation principle;

[0060] According to the inspection priority of the first ckg, a preset number of ckgs screened in descending order are determined as the ckgs for the current round of inspection.

[0061] In some embodiments, the patrol instruction is configured to be sent by the main storage node at a preset time or periodically, and the disk slice group ckg where the data to be patrolled indicated by the patrol instruction is located is the ckg corresponding to the partial data, wherein the ckg corresponding to the partial data is determined by the main storage node based on the patrol priority of the ckg of all the data, and a preset number of ckgs are screened from the ckg of all the data in order from high to low, and the patrol priority of the ckg of all the data is determined by the main storage node based on the total number of patrol errors of each ckg in the distributed database according to the positive correlation principle.

[0062] In some embodiments, the inspection module is specifically used to:

[0063] Notify each Vdisk inspection execution unit in the corresponding slave storage node to distribute the ckg of the current inspection to the ckg inspection execution unit corresponding to the ckg of the current inspection, and perform inspection on the ckg of the current inspection.

[0064] In some embodiments, the inspection module is specifically used to:

[0065] Distribute the ckg of the current round of inspection to the ckg inspection execution units corresponding to the ckg of the current round of inspection and send inspection instructions to each ckg inspection execution unit, so that each ckg inspection execution unit responds to the inspection instruction and reads the data stored in the ckg corresponding to the ckg inspection execution unit, wherein the data includes the user's original data and the checksum of the original data, and the backup data of the user's original data and the checksum of the original data;

[0066] respectively calculating a checksum of the original data and a checksum of the backup data, and comparing the checksum of the original data with the checksum of the original data to obtain a first comparison result;

[0067] Comparing the checksum of the backup data with the check code of the backup data to obtain a second comparison result;

[0068] Based on the first comparison result and the second comparison result, an inspection result is determined and corresponding processing is performed when the inspection result is abnormal.

[0069] In some embodiments, the inspection module is specifically used to:

[0070] If the first comparison result and the second comparison result are consistent, it is determined that no silent error occurs in the data;

[0071] If any comparison result is inconsistent, repair the data with inconsistent comparison results according to the data with consistent comparison results;

[0072] The repaired data is rewritten into the ckg, and the number of inspection errors occurring in the ckg is recorded, and the recording result is stored in a distributed database.

[0073] In some embodiments, the inspection instruction includes a bandwidth of the inspection read data IO preset by the quality of service Qos, so that each ckg inspection execution unit responds to the inspection instruction and reads the data file stored in each fragment in the ckg corresponding to the ckg inspection execution unit according to the bandwidth of the inspection read data IO preset by the Qos;

[0074] Among them, the pre-set patrol read data IO bandwidth is that when the disk bandwidth reaches full load, the patrol read data IO bandwidth is not greater than the first threshold of the disk service IO bandwidth; when the disk traffic does not reach full load, the patrol read data IO bandwidth matches the required maximum bandwidth value.

[0075] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein: the memory stores instructions executed by the at least one processor; the instructions are executed by the at least one processor so that the at least one processor can execute a method as described in any of the above aspects.

[0076] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is used to execute the method described in any of the above aspects.

[0077] In an embodiment of the present application, a distributed storage system includes a master storage node and a plurality of slave storage nodes connected to the master storage node, and receives a patrol instruction sent by the master storage node, wherein the patrol instruction is used to indicate a disk slice group ckg corresponding to the data to be patrolled, wherein each ckg is composed of a preset number of slices selected from a plurality of slices divided by a plurality of disks of the distributed storage system, and the preset number of slices in each ckg are from different disks; in response to the patrol instruction, a ckg for this round of patrol is determined from at least one ckg allocated to each corresponding slave storage node; and a ckg patrol execution unit corresponding to the ckg for this round of patrol in each corresponding slave storage node is notified, and the ckg for this round of patrol is patrolled concurrently, wherein one ckg corresponds to one ckg patrol execution unit. In this way, patrolling concurrently in units of ckg can improve the patrol efficiency of distributed data, and at the same time, ensure the continuity of disk read and write data, and reduce the impact on disk performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0079] Figure 1 A flow chart of a distributed data inspection method provided in an embodiment of the present application;

[0080] Figure 2 A schematic diagram of a disk slice provided in an embodiment of the present application;

[0081] Figure 3 A flow chart of another distributed data inspection method provided in an embodiment of the present application;

[0082] Figure 4 Another disk slicing schematic diagram provided in an embodiment of the present application;

[0083] Figure 5 A schematic diagram of a distributed storage system structure provided in an embodiment of the present application;

[0084] Figure 6 A schematic diagram of the structure of a distributed data inspection device provided in an embodiment of the present application;

[0085] Figure 7 A schematic diagram of the hardware structure of an electronic device for implementing a distributed data inspection method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0086] In order to improve the inspection efficiency of distributed data and reduce the impact on disk performance, the embodiments of the present application provide a distributed data inspection method, device, electronic device and storage medium.

[0087] It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist, and B exists alone. A is connected to B, which can represent two situations: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0088] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0089] Figure 1 A flowchart of a distributed data inspection method provided in an embodiment of the present application, the distributed storage system includes a master storage node and multiple slave storage nodes connected to the master storage node, the method is applied to the slave storage node, and the method includes the following steps.

[0090] In step 101, a patrol instruction sent by a main storage node is received, where the patrol instruction is used to indicate a disk slice group ckg corresponding to the data to be patrolled, wherein each ckg is composed of a preset number of slices selected from multiple slices divided from multiple disks of a distributed storage system, and the preset number of slices in each ckg come from different disks.

[0091] In specific implementation, the inspection instruction is used to indicate the disk slice group (Chunk Group, ckg) corresponding to the data to be inspected. Figure 2 A disk slicing schematic diagram provided in an embodiment of the present application, such as Figure 2 As shown, the storage pool consists of three physical disks, namely Disk A, Disk B and Disk C. Each disk in the storage pool is evenly divided into three slices, for example, divided into Chunks of the same capacity, and then a Chunk is selected from Disk A, Disk B and Disk C to obtain a ckg. An identifier is set for each ckg, that is, ckg1, ckg2, and ckg3 are obtained. It should be noted that the method and number of dividing ckgs here are only used for illustration of the embodiments of the present application and are not specifically limited. In actual applications, developers can set them according to actual needs. Afterwards, ckg1 can be assigned to storage node 1 for management, ckg2 can be assigned to storage node 2 for management, and ckg3 can be assigned to storage node 3 for management.

[0092] In specific implementation, the inspection instruction can be configured to be sent by the main storage node at a preset time or periodically, or can be configured to be sent by the main storage node when the main storage node determines that any data has a silent error when reading or writing. In addition, the inspection instruction can also be configured to be immediately triggered when the main storage node receives an inspection instruction triggered by a user, such as the inspection instruction specifies that the user inspects all data files or a certain data file, and the inspection instruction may include time information, and the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction includes at least one of the multiple ckgs corresponding to all the data, and at least one of the multiple ckgs corresponding to all the data includes the ckg corresponding to the data with a silent error.

[0093] In step 102, in response to the inspection instruction, a ckg for the current inspection round is determined from at least one ckg allocated to each corresponding slave storage node.

[0094] In specific implementation, the ckg for this round of inspection can be determined according to the total number of inspection errors from at least one ckg allocated to each corresponding slave storage node. For example, a preset number of ckgs in the order of the number of inspection errors is selected, or a preset proportion of ckgs in the order of the number of inspection errors is selected, and the selected ckgs are determined as the ckgs for this round of inspection.

[0095] Wherein, each slave storage node runs a plurality of virtual disks Vdisks respectively, each Vdisk is composed of a preset number of ckgs, and one Vdisk corresponds to one Vdisk inspection execution unit.

[0096] Therefore, the Vdisk inspection execution units corresponding to each Vdisk in the corresponding slave storage nodes may also be notified to determine the ckg for the current inspection according to the total number of inspection errors from at least one allocated ckg.

[0097] In specific implementation, the inspection instruction can be configured to be sent by the primary storage node at a preset time or periodically. At this time, according to the different disk slice groups ckg corresponding to the data to be inspected indicated by the inspection instruction, the ckg for this round of inspection can be determined in the following two cases:

[0098] The first case: the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction is the ckg corresponding to all the data. At this time, the ckg for this round of inspection can be determined from at least one ckg allocated to the corresponding slave storage node according to the identifier of each ckg in the inspection instruction.

[0099] For example, the ckgs corresponding to all the data are ckg1, ckg2, and ckg3, and the slave storage nodes are slave storage node 1, slave storage node 2, and slave storage node 3, respectively. Slave storage node 1 is assigned ckg1, slave storage node 2 is assigned ckg2, and slave storage node 3 is assigned ckg3. When the master storage node sends a patrol instruction to each slave storage node and indicates in the patrol instruction that the disk slice group ckg corresponding to the data to be patrolled is the ckg corresponding to all the data, patrol is performed on ckg1, ckg2, and ckg3. Each slave storage node can match at least one ckg assigned to each slave storage node according to the ckg identifier of the data to be patrolled indicated in the patrol instruction. Slave storage node 1 determines that it matches ckg1 in the patrol instruction, slave storage node 2 determines that it matches ckg2 in the patrol instruction, and slave storage node 3 determines that it matches ckg3 in the patrol instruction. Then ckg1, ckg2, and ckg3 are determined as the ckgs for this round of patrol.

[0100] In this way, all data are inspected periodically to facilitate timely discovery of data files with silent errors, which can then be repaired in a timely manner, effectively avoiding loss of user data.

[0101] During specific implementation, the first ckg can also be determined from at least one ckg allocated to each corresponding slave storage node, and the inspection priority of the first ckg can be determined according to the total number of inspection errors corresponding to the first ckg according to the positive correlation principle. According to the inspection priority of the first ckg, a preset number of ckgs screened in order from high to low can be used to determine the ckg for this round of inspection.

[0102] For example, the inspection instruction instructs to inspect the ckgs corresponding to all data, that is, ckg1, ckg2, and ckg3, and matches the ckgs allocated from the storage nodes according to the identifiers of each ckg in the inspection instruction. It is learned that ckg1 from storage node 1 matches ckg1 in the inspection instruction, ckg2 from storage node 2 matches ckg2 in the inspection instruction, and ckg3 from storage node 3 matches ckg3 in the inspection instruction. According to the total number of inspection errors of each ckg in the distributed database, it is determined that the number of inspection errors of ckg1 is 2 times, the number of inspection errors of ckg2 is 5 times, and the number of inspection errors of ckg3 is 8 times. According to the principle of positive correlation, it is determined that the inspection priority of ckg3 is higher than the inspection priority of ckg1, which is higher than the inspection priority of ckg2. Then, a preset number of ckgs are screened in order from high to low. For example, if the preset number is 2, the ckgs for this round of inspection are ckg3 and ckg1.

[0103] In this way, the storage node sets the inspection priority of each ckg according to the total number of inspection errors that occur in each ckg in the historical inspection results recorded in the distributed database. In the next round of inspection, the ckg with a high priority, that is, the ckg with a large number of inspection errors, is selected for inspection. Prioritizing inspection of ckgs with high risks can further speed up the inspection rate and facilitate timely discovery of silent error data files.

[0104] The second case: the disk slice group ckg where the data to be inspected indicated by the inspection instruction is located is the ckg corresponding to partial data. At this time, the ckg corresponding to partial data is determined by the inspection priority of the main storage node based on the ckg of all data, and a preset number of ckgs are screened from the ckg of all data in order from high to low. The inspection priority of the ckg of all data is determined by the main storage node based on the total number of inspection errors of each ckg in the distributed database according to the positive correlation principle.

[0105] In this way, in addition to the slave storage node being able to determine the inspection priority of the cgg, the master storage node can also first determine the inspection priority of the cgg, and then only carry a preset number of cggs with high inspection priority in the inspection instruction and send it to each slave storage node for inspection, making the inspection method more flexible.

[0106] In specific implementation, the inspection instruction can also be configured to be sent by the primary storage node when the primary storage node determines that any data has a silent error when reading or writing. At this time, according to the different disk slice groups ckg corresponding to the data to be inspected indicated by the inspection instruction, the ckg for this round of inspection can be divided into the following three situations:

[0107] The first case: the disk slice group ckg indicated by the inspection instruction where the data to be inspected is located is the ckg corresponding to the data with silent errors. At this time, the identifier of each ckg in the inspection instruction can be matched with at least one ckg allocated from the corresponding storage node, and the one that matches is determined as the ckg for this round of inspection.

[0108] In this way, in addition to performing inspections when the inspection cycle is reached, the master storage node can also be triggered to send inspection instructions to the slave storage node when a silent error occurs when the user reads or writes any data file. This avoids waiting for a long inspection cycle and can immediately discover and repair data files with silent errors and other undiscovered data files with silent errors.

[0109] The second situation: the disk slice group ckg indicated by the inspection instruction where the data to be inspected is located is the ckg corresponding to all data including the data with silent errors. At this time, the identifier of each ckg in the inspection instruction can be used to match it with at least one ckg allocated from the corresponding storage node, and the one that matches the ckg is determined as the ckg for this round of inspection.

[0110] In this way, in addition to timely inspecting the data with silent errors, the ckg corresponding to all data can also be inspected at the same time, so that other undiscovered data files with silent errors can be discovered and repaired in the first time.

[0111] During specific implementation, the identifier of each ckg in the inspection instruction can be matched with at least one ckg allocated from the corresponding storage node, and the second ckg corresponding to the data with silent error can be screened out from the ckg with consistent matching. The inspection priority of the remaining ckgs in the consistent matching ckg can be determined according to the positive correlation principle based on the total number of inspection errors of each ckg in the distributed database. According to the inspection priority of the remaining ckgs, a preset number of third ckgs can be screened in descending order, and the second ckg and the third ckg can be determined as the ckgs for this round of inspection.

[0112] For example, the inspection instruction carries the ckg corresponding to all data files. Assume that the ckg corresponding to all data files are ckg1, ckg2, and ckg3, among which the second ckg corresponding to the data file with silent error is ckg2, and the inspection priority of the remaining ckgs is ckg3, which is higher than ckg1. Assume that the third ckg with a preset number of 1 is screened in order from high to low, the third ckg is ckg3, and the ckgs for this round of inspection are ckg2 and ckg3.

[0113] In this way, in addition to repairing data files with silent errors, ckgs with high inspection priorities among the remaining ckgs are selected to participate in the inspection, which improves the inspection efficiency while checking other data files.

[0114] The third case: the disk slice group ckg indicated by the inspection instruction where the data to be inspected is located is the ckg corresponding to some data including the data with silent errors. At this time, the ckg corresponding to some data is the ckg corresponding to the data with silent errors in the primary storage node, and is determined by screening out a preset number of ckgs in descending order based on the ckg inspection priority of the remaining data except the data with silent errors in all the data; wherein the ckg inspection priority of the remaining data is determined according to the positive correlation principle based on the total number of ckg inspection errors in the distributed database.

[0115] In this way, in addition to the slave storage node being able to determine the inspection priority of the cgg, the master storage node can also, after determining the inspection priority of each cgg except the cgg corresponding to the data file with silent errors, carry the cgg corresponding to the data file with silent errors and a preset number of cggs with high inspection priority in the inspection instruction and send it to each slave storage node for inspection, making the inspection method more flexible.

[0116] In step 103, the ckg inspection execution units corresponding to the ckg of this round of inspection in the corresponding slave storage nodes are notified to inspect the ckg of this round of inspection, wherein one ckg corresponds to one ckg inspection execution unit.

[0117] In specific implementation, each Vdisk inspection execution unit in the corresponding slave storage node can be notified to distribute the ckg of this round of inspection to the ckg inspection execution unit corresponding to the ckg of this round of inspection, and then inspect the ckg of this round of inspection.

[0118] The ckg of this round of inspection is distributed to the ckg inspection execution unit corresponding to the ckg of this round of inspection, and an inspection instruction is sent to each ckg inspection execution unit, so that each ckg inspection execution unit responds to the inspection instruction and reads the data stored in the ckg corresponding to the ckg inspection execution unit, wherein the data includes the user's original data and the checksum of the original data, and the backup data of the user's original data and the checksum of the original data. The check code of the original data and the check code of the backup data are calculated respectively, and the checksum of the original data is compared with the check code of the original data to obtain a first comparison result; the checksum of the backup data is compared with the check code of the backup data to obtain a second comparison result; based on the first comparison result and the second comparison result, the inspection result is determined and corresponding processing is performed when the inspection result is abnormal.

[0119] Among them, if the first comparison result and the second comparison result are consistent, it is determined that no silent error occurs in the data; if any comparison result is inconsistent, the data with inconsistent comparison results is repaired according to the data with consistent comparison results; then the repaired data is rewritten into the ckg, and the number of inspection errors that occur in the ckg is recorded once, and the recorded results are stored in the distributed database.

[0120] It should be noted that if the first comparison result and the second comparison result are inconsistent, it is determined that both the original data file and the backup data file have silent errors, and data repair is impossible.

[0121] In actual applications, after forming multiple ckgs, each ckg can actually be divided according to finer-grained fragments, where each fragment can be the smallest storage unit in the data writing process. In this way, each time a part of data is written, the data can be written into a fragment, making data storage more flexible. Therefore, there may be fragments in any ckg that have no user data written. Since there is no user data, these fragments can also not participate in the inspection and can be directly skipped during the inspection process.

[0122] Therefore, when notifying the ckg inspection execution unit corresponding to the ckg of the current round of inspection to inspect each segment in the ckg of the current round of inspection, the ckg inspection execution unit can first determine whether the user data file is written into each segment, and if so, inspect the segment, and if not, skip the segment and inspect the next segment. In this way, the inspection efficiency can be further improved.

[0123] In specific implementation, the inspection instruction also includes the bandwidth of the inspection reading data IO preset by the quality of service Qos, so that each ckg inspection execution unit responds to the inspection instruction and reads the data files stored in each fragment in the ckg corresponding to the ckg inspection execution unit according to the bandwidth of the inspection reading data IO preset by the Qos;

[0124] The preset patrol read data IO bandwidth is that when the disk bandwidth reaches full load, the patrol read data IO bandwidth is not greater than the first threshold of the disk service IO bandwidth; when the disk traffic does not reach full load, the patrol read data IO bandwidth matches the required maximum bandwidth value. The first threshold is, for example, 25%.

[0125] In this way, using disk-level QoS to limit the inspection bandwidth can not only avoid the inspection affecting the user's business bandwidth, but also quickly inspect the ckg with less business pressure.

[0126] In the specific implementation, the ckg inspection execution unit corresponding to the ckg of this round of inspection in the corresponding slave storage node is notified, and after the ckg of this round of inspection is inspected, if it is determined that the ckg of this round of inspection has an inspection error, the number of errors in the ckg to be inspected is recorded and stored in the distributed database, wherein the distributed database is used to store the total number of inspection errors of each ckg, and is connected to the master storage node and each slave storage node. The total number of inspection errors of any ckg can be accumulated all the time, or it can be accumulated from the time the repair is completed, and it can also be set to the total number of times within a preset time period counted in the distributed database, such as the past month, year, etc.

[0127] In this embodiment, inspection is performed concurrently in units of ckg, which can improve the inspection efficiency of distributed data. At the same time, it can also ensure the continuity of disk reading and writing data, reducing the impact on disk performance.

[0128] Figure 3 A flowchart of another distributed data inspection method provided in an embodiment of the present application, wherein the distributed storage system includes a master storage node and multiple slave storage nodes connected to the master storage node, the method is applied to the master storage node, and the method includes the following steps.

[0129] In step 301, when it is determined that the trigger condition of the inspection instruction is met, the disk slice group ckg where the data to be inspected is located is determined, wherein each ckg is composed of a preset number of slices selected from multiple slices divided by multiple disks of the distributed storage system, and the preset number of slices in each ckg come from different disks.

[0130] In some embodiments, the triggering condition of the patrol command is the arrival of a preset time or a preset period, or the triggering condition of the patrol command is determining that a silent error exists in any data when reading or writing.

[0131] On the one hand, when the trigger condition of the inspection instruction is reaching a preset time or a preset cycle, the disk slice group ckg where the data to be inspected is located is determined, and the ckg corresponding to all the data can be obtained, and the ckg corresponding to all the data is determined as the disk slice group ckg where the data to be inspected is located; the inspection priority of the ckg corresponding to all the data can also be determined according to the positive correlation principle based on the total number of inspection errors of each ckg in the distributed database, wherein the distributed database is communicated with the main storage node and each slave storage node, and based on the inspection priority of the ckg corresponding to all the data, a preset number of ckgs screened in descending order are determined as the disk slice group ckg where the data file to be inspected is located.

[0132] On the other hand, when the trigger condition of the inspection instruction is to determine that any data has a silent error when reading or writing, determining the disk slice group ckg where the data file to be inspected is located can be to determine the ckg corresponding to the data with the silent error as the disk slice group ckg where the data file to be inspected is located; it can also be to determine the ckg corresponding to the data with the silent error as the fourth ckg, and based on the ckg inspection priority corresponding to the remaining data in all the data except the data with the silent error, screen a preset number of fifth ckgs in order from high to low, and determine the fourth ckg and the fifth ckg as the disk slice group ckg where the data to be inspected is located, wherein the ckg inspection priority corresponding to the remaining data is determined based on the total number of ckg inspection errors in the distributed database and according to the positive correlation principle.

[0133] In step 302, the determined ckg is carried in a patrol instruction and sent to each slave storage node, so that each slave storage node determines the ckg for this round of patrol from at least one ckg allocated to each of them and patrols the ckg for this round of patrol.

[0134] The present application is described in detail below with reference to specific embodiments.

[0135] first, Figure 4 Another disk slicing schematic diagram provided in the embodiment of the present application is as follows: Figure 4As shown, the storage pool consists of three disks, namely Disk A, Disk B and Disk C. Each disk in the storage pool is evenly divided into three Chunks of the same capacity. Then, a Chunk is selected from Disk A, Disk B and Disk C to obtain a ckg. Each ckg is set with an identifier, namely ckg1, ckg2, and ckg3. After that, each Chunk in each ckg is divided into finer-grained slices Strips. Multiple strips from different Chunks are combined into a fragment Segment to obtain Segment1, Segment2, and Segment3. Finally, every three Segments are combined into a virtual disk Vdisk to obtain Vdisk1, Vdisk2, and Vdisk3. Vdisk1 is allocated to slave storage node 1 for management, Vdisk2 is allocated to slave storage node 2 for management, and Vdisk3 is allocated to slave storage node 3 for management.

[0136] In specific implementation, the distributed storage system includes a master storage node and multiple slave storage nodes, such as Figure 5 As shown, Figure 5 A schematic diagram of the structure of a distributed storage system is provided for an embodiment of the present application, wherein the master storage node includes a patrol management unit, a patrol control unit and two Vdisk patrol control units, namely Vdisk1 patrol control unit and Vdisk2 patrol control unit, including two slave storage nodes, and each slave storage node is assigned a Vdisk patrol execution unit and three ckg patrol execution units and a ckg corresponding to the ckg patrol execution unit.

[0137] In specific implementation, based on the above Figure 4 In the disk slicing method, when the distributed storage system writes user data, the user's original data and the checksum of the original data, as well as the backup data of the user's original data and the checksum of the original data, are written into multiple Segments. The Segments are divided by ckgs. Therefore, during inspection, the ckgs are directly inspected to ensure the continuity of the disk data. The specific distributed data inspection of the embodiment of the present application can be implemented through the following steps.

[0138] Step 1: The inspection management unit automatically starts checking and starts the inspection timer, and notifies the inspection control unit to start the inspection process when the inspection cycle arrives.

[0139] Step 2: The inspection control unit determines the disk slice group ckg where the data file to be inspected is located, creates an inspection task, and distributes it to each Vdisk inspection control unit.

[0140] Step 3: Each Vdisk inspection control unit notifies the Vdisk inspection execution unit on the slave storage node where the respective Vdisk is running.

[0141] In this way, Vdisk is used as a unit to distribute to different slave storage nodes for concurrent inspection, which can make full use of the CPU resources of each node in the distributed system. Vdisk concurrency can avoid the inspection traffic being concentrated on any user's disk, affecting the user experience.

[0142] Step 4: The Vdisk inspection execution unit determines the inspection priority of each ckg according to the number of inspection errors of each ckg in the historical inspection results and the principle of positive correlation, and selects a preset number of ckgs in order from high to low as the ckgs for this round of inspection, and finally distributes these ckgs to the corresponding ckg inspection execution units for concurrent inspection.

[0143] In this way, multiple ckgs can be inspected concurrently, which can ensure the continuity of disk reading and writing data, and make full use of the resources of each disk in the distributed system to improve inspection efficiency.

[0144] Step 5: The ckg inspection execution unit first reads the data files stored in each Segment in the ckg according to the inspection read data IO bandwidth pre-set by Qos, and then calculates the check code of the original data and the check code of the backup data respectively, compares the checksum of the original data with the check code of the original data to obtain a first comparison result, compares the checksum of the backup data with the check code of the backup data to obtain a second comparison result, determines the inspection result based on the first comparison result and the second comparison result, and performs corresponding processing when the inspection result is abnormal.

[0145] In this way, using disk-level QoS to limit the inspection bandwidth can not only avoid the inspection affecting the user's business bandwidth, but also quickly inspect the disk group with less business pressure.

[0146] If the first comparison result and the second comparison result are consistent, it is determined that no silent error occurs in the data file;

[0147] If any comparison result is inconsistent, the data with inconsistent comparison results will be repaired according to the data with consistent comparison results, the repaired data will be rewritten into the Segment, and the number of inspection errors that occur in the ckg will be recorded, and the record results will be stored in the distributed database.

[0148] In specific implementation, when the main storage node determines that a silent error occurs when a user reads or writes any data file, it will also trigger the inspection management unit to start the inspection process to inspect and repair the ckg with abnormal data.

[0149] This can avoid waiting for a long inspection cycle, and can detect and repair all other potential abnormal data in the first time, improving the reliability of the storage system.

[0150] Based on the same technical concept, an embodiment of the present application also provides a distributed data patrol device. The principle of solving the problem by the distributed data patrol device is similar to that of the above-mentioned distributed data patrol method. Therefore, the implementation of the distributed data patrol device can refer to the implementation of the distributed data patrol method, and the repeated parts will not be repeated.

[0151] Figure 6 A structural schematic diagram of a distributed data inspection device is provided for an embodiment of the present application. The distributed storage system includes a master storage node and multiple slave storage nodes connected to the master storage node, including a receiving module 601, a determination module 602, and an inspection module 603.

[0152] A receiving module 601 is used to receive a patrol instruction sent by the primary storage node, wherein the patrol instruction is used to indicate a disk slice group ckg corresponding to the data to be patrolled, wherein each ckg is composed of a preset number of slices selected from a plurality of slices divided by a plurality of disks of the distributed storage system, and the preset number of slices in each ckg are from different disks;

[0153] A determination module 602, configured to determine, in response to the inspection instruction, a ckg for this round of inspection from at least one ckg allocated to each corresponding slave storage node;

[0154] The inspection module 603 is used to notify the ckg inspection execution units corresponding to the ckg of the current inspection in the corresponding slave storage nodes, and to inspect the ckg of the current inspection, wherein one ckg corresponds to one ckg inspection execution unit.

[0155] In some embodiments, the determining module 602 is specifically configured to:

[0156] From the at least one ckg, the ckg for the current round of inspection is determined according to the total number of inspection errors.

[0157] The inspection module 603 is also used for:

[0158] If it is determined that an inspection error occurs in the ckg of this round of inspection, the number of times the ckg to be inspected has errors is recorded and stored in a distributed database, wherein the distributed database is used to store the total number of inspection errors that occur in each ckg, and is communicated with the master storage node and each slave storage node.

[0159] In some embodiments, each slave storage node runs multiple virtual disks Vdisks, each Vdisk is composed of a preset number of ckgs; the determination module 602 is specifically used to:

[0160] Notify the Vdisk inspection execution units corresponding to each Vdisk in the corresponding slave storage nodes to determine the ckg for the current inspection according to the total number of inspection errors from at least one allocated ckg, wherein one Vdisk corresponds to one Vdisk inspection execution unit.

[0161] In some embodiments, the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction includes at least one of multiple ckgs corresponding to all data; and at least one of the multiple ckgs corresponding to all data includes a ckg corresponding to data with a silent error.

[0162] In some embodiments, the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically; or

[0163] The patrol instruction is configured to be sent by the main storage node when the main storage node determines that any data has a silent error during reading or writing.

[0164] In some embodiments, when the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically, the determination module 602 is specifically configured to:

[0165] According to the identifier of each ckg in the inspection instruction, the ckg for the current inspection round is determined from at least one ckg allocated to the corresponding slave storage node.

[0166] In some embodiments, when the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically, the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction is the ckg corresponding to all the data, and the determination module 602 is further used to:

[0167] Determine a first ckg from at least one ckg allocated to the corresponding slave storage node according to the identifier of each ckg in the inspection instruction;

[0168] Determine the inspection priority of the first ckg according to the total number of inspection errors corresponding to the first ckg according to the positive correlation principle;

[0169] According to the inspection priority of the first ckg, a preset number of ckgs screened in descending order are determined as the ckgs for the current round of inspection.

[0170] In some embodiments, the patrol instruction is configured to be sent by the main storage node at a preset time or periodically, and the disk slice group ckg where the data to be patrolled indicated by the patrol instruction is located is the ckg corresponding to the partial data, wherein the ckg corresponding to the partial data is determined by the main storage node based on the patrol priority of the ckg of all the data, and a preset number of ckgs are screened from the ckg of all the data in order from high to low, and the patrol priority of the ckg of all the data is determined by the main storage node based on the total number of patrol errors of each ckg in the distributed database according to the positive correlation principle.

[0171] In some embodiments, the inspection module 603 is specifically used to:

[0172] Notify each Vdisk inspection execution unit in the corresponding slave storage node to distribute the ckg of the current inspection to the ckg inspection execution unit corresponding to the ckg of the current inspection, and perform inspection on the ckg of the current inspection.

[0173] In some embodiments, the inspection module 603 is specifically used to:

[0174] Distribute the ckg of the current round of inspection to the ckg inspection execution units corresponding to the ckg of the current round of inspection and send inspection instructions to each ckg inspection execution unit, so that each ckg inspection execution unit responds to the inspection instruction and reads the data stored in the ckg corresponding to the ckg inspection execution unit, wherein the data includes the user's original data and the checksum of the original data, and the backup data of the user's original data and the checksum of the original data;

[0175] respectively calculating a checksum of the original data and a checksum of the backup data, and comparing the checksum of the original data with the checksum of the original data to obtain a first comparison result;

[0176] Comparing the checksum of the backup data with the check code of the backup data to obtain a second comparison result;

[0177] Based on the first comparison result and the second comparison result, an inspection result is determined and corresponding processing is performed when the inspection result is abnormal.

[0178] In some embodiments, the inspection module 603 is specifically used to:

[0179] If the first comparison result and the second comparison result are consistent, it is determined that no silent error occurs in the data;

[0180] If any comparison result is inconsistent, repair the data with inconsistent comparison results according to the data with consistent comparison results;

[0181] The repaired data is rewritten into the ckg, and the number of inspection errors occurring in the ckg is recorded, and the recording result is stored in a distributed database.

[0182] In some embodiments, the inspection instruction includes a bandwidth of the inspection read data IO preset by the quality of service Qos, so that each ckg inspection execution unit responds to the inspection instruction and reads the data file stored in each fragment in the ckg corresponding to the ckg inspection execution unit according to the bandwidth of the inspection read data IO preset by the Qos;

[0183] Among them, the pre-set patrol read data IO bandwidth is that when the disk bandwidth reaches full load, the patrol read data IO bandwidth is not greater than the first threshold of the disk service IO bandwidth; when the disk traffic does not reach full load, the patrol read data IO bandwidth matches the required maximum bandwidth value.

[0184] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated in a processor, or may exist physically separately, or two or more modules may be integrated in one module. The coupling between the modules may be achieved through some interfaces, which are usually electrical communication interfaces, but it is not excluded that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0185] After introducing the distributed data inspection method and device according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.

[0186] Refer to the following Figure 7 The electronic device 130 implemented according to this embodiment of the present application is described. Figure 7 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0187] like Figure 7 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).

[0188] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0189] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .

[0190] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0191] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0192] In an exemplary embodiment, a computer storage medium is also provided, and when a computer program in the computer storage medium is executed by a processor of an electronic device, the electronic device can perform any of the above-mentioned distributed data inspection methods. Optionally, the storage medium can be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0193] In an exemplary embodiment, the electronic device of the present application may include at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor may execute the steps of any distributed data patrol method provided in the embodiments of the present application.

[0194] In an exemplary embodiment, a computer program product is also provided. When the computer program product is executed by an electronic device, the electronic device can implement any exemplary method provided in the present application.

[0195] Furthermore, the computer program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0196] The program product for distributed data inspection in the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.

[0197] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0198] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0199] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network such as a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0200] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.

[0201] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0202] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0203] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0204] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0205] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0206] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0207] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A distributed data inspection method, applied to a slave storage node of a distributed storage system, characterized in that: The distributed storage system includes a master storage node and a plurality of slave storage nodes connected to the master storage node, and the method includes: Receive a patrol instruction sent by the primary storage node, the patrol instruction is used to indicate a disk slice group ckg corresponding to the data to be patrolled, wherein each ckg is composed of a preset number of slices selected from a plurality of slices divided by a plurality of disks of the distributed storage system, and the preset number of slices in each ckg are from different disks; In response to the inspection instruction, determining a ckg for this round of inspection from at least one ckg allocated to each corresponding slave storage node; Notify the ckg inspection execution units corresponding to the ckg of the current round of inspection in the corresponding slave storage nodes, and perform inspection on the ckg of the current round of inspection, wherein one ckg corresponds to one ckg inspection execution unit.

2. The method according to claim 1, characterized in that The step of determining a ckg for the current round of inspection from at least one ckg allocated to each corresponding slave storage node comprises: Determine the ckg for the current round of inspection from the at least one ckg according to the total number of inspection errors; After notifying the ckg inspection execution units corresponding to the ckg of the current round of inspection in the respective slave storage nodes and inspecting the ckg of the current round of inspection, the method further includes: If it is determined that an inspection error occurs in the ckg of this round of inspection, the number of times the ckg to be inspected has errors is recorded and stored in a distributed database, wherein the distributed database is used to store the total number of inspection errors that occur in each ckg, and is communicated with the master storage node and each slave storage node.

3. The method according to claim 1, characterized in that Each slave storage node runs multiple virtual disks Vdisk, each Vdisk is composed of a preset number of ckgs; The step of determining a ckg for the current round of inspection from at least one ckg allocated to each corresponding slave storage node comprises: Notify the Vdisk inspection execution units corresponding to each Vdisk in the corresponding slave storage nodes to determine the ckg for the current inspection according to the total number of inspection errors from at least one allocated ckg, wherein one Vdisk corresponds to one Vdisk inspection execution unit.

4. The method according to claim 1, characterized in that The disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction includes at least one of the multiple ckgs corresponding to all the data; and at least one of the multiple ckgs corresponding to all the data includes the ckg corresponding to the data having a silent error.

5. The method according to claim 1, characterized in that The inspection instruction is configured to be sent by the primary storage node at a preset time or periodically; or The patrol instruction is configured to be sent by the main storage node when the main storage node determines that any data has a silent error during reading or writing.

6. The method according to claim 5, characterized in that When the inspection instruction is configured to be sent by the master storage node at a preset time or periodically, the step of determining the ckg for the current round of inspection from at least one ckg allocated to the respective corresponding slave storage nodes in response to the inspection instruction comprises: According to the identifier of each ckg in the inspection instruction, the ckg for the current inspection round is determined from at least one ckg allocated to the corresponding slave storage node.

7. The method according to claim 5, characterized in that When the inspection instruction is configured to be sent by the primary storage node at a preset time or periodically, the disk slice group ckg corresponding to the data to be inspected indicated by the inspection instruction is the ckg corresponding to all the data; The step of determining the ckg for the current round of inspection from at least one ckg allocated to the corresponding slave storage node in response to the inspection instruction further includes: Determine a first ckg from at least one ckg allocated to the corresponding slave storage node according to the identifier of each ckg in the inspection instruction; Determine the inspection priority of the first ckg according to the total number of inspection errors corresponding to the first ckg according to the positive correlation principle; According to the inspection priority of the first ckg, a preset number of ckgs screened in descending order are determined as the ckgs for the current round of inspection.

8. The method according to claim 5, characterized in that The inspection instruction is configured to be sent by the main storage node at a preset time or periodically, and the disk slice group ckg where the data to be inspected indicated by the inspection instruction is located is the ckg corresponding to the partial data, wherein the ckg corresponding to the partial data is determined by the main storage node based on the inspection priority of the ckg of all the data, and a preset number of ckgs are screened from the ckg of all the data in order from high to low, and the inspection priority of the ckg of all the data is determined by the main storage node based on the total number of inspection errors of each ckg in the distributed database according to the positive correlation principle.

9. The method according to claim 1, characterized in that The notifying the cgg inspection execution units corresponding to the cgg of the current inspection in the respective slave storage nodes and inspecting the cgg of the current inspection includes: Notify each Vdisk inspection execution unit in the corresponding slave storage node to distribute the ckg of the current inspection to the ckg inspection execution unit corresponding to the ckg of the current inspection, and perform inspection on the ckg of the current inspection.

10. The method according to claim 9, characterized in that The distributing the ckg of the current round of inspection to the ckg inspection execution unit corresponding to the ckg of the current round of inspection, and inspecting the ckg of the current round of inspection, includes: Distribute the ckg of the current round of inspection to the ckg inspection execution units corresponding to the ckg of the current round of inspection and send inspection instructions to each ckg inspection execution unit, so that each ckg inspection execution unit responds to the inspection instruction and reads the data stored in the ckg corresponding to the ckg inspection execution unit, wherein the data includes the user's original data and the checksum of the original data, and the backup data of the user's original data and the checksum of the original data; respectively calculating a checksum of the original data and a checksum of the backup data, and comparing the checksum of the original data with the checksum of the original data to obtain a first comparison result; Comparing the checksum of the backup data with the check code of the backup data to obtain a second comparison result; Based on the first comparison result and the second comparison result, an inspection result is determined and corresponding processing is performed when the inspection result is abnormal.

11. The method according to claim 9, characterized in that The determining of the inspection result and performing corresponding processing when the inspection result is abnormal includes: If the first comparison result and the second comparison result are consistent, it is determined that no silent error occurs in the data; If any comparison result is inconsistent, repair the data with inconsistent comparison results according to the data with consistent comparison results; The repaired data is rewritten into the ckg, and the number of inspection errors occurring in the ckg is recorded, and the recording result is stored in a distributed database.

12. The method according to claim 9, characterized in that The inspection instruction includes a bandwidth of the inspection reading data IO preset by the quality of service Qos, so that each ckg inspection execution unit responds to the inspection instruction and reads the data file stored in each fragment in the ckg corresponding to the ckg inspection execution unit according to the bandwidth of the inspection reading data IO preset by the Qos; Among them, the pre-set patrol read data IO bandwidth is that when the disk bandwidth reaches full load, the patrol read data IO bandwidth is not greater than the first threshold of the disk service IO bandwidth; when the disk traffic does not reach full load, the patrol read data IO bandwidth matches the required maximum bandwidth value.

13. A distributed data inspection device, applied to a slave storage node of a distributed storage system, characterized in that: The distributed storage system includes a master storage node and a plurality of slave storage nodes connected to the master storage node, including: a receiving module, configured to receive a patrol instruction sent by the primary storage node, wherein the patrol instruction is used to indicate a disk slice group ckg corresponding to the data to be patrolled, wherein each ckg is composed of a preset number of slices selected from a plurality of slices divided by a plurality of disks of the distributed storage system, and the preset number of slices in each ckg are from different disks; A determination module, configured to determine, in response to the inspection instruction, a ckg for the current inspection from at least one ckg allocated to the respective corresponding slave storage nodes; The inspection module is used to notify the ckg inspection execution units corresponding to the ckg of the current inspection in the corresponding slave storage nodes, and to inspect the ckg of the current inspection, wherein one ckg corresponds to one ckg inspection execution unit.

14. An electronic device, characterized in that: include: at least one processor, and a memory in communication with the at least one processor, wherein the memory stores instructions executable by the at least one processor; The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-12.

15. A computer storage medium, characterized in that The computer storage medium stores a computer program for executing the method according to any one of claims 1 to 12.