CN117472287A - Redundant disk array inspection method, device, equipment and medium - Google Patents

Redundant disk array inspection method, device, equipment and medium Download PDF

Info

Publication number
CN117472287A
CN117472287A CN202311813271.4A CN202311813271A CN117472287A CN 117472287 A CN117472287 A CN 117472287A CN 202311813271 A CN202311813271 A CN 202311813271A CN 117472287 A CN117472287 A CN 117472287A
Authority
CN
China
Prior art keywords
disk
exclusive
value
determining
calculating
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.)
Granted
Application number
CN202311813271.4A
Other languages
Chinese (zh)
Other versions
CN117472287B (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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
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 Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311813271.4A priority Critical patent/CN117472287B/en
Publication of CN117472287A publication Critical patent/CN117472287A/en
Application granted granted Critical
Publication of CN117472287B publication Critical patent/CN117472287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of redundant disk arrays and discloses a method, a device, equipment and a medium for inspecting a redundant disk array. In the process, the first exclusive-or value is calculated by the corresponding expansion cabinet according to the corresponding relation between the disk number and each expansion cabinet, the expansion cabinet is used as an operation main body, the first exclusive-or value of the corresponding disk in the corresponding expansion cabinet is calculated, and the controller is used as another operation main body, so that the exclusive-or value of the corresponding disk in the controller is calculated by the expansion cabinet, the data reading and writing of the controller and each disk in the expansion cabinet in the inspection process are avoided, the transmitted data quantity is reduced by combining return data, and the overall performance is improved.

Description

Redundant disk array inspection method, device, equipment and medium
Technical Field
The invention relates to the technical field of redundant disk arrays, in particular to a method, a device, equipment and a medium for inspecting a redundant disk array.
Background
The centralized storage system comprises components, besides the devices such as a controller, a disk array and a switch, auxiliary devices such as management devices and the like. The controller is a core component of the whole storage system and is generally composed of a controller and front and rear ports; the disk array is composed of a plurality of independent hard disks to form a hard disk group with huge capacity, and the efficiency of the whole hard disk system is improved by utilizing the addition effect generated by providing data by individual hard disks. With this technique, data can be cut into a number of sections, which are stored separately on individual hard disks. The concept of parity check can also be utilized, and when any hard disk in the array fails, data can still be read. The redundant disk array has the function of data inspection, and the position where the data of the disk change is found by calculating whether the data block on the current disk is consistent with the data of the check block.
In the related art, the patrol needs to read the data blocks and the check blocks on the plurality of magnetic disks, and the controller is used for calculating to obtain whether the current data is consistent. For a controller connected with an expansion cabinet, as a plurality of magnetic disks may be located on the same expansion cabinet, data needs to pass through an IO (Input/Output) card of the expansion cabinet and the controller, and the performance bottleneck of the IO card hinders the data transmission of inspection and host IO, so that the performance of inspection and host IO is reduced.
Disclosure of Invention
In view of the above, the invention provides a method, a device, equipment and a medium for inspecting a redundant disk array, which are used for solving the technical problem that the overall performance is affected due to frequent reading and writing of a controller to a disk in an expansion cabinet.
In a first aspect, the present invention provides a method for inspecting a redundant array of disks, where the redundant array of disks includes a controller and at least one expansion cabinet, and the controller and each expansion cabinet have disks, and the method includes: responding to the disk inspection request, and determining a disk number and a verification algorithm corresponding to the disk inspection request; calculating a first exclusive or value according to the corresponding relation between the disk number and each expansion cabinet based on the disk number and a verification algorithm; calculating a second exclusive-or value by the controller based on the disk number and the verification algorithm; and determining a disk inspection result based on the first exclusive-or value and the second exclusive-or value.
With reference to the first aspect, in one possible implementation manner of the first aspect, in response to the disk patrol request, determining a disk number and a verification algorithm corresponding to the disk patrol request includes: obtaining a disk stripe and a verification algorithm contained in a disk inspection request; the disk number is determined based on the disk distribution of the disk stripe.
With reference to the first aspect, in a possible implementation manner of the first aspect, calculating, by a correspondence between a disk number and each expansion cabinet, a first exclusive-or value according to a disk number and a verification algorithm, with the corresponding expansion cabinet includes: calculating a first disk address based on the first disk number; determining a first number of a first sub-block of a corresponding disk based on a verification algorithm; calculating the space distribution of the corresponding disk based on the first disk number and the first number, and determining the first disk block number of the corresponding disk; based on the first disk address and the first disk block number, a first exclusive or value is calculated using the expansion cabinet.
With reference to the first aspect, in a possible implementation manner of the first aspect, determining, based on a verification algorithm, a first number corresponding to a first sub-block of the disk includes: determining the number of the first sub-block of each disk in the corresponding expansion cabinet based on a preset corresponding relation between a verification algorithm and a naming rule; based on the number, a first number is determined.
With reference to the first aspect, in one possible implementation manner of the first aspect, calculating a spatial distribution of the corresponding disk based on the first disk number and the first number, and determining a first disk tray number of the corresponding disk includes: determining the number of first magnetic disc blocks of the corresponding magnetic disc based on the first magnetic disc number; based on the number of the first magnetic disk blocks and the first number, the spatial distribution of the corresponding magnetic disk is calculated, and the first magnetic disk block number of the corresponding magnetic disk is determined.
With reference to the first aspect, in one possible implementation manner of the first aspect, calculating, based on the first disk address and the first disk block number, a first exclusive-or value using the expansion cabinet includes: reading data based on the first disk address, and determining first data information; based on the first data information, a first exclusive or value corresponding to the first disk block number is calculated by the corresponding expansion cabinet.
With reference to the first aspect, in a possible implementation manner of the first aspect, after calculating, with the expansion cabinet, the first exclusive-or value based on the first disk address and the first disk block number, the method further includes: determining flag bit information based on the number of first disk blocks; and adding the zone bit information to the first exclusive OR value.
With reference to the first aspect, in a possible implementation manner of the first aspect, calculating, with the controller, a second exclusive-or value based on the disk number and the verification algorithm includes: calculating a second disk address based on the second disk number; determining a second number of a first sub-block of the corresponding disk based on a verification algorithm; calculating the space distribution of the corresponding magnetic disk based on the second magnetic disk number and the second number, and determining the number of the second magnetic disk block of the corresponding magnetic disk; based on the second disk address and the second disk block number, a second exclusive or value is calculated using the controller.
With reference to the first aspect, in a possible implementation manner of the first aspect, determining, based on a verification algorithm, a second number corresponding to a first sub-block of the disk includes: determining the number of the first sub-block of each disk in the controller based on a preset corresponding relation between a verification algorithm and a naming rule; based on the number, a second number corresponding to the disk is determined.
With reference to the first aspect, in one possible implementation manner of the first aspect, calculating a spatial distribution of the corresponding disk based on the second disk number and the second number, and determining the second disk tray number of the corresponding disk includes: determining the number of second magnetic disc blocks of the corresponding magnetic disc based on the second magnetic disc number; based on the number of the second magnetic disk blocks and the second number, calculating the spatial distribution of the corresponding magnetic disk, and determining the number of the second magnetic disk blocks of the corresponding magnetic disk.
With reference to the first aspect, in a possible implementation manner of the first aspect, calculating, with the controller, a second exclusive-or value based on the second disk address and the second disk block number includes: reading data based on the second disk address, and determining second data information; based on the second data information, a second exclusive or value corresponding to a second disk block number is calculated by the controller.
With reference to the first aspect, in a possible implementation manner of the first aspect, determining a disk patrol result based on the first exclusive-or value and the second exclusive-or value includes: comparing the first exclusive-or value corresponding to the magnetic disk block number with the second exclusive-or value based on the magnetic disk block number, and determining a comparison result; and when the comparison results are consistent, the redundant disk array passes inspection.
In a second aspect, the present invention provides a redundant array of inexpensive disks inspection apparatus for a redundant array of disks, the redundant array of disks including a controller and at least one expansion cabinet, the controller and each expansion cabinet having disks, the apparatus comprising: the determining module is used for responding to the disk inspection request and determining a disk number and a checking algorithm corresponding to the disk inspection request; the first exclusive-or value calculation module is used for calculating a first exclusive-or value according to the corresponding relation between the disk number and each expansion cabinet and based on the disk number and a verification algorithm; the second exclusive-or value calculating module is used for calculating a second exclusive-or value by the controller based on the disk number and the verification algorithm; and the inspection result module is used for determining a disk inspection result based on the first exclusive-or value and the second exclusive-or value.
In a third aspect, the present invention provides a computer device comprising: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions so as to execute the redundant disk array inspection method according to the first aspect or any implementation mode corresponding to the first aspect.
In a fourth aspect, the present invention provides a computer readable storage medium, where computer instructions are stored on the computer readable storage medium, where the computer instructions are configured to cause a computer to perform the redundant disk array inspection method according to the first aspect or any one of the embodiments corresponding to the first aspect.
The method, the device, the equipment and the medium for inspecting the redundant disk array have the following advantages:
and calculating a first exclusive-or value by using the expansion cabinet and calculating a second exclusive-or value by using the controller through determining a disk number and a verification algorithm corresponding to the disk inspection request, thereby determining a disk inspection result through the first exclusive-or value and the second exclusive-or value. In the process, the first exclusive-or value is calculated by the corresponding expansion cabinet according to the corresponding relation between the disk number and each expansion cabinet, the expansion cabinet is used as an operation main body, the first exclusive-or value of the corresponding disk in the corresponding expansion cabinet is calculated, and the controller is used as another operation main body, so that the exclusive-or value of the corresponding disk in the controller is calculated by the expansion cabinet, the data reading and writing of the controller and each disk in the expansion cabinet in the inspection process are avoided, the transmitted data quantity is reduced by combining return data, and the overall performance is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a memory device according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for inspecting a redundant array of inexpensive disks according to an embodiment of the present invention;
FIG. 3 is a block diagram illustrating a redundant array of inexpensive disks inspection apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the hardware architecture of a computer device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The present embodiment provides a storage device, as shown in fig. 1, including: controller 10, expansion cabinet 21, expansion cabinet 22, and expansion cabinet 23. The controller 10 has a disk 101, a disk 102, and a disk 103, the expansion cabinet 21 has a disk 211, a disk 212, a disk 213, and a disk 214, the expansion cabinet 22 has a disk 221, a disk 222, and a disk 223, and the expansion cabinet 23 has a disk 231, a disk 232, a disk 233, and a disk 234. After receiving the disk patrol request, the storage device performs disk patrol according to the disk stripe and the checking algorithm contained in the disk patrol request, wherein the corresponding disk number is determined according to the disk distribution of the disk stripe, taking the disk corresponding to the disk stripe as the disk 101, the disk 211, the disk 212, the disk 221 and the disk 233 as an example, the controller issues a data read request to the disk 101 to obtain data B, the controller calculates an exclusive-or value B of the data B by using the controller, the controller 10 issues an exclusive-or instruction for reading the disk 211 and the disk 212 to the expansion cabinet 21, the expansion cabinet 21 obtains the data a by reading the disk 211 and the disk 212, calculates an exclusive-or value a of the data a by using the expansion cabinet 21, returns the exclusive-or value a to the controller 10, the expansion cabinet 22 obtains the data C by reading the disk 221, calculates an exclusive-or value C of the data C by using the expansion cabinet 22, returns the exclusive-or value C to the controller 10, the expansion cabinet 23 obtains the data D by reading the disk 233, calculates an exclusive-or value D of the data D by using the expansion cabinet 23, and returns the exclusive-or value D to the controller 10, so that the controller 10 determines the exclusive-or result by comparing the value B with the exclusive-or value a, the exclusive-or value D, and the exclusive-or value D, respectively.
In accordance with an embodiment of the present invention, there is provided an embodiment of a redundant array of inexpensive disks inspection method, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical sequence is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in a different order than that illustrated herein.
The embodiment provides a redundant disk array inspection method, as shown in fig. 2, comprising the following steps:
s101, responding to a disk inspection request, and determining a disk number and a verification algorithm corresponding to the disk inspection request.
Specifically, the disk number includes: the disc identifier is used for identifying disc names, such as disc 101 and disc 211 in fig. 1, and the block identifier is used for identifying blocks in each disc, typically, each disc is divided into a plurality of blocks with a preset size, the preset size can be set according to an actual working condition, and typically, each disc is divided with 256k, 128k or other numerical values as the preset size.
Specifically, the checking algorithm refers to a checking algorithm corresponding to a disk checking request, and comprises transverse checking and diagonal checking.
Specifically, in response to a disk inspection request, determining a disk number and a verification algorithm corresponding to the disk inspection request refers to determining the verification algorithm specified by the disk inspection request, and determining a disk to be inspected and a corresponding disk partition.
S102, calculating a first exclusive or value according to the corresponding relation between the disk number and each expansion cabinet based on the disk number and a verification algorithm.
Specifically, the corresponding relation between the disk number and each expansion cabinet refers to that the actual position of the corresponding disk block on the disk is determined through the disk number, namely, the disk address of the disk block is determined, and the process is equivalent to determining which disk in which expansion cabinet the disk block belongs to.
Specifically, calculating the first exclusive or value with the corresponding expansion cabinet based on the disk number and the verification algorithm through the corresponding relation between the disk number and each expansion cabinet refers to calculating the exclusive or value of the corresponding disk block through the corresponding expansion cabinet by the verification algorithm according to the actual position of the disk block.
S103, calculating a second exclusive or value by the controller based on the disk number and the verification algorithm.
Specifically, calculating the second exclusive-or value with the controller based on the disk number and the verification algorithm refers to calculating the exclusive-or value of the corresponding disk block with the actual position of the disk block with the verification algorithm through the controller.
S104, determining a disk inspection result based on the first exclusive-or value and the second exclusive-or value.
Specifically, based on the first exclusive-or value and the second exclusive-or value, determining that the disk inspection result is that the first exclusive-or value and the second exclusive-or value are compared, and when the exclusive-or values at the same position are the same, the disk inspection is passed, and conversely, the disk inspection is considered to be failed.
The invention provides a redundant disk array inspection method, which is characterized in that a disk number and a verification algorithm corresponding to a disk inspection request are determined, a first exclusive-or value is calculated by using an expansion cabinet, and a second exclusive-or value is calculated by using a controller, so that a disk inspection result is determined by the first exclusive-or value and the second exclusive-or value. In the process, the first exclusive-or value is calculated by the corresponding expansion cabinet according to the corresponding relation between the disk number and each expansion cabinet, the expansion cabinet is used as an operation main body, the first exclusive-or value of the corresponding disk in the corresponding expansion cabinet is calculated, and the controller is used as another operation main body, so that the exclusive-or value of the corresponding disk in the controller is calculated by the expansion cabinet, the data reading and writing of the controller and each disk in the expansion cabinet in the inspection process are avoided, the transmitted data quantity is reduced by combining return data, and the overall performance is improved.
In an alternative embodiment, in response to a disk patrol request, determining a disk number and a verification algorithm corresponding to the disk patrol request includes:
and obtaining a disk stripe and a verification algorithm contained in the disk inspection request.
Specifically, the disk stripe refers to a stripe formed by freely designating blocks on a plurality of disks by a user, and the disk stripe represents the disk blocks which need to be inspected in a disk inspection request.
The disk number is determined based on the disk distribution of the disk stripe.
Specifically, determining the disk number based on the disk distribution of the disk stripe refers to determining the partition of the disk specified by the user and the corresponding disk based on the disk stripe, that is, determining the disk number, where the disk number includes: disk identification and block identification, disk number is denoted as [ d, s ], and block s on disk d is denoted as [211, a1], [212, a2], [213, a3] by taking disk 211, disk 212, disk 213 as an example.
In order to reduce the amount of data transmitted and avoid data reading and writing of each disk in the controller and the expansion cabinets in the inspection process, in an alternative embodiment, calculating the first exclusive or value according to the corresponding relation between the disk number and each expansion cabinet and based on the disk number and the verification algorithm, so as to correspond to the expansion cabinet, includes:
(1) Based on the first disk number, a first disk address is calculated.
Specifically, calculating the first disk address based on the first disk number refers to determining the actual position of the corresponding disk block on the disk according to the disk number through the corresponding relation between the disk number and each expansion cabinet, that is, determining the disk address of the disk block.
(2) Based on a verification algorithm, a first number corresponding to a first sub-block of the disk is determined.
In an alternative embodiment, determining the first number of the first sub-block of the corresponding disk based on a verification algorithm includes:
and determining the number of the first sub-block of each disk in the corresponding expansion cabinet based on the preset corresponding relation between the verification algorithm and the naming rule.
Specifically, the sub-blocks of each disk refer to dividing the corresponding disk block in the disk number into smaller sub-blocks.
Specifically, based on a preset corresponding relation between a verification algorithm and a naming rule, determining the number of the first sub-block of each disk in the corresponding expansion cabinet refers to determining the number of the first sub-block in the corresponding sub-block of the disk participating in inspection according to the preset corresponding relation between the verification algorithm and the naming rule, wherein the number of the first sub-block corresponding to the disk number is denoted as [ d, s, z ], and the number of the first sub-block of the sub-block s on the disk d is denoted as z.
Specifically, taking a checking algorithm as diagonal checking, taking a disk 211, a disk 212 and a disk 213 included in the expansion cabinet 21 as an example of a disk to be inspected in the expansion cabinet 21, the sub-block numbers of the corresponding blocks are shown in table 1:
TABLE 1
It can be seen that the sub-blocks with the same sub-block numbers in table 1 are all located on a straight line in a diagonal direction, and the number of the sub-block is ensured to accord with the corresponding checking algorithm by determining the number of the first sub-block in the corresponding sub-block of each magnetic disk. The number of each disk corresponding to the partition block except the number of the first sub-block is determined by the subsequent calculation of the spatial distribution of the corresponding disk.
Based on the number, a first number is determined.
Specifically, based on the numbers, determining the first number refers to determining the number of the first row of sub-blocks of the disk blocks corresponding to the expansion cabinet through the number of the first sub-block of the sub-block corresponding to each disk, namely determining the first number. As shown in table 1, the first number is: [211, a1,0], [212, a2,1], [213, a3,2]. It should be understood that the same principle is used for the lateral verification, and no description is given, in this embodiment, if the verification algorithm is the lateral verification, the corresponding first number is: [211, a1,0], [212, a2,0], [213, a3,0].
(3) Based on the first disk number and the first number, calculating the spatial distribution of the corresponding disk, and determining the first disk block number of the corresponding disk.
In an alternative embodiment, calculating the spatial distribution of the corresponding disk based on the first disk number and the first number, and determining the first disk block number of the corresponding disk includes:
based on the first disk number, a first disk number of the corresponding disk is determined.
Specifically, determining the first disk number of the corresponding disk based on the first disk number refers to determining the number of sub-blocks into which the block of the corresponding disk is divided. The first disk number is 16, as exemplified in table 1. In general, the number of the magnetic disc blocks is 15 or 16, which is not particularly limited in this embodiment, and may be set according to actual working conditions.
Based on the number of the first magnetic disk blocks and the first number, the spatial distribution of the corresponding magnetic disk is calculated, and the first magnetic disk block number of the corresponding magnetic disk is determined.
Specifically, the first disk block number is represented by formula (1):
e=(z+n)mod f(1)
wherein e represents the number of a sub-block of a certain sub-block, n represents the n-th sub-block in the sub-block, mod represents the remainder, and f represents the number of disk blocks.
Specifically, the process of calculating the spatial distribution of the corresponding disk is shown in the formula (1), and in the above embodiment, the disk sub-block numbers of the other sub-blocks except for the first number in the formula 1 are determined in this way.
(4) Based on the first disk address and the first disk block number, a first exclusive or value is calculated using the expansion cabinet.
In an alternative embodiment, calculating the first exclusive-or value using the expansion cabinet based on the first disk address and the first disk block number includes:
based on the first disk address, the data is read, and first data information is determined.
Based on the first data information, a first exclusive or value corresponding to the first disk block number is calculated by the corresponding expansion cabinet.
Specifically, calculating the first xor value corresponding to the first disk block number by the corresponding expansion cabinet based on the first data information refers to calculating the first xor value by the expansion cabinet to which the disk belongs, wherein the first xor value corresponding to the first disk block number refers to determining whether the xor value of the data with the disk block number is the same or not due to parity check in the way of the redundant disk array inspection, and therefore, in this embodiment, calculating the xor value of each disk block number in the partition corresponding to the disk by the expansion cabinet provides a data basis for comparing the xor value with the same disk block number in the controller.
In an alternative embodiment, after calculating the first exclusive-or value using the expansion cabinet based on the first disk address and the first disk block number, the method further includes:
the flag bit information is determined based on the first disk number.
And adding the zone bit information to the first exclusive OR value.
Specifically, the flag bit information may be 0, 1, x, y or other characters because of identifying the number of sub-blocks into which the blocks of the corresponding disk are divided, taking the first disk number of 15 or 16 as an example, it is common that the blocks of the corresponding disk are divided into 16 sub-blocks by 0 and the blocks of the corresponding disk are divided into 15 sub-blocks by 1.
According to the embodiment, the first disk address is calculated, the first number of the first sub-block of the corresponding disk is determined, the spatial distribution of the corresponding disk is calculated, the first disk block number of the corresponding disk is determined, the expansion cabinet corresponding to the disk block to be inspected is taken as a whole, the first exclusive or value corresponding to the disk block number is calculated by the corresponding expansion cabinet, a data basis is provided for the subsequent comparison of the first exclusive or value and the second exclusive or value, and in the process, the expansion cabinet corresponding to the disk block to be inspected is taken as a whole, and the expansion cabinet is taken as an operation main body to calculate the first exclusive or value, so that the controller is prevented from reading and writing data of each disk for acquiring the data of each disk, the transmitted data quantity is reduced, and the data basis is provided for improving the overall performance.
In order to ensure that the exclusive-or value of the controller is calculated in the same manner as the expansion cabinet, the exclusive-or value is calculated by using the controller as an operation main body, in an alternative embodiment, based on the disk number and the verification algorithm, the calculating of the second exclusive-or value by using the controller includes:
(1) Based on the second disk number, a second disk address is calculated.
Specifically, calculating the second disk address based on the second disk number refers to determining the actual position of the corresponding disk block on the disk according to the disk number through the corresponding relationship between the disk number and the controller, that is, determining the disk address of the disk block.
(2) Based on the verification algorithm, a second number corresponding to the first sub-block of the disk is determined.
In an alternative embodiment, determining the second number corresponding to the first sub-block of the disk based on a verification algorithm includes:
and determining the number of the first sub-block of each disk in the controller based on the preset corresponding relation between the verification algorithm and the naming rule.
Specifically, based on a preset corresponding relation between a verification algorithm and a naming rule, determining the number of the first sub-block of each disk in the controller refers to determining the number of the first sub-block in the corresponding sub-block of the disk participating in the inspection according to the preset corresponding relation between the verification algorithm and the naming rule, wherein the number of the first sub-block corresponding to the number of the disk is recorded as [ d, s, z ], and the number of the first sub-block representing the sub-block s on the disk d is z. Taking the disks in the controllers participating in the patrol as disk 101 and disk 102, the number of the first sub-block of disk 101 is 0, and the number of the first sub-block of disk 102 is 0 as an example, which are respectively denoted as [101, b1,0], [102, b2,0].
Based on the number, a second number corresponding to the disk is determined.
Specifically, determining the second number based on the number refers to determining the number of the first row of sub-blocks of the disk partition of the expander through the number of the first sub-block of the sub-block corresponding to each disk, that is, determining the second number. By way of the same example, the second number is: [101, b1,0], [102, b2,0]
(3) And calculating the spatial distribution of the corresponding magnetic disk based on the second magnetic disk number and the second number, and determining the number of the second magnetic disk block of the corresponding magnetic disk.
In an alternative embodiment, calculating the spatial distribution of the corresponding disk based on the second disk number and the second number, and determining the second disk block number of the corresponding disk includes:
based on the second disk number, a second disk number of the corresponding disk is determined.
Specifically, the process of determining the number of the second disk blocks corresponding to the disk based on the number of the second disk is the same as the manner of determining the number of the first disk blocks in the above embodiment, and will not be described in detail.
Based on the number of the second magnetic disk blocks and the second number, calculating the spatial distribution of the corresponding magnetic disk, and determining the number of the second magnetic disk blocks of the corresponding magnetic disk.
Specifically, based on the number of the second magnetic disk blocks and the second number, the spatial distribution of the corresponding magnetic disk is calculated, and the process of determining the number of the second magnetic disk blocks of the corresponding magnetic disk is also determined by using the formula (1) in the above embodiment, which is not described in detail.
(4) Based on the second disk address and the second disk block number, a second exclusive or value is calculated using the controller.
In an alternative embodiment, calculating, with the controller, the second exclusive-or value based on the second disk address and the second disk block number, includes:
based on the second disk address, the data is read and second data information is determined.
Based on the second data information, a second exclusive or value corresponding to a second disk block number is calculated by the controller.
Specifically, based on the second data information, calculating, by the controller, the second xor value corresponding to the second disk block number refers to calculating, by the controller, the first xor value, wherein the second xor value corresponding to the second disk block number refers to determining, by parity checking of the redundant disk array, whether the xor values of the data having the disk block number are the same, and therefore, in this embodiment, calculating, by the controller, the xor value of each disk block number in the partition corresponding to the disk, and providing a data basis for comparing the xor values having the same disk block number with the xor values in the expansion cabinets.
In an alternative embodiment, determining the disk patrol result based on the first exclusive-or value and the second exclusive-or value includes:
based on the magnetic disk block number, comparing the first exclusive-or value corresponding to the magnetic disk block number with the second exclusive-or value, and determining a comparison result.
Specifically, based on the disk block number, comparing the first exclusive or value corresponding to the disk block number with the second exclusive or value, determining the comparison result refers to comparing the corresponding first exclusive or value with the same first exclusive or value as the second disk block number, that is, comparing the first exclusive or value with the same disk block number with the second exclusive or value, where the comparison result includes coincidence and non-coincidence.
And when the comparison results are consistent, the redundant disk array passes inspection.
According to the embodiment, the second disk address is calculated, the second number of the first sub-block of the corresponding disk is determined, the spatial distribution of the corresponding disk is calculated, the second disk block number of the corresponding disk is determined, the controller is taken as a whole, the second exclusive-or value corresponding to the disk block number is calculated by the controller, and a data basis is provided for comparing the first exclusive-or value with the second exclusive-or value.
The embodiment also provides a redundant array of inexpensive disks inspection device, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides a redundant disk array inspection apparatus, as shown in fig. 3, including:
the determining module 301 is configured to determine, in response to the disk inspection request, a disk number and a verification algorithm corresponding to the disk inspection request. The specific process may be referred to the related description of step S101 in the above embodiment, and will not be repeated here.
The first exclusive or value calculating module 302 is configured to calculate, according to the correspondence between the disk number and each expansion cabinet, a first exclusive or value according to the disk number and the verification algorithm, and the expansion cabinet. The specific process may be referred to the related description of step S102 in the above embodiment, and will not be repeated here.
A second exclusive-or value calculating module 303, configured to calculate a second exclusive-or value with the controller based on the disk number and the verification algorithm. The specific process may be referred to the related description of step S103 in the above embodiment, and will not be repeated here.
The inspection result module 304 is configured to determine a disk inspection result based on the first xor value and the second xor value. The specific process may be referred to the related description of step S104 in the above embodiment, and will not be repeated here.
The redundant array of inexpensive disks inspection apparatus of this embodiment is presented in the form of functional units, where the units are ASIC (Application Specific Integrated Circuit ) circuits, processors and memories that execute one or more software or firmware programs, and/or other devices that provide the above-described functionality.
The embodiment of the invention also provides computer equipment, which is provided with the redundant disk array inspection device shown in the figure 3. Referring to fig. 4, fig. 4 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 4, the computer device includes: one or more processors 401, memory 402, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 401 is illustrated in fig. 4.
The processor 401 may be a central processor, a network processor or a combination thereof. Wherein the processor 401 may further comprise a hardware chip. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 402 stores instructions executable by the at least one processor 401 to cause the at least one processor 401 to perform the method shown in implementing the above embodiments.
Memory 402 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 402 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; memory 402 may also include a combination of the above types of memory. The computer device also includes a communication interface 403 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code, which when accessed and executed by the computer, processor or hardware, as shown in fig. 5, further provides a computer readable storage medium 501, the computer readable storage medium 501 storing computer instructions 5011, which when executed by the processor, implement the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (15)

1. A method for inspecting a redundant array of disks, the redundant array of disks comprising a controller and at least one expansion cabinet, the controller and each expansion cabinet having disks, the method comprising:
responding to a disk inspection request, and determining a disk number and a verification algorithm corresponding to the disk inspection request;
calculating a first exclusive-or value according to the corresponding relation between the disk number and each expansion cabinet based on the disk number and the verification algorithm and the corresponding expansion cabinet;
calculating a second exclusive-or value by the controller based on the disk number and the verification algorithm;
and determining a disk inspection result based on the first exclusive-or value and the second exclusive-or value.
2. The method of claim 1, wherein the determining, in response to a disk patrol request, a disk number and a verification algorithm corresponding to the disk patrol request comprises:
obtaining a disk stripe and a verification algorithm contained in the disk inspection request;
and determining the disk number based on the disk distribution of the disk stripe.
3. The method of claim 1, wherein said calculating a first exclusive-or value with the corresponding expansion cabinet based on the disk number and the verification algorithm by the correspondence of the disk number and each expansion cabinet comprises:
calculating a first disk address based on the first disk number;
determining a first number of a first sub-block of a corresponding disk based on the verification algorithm;
calculating the space distribution of the corresponding disk based on the first disk number and the first number, and determining the first disk block number of the corresponding disk;
and calculating a first exclusive OR value by using an expansion cabinet based on the first disk address and the first disk block number.
4. The method of claim 3, wherein determining the first number of the first sub-block of the corresponding disk based on the verification algorithm comprises:
determining the number of the first sub-block of each disk in the corresponding expansion cabinet based on the preset corresponding relation between the verification algorithm and the naming rule;
the first number is determined based on the number.
5. The method of claim 3, wherein the calculating the spatial distribution of the corresponding disk based on the first disk number and the first number, determining the first disk tray number of the corresponding disk, comprises:
determining the number of first disk blocks of the corresponding disk based on the first disk number;
and calculating the spatial distribution of the corresponding magnetic disk based on the number of the first magnetic disk blocks and the first number, and determining the number of the first magnetic disk blocks of the corresponding magnetic disk.
6. The method of claim 3, wherein said calculating a first exclusive-or value using an expansion cabinet based on said first disk address and said first disk block number comprises:
reading data based on the first disk address, and determining first data information;
and calculating a first exclusive or value corresponding to the first magnetic disk block number through a corresponding expansion cabinet based on the first data information.
7. The method of claim 5, further comprising, after said computing a first exclusive or value using an expansion cabinet based on said first disk address and said first disk block number:
determining flag bit information based on the number of first magnetic disk blocks;
and adding the zone bit information to the first exclusive-or value.
8. The method of claim 1, wherein the calculating, with the controller, a second exclusive-or value based on the disk number and the verification algorithm comprises:
calculating a second disk address based on the second disk number;
determining a second number of a first sub-block of the corresponding disk based on the verification algorithm;
calculating the space distribution of the corresponding disk based on the second disk number and the second number, and determining the second disk tray number of the corresponding disk;
and calculating a second exclusive or value by using the controller based on the second disk address and the second disk block number.
9. The method of claim 8, wherein determining the second number corresponding to the first sub-block of the disk based on the verification algorithm comprises:
determining the number of the first sub-block of each disk in the controller based on the preset corresponding relation between the verification algorithm and the naming rule;
and determining a second number of the corresponding disk based on the number.
10. The method of claim 8, wherein the calculating the spatial distribution of the corresponding disk based on the second disk number and the second number, determining the second disk tray number of the corresponding disk, comprises:
determining the number of second disk blocks of the corresponding disk based on the second disk number;
and calculating the spatial distribution of the corresponding magnetic disk based on the number of the second magnetic disk blocks and the second number, and determining the number of the second magnetic disk blocks of the corresponding magnetic disk.
11. The method of claim 8 wherein calculating, with the controller, a second exclusive-or value based on the second disk address and the second disk block number comprises:
reading data based on the second disk address, and determining second data information;
and calculating, by the controller, a second exclusive or value corresponding to the second disk block number based on the second data information.
12. The method of claim 3 or 8, wherein the determining a disk patrol result based on the first exclusive-or value and the second exclusive-or value comprises:
based on the disk sub-block number, comparing the first exclusive-or value corresponding to the disk sub-block number with the second exclusive-or value, and determining a comparison result;
and when the comparison result is consistent, the redundant disk array passes inspection.
13. A redundant array of inexpensive disks inspection apparatus for a redundant array of disks, the redundant array of disks comprising a controller and at least one expansion cabinet, the controller and each of the expansion cabinets having disks, the apparatus comprising:
the determining module is used for responding to the disk inspection request and determining a disk number and a checking algorithm corresponding to the disk inspection request;
the first exclusive-or value calculation module is used for calculating a first exclusive-or value according to the corresponding relation between the disk number and each expansion cabinet and based on the disk number and the verification algorithm;
the second exclusive-or value calculating module is used for calculating a second exclusive-or value by the controller based on the disk number and the verification algorithm;
and the inspection result module is used for determining a disk inspection result based on the first exclusive-or value and the second exclusive-or value.
14. A computer device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the redundant disk array inspection method of any one of claims 1 to 12.
15. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the redundant disk array inspection method of any one of claims 1 to 12.
CN202311813271.4A 2023-12-27 2023-12-27 Redundant disk array inspection method, device, equipment and medium Active CN117472287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311813271.4A CN117472287B (en) 2023-12-27 2023-12-27 Redundant disk array inspection method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311813271.4A CN117472287B (en) 2023-12-27 2023-12-27 Redundant disk array inspection method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN117472287A true CN117472287A (en) 2024-01-30
CN117472287B CN117472287B (en) 2024-03-19

Family

ID=89627838

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311813271.4A Active CN117472287B (en) 2023-12-27 2023-12-27 Redundant disk array inspection method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117472287B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546249A (en) * 2008-03-26 2009-09-30 中兴通讯股份有限公司 On-line capacity expansion method for disk arrays
CN113626248A (en) * 2021-06-30 2021-11-09 苏州浪潮智能科技有限公司 Method and system for repairing stripe data inconsistency in RAID
CN115878052A (en) * 2023-03-08 2023-03-31 苏州浪潮智能科技有限公司 RAID array inspection method, inspection device and electronic equipment
CN116339644A (en) * 2023-05-26 2023-06-27 苏州浪潮智能科技有限公司 Method, device, equipment and medium for creating redundant array of independent disk

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546249A (en) * 2008-03-26 2009-09-30 中兴通讯股份有限公司 On-line capacity expansion method for disk arrays
CN113626248A (en) * 2021-06-30 2021-11-09 苏州浪潮智能科技有限公司 Method and system for repairing stripe data inconsistency in RAID
CN115878052A (en) * 2023-03-08 2023-03-31 苏州浪潮智能科技有限公司 RAID array inspection method, inspection device and electronic equipment
CN116339644A (en) * 2023-05-26 2023-06-27 苏州浪潮智能科技有限公司 Method, device, equipment and medium for creating redundant array of independent disk

Also Published As

Publication number Publication date
CN117472287B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
CN111104244B (en) Method and apparatus for reconstructing data in a storage array set
CN107943421B (en) Partition division method and device based on distributed storage system
EP3678346A1 (en) Blockchain smart contract verification method and apparatus, and storage medium
CN101377748B (en) Method for checking reading and writing functions of memory device
CN109995813A (en) A kind of partition extension method, date storage method and device
CN112463022B (en) IO processing method, device and medium based on disk array
US20240143188A1 (en) Data processing method and apparatus, device, and readable storage medium
CN112000513A (en) Computer and VPD data operation method, device and storage medium thereof
CN110504002B (en) Hard disk data consistency test method and device
CN110955545B (en) Data integrity verification method, system and related equipment
CN117472287B (en) Redundant disk array inspection method, device, equipment and medium
CN106708445B (en) Link selecting method and device
CN106325769B (en) A kind of method and device of data storage
US11366608B2 (en) Method, electronic device and computer readable storage medium for i/o management
CN112181790A (en) Capacity statistical method and system of storage equipment and related components
CN116382582A (en) RAID remapping method, system, equipment and storage medium
CN109753225B (en) Data storage method and equipment
CN104615564A (en) Data transmission method based on QPI bus and computer system
CN106919340B (en) System and method for improving RAID reading performance
CN104598171A (en) Array reconstruction method and device based on metadata
CN114138688A (en) Data reading method, system, device and medium
CN112463019A (en) Data reading method and device
CN111435331A (en) Data writing method and device for storage volume, electronic equipment and machine-readable storage medium
CN117149672B (en) Disk array card cache configuration and reading methods and devices and disk array card
CN115454708A (en) Data reconstruction method, device, equipment and storage medium

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