CN115543216A - Disk array distribution architecture, block calculation method, system, device and medium - Google Patents
Disk array distribution architecture, block calculation method, system, device and medium Download PDFInfo
- Publication number
- CN115543216A CN115543216A CN202211503958.3A CN202211503958A CN115543216A CN 115543216 A CN115543216 A CN 115543216A CN 202211503958 A CN202211503958 A CN 202211503958A CN 115543216 A CN115543216 A CN 115543216A
- Authority
- CN
- China
- Prior art keywords
- target
- block
- stripe
- blocks
- offset
- 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
Links
- 238000004364 calculation method Methods 0.000 title claims abstract description 160
- 238000005192 partition Methods 0.000 claims description 45
- 230000005540 biological transmission Effects 0.000 claims description 32
- 238000000034 method Methods 0.000 claims description 30
- 238000011144 upstream manufacturing Methods 0.000 claims description 30
- 238000000638 solvent extraction Methods 0.000 claims description 27
- 238000004590 computer program Methods 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 10
- 230000000903 blocking effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0689—Disk arrays, e.g. RAID, JBOD
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a disk array distribution architecture, a block calculation method, a system, equipment and a medium, wherein the disk array is RAID10, the RAID10 comprises a plurality of strips, each strip at least comprises a pair of blocks, and when the block size of each disk in the RAID10 is set to be a first preset size, each strip comprises two pairs of blocks; when the block size of each disk in the RAID10 is set to be a second preset size, each stripe comprises a pair of blocks; in addition, the block calculation method of the disk array distribution architecture is adopted, the judgment of the two block sizes in the prior art is eliminated, the block size and other information are directly substituted into the block calculation method, the target block coding and the target block internal offset of the target block can be obtained, the complexity of the calculation method is reduced, and the block calculation efficiency is improved.
Description
Technical Field
The present application relates to the field of storage technologies, and in particular, to a disk array distribution architecture, a block calculation method, a system, a device, and a medium.
Background
RAID (Redundant Arrays of Independent Disks) technology is widely used in the storage field, and means a set of Redundant Arrays formed by Independent Disks. RAID10 is one type of RAID technology, and the main technical characteristics of RAID10 are as follows: and constructing magnetic disks which are mirror images of each other, wherein the contents of the stored data are consistent. When any disk in the mirror image disks fails, data cannot be lost, and therefore the safety of stored information is guaranteed.
The RAID10 technique includes a stripe that includes partitions of both 256KB (512 sectors) and 128KB (256 sectors) size. When the partition size of a stripe is 256KB (512 sectors), one stripe consists of 2 partitions; since the capacity of a disk is fixed, if the block size of a stripe is 128KB (256 sectors), the number of stripes is doubled for a disk of fixed capacity. Since each stripe requires a certain amount of memory to store the corresponding stripe information, the memory requirement becomes a major issue for doubling the stripe.
Disclosure of Invention
Based on this, the present application provides a disk array distribution architecture, a block computation method, a system, a device, and a medium, so as to reduce the memory requirement of stripe information.
In one aspect, a disk array distribution architecture is provided, where the disk array is a RAID10, the RAID10 includes a plurality of stripes, each stripe includes at least one pair of split blocks, and when a split block size of each disk in the RAID10 is set to a first preset size, each stripe includes two pairs of split blocks; when the block size of each disk in the RAID10 is set to be a second preset size, each stripe comprises a pair of blocks; wherein each pair of the blocks are mirror images of each other.
In one embodiment, when the first predetermined size is 128KB, the block size of each disk in RAID10 is set to 128KB, and each stripe includes two pairs of blocks.
In one embodiment, when the first preset size is 256KB, the block size of each disk in the RAID10 is set to 256KB, and each stripe includes a pair of blocks.
In another aspect, a block calculation method is provided, and includes:
performing stripe division on the RAID10, performing block division under the stripes, and numbering the divided stripes and blocks;
receiving a data transmission instruction, and determining a target band, a target band number of the target band and an offset in the target band according to the data transmission instruction;
calculating the number of blocks in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
calculating the target block number of the target block in the target stripe according to the block number in the upstream row of the target stripe in the RAID 10;
calculating the target intra-block offset of the target block according to the target intra-strip offset of the target strip;
and the number of the blocks is the number of the blocks with different block numbers.
In one embodiment, stripe partitioning and blocking partitioning under the stripe for the RAID10, and numbering the partitioned stripe and block, includes:
dividing strips according to requirements, and determining the size and the logarithm of the blocks;
partitioning according to the size and the number of the partitioning pairs of the partitions;
and numbering the divided strips and blocks.
In one embodiment, after obtaining the target block number and the target intra-block offset of the target block, the method further includes:
and determining a destination address according to the target block number of the target block and the offset in the target block, and reading or writing data into the destination address.
In one embodiment, the calculating, according to the target stripe number of the target stripe, the number of blocks in the rows above the row where the target stripe is located in the RAID10 includes:
determining the disk pairs which are mirror images of each other in the RAID10 and the number of blocks with different block numbers in each row of the RAID 10;
and calculating the block number in the rows above the target stripe in the RAID10 according to the disk pair number which is in mirror image with each other in the RAID10 and the number of blocks with different block numbers in each row of the RAID10 by using a block number calculation formula.
In one embodiment, the block number calculation formula is:
Stripfirst=(Stretch/Mirrors)*Rowstripcount;
wherein, stripfirst is the number of blocks in the rows above the row where the target stripe is located in the RAID 10; stretch is the target stripe number of the target stripe; mirrors are the number of pairs of disks which are mirror images in the RAID 10; rowstripcount is the number of blocks with different block numbers in each row of the RAID 10.
In one embodiment, the calculating a target block number in the target stripe according to the number of blocks in the row above the row where the target stripe is located in the RAID10 includes:
calculating the block number of the first block of the disk where the target strip is located according to the block number in the upstream of the row where the target strip is located in the RAID 10;
calculating the increment number of the specific block of the target block in the disk according to the target strip number of the target strip and the offset in the target strip;
and calculating the target block number of the target block in the target band through a block number calculation formula according to the block number of the first block of the disk where the target band is located and the increment number of the specific block of the target block in the disk.
In one embodiment, the block number calculation formula is:
Stripnum=Stripfirst+Stretch%Mirrors+Mirrors*(Stretchoffset>>Stripsizeshift);
wherein Stripnum is a target block number of a target block in the target stripe; the Stripfirst + Stretch% Mirrors is the number of the first block in the disk where the target stripe is located; stretchoffset is a target intra-band offset of the target band; strisizeshift is the calculated index; the Stretchoffset > > StripsizShift operation is Stretchoffset/2^ (StripsizShift).
In one embodiment, the calculation method of the calculation index is as follows:
Stripsizeshift=log2(2*Stripsize);
wherein, the Stripsize is the block size and the unit is KB.
In one embodiment, the calculating a target intra-block offset of a target block in the target stripe according to the target intra-stripe offset of the target stripe includes:
calculating according to the size of the blocks to obtain a block calculation mask;
and calculating the target intra-block offset of the target block through a block offset calculation formula according to the target intra-strip offset of the target strip and the block calculation mask.
In one embodiment, the calculation formula of the block calculation mask is:
Stripsizemask=2*Stripsize-1;
wherein the stripizzemask computes a mask for the partitions.
In one embodiment, the target intra-block offset calculation formula is:
Stripoffset=Stretchoffset&Stripsizemask;
wherein the Stripoffset is the target intra-block offset.
In another aspect, a tile computing system is provided, the tile computing system comprising:
the system comprises a stripe partitioning module, a data partitioning module and a data partitioning module, wherein the stripe partitioning module is used for performing stripe partitioning on RAID10, performing partitioning under the stripe, and numbering the partitioned stripes and the partitioned blocks;
the target strip determining module is used for receiving a data transmission instruction and determining a target strip, a target strip number of the target strip and an offset in the target strip according to the data transmission instruction;
the block number calculation module is used for calculating the block number in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
a block number calculation module, configured to calculate a target block number of a target block in the target stripe according to the number of blocks in an uplink above a row where the target stripe is located in the RAID 10;
and the block offset calculation module is used for calculating the target block internal offset of the target block according to the target strip internal offset of the target strip.
In another aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the following steps when executing the computer program:
performing stripe division on the RAID10, performing block division under the stripes, and numbering the divided stripes and blocks;
receiving a data transmission instruction, and determining a target band, a target band number of the target band and an offset in the target band according to the data transmission instruction;
calculating the number of blocks in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
calculating a target block number of a target block in the target stripe according to the number of blocks in an upstream row of the target stripe in the RAID 10;
and calculating the target intra-block offset of the target block according to the target intra-strip offset of the target strip.
In yet another aspect, there is provided a computer-readable storage medium storing a program which, when executed by a processor, causes the processor to perform the steps of:
performing stripe division on the RAID10, performing block division under the stripes, and numbering the divided stripes and blocks;
receiving a data transmission instruction, and determining a target band, a target band number of the target band and an offset in the target band according to the data transmission instruction;
calculating the number of blocks in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
calculating the target block number of the target block in the target stripe according to the block number in the upstream row of the target stripe in the RAID 10;
and calculating the target intra-block offset of the target block according to the target intra-band offset of the target band.
Compared with the prior art, the technical scheme of the application has the following advantages:
the disk array is a RAID10, the RAID10 includes a plurality of stripes, each stripe includes at least one pair of partitioned blocks, and when the size of each partitioned block of each disk in the RAID10 is set to a first preset size, each stripe includes two pairs of partitioned blocks; when the block size of each disk in the RAID10 is set to the second preset size, each stripe includes a pair of blocks, no matter the block size is 128KB (256 sector) which is the first preset size, or 256KB (512 sector) which is the second preset size, under the condition that the hard disk capacity is fixed, the number of the two sizes of stripes is the same, the required memory is the same, and the number of the stripes does not need to be increased, that is, the memory does not need to be increased to store additional stripe information, so that the demand for the memory is effectively reduced; in addition, by adopting the block calculation method of the RAID10 distribution architecture, the judgment of the sizes of two blocks in the prior art is eliminated, and the target block coding and the target block internal offset of the target block can be obtained by directly substituting the block sizes and other information into the block calculation method, so that the complexity of the calculation method is reduced, and the block calculation efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a first architecture diagram of a disk array distribution architecture provided by an embodiment of the present application;
FIG. 2 is a second architecture diagram of a disk array distribution architecture provided by an embodiment of the present application;
FIG. 3 is a flow chart of a first method of a block computation method provided by an embodiment of the present application;
FIG. 4 is a flow chart of a second method of a block computation method provided in an embodiment of the present application;
FIG. 5 is a system architecture diagram of a partitioned computing system provided by an embodiment of the present application;
fig. 6 is a device structure diagram of a computer device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The first embodiment is as follows:
referring to fig. 1 and fig. 2, fig. 1 is a first architecture diagram of a disk array distribution architecture provided in an embodiment of the present application; fig. 2 is a second architecture diagram of a disk array distribution architecture according to an embodiment of the present application.
The disk array is a RAID10, a partial architecture (spatial distribution architecture) of the RAID10 includes a plurality of stripes, each stripe includes at least one pair of split blocks, and when a split block size of each disk in the RAID10 is set to a first preset size, each stripe includes two pairs of split blocks; when the block size of each disk in the RAID10 is set to be a second preset size, each stripe comprises a pair of blocks; wherein each pair of the blocks are mirror images of each other.
Specifically, each slice in the prior art includes a pair of partitions, each of which has a size that includes both 128KB and 256 KB. In a disk, if the size of a block is changed from 256KB to 128KB, since the capacity of each disk is fixed, the number of stripes needs to be increased, a memory is needed for storing stripe information, and the memory is needed for storing stripe information for the increased stripes, which increases the memory requirement. Accordingly, the present invention is directed to a RAID10 distribution architecture, as shown in fig. 1 and 2, the RAID10 distribution architecture includes a plurality of stripes, each stripe including at least a pair of split blocks. The RAID10 distribution architecture of the present invention is not limited to only a pair of blocks, but increases the number of blocks. When the block size of each disk in the RAID10 is set to be a first preset size, each stripe comprises two pairs of blocks; when the block size of each disk in the RAID10 is set to be a second preset size, each stripe comprises a pair of blocks; no matter the size of the block is the first preset size or the second preset size, the number of the stripes is controlled to be the same, the number of the stripes does not need to be increased, a memory does not need to be increased for storing extra stripe information, and the requirement on the memory is effectively reduced. Regardless of the blocks with the first preset size or the second preset size, each pair of blocks are mirror images, that is, the data stored in each pair of blocks are the same, so that data redundancy is realized, and the safety of stored information is improved.
In one embodiment, when the first predetermined size is 128KB, the block size of each disk in RAID10 is set to 128KB, and each stripe includes two pairs of blocks.
Specifically, the block size includes two types, one is 256KB (512 sector) and the other is 128KB (256 sector). Therefore, the preset sizes of the partitions include two types, the first preset size is 256KB (512 sector), and the second preset size is 128KB (256 sector). When the first predetermined size is 128KB, the block size of each disk in RAID10 is set to 128KB (256 sectors), and each stripe includes two pairs of blocks, as shown in fig. 1, including 9 stripes, and each stripe includes two pairs of blocks.
In one embodiment, when the second predetermined size is 256KB, the block size of each disk in the RAID10 is set to 256KB, and each stripe includes a pair of blocks.
Specifically, when the second predetermined size is 256KB, the size of the partition of each disk in RAID10 is set to 256KB (512 sectors), each stripe includes a pair of partitions, and as shown in fig. 2, includes 9 stripes, and each stripe includes a pair of partitions.
Therefore, no matter the partition size is the first preset size of 128KB (256 sector) or the second preset size of 256KB (512 sector), under the condition that the hard disk capacity is fixed, the number of the stripes of the two sizes is the same, the required memory is the same, the number of the stripes does not need to be increased, the memory does not need to be increased to store additional stripe information, and the requirement on the memory is effectively reduced.
Example two:
referring to fig. 3, fig. 3 is a flowchart of a first method of a block calculating method according to an embodiment of the present application.
The method comprises the following steps:
s101, performing stripe division on the RAID10, performing block division under the stripes, and numbering the divided stripes and blocks;
specifically, preparation needs to be made before data transmission, that is, stripe division is performed on the RAID10, block division is performed under the stripe, and the divided stripe and the divided block are numbered, so that a target block number of the target block and a target intra-block offset of the target block are obtained by calculation subsequently according to the target stripe number and the target intra-stripe offset of the target stripe.
S102, receiving a data transmission instruction, and determining a target stripe, a target stripe number of the target stripe and an internal offset of the target stripe according to the data transmission instruction;
specifically, after a data transmission instruction is received, a target stripe number of the target stripe, and a target stripe internal offset of the target stripe may be determined according to the data transmission instruction, so that a target block number and a target block internal offset of a target block are obtained by calculation according to the target stripe number and the target stripe internal offset of the target stripe, a specific address is obtained, and data is transmitted to the corresponding address.
S103, calculating the block number in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
specifically, to store data in the disk, the storage address of the disk needs to be calculated, that is, the block number and the intra-block offset of the block are calculated according to the stripe number and the intra-stripe offset. In the present invention, a stripe in which data needs to be stored is referred to as a target stripe, and a block in which data needs to be stored is referred to as a target block. Therefore, the partition calculation method of the present invention calculates the target partition number and the target intra-partition offset of the target partition from the target partition number and the target intra-partition offset of the target stripe. First, the number of blocks in the upstream of the row where the target stripe in RAID10 is located is calculated according to the target stripe number of the target stripe, as shown in fig. 1, for example, if the target stripe number is stripe 4, the number of blocks in the upstream of the row where the target stripe 4 is located is 6. Where the number of blocks is the number of blocks with different block numbers, the number of blocks in the first row is therefore 6.
S104, calculating the target block number of the target block in the target stripe according to the block number in the upstream row of the target stripe in the RAID 10;
specifically, after the number of blocks in the upstream line of the row where the target stripe in RAID10 is located is calculated according to the target stripe number of the target stripe, the target block number of the target block in the target stripe may be obtained through calculation according to the number of blocks in the upstream line of the row where the target stripe in RAID10 is located.
S105, calculating the target intra-block offset of the target block according to the target intra-strip offset of the target strip;
specifically, after the target block number of the target block in the target stripe is obtained through calculation, the target intra-block offset of the target block can be obtained through calculation according to the target intra-stripe offset of the target stripe, and the specific address in the disk can be obtained by adding the target intra-block offset to the target block number, so that the data can be written into the address of the disk. A block calculation method adopting RAID10 distribution architecture is provided, the judgment of the sizes of two blocks in the prior art is removed, the block size and other information are directly substituted into the block calculation method, so that the target block coding and the target block internal deviation of the target block can be obtained, the complexity of the calculation method is reduced, and the block calculation efficiency is improved.
And the block number is the number of blocks with different block numbers.
In one embodiment, striping and blocking the RAID10 under the stripe, and numbering the striped and blocking, includes:
dividing strips according to requirements, and determining the size and the logarithm of the blocks;
specifically, the method comprises the steps of carrying out stripe division according to actual requirements, and determining the number of stripes to be divided; the block size is then determined according to the actual requirements, i.e. the block size is 128KB, or 256KB, and the good block logarithm is determined.
Partitioning according to the block size and the block logarithm thereof;
specifically, after the block size and the block logarithm are determined, the blocks can be divided according to the block size and the block logarithm.
And numbering the divided strips and blocks.
Specifically, after the stripes and the blocks are divided, all the stripes and the blocks are numbered, so that the target block number and the target block internal offset of the target block can be obtained through calculation according to the target stripe number and the target block internal offset of the target stripe.
In one embodiment, after obtaining the target block number and the target intra-block offset of the target block, the method further includes:
and determining a destination address according to the target block number of the target block and the offset in the target block, and reading or writing data into the destination address.
Specifically, after the target block number and the target intra-block offset of the target block are obtained through calculation according to the target band number and the target intra-band offset of the target band, a target address is determined according to the target block number and the target intra-block offset of the target block, and data is read or written into the target address to complete data transmission operation.
In one embodiment, the calculating, according to the target stripe number of the target stripe, the number of blocks in the rows above the row where the target stripe is located in the RAID10 includes:
determining the disk pairs which are mirror images of each other in the RAID10 and the number of blocks with different block numbers in each row of the RAID 10;
specifically, to obtain the target block number through calculation, the target block number is obtained through corresponding calculation according to the target stripe number of the target stripe. Firstly, determining the number of disk pairs which are mirror images of each other in the disk array and the number of blocks with different block numbers in each row in the RAID10 disk array according to RAID10, so as to determine the number of blocks in the rows above where the target stripe is located by the number of disk pairs which are mirror images of each other and the number of blocks with different block numbers in each row.
And calculating the block number in the rows above the target stripe in the RAID10 according to the disk pair number which is in mirror image with each other in the RAID10 and the number of blocks with different block numbers in each row of the RAID10 by using a block number calculation formula.
Specifically, after the number of the disk pairs which are mirror images of each other and the number of the blocks with different block numbers in each row are obtained, the number of the blocks in the uplink of the row in which the target stripe is located in RAID10 can be obtained by calculating the number of the disk pairs which are mirror images of each other and the number of the blocks with different block numbers in each row through a related calculation formula, so that the block number of the first block of the disk in which the target stripe is located is calculated according to the number of the blocks in the uplink of the row in which the target stripe is located in RAID 10.
In one embodiment, the calculation formula of the number of blocks is:
Stripfirst=(Stretch/Mirrors)*RowStripCount;
wherein, stripfirst is the number of blocks in the row above the row where the target stripe is located in the RAID 10; stretch is the target stripe number of the target stripe; mirrors are the number of pairs of disks which are mirror images in the RAID 10; rowstripcount is the number of blocks with different block numbers in each row of the RAID 10.
Specifically, the number of blocks in the uplink of the row where the target stripe is located in RAID10 is calculated according to the number of disk pairs that are mirror images of each other in RAID10 and the number of blocks with different block numbers in each row of RAID10 through a block number calculation formula, where the block number calculation formula is Stripfirst = (Stretch/Mirrors) × Rowstripcount. As shown in fig. 1, the block size is 128kb, mirrors are the disk pair number (disk number divided by 2) of RAID10 that are mirror images of each other, the distribution architecture shown in fig. 1 includes 6 disks, disk 0 and disk 1 are mirror images of each other, disk 2 and disk 3 are mirror images of each other, and disk 4 and disk 5 are mirror images of each other, that is, three pairs of disks (disk number 6 divided by 2 is equal to 3). Assuming that Stretch4 is given, then Stretch = (Stretch/Mirrors) × rowstriccount = (4/3) × 6=, where the operation symbol "/" is a quotient and the number of chunks is the number of chunks with different chunk numbers, then the number of chunks in the upper line of the row where the target stripe is located is 6, i.e., strip0, strip1, strip2, strip3, strip4, strip5.
In one embodiment, the calculating a target block number in a target stripe according to the number of blocks in the row above the row where the target stripe is located in the RAID10 includes:
calculating the block number of the first block of the disk where the target stripe is located according to the number of blocks in the upstream of the row where the target stripe is located in the RAID 10;
specifically, after the number of blocks in the upstream of the row where the target stripe is located in RAID10 is obtained, the block number of the first block of the disk where the target stripe is located may be obtained through calculation according to the number of blocks in the upstream of the row where the target stripe is located in RAID10 through a corresponding calculation formula, so that the target block number of the target block in the target stripe is calculated through the block number.
Calculating the increment number of the specific block of the target block in the disk according to the target strip number of the target strip and the offset in the target strip;
specifically, after the block number of the first block of the disk where the target stripe is located is obtained, the increment number of the specific block of the target block in the disk can be calculated through a corresponding calculation formula according to the target stripe number of the target stripe and the offset in the target stripe, so that the target block number of the target block in the target stripe can be calculated through the block number and the increment number of the first block.
And calculating the target block number of the target block in the target band through a block number calculation formula according to the block number of the first block of the disk where the target band is located and the increment number of the specific block of the target block in the disk.
Specifically, after the block number of the first block of the disk where the target stripe is located and the increment number of the specific block of the target block in the disk are obtained, the block number of the first block of the disk where the target stripe is located and the increment number of the specific block of the target block in the disk are substituted into the corresponding calculation formula, so that the target block number of the target block in the target stripe can be obtained.
In one embodiment, the block number calculation formula is:
Stripnum=Stripfirst+Stretch%Mirrors+Mirrors*(Stretchoffset>>Stripsizeshift);
wherein, stripnum is the target block number of the target block in the target band; the Stripfirst + Stretch% Mirrors is the number of the first block in the disk where the target stripe is located; stretchoffset is a target intra-band offset of the target band; strisizeshift is the calculated index; stretchoffset > > Stripsezeshift operation is Stretchoffset/2^ (Stripsezeshift).
Specifically, to obtain the target block number of the target block, the block number of the first block of the disk where the target block is located is calculated according to the block number in the upstream of the row where the target block is located in RAID10, then the increment number of the specific block of the target block in the disk is calculated according to the target block number of the target block and the offset in the target block, and then the target block number of the target block in the target block is calculated through the block number calculation formula according to the block number of the first block of the disk where the target block is located and the increment number of the specific block of the target block in the disk. The block number calculation formula is as follows: stripnum = Stripfirst + Stretch% Mirrors + Mirrors [ (strutchoffset > > Stripsizeshift) ]; calculating the block number of the first block of the disk where the target stripe is located according to the number of blocks in the uplink of the row where the target stripe is located in the RAID10 by using a method of Stripfirst + Stretch% Mirrors; for example, given Stretch4, as shown in fig. 2, when the partition size is 256KB, the Stripfirst + Stretch% Mirrors = (4/3) × 3+ (4) = 3) =4, corresponding to the partition number 4 (Strip 4) in fig. 2; when the partition size is 128KB, stripfirst + Stretch% Mirrors = (4/3) × 6+ (4% > -3) =7, which corresponds to the partition number 7 (Strip 4) in fig. 1, where "%" is a remainder. The method for calculating the increment number of the specific block of the target block in the disk according to the target stripe number of the target stripe and the offset in the target stripe is Stretchoffset > > Stripsizeshift, and the specific calculation is Stretchoffset/2^ (Stripsezeshift); for example, given a target stripe with a target stripe number of Stretch4 and a target stripe intra-coding offset of the target stripe of Stretch offset =258sector, as shown in fig. 1, a partition size of 128kb =256sector =2^8 ^ 2^ stripesischhift, then Stretch > stripesischshift = Stretch/2 ^ (stripesischshift) =258/256=1, indicating that it falls on the second of the two partitions (0 on the first partition calculation and 1 on the second partition calculation). As shown in fig. 2, the block size is 256kb =512sector =2^9=2^ stripesishift, then stripesifset > > stripesishift = stripesifset/2 ^ (stripesishift) =256/512=0, in this architecture, one disk has only one block in a row, so the stripesift/512 value is always 0, meaning it falls on the first one. Then according to the block number of the first block of the disk where the target stripe is located and the increment number of the specific block of the target block in the disk, calculating the target block number of the target block in the target stripe by a block number calculation formula, wherein the calculation method is that Stripnum = Stripfirst + Stretch% errors + errors (stripchoffset > > stripsizhift); as shown in fig. 1, assuming that the destination stripe number of a given destination stripe is Stretch4 and the destination stripe intra-coding offset of the destination stripe is Stretch offset =258sector, then Stretch first + Stretch% Mirrors + Mirrors = (Stretch offset > > stripezeashift) = (4/3) × 6+ (4 ÷ 3 ^ 258/2^ 8) =10 corresponds to Stretch 10 in fig. 1.
In one embodiment, the method for calculating the index includes:
Stripsizeshift=log2(2*Stripsize);
wherein, the Stripsize is the block size and the unit is KB.
Specifically, the calculation method for calculating the increment number of a specific block of a target block in a disk according to the target stripe number of the target stripe and the target intra-stripe offset is Stretchoffset/2^ (stripishhift), wherein the calculation method for stripishhift is Strickishhift = log2 (2X stripishize); the Stripsize is a partition size in KB, and 2 × Stripsize indicates a unit conversion into sectors, i.e., partition size =128KB, into 256 sectors.
In one embodiment, the calculating a target intra-block offset of a target block in the target stripe according to the target intra-stripe offset of the target stripe includes:
calculating according to the size of the blocks to obtain a block calculation mask;
specifically, after the target block number in the target stripe is calculated according to the number of blocks in the upstream of the row where the target stripe is located in RAID10, the target intra-block offset of the target block in the target stripe is further calculated according to the target intra-stripe offset of the target stripe, and first, the block calculation mask is calculated according to the block size, so that the target intra-block offset of the target block is calculated through the block offset calculation formula by using the target intra-stripe offset of the target stripe and the block calculation mask.
And calculating the target intra-block offset of the target block through a block offset calculation formula according to the target intra-strip offset of the target strip and the block calculation mask.
Specifically, after a block calculation mask is calculated according to the size of a block, a target block internal offset of a target block is calculated through a block offset calculation formula according to the target strip internal offset and the block calculation mask of the target strip, and a target block number and the target block internal offset of the target block are obtained through calculation, so that a specific address in a disk is located, and data can be written into the address.
In one embodiment, the calculation formula of the block calculation mask is:
Stripsizemask=2*Stripsize-1;
wherein the stripizzemask computes a mask for the partitions.
Specifically, the calculation formula of the block calculation mask calculated according to the block size is strisizemask =2 × strixsize-1, where strisizemask is the block calculation mask, and strixsize is the block size, and the unit is KB. For example, when the chunking size is 128KB, the chunking calculation mask is 2 × 128-1=255; when the chunking size is 256KB, the chunking calculation mask is 2 × 256-1=511.
In one embodiment, the target intra-block offset calculation formula is:
Stripoffset=Stretchoffset & Stripsizemask;
wherein the Stripoffset is the target intra-block offset.
Specifically, after a block calculation mask is calculated according to the size of a block, a target block internal offset of a target block is calculated according to a target strip internal offset and the block calculation mask of the target strip through a block offset calculation formula, wherein the block offset calculation formula is as follows: stripfoffset = strichoffset & strisizemask; as shown in fig. 2, when the block size is 256KB, it is converted into a sector unit of 512sector, stripizemask =512-1=2^9-1=511 (binary 11111111111), where stripizeshift is 9, when the target intra-stripe offset of a given target stripe =510sector (binary 111111111110), stripoffset = stripcoffset & stripizemask = 111110 &11111111111111 = 111111111110 (decimal 510), and thus the target intra-block offset of the resultant target block is 510sector.
Example three:
referring to fig. 4, fig. 4 is a flowchart of a second method of the method provided in the embodiment of the present application. In the method shown in fig. 4, the same or similar contents as those in the method shown in fig. 3 may refer to the description in the method shown in fig. 3, and are not repeated herein.
S201, carrying out stripe division according to requirements, and determining the size and the logarithm of the blocks;
dividing the strips according to actual requirements, and determining the number of the strips to be divided; the block size is then determined according to the actual requirements, i.e. the block size is 128KB, or 256KB, and the good block logarithm is determined.
S202, partitioning according to the size and the block logarithm of the block;
after the block size and the block logarithm are determined, the blocks can be divided according to the block size and the block logarithm.
And S203, numbering the divided strips and blocks.
And after the stripes and the blocks are divided, numbering all the stripes and the blocks so as to obtain the target block number and the target block internal offset of the target block by calculation according to the target stripe number and the target block internal offset of the target stripe.
S204, receiving a data transmission instruction, and determining a target stripe, a target stripe number of the target stripe and an internal offset of the target stripe according to the data transmission instruction;
after a data transmission instruction is received, a target stripe number of the target stripe and a target stripe internal offset can be determined according to the data transmission instruction, so that a target block number of a target block and the target block internal offset can be obtained through calculation according to the target stripe number of the target stripe and the target stripe internal offset, a specific address is obtained, and data are transmitted to the corresponding address.
S205, determining the number of disk pairs which are mirror images in the RAID10 and the number of blocks with different block numbers in each row of the RAID 10;
and if the target block number is obtained through calculation, the target block number is obtained through corresponding calculation according to the target strip number of the target strip. Firstly, determining the number of disk pairs which are mirror images of each other in the disk array and the number of blocks with different block numbers in each row in the RAID10 disk array according to RAID10, so as to determine the number of blocks in the rows above where the target stripe is located by the number of disk pairs which are mirror images of each other and the number of blocks with different block numbers in each row.
S206, calculating the number of blocks in the upstream of the row of the target strip in the RAID10 according to the disk pair number which is a mirror image in the RAID10 and the number of blocks with different block numbers in each row of the RAID10 by using a block number calculation formula;
after the number of the blocks with different numbers of the blocks in each row is obtained through the disk pairs which are mirror images of each other, the number of the blocks in the upstream of the row where the target stripe is located in RAID10 can be obtained through calculation through a related calculation formula through the disk pairs which are mirror images of each other and the number of the blocks with different numbers of the blocks in each row, so that the block number of the first block of the disk where the target stripe is located can be calculated according to the number of the blocks in the upstream of the row where the target stripe is located in RAID 10.
S207, calculating the block number of the first block of the disk where the target strip is located according to the block number in the upstream of the row where the target strip is located in the RAID 10;
after the number of blocks in the upstream of the row where the target stripe is located in RAID10 is obtained, the block number of the first block of the disk where the target stripe is located may be obtained through calculation according to the number of blocks in the upstream of the row where the target stripe is located in RAID10 through a corresponding calculation formula, so that the target block number of the target block in the target stripe is calculated through the block number.
S208, calculating the increment number of the specific block of the target block in the disk according to the target strip number of the target strip and the offset in the target strip;
after the block number of the first block of the disk where the target strip is located is obtained, the increment number of the specific block of the target block in the disk can be calculated through a corresponding calculation formula according to the target strip number of the target strip and the offset in the target strip, so that the target block number of the target block in the target strip can be calculated through the block number and the increment number of the first block.
S209, calculating the target block number of the target block in the target strip through a block number calculation formula according to the block number of the first block of the disk where the target strip is located and the increment number of the specific block of the target block in the disk;
after the block number of the first block of the disk where the target stripe is located and the increment number of the specific block of the target block in the disk are obtained, the block number of the first block of the disk where the target stripe is located and the increment number of the specific block of the target block in the disk are substituted into a corresponding calculation formula, so that the target block number of the target block in the target stripe can be obtained.
S210, calculating according to the size of the block to obtain a block calculation mask;
after calculating the target block number in the target stripe according to the number of blocks in the upstream of the row where the target stripe is located in RAID10, the target intra-block offset of the target block in the target stripe is further calculated according to the target intra-stripe offset of the target stripe, and first, the block calculation mask is calculated according to the block size, so that the target intra-block offset of the target block is calculated through the target intra-stripe offset of the target stripe and the block calculation mask by using the block offset calculation formula.
S211, calculating the target intra-block offset of the target block through a block offset calculation formula according to the target intra-strip offset of the target strip and the block calculation mask;
after the block calculation mask is calculated according to the size of the block, the target block internal offset of the target block is calculated through a block offset calculation formula according to the target strip internal offset and the block calculation mask of the target strip, and the target block number and the target block internal offset of the target block are obtained through calculation, so that the specific address in the disk is positioned, and data can be written into the address.
S212, determining a destination address according to the target block number of the target block and the offset in the target block, and reading or writing data into the destination address.
And after the target block number and the target intra-block offset of the target block are obtained through calculation according to the target block number and the target intra-block offset of the target band, determining a target address according to the target block number and the target intra-block offset of the target block, and reading or writing data into the target address to finish data transmission operation.
It should be understood that although the various steps in the flow diagrams of fig. 3-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3-4 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
Example four:
referring to fig. 5, fig. 5 is a system structure diagram of a block computing system according to an embodiment of the present application.
The block computing system of the present embodiment includes:
the system comprises a stripe partitioning module, a data partitioning module and a data partitioning module, wherein the stripe partitioning module is used for performing stripe partitioning on RAID10, performing partitioning under the stripe, and numbering the partitioned stripes and the partitioned blocks;
before data transmission, preparation work needs to be done, namely, stripe division is carried out on the RAID10 through a stripe and block division module, block division is carried out under stripes, and the divided stripes and blocks are numbered, so that the target block number and the target block internal offset of the target block can be obtained through calculation according to the target stripe number and the target stripe internal offset of the target stripe.
The target strip determining module is used for receiving a data transmission instruction and determining a target strip, a target strip number of the target strip and an offset in the target strip according to the data transmission instruction;
after a data transmission instruction is received, a target stripe number and a target stripe internal offset of the target stripe can be determined through a target stripe determining module according to the data transmission instruction, so that a target block number and a target block internal offset of a target block can be obtained through calculation according to the target stripe number and the target stripe internal offset of the target stripe, a specific address is obtained, and data are transmitted to the corresponding address.
The block number calculation module is used for calculating the block number in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
to store data in the disk, the storage address of the disk needs to be calculated, that is, the block number and the intra-block offset of the block are calculated according to the stripe number and the intra-stripe offset. In the present invention, a stripe in which data needs to be stored is referred to as a target stripe, and a block in which data needs to be stored is referred to as a target block. Therefore, the partition calculation method of the present invention calculates the target partition number and the target intra-partition offset of the target partition from the target partition number and the target intra-partition offset of the target stripe. Firstly, the block number calculation module calculates the block number in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe.
A block number calculation module, configured to calculate a target block number of a target block in the target stripe according to the number of blocks in an uplink above a row where the target stripe is located in the RAID 10;
after the number of blocks in the upstream row of the row where the target stripe in the RAID10 is located is calculated according to the target stripe number of the target stripe, the target block number of the target block in the target stripe may be obtained through calculation according to the number of blocks in the upstream row of the row where the target stripe in the RAID10 is located by the block number calculation module.
And the block offset calculation module is used for calculating the target block internal offset of the target block according to the target strip internal offset of the target strip.
After the target block number of the target block in the target band is obtained through calculation, the target block internal offset of the target block can be obtained through calculation according to the target band internal offset of the target band by the block offset calculation module, and the specific address in the disk can be obtained by adding the target block number and the target block internal offset, so that data can be written into the address of the disk.
In one embodiment, the block computing system further comprises:
a first block calculation module, configured to calculate, according to the number of blocks in an uplink of the row where the target stripe is located in the RAID10, a block number of a first block of a disk where the target stripe is located;
after the number of blocks in the upstream of the row where the target stripe is located in RAID10 is obtained, the first block number of the first block of the disk where the target stripe is located may be obtained through calculation by the first block calculation module according to the number of blocks in the upstream of the row where the target stripe is located in RAID10 through a corresponding calculation formula, so that the target block number of the target block in the target stripe is calculated through the block number.
The increment number calculation module is used for calculating the increment number of the specific block of the target block in the disk according to the target strip number of the target strip and the offset in the target strip;
after the block number of the first block of the disk where the target strip is located is obtained, the increment number of the specific block of the target block falling in the disk can be obtained through calculation by the increment number calculation module according to the target strip number of the target strip and the offset in the target strip through a corresponding calculation formula, so that the target block number of the target block in the target strip can be calculated through the block number and the increment number of the first block.
And the block mask calculation module is used for calculating to obtain a block calculation mask according to the size of the block.
After calculating the target block number in the target stripe according to the number of blocks in the upstream of the row where the target stripe is located in RAID10, the target intra-block offset of the target block in the target stripe is further calculated according to the target intra-stripe offset of the target stripe, and first, the block mask calculation module calculates the block calculation mask according to the size of the block, so that the target intra-block offset of the target block is calculated through the block offset calculation formula by using the target intra-stripe offset of the target stripe and the block calculation mask.
For the specific limitations of the block computing system, reference may be made to the limitations of the method above, which are not described in detail here. The various modules in the above-described partitioned computing system may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Example five:
the present embodiment provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the block calculation method when executing the computer program.
The computer device may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a block computation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It should be understood by those skilled in the art that the structure shown in fig. 6 is a block diagram of only a portion of the structure associated with the present application, and does not constitute a limitation on the computing devices to which the present application may be applied, and a particular computing device may include more or less components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
performing stripe division on the RAID10, performing block division under the stripes, and numbering the divided stripes and blocks;
receiving a data transmission instruction, and determining a target band, a target band number of the target band and an offset in the target band according to the data transmission instruction;
calculating the number of blocks in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
calculating the target block number of the target block in the target stripe according to the block number in the upstream row of the target stripe in the RAID 10;
and calculating the target intra-block offset of the target block according to the target intra-strip offset of the target strip.
Example six:
the present embodiments provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
performing stripe division on the RAID10, performing block division under the stripes, and numbering the divided stripes and blocks;
receiving a data transmission instruction, and determining a target band, a target band number of the target band and an offset in the target band according to the data transmission instruction;
calculating the number of blocks in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
calculating a target block number of a target block in the target stripe according to the number of blocks in an upstream row of the target stripe in the RAID 10;
and calculating the target intra-block offset of the target block according to the target intra-band offset of the target band.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.
Claims (17)
1. A disk array distribution architecture, wherein the disk array is a RAID10, the RAID10 includes a plurality of stripes, each stripe includes at least one pair of split blocks, and when a split block size of each disk in the RAID10 is set to a first preset size, each stripe includes two pairs of split blocks; when the block size of each disk in the RAID10 is set to be a second preset size, each stripe comprises a pair of blocks; wherein each pair of the blocks are mirror images of each other.
2. The disk array distribution architecture as claimed in claim 1, wherein when the first predetermined size is 128KB, the block size of each disk in the RAID10 is set to 128KB, and each of the stripes comprises two pairs of blocks.
3. The disk array distribution architecture as claimed in claim 1, wherein when the first predetermined size is 256KB, the block size of each disk in the RAID10 is set to 256KB, and each of the stripes comprises a pair of blocks.
4. A block calculation method using the disk array distribution architecture according to any one of claims 1 to 3, the block calculation method comprising:
performing stripe division on the RAID10, performing block division under the stripes, and numbering the divided stripes and blocks;
receiving a data transmission instruction, and determining a target band, a target band number of the target band and an offset in the target band according to the data transmission instruction;
calculating the number of blocks in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
calculating the target block number of the target block in the target stripe according to the block number in the upstream row of the target stripe in the RAID 10;
calculating a target intra-block offset of the target block according to the target intra-band offset of the target band;
and the number of the blocks is the number of the blocks with different block numbers.
5. The partition calculation method of claim 4, wherein striping the RAID10 and partitioning the partitions under the stripes, and numbering the partitioned stripes and partitions comprises:
dividing strips according to requirements, and determining the size and the logarithm of the blocks;
partitioning according to the size and the number of the partitioning pairs of the partitions;
and numbering the divided strips and blocks.
6. The block calculation method according to claim 4, wherein after obtaining the target block number and the target intra-block offset of the target block, the method further comprises:
and determining a destination address according to the target block number of the target block and the offset in the target block, and reading or writing data into the destination address.
7. The block calculation method according to claim 4, wherein the calculating the number of blocks in the rows above the row of the target stripe in the RAID10 according to the target stripe number of the target stripe comprises:
determining the disk pairs which are mirror images of each other in the RAID10 and the number of blocks with different block numbers in each row of the RAID 10;
and calculating the number of blocks in the rows above the row of the target strip in the RAID10 according to the disk pair number which is a mirror image in the RAID10 and the number of blocks with different block numbers in each row of the RAID10 by using a block number calculation formula.
8. The block calculation method according to claim 7, wherein the block number calculation formula is:
Stripfirst=(Stretch/Mirrors)*Rowstripcount;
wherein, stripfirst is the number of blocks in the row above the row where the target stripe is located in the RAID 10; stretch is the target stripe number of the target stripe; mirrors are the number of pairs of disks which are mirror images in the RAID 10; rowstripcount is the number of blocks with different block numbers in each row of the RAID 10.
9. The partition calculation method according to claim 7, wherein the calculating a target partition number in the target stripe according to the number of partitions in the row above the row where the target stripe is located in the RAID10 comprises:
calculating the block number of the first block of the disk where the target strip is located according to the block number in the upstream of the row where the target strip is located in the RAID 10;
calculating the increment number of the specific block of the target block in the disk according to the target strip number of the target strip and the offset in the target strip;
and calculating the target block number of the target block in the target strip through a block number calculation formula according to the block number of the first block of the disk where the target strip is located and the increment number of the specific block of the target block in the disk.
10. The block calculation method according to claim 9, wherein the block number calculation formula is:
Stripnum=Stripfirst+Stretch%Mirrors+Mirrors*(Stretchoffset>>Stripsizeshift);
wherein Stripnum is a target block number of a target block in the target stripe; the Stripfirst + Stretch% Mirrors is the number of the first block in the disk where the target stripe is located; stretchoffset is a target intra-band offset of the target band; strisizeshift is a calculation index; stretchoffset > > Stripsezeshift operation is Stretchoffset/2^ (Stripsezeshift).
11. The block calculation method according to claim 10, wherein the calculation method of the calculation index is:
Stripsizeshift=log 2 (2*Stripsize);
wherein, the Stripsize is the size of the block and the unit is KB.
12. The partition calculation method of claim 9, wherein the calculating a target intra-partition offset for a target partition in the target stripe from a target intra-stripe offset for the target stripe comprises:
calculating according to the size of the blocks to obtain a block calculation mask;
and calculating the target intra-block offset of the target block through a block offset calculation formula according to the target intra-strip offset of the target strip and the block calculation mask.
13. The block calculation method according to claim 12, wherein the calculation formula of the block calculation mask is:
Stripsizemask=2*Stripsize-1;
wherein the stripzemask computes a mask for the partitions.
14. The block computation method of claim 13, wherein the target intra-block offset computation formula is:
Stripoffset=Stretchoffset&Stripsizemask;
wherein the Stripoffset is the target intra-block offset.
15. A tile computing system, comprising:
the system comprises a stripe partitioning module, a data partitioning module and a data partitioning module, wherein the stripe partitioning module is used for performing stripe partitioning on RAID10, performing partitioning under the stripe, and numbering the partitioned stripes and the partitioned blocks;
the target strip determining module is used for receiving a data transmission instruction and determining a target strip, a target strip number of the target strip and an offset in the target strip according to the data transmission instruction;
the block number calculation module is used for calculating the block number in the rows above the row where the target stripe is located in the RAID10 according to the target stripe number of the target stripe;
a block number calculation module, configured to calculate a target block number of a target block in the target stripe according to the number of blocks in an uplink above a row where the target stripe is located in the RAID 10;
and the block offset calculation module is used for calculating the target block offset of the target block according to the target intra-stripe offset of the target stripe.
16. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any one of claims 4 to 14 are implemented when the computer program is executed by the processor.
17. A computer-readable storage medium, characterized in that: the computer-readable storage medium stores a program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 4 to 14.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211503958.3A CN115543216B (en) | 2022-11-29 | 2022-11-29 | Disk array distribution architecture, block calculation method, system, device and medium |
PCT/CN2023/113614 WO2024113972A1 (en) | 2022-11-29 | 2023-08-17 | Distributed architecture for redundant array of independent disks, block calculation method, system, device, and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211503958.3A CN115543216B (en) | 2022-11-29 | 2022-11-29 | Disk array distribution architecture, block calculation method, system, device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115543216A true CN115543216A (en) | 2022-12-30 |
CN115543216B CN115543216B (en) | 2023-03-21 |
Family
ID=84722329
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211503958.3A Active CN115543216B (en) | 2022-11-29 | 2022-11-29 | Disk array distribution architecture, block calculation method, system, device and medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115543216B (en) |
WO (1) | WO2024113972A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024113972A1 (en) * | 2022-11-29 | 2024-06-06 | 苏州元脑智能科技有限公司 | Distributed architecture for redundant array of independent disks, block calculation method, system, device, and medium |
CN118689412A (en) * | 2024-08-28 | 2024-09-24 | 苏州元脑智能科技有限公司 | Data processing method, product, equipment and medium |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030115437A1 (en) * | 2001-12-18 | 2003-06-19 | Kabushiki Kaisha Toshiba | Disk array apparatus and data update method therein |
CN101504623A (en) * | 2009-03-20 | 2009-08-12 | 杭州华三通信技术有限公司 | Independent disk redundancy array construction method and device |
CN101587425A (en) * | 2009-06-16 | 2009-11-25 | 杭州华三通信技术有限公司 | A kind of method and device that increases magnetic disc redundant array redundancy |
CN101866307A (en) * | 2010-06-24 | 2010-10-20 | 杭州华三通信技术有限公司 | Data storage method and device based on mirror image technology |
CN101976174A (en) * | 2010-08-19 | 2011-02-16 | 北京同有飞骥科技有限公司 | Method for constructing energy-saving disk array of vertical configuration distribution check |
CN101976175A (en) * | 2010-08-19 | 2011-02-16 | 北京同有飞骥科技有限公司 | Method for constructing disk array by horizontal grouping parallel concentrated verification |
CN108319427A (en) * | 2017-12-21 | 2018-07-24 | 创新科存储技术(深圳)有限公司 | A kind of Raid10 implementation methods for supporting quickly to rebuild and device |
CN108628541A (en) * | 2017-03-22 | 2018-10-09 | 华为技术有限公司 | A kind of method, apparatus and storage system of file storage |
US20190102250A1 (en) * | 2017-10-02 | 2019-04-04 | Western Digital Technologies, Inc. | Redundancy Coding Stripe Based On Internal Addresses Of Storage Devices |
CN112463036A (en) * | 2020-11-13 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Method, system, terminal and storage medium for calculating block stripes by disk |
CN113342279A (en) * | 2021-06-24 | 2021-09-03 | 苏州浪潮智能科技有限公司 | Disk array access method, device, equipment and storage medium |
CN113407125A (en) * | 2021-08-20 | 2021-09-17 | 苏州浪潮智能科技有限公司 | Method, system and related device for determining block number in RAID6 array |
CN113821373A (en) * | 2021-11-19 | 2021-12-21 | 苏州浪潮智能科技有限公司 | Method, system, equipment and storage medium for improving disk address translation speed |
CN113867644A (en) * | 2021-09-30 | 2021-12-31 | 苏州浪潮智能科技有限公司 | Disk array optimization method and device, computer equipment and storage medium |
CN113986149A (en) * | 2021-12-27 | 2022-01-28 | 苏州浪潮智能科技有限公司 | System fault processing method, device, equipment and storage medium |
CN115129265A (en) * | 2022-09-01 | 2022-09-30 | 苏州浪潮智能科技有限公司 | Partitioned caching method, device, equipment and readable medium for redundant array of independent disks |
CN115373609A (en) * | 2022-10-25 | 2022-11-22 | 浪潮电子信息产业股份有限公司 | Task processing method and related equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104778018B (en) * | 2015-04-23 | 2018-06-05 | 南京道熵信息技术有限公司 | Wide band disk array and storage method based on asymmetric hybrid magnetic disk mirroring |
CN107728946A (en) * | 2017-09-30 | 2018-02-23 | 深圳市华德安科技有限公司 | Hanging method, Android device and the storage medium of disk array |
CN111857552A (en) * | 2019-04-30 | 2020-10-30 | 伊姆西Ip控股有限责任公司 | Storage management method, electronic device and computer program product |
CN115543216B (en) * | 2022-11-29 | 2023-03-21 | 苏州浪潮智能科技有限公司 | Disk array distribution architecture, block calculation method, system, device and medium |
-
2022
- 2022-11-29 CN CN202211503958.3A patent/CN115543216B/en active Active
-
2023
- 2023-08-17 WO PCT/CN2023/113614 patent/WO2024113972A1/en unknown
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030115437A1 (en) * | 2001-12-18 | 2003-06-19 | Kabushiki Kaisha Toshiba | Disk array apparatus and data update method therein |
CN101504623A (en) * | 2009-03-20 | 2009-08-12 | 杭州华三通信技术有限公司 | Independent disk redundancy array construction method and device |
CN101587425A (en) * | 2009-06-16 | 2009-11-25 | 杭州华三通信技术有限公司 | A kind of method and device that increases magnetic disc redundant array redundancy |
CN101866307A (en) * | 2010-06-24 | 2010-10-20 | 杭州华三通信技术有限公司 | Data storage method and device based on mirror image technology |
CN101976174A (en) * | 2010-08-19 | 2011-02-16 | 北京同有飞骥科技有限公司 | Method for constructing energy-saving disk array of vertical configuration distribution check |
CN101976175A (en) * | 2010-08-19 | 2011-02-16 | 北京同有飞骥科技有限公司 | Method for constructing disk array by horizontal grouping parallel concentrated verification |
CN108628541A (en) * | 2017-03-22 | 2018-10-09 | 华为技术有限公司 | A kind of method, apparatus and storage system of file storage |
US20190102250A1 (en) * | 2017-10-02 | 2019-04-04 | Western Digital Technologies, Inc. | Redundancy Coding Stripe Based On Internal Addresses Of Storage Devices |
CN108319427A (en) * | 2017-12-21 | 2018-07-24 | 创新科存储技术(深圳)有限公司 | A kind of Raid10 implementation methods for supporting quickly to rebuild and device |
CN112463036A (en) * | 2020-11-13 | 2021-03-09 | 苏州浪潮智能科技有限公司 | Method, system, terminal and storage medium for calculating block stripes by disk |
CN113342279A (en) * | 2021-06-24 | 2021-09-03 | 苏州浪潮智能科技有限公司 | Disk array access method, device, equipment and storage medium |
CN113407125A (en) * | 2021-08-20 | 2021-09-17 | 苏州浪潮智能科技有限公司 | Method, system and related device for determining block number in RAID6 array |
CN113867644A (en) * | 2021-09-30 | 2021-12-31 | 苏州浪潮智能科技有限公司 | Disk array optimization method and device, computer equipment and storage medium |
CN113821373A (en) * | 2021-11-19 | 2021-12-21 | 苏州浪潮智能科技有限公司 | Method, system, equipment and storage medium for improving disk address translation speed |
CN113986149A (en) * | 2021-12-27 | 2022-01-28 | 苏州浪潮智能科技有限公司 | System fault processing method, device, equipment and storage medium |
CN115129265A (en) * | 2022-09-01 | 2022-09-30 | 苏州浪潮智能科技有限公司 | Partitioned caching method, device, equipment and readable medium for redundant array of independent disks |
CN115373609A (en) * | 2022-10-25 | 2022-11-22 | 浪潮电子信息产业股份有限公司 | Task processing method and related equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024113972A1 (en) * | 2022-11-29 | 2024-06-06 | 苏州元脑智能科技有限公司 | Distributed architecture for redundant array of independent disks, block calculation method, system, device, and medium |
CN118689412A (en) * | 2024-08-28 | 2024-09-24 | 苏州元脑智能科技有限公司 | Data processing method, product, equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
WO2024113972A1 (en) | 2024-06-06 |
CN115543216B (en) | 2023-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7051155B2 (en) | Method and system for striping data to accommodate integrity metadata | |
US7328305B2 (en) | Dynamic parity distribution technique | |
JP5923964B2 (en) | Disk array device, control device, and program | |
US7433999B2 (en) | Storage controller and method for storage control with non-contiguous stored parities | |
CN101587425B (en) | Method and device for increasing magnetic disc redundant array redundancy | |
US6918007B2 (en) | Memory controller interface with XOR operations on memory read to accelerate RAID operations | |
CN107484427B (en) | Method for processing stripes in a storage device and storage device | |
US8489916B2 (en) | Multi-disk fault-tolerant system, method for generating a check block, and method for recovering a data block | |
CN115543216B (en) | Disk array distribution architecture, block calculation method, system, device and medium | |
CN110297601B (en) | Solid state disk array construction method, electronic device and storage medium | |
US8335966B1 (en) | Dual parity RAID wherein no more than N+1 data symbols contribute to any parity symbol | |
CN113176858B (en) | Data processing method, storage system and storage device | |
JP2004227560A (en) | Parity storage method and error block restoration method in external storage subsystem | |
US6848022B2 (en) | Disk array fault tolerant method and system using two-dimensional parity | |
CN115562594B (en) | Method, system and related device for constructing RAID card | |
CN115080303B (en) | Encoding method, decoding method, device and medium for RAID6 disk array | |
CN114168087B (en) | Verification data generation method, device, equipment and storage medium | |
US20090172244A1 (en) | Hierarchical secondary raid stripe mapping | |
CN115657960B (en) | Disk array initialization method, device, equipment and readable storage medium | |
CN104182176A (en) | Rapid dilatation method for RAID 5 (redundant array of independent disks) | |
JP2016038767A (en) | Storage control device, storage control program, and storage control method | |
US9524213B2 (en) | Storage control apparatus, recording medium having stored therein storage control program and storage control method | |
CN111880745A (en) | Data processing method, device and equipment based on solid-state disk array and storage medium | |
CN115543693B (en) | Data recovery method and related equipment | |
CN111857535A (en) | Method, electronic device, and computer-readable storage medium for storage management |
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 |