CN101526886B - Data operating method of redundant arrays of independent disk and device - Google Patents

Data operating method of redundant arrays of independent disk and device Download PDF

Info

Publication number
CN101526886B
CN101526886B CN2009100829610A CN200910082961A CN101526886B CN 101526886 B CN101526886 B CN 101526886B CN 2009100829610 A CN2009100829610 A CN 2009100829610A CN 200910082961 A CN200910082961 A CN 200910082961A CN 101526886 B CN101526886 B CN 101526886B
Authority
CN
China
Prior art keywords
grain size
logical block
write operation
strip parameter
size intervals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2009100829610A
Other languages
Chinese (zh)
Other versions
CN101526886A (en
Inventor
孙策
郑萍萍
倪小珂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN2009100829610A priority Critical patent/CN101526886B/en
Publication of CN101526886A publication Critical patent/CN101526886A/en
Application granted granted Critical
Publication of CN101526886B publication Critical patent/CN101526886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention provides a data operating method of redundant arrays of an independent disk and a device; wherein the method comprises the following steps: creating a logic unit based on RAID and dividing the logic unit into multiple grain size intervals, and carrying out striping processing based on the grain size intervals; before carrying out write operation on the logic unit, judging whether the sizes of the strips to be written into the grain size intervals are matched with the current values of strip parameters; if not, adjusting the sizes of the strips to be written into the grain size intervals according to the current values of the strip parameters and carrying out write operation according to the adjusted sizes of the strips; or, directly carrying out write operation according to the sizes of the strips to be written into the grain size intervals; wherein the strip parameter has an initial value and is updated according to the writing data quantity of write operation on the logic unit. According to the data operating method, the data read/write performance of the RAID can be improved.

Description

A kind of data manipulation method of Redundant Array of Independent Disks (RAID) and device
Technical field
The present invention relates to Redundant Array of Independent Disks (RAID) (RAID, Redundant Array of IndependentDisks) technical field, be specifically related to a kind of data manipulation method and device of Redundant Array of Independent Disks (RAID).
Background technology
RAID can provide the jumbo while by a plurality of disk aggregations together, and higher access speed, better availability and data redundancy protection are provided.Wherein, the disk among the RAID can be described as member's disk of this RAID.Below simply introduce the related notion of RAID:
Subregion (Extent) is a storage block that the address on the disk is continuous.A disk can be divided into a plurality of subregions, and each subregion can equal and opposite in direction.Subregion is also referred to as logic magnetic disc sometimes.
Piecemeal (Strip) is distinguished into a plurality of equal-sized, pieces that the address is adjacent with a branch, and these pieces are called piecemeal.Piecemeal is considered to the element of band usually.Virtual disk is unit with the piecemeal, the map addresses of virtual disk is arrived the address of member's disk.
Band (Stripe) is the set of the relevant piecemeal (Strip) in position on the different subregions of RAID, is the unit that organizes stick on the different subregions.Stripe size equals the branch block size and multiply by member's number of disks.
The RAID technology has been widely used in the various occasions of data storage, and wherein the most widely used is RAID5.Each band of RAID5 contains the check bit of 1 piecemeal, is used for by the data in other deblockings of band are carried out parity checking so that redundancy protecting to be provided.When a disk failures, can carry out the data that parity arithmetic is come reconstructing lost by the data in check bit and other disks.Parity data is to use XOR (XOR) to draw by the data bit in each band, like this when a disk is damaged, can use XOR to reduce that part of data of losing by data bit in the band and parity check bit.Fig. 1 shows the data storage procedure of RAID5.RAID5 array among Fig. 1 is made up of 3 disks, need write the 6 blocks of data pieces that have of RAID5, and is divided into 3 bands like this and writes in the disk, and wherein the data block shown in P1~P3 is a parity data, is drawn by the data block XOR in each band respectively:
Figure G2009100829610D00011
Figure G2009100829610D00012
Figure G2009100829610D00013
Figure G2009100829610D00021
Figure G2009100829610D00022
The expression XOR.Like this, suppose that disk 1 damages, the data block A in the band 1 so can also be by (data block
Figure G2009100829610D00023
) computing draws.
In the prior art, being provided with of stripe size mainly is divided into two kinds: a kind of stripe size for fixing, and when creating, the RAID array sets, just can not change again later; Another kind of for can manually changing the stripe size of whole RAID array.
Above-mentioned first kind of scheme, stripe size just configures in the RAID constructive process, and the band of whole array just is fixed, and as a RAID5 array of being made up of 5 disks, being provided with stripe size during establishment is 32KB (B represents byte here).Then the branch of each in band block size is 32/ (5-1)=8KB.Fig. 2 shows the fixedly write operation synoptic diagram of band size array, when the pairing write data size of professional I/O is 16KB, this write data is divided into block data piece 0 and the data block 1 of two 8KB by the RAID controller, covers data block L and data block A in the band 1 respectively.Yet before writing band 1, the RAID controller also needs the data read of data block B and data block C is come out, and calculates the parity check bit P1 ' that makes new advances by following formula, covers the P1 in the band 1:
Again data block 0 and data block 1 and P1 ' are write in the piecemeal corresponding in the band 1 at last.Obviously, there is following shortcoming in this scheme:
1, stripe size is just fixing after array is created can not change again.Need read a large amount of data that do not change if each write operation, will appear because cause specific changes the back not to be complementary with stripe size in professional I/O, influence the efficient of write operation.
2, array can only be fit to the business of a specific big or small I/O, when increasing new I/O characteristic when professional, uses existing array clearance spaces will influence the readwrite performance of new business.
The another kind of scheme of prior art is, after creating the RAID array, when the write data of finding professional I/O correspondence commonly used and array band do not match, in order to improve readwrite performance, by manual adjustment array stripe size, form new band by data migtation, the data according to new band recomputate check bit again.With the RAID array shown in Fig. 2 is example, has formed 6 bands by data migtation, and stripe size is adjusted into 16KB, and the branch block size in the band is adjusted into 4KB, as shown in Figure 3.Through above-mentioned adjustment, the stripe size of RAID array is 16KB, when carrying out above-mentioned write operation shown in Figure 2, because the write data of professional I/O correspondence size and band are consistent, the RAID controller is divided into write data four data blocks of 4KB size: data block 0, data block 1, data block 2 and data block 3, directly calculate new check bit P1 then according to these four data blocks ", then with data block 0, data block 1, data block 2, data block 3 and P1 " write in the band 1.The operation that has not had to read data on the persistent data piece in the whole write operation process.
The shortcoming of such scheme is,
When 1, changing stripe size, the band of whole RAID array all need be adjusted, the migration lot of data, speed is very slow, and the processing pressure of storage device controller is huge.
2, adjust after, the RAID array still can only be fit to the business of a kind of specific big or small I/O, when increasing new I/O characteristic professional, uses existing array clearance spaces still can influence readwrite performance.
Summary of the invention
Embodiment of the invention technical matters to be solved provides a kind of data manipulation method and device of Redundant Array of Independent Disks (RAID), by being divided into a plurality of grain size intervals based on the logical block that RAID creates, and, improved the reading and writing data performance of RAID according to the stripe size of described logical block writing data quantity of write operation size dynamically being adjusted corresponding grain size intervals.
For solving the problems of the technologies described above, the embodiment of the invention provides scheme as follows:
The data manipulation method of a kind of Redundant Array of Independent Disks (RAID) RAID comprises:
Create logical block based on RAID, described logical block is divided into a plurality of grain size intervals, and carry out striping based on grain size intervals and handle;
Before described logical block is carried out write operation, whether the stripe size of the grain size intervals that judgement will write is complementary with the currency of strip parameter: as do not match, then the stripe size of the grain size intervals that will write according to the currency adjustment of described strip parameter is earlier carried out write operation according to adjusted stripe size again; Otherwise, directly carry out write operation according to the stripe size of the grain size intervals that will write;
Wherein, described strip parameter has an initial value, and according to described logical block writing data quantity of write operation is upgraded.
Preferably, in the above-mentioned data manipulation method, further the writing data quantity size according to the professional I/O commonly used of described logical block correspondence is provided with described initial value.
Preferably, in the above-mentioned data manipulation method, describedly carry out striping based on grain size intervals and handle and to comprise: according to RAID array type and described initial value each grain size intervals in the described logical block is carried out striping respectively and handle, make the stripe size of each grain size intervals of described logical block all equal described initial value.
Preferably, in the above-mentioned data manipulation method, describedly carry out striping based on grain size intervals and handle and to comprise: according to RAID array type and described initial value first grain size intervals in the described logical block is carried out striping and handle, make the stripe size of described first grain size intervals all equal described initial value; And, write when full in current grain size intervals, according to the currency of RAID array type and described strip parameter, the next grain size intervals in the described logical block is carried out striping handle, make the stripe size of described next grain size intervals equal the currency of described strip parameter.
Preferably, in the above-mentioned data manipulation method, described basis is upgraded described logical block writing data quantity of write operation and is comprised:
Record is to each writing data quantity of write operation of described logical block;
If continuous recording to writing data quantity be that the write operation of first numerical value reaches pre-determined number, and first numerical value is different with the currency of described strip parameter, then upgrades described strip parameter according to described first numerical value.
Preferably, in the above-mentioned data manipulation method, described basis is upgraded described logical block writing data quantity of write operation and is comprised:
In the predetermined measurement period of statistics to average each writing data quantity of the write operation of described logical block;
If the average each writing data quantity at least two nearest continuous measurement periods all surpasses first threshold or all is lower than second threshold value, described first threshold is not less than the currency of described strip parameter, described second threshold value is not more than the currency of described strip parameter, then upgrades described strip parameter according to the average each writing data quantity in the nearest measurement period.
Preferably, in the above-mentioned data manipulation method, the size of each grain size intervals of described logical block is all identical.
The embodiment of the invention also provides the data manipulation device of a kind of Redundant Array of Independent Disks (RAID) RAID, comprising:
The striping processing unit is used for creating logical block based on RAID, and described logical block is divided into a plurality of grain size intervals, and carries out striping based on grain size intervals and handle;
The strip parameter updating block is used to be provided with a strip parameter, and described strip parameter has an initial value, and according to described logical block writing data quantity of write operation is upgraded described strip parameter;
Write operation unit, be used for before described logical block is carried out write operation, whether the stripe size of the grain size intervals that judgement will write is complementary with the currency of described strip parameter: as do not match, then the stripe size of the grain size intervals that will write according to the currency adjustment of described strip parameter is earlier carried out write operation according to adjusted stripe size again; Otherwise, directly carry out write operation according to the stripe size of the grain size intervals that will write.
Preferably, in the above-mentioned data manipulation device, described strip parameter updating block also is used for according to the writing data quantity size of the professional I/O commonly used of described logical block correspondence described initial value being set.
Preferably, in the above-mentioned data manipulation device, described striping processing unit, also be used for each grain size intervals of described logical block being carried out striping respectively and handle, make the stripe size of each grain size intervals of described logical block all equal described initial value according to RAID array type and described initial value.
Preferably, in the above-mentioned data manipulation device, described striping processing unit also is used for according to RAID array type and described initial value first grain size intervals of described logical block being carried out striping and handles, and makes the stripe size of described first grain size intervals all equal described initial value; And, write when full in current grain size intervals, according to the currency of RAID array type and described strip parameter, the next grain size intervals in the described logical block is carried out striping handle, make the stripe size of described next grain size intervals equal the currency of described strip parameter.
Preferably, in the above-mentioned data manipulation device, described strip parameter updating block, also be used to write down each writing data quantity of write operation to described logical block, and continuous recording to writing data quantity be that the write operation of first numerical value reaches pre-determined number, and the currency of first numerical value and described strip parameter is not simultaneously, upgrades described strip parameter according to described first numerical value.
Preferably, in the above-mentioned data manipulation device, described strip parameter updating block, in the measurement period that also is used to add up predetermined to average each writing data quantity of the write operation of described logical block, and the average each writing data quantity in nearest at least two continuous measurement periods all surpasses first threshold or all is lower than second threshold value, and described first threshold is not less than the currency of described strip parameter, when described second threshold value is not more than the currency of described strip parameter, upgrade described strip parameter according to the average each writing data quantity in the nearest measurement period.
From the above as can be seen, the data manipulation method of the Redundant Array of Independent Disks (RAID) that the embodiment of the invention provides and device, write data characteristics by statistical service I/O, dynamically adjust the stripe size of grain size intervals, make the stripe size of grain size intervals and current professional I/O be complementary, thereby can improve the reading and writing data performance of memory device; And the embodiment of the invention is only adjusted a grain size intervals of logical block, rather than the whole RAID array is adjusted carrying out stripe size when adjusting, and it is less and regulate the speed very fast therefore to adjust the data migtation amount that relates to; At last, the embodiment of the invention can be created a plurality of logical blocks based on a RAID array, the storage space of each logical block can be corresponding to different professional I/O, make a RAID array can be used to store the professional I/O of different write data sizes, solved the limitation that can only be fit to a kind of professional I/O of write data size after the RAID array is set up in the prior art.
Description of drawings
Fig. 1 is the data storage synoptic diagram of RAID5 in the prior art;
Fig. 2 is the fixing write operation synoptic diagram of band size array in the prior art;
Fig. 3 is for adjusting stripe size to adapt to the synoptic diagram of new business write operation in the prior art;
Fig. 4 is the schematic flow sheet of the data manipulation method of the described RAID of the embodiment of the invention;
Fig. 5 is for carrying out the synoptic diagram of striping at grain size intervals in the embodiment of the invention;
Fig. 6 is the structural representation of the data manipulation device of the described RAID of the embodiment of the invention.
Embodiment
The embodiment of the invention is not carried out striping to the whole RAID array and is handled when creating the RAID array, the embodiment of the invention will be divided into a plurality of grain size intervals based on the logical block that the RAID array is created, carry out striping at each grain size intervals and handle, make a RAID array that a plurality of different stripe size can be arranged; The embodiment of the invention is also upgraded strip parameter according to writing data quantity of write operation, in the process of write operation, determine whether the stripe size of the purpose grain size intervals of needs adjustment write operation according to the currency of strip parameter, thereby realized in the write operation process, dynamically adjusting the stripe size of corresponding grain size intervals according to the write data size of professional I/O, data migtation amount in the time of can reducing the stripe size adjustment can improve the data write performance again.The present invention is described further by specific embodiment below in conjunction with accompanying drawing.
Present embodiment will be divided into a plurality of continuous grain size intervals based on the logical block that RAID creates, and a strip parameter is set, this strip parameter has a predefined initial value, and this initial value can be provided with according to the writing data quantity size of the professional I/O commonly used of logical block correspondence.And this strip parameter can be according to upgrading the logical block writing data quantity of write operation, and concrete update mode illustrates hereinafter.
Please refer to Fig. 4, the data manipulation method of the described RAID of the embodiment of the invention may further comprise the steps:
Step 41 is created the RAID array, and creates logical block based on the RAID array.
Here, when creating the RAID array, at first the RAID array is carried out initialization process, full disk is write Z-operation.Use this RAID array can create one or more logical blocks, different logical blocks is by logical unit number (LUN, Logical Unit Number) distinguishes, logical block can be corresponding with concrete professional I/O, and such RAID array just can be used to store the multiple business data.The whole RAID array not being carried out striping in this step when creating the RAID array handles.
Step 42 is divided into a plurality of grain size intervals with logical block, and carries out striping based on grain size intervals and handle.
The striping processing is to carry out at the whole RAID array in the prior art.Unlike the prior art, the unit that striping is handled in the present embodiment is a grain size intervals, and the size of each grain size intervals can be predesignated, 128MB for example, and the size of each grain size intervals can be the same or different.
Carrying out striping based on grain size intervals in this step handles, and write down the stripe size of each grain size intervals, the stripe size possibility of each grain size intervals is identical also may be different, concrete, carrying out the striping processing based on grain size intervals can be: at first, mark off first grain size intervals from described logical block, and according to the initial value of RAID array type and strip parameter, first grain size intervals is carried out striping handle, make the stripe size of described first grain size intervals equal described initial value; Then, first grain size intervals write when full or write full before, currency according to RAID array type and described strip parameter, next grain size intervals in the described logical block (second grain size intervals) is carried out striping handle, make the stripe size of second grain size intervals equal the currency of described strip parameter; Second grain size intervals write when full or write full before, continue currency according to RAID array type and described strip parameter and the 3rd grain size intervals carried out striping handle, the rest may be inferred, each grain size intervals carried out striping one by one handle.
For example, suppose that the initial value of strip parameter is set to 32KB, the grain size intervals size is 128MB.When creating logical block, utilize the RAID controller at first first grain size intervals (the RAID array is distributed to the 128MB space of the storage area head of this logical block) to be carried out striping according to array type and described initial value and handle, so the size of the band of first grain size intervals is 32KB.As shown in Figure 5, with a RAID5 array of being made up of 5 member's disks is example, when logical block of initial creation, first grain size intervals of this logical block is divided into 4K band (each stripe size is 32KB), each deblocking (band element) is 8KB, a band state table that is used to write down each grain size intervals stripe size is set in the resource virtualizing information of this logical block simultaneously, first grain size intervals stripe size that write down in this band state table this moment is 32KB, and the data of other grain size intervals are record not as yet.Before first grain size intervals is write completely, utilize the RAID controller 128MB space subsequent (second grain size intervals) also to carry out the striping processing, by that analogy according to the currency of array type and strip parameter to first grain size intervals.
Step 43, RAID controller receive professional I/O request, and request is carried out write operation to above-mentioned logical block; Before described logical block is carried out write operation, whether the stripe size that the RAID controller is judged the grain size intervals that will write is complementary with the currency of strip parameter, as do not match, then the stripe size of the grain size intervals that will write according to the currency adjustment of described strip parameter is earlier carried out write operation according to adjusted stripe size again; If coupling is then directly carried out write operation according to the stripe size of the grain size intervals that will write.
In this step,, then need the stripe size of the grain size intervals that will write is adjusted if the currency of the stripe size of the grain size intervals that will write and strip parameter does not match.For example, when the currency of strip parameter is 16KB, RAID controller query note has the band state table of each grain size intervals stripe size, the stripe size of definite grain size intervals that will write, be assumed to be 32KB, at this moment, the RAID controller begins to adjust the stripe size of the described grain size intervals that will write, band is adjusted into 16KB from 32KB, and after adjustment is finished, upgrades the stripe size value of this grain size intervals that will write in the band state table.Owing to only adjust the stripe size of a grain size intervals, with respect to the stripe size of adjusting the whole RAID array in the prior art, the data volume that present embodiment need move is obviously few a lot, can alleviate the pressure of RAID controller, finishes adjustment apace.After adjustment is finished, the RAID controller is carried out write operation again, and therefore need not from band read any data because grain size intervals band and write data are complementary this moment again, but according to write data calculation check position, and then write data and check bit be written to piecemeal corresponding in the band.
In this step, when the currency of the stripe size of the grain size intervals that will write and strip parameter is complementary, directly carry out write operation according to the stripe size of the grain size intervals that will write.Because the renewal of strip parameter has certain time-delay usually; the currency of strip parameter sometimes and be not equal to the write data size of current write operation; therefore; the stripe size of the grain size intervals that will write and current writing data quantity of write operation size may be also unequal; this moment, write operation may also need to read existing data in the band; recomputating new check bit, and then write data and new check bit be written to piecemeal corresponding in the band.
Like this, after a large amount of professional I/O requests, the band at frequently-used data place all can be adjusted to the stripe size that is fit to professional I/O feature in the logical block, and the grain size intervals band at the data place that some are are seldom read and write then can not change.Through stripe size adjustment repeatedly, the stripe size of each grain size intervals in the logical block all will be complementary with this logical block corresponding service I/O feature, and the readwrite performance of this logical block will be greatly improved.
In the step 42 of above-mentioned flow process striping handle be current grain size intervals write when full or write full before, just next grain size intervals is carried out striping and handles according to the currency of RAID array type and strip parameter.This striping processing mode makes the stripe size of grain size intervals and current business I/O adapt.Present embodiment can also be simplified above-mentioned striping processing procedure, for example, describedly carry out striping based on grain size intervals and handle and to be: when creating logical block, directly all grain size intervals of described logical block are carried out striping and handle, make the stripe size of all grain size intervals of described logical block all equal described initial value according to RAID array type and described initial value.For example, when the writing data quantity of logical block corresponding service I/O is 32KB, initial value that can strip parameter is set to 32KB, suppose that the RAID array type is a RAID5 array and when comprising 5 member's disks, at this moment, the band element of each member's disk is 32/ (5-1)=8KB, handles so can carry out striping to each grain size intervals according to above-mentioned parameter, makes the stripe size of each grain size intervals of logical block be 32KB.
The update mode of following shows slice parameter.
Simply, when the currency of strip parameter and current to described logical block writing data quantity of write operation not simultaneously, just can directly strip parameter be updated to current to described logical block writing data quantity of write operation.This update mode is suitable for writing data quantity and changes not too frequent applied environment.When the writing data quantity frequent variations, strip parameter is upgraded continually in the aforesaid way, will cause adjusting stripe size continually, causes lot of data to calculate and data migtation, and has influence on the serviceable life of disk.Preferably, present embodiment can also upgrade strip parameter according to following two kinds of update modes.
1) record is to each writing data quantity of write operation of described logical block; If continuous recording to writing data quantity be that the write operation of first numerical value reaches pre-determined number, and first numerical value is different with the currency of described strip parameter, then upgrades described strip parameter according to described first numerical value.
For example, suppose that described pre-determined number is 100 times, the currency of strip parameter is 32KB, if current described logical block has been carried out write operation 100 times, and each writing data quantity is 16KB, then strip parameter can be updated to 16KB this moment.
2) in the predetermined measurement period of statistics to average each writing data quantity of the write operation of described logical block; If the average each writing data quantity at least two nearest continuous measurement periods all surpasses first threshold or all is lower than second threshold value, described first threshold is not less than the currency of described strip parameter, described second threshold value is not more than the currency of described strip parameter, then upgrades described strip parameter according to the average each writing data quantity in the nearest measurement period.Here, first, second threshold value is to determine that according to the currency of strip parameter the currency of strip parameter is in first threshold and the formed numerical value of second threshold value interval.For example, be that the center is provided with a numerical range with the currency of strip parameter, the upper and lower bound of this numerical range is respectively first, second threshold value.
For example, the as if statistics cycle is 10 minutes, and described initial value is 32KB, and first threshold is 40KB, and second threshold value is 26KB, and each writing data quantity of professional I/O is 32KB.Average each writing data quantity of the write operation that statistics obtains in first 10 minutes is 32KB; Since the 15th minute, cause the writing data quantity of professional I/O to become 16KB for a certain reason, suppose that second average each writing data quantity that statistics obtains in 10 minutes is 24KB; After this, each writing data quantity of professional I/O is stabilized in 16KB, so average each writing data quantity of the 3rd write operation that statistics obtains in 10 minutes is 16KB.The statistical value in above-mentioned three cycles can reflect the variation tendency of the writing data quantity of professional I/O.Usually, the writing data quantity of logical block corresponding service I/O is more stable, because the average each writing data quantity in second and third 10 minutes is all less than the second threshold value 26KB, then the 3rd average each writing data quantity of 10 minutes can reflect the current real each writing data quantity of professional I/O usually, therefore, can be according to average each writing data quantity 16KB of a nearest measurement period (promptly the 3rd 10 minutes), strip parameter is updated to 16KB, thereby makes strip parameter and current professional I/O adapt.Here, preferably adopt two measurement periods, determine whether upgrading strip parameter according to the average each writing data quantity in continuous two measurement periods.Obviously, present embodiment is not limited to two measurement periods, it can also be more a plurality of continuous measurement periods, as three, at this moment, if average each writing data quantity of continuous three measurement periods all surpasses first threshold or is lower than second threshold value, then upgrade strip parameter according to average each writing data quantity of a nearest measurement period.
Can also further use the RAID array to create one or more new logical blocks in the present embodiment, the striping of these logical blocks is handled all identical with data manipulation method, each logical block is separate, corresponding service I/O feature can be different fully separately, and the stripe size of grain size intervals also can be different separately.
From the above as can be seen, pass through the write data characteristics of statistical service I/O in the present embodiment, dynamically adjust the stripe size of grain size intervals, make the stripe size of grain size intervals and current professional I/O be complementary, thereby can improve the readwrite performance of memory device; And present embodiment is only adjusted a grain size intervals of logical block, rather than the whole RAID array is adjusted carrying out stripe size when adjusting, and it is less and regulate the speed very fast therefore to adjust the data migtation amount that relates to; At last, present embodiment can be created a plurality of logical blocks based on a RAID array, the storage space of a logical block is corresponding to certain professional I/O, make a RAID array can be used to store the professional I/O of different write data sizes, solved the limitation that can only be fit to a kind of professional I/O of write data size after the RAID array is set up in the prior art.
Based on the data manipulation method of above-mentioned RAID, present embodiment also provides the data manipulation device of a kind of RAID, and as shown in Figure 6, this data manipulation device comprises:
The striping processing unit is used for creating logical block based on RAID, and described logical block is divided into a plurality of grain size intervals, and carries out striping based on grain size intervals and handle, and writes down the stripe size of each grain size intervals;
The strip parameter updating block is used to be provided with a strip parameter, and described strip parameter has an initial value, and according to described logical block writing data quantity of write operation is upgraded described strip parameter;
Write operation unit, be used for before described logical block is carried out write operation, whether the stripe size of the grain size intervals that judgement will write is complementary with the currency of described strip parameter: as do not match, then the stripe size of the grain size intervals that will write according to the currency adjustment of described strip parameter is earlier carried out write operation according to adjusted stripe size again; Otherwise, directly carry out write operation according to the stripe size of the grain size intervals that will write.
Preferably, above-mentioned strip parameter updating block can also be used for according to the writing data quantity size of the professional I/O commonly used of described logical block correspondence described initial value being set.
Preferably, above-mentioned striping processing unit, can also be used for each grain size intervals of described logical block being carried out striping respectively and handle, make the stripe size of each grain size intervals of described logical block all equal described initial value according to RAID array type and described initial value; Perhaps, be used for first grain size intervals of described logical block being carried out striping and handle, make the stripe size of described first grain size intervals all equal described initial value according to RAID array type and described initial value; And, write when full in current grain size intervals, according to the currency of RAID array type and described strip parameter, the next grain size intervals in the described logical block is carried out striping handle, make the stripe size of described next grain size intervals equal the currency of described strip parameter.
Preferably, above-mentioned strip parameter updating block, can also be used to write down each writing data quantity of write operation to described logical block, and continuous recording to writing data quantity be that the write operation of first numerical value reaches pre-determined number, and the currency of first numerical value and described strip parameter is not simultaneously, upgrades described strip parameter according to described first numerical value.Perhaps, above-mentioned strip parameter updating block, in the measurement period that can also be used to add up predetermined to average each writing data quantity of the write operation of described logical block, and the average each writing data quantity in nearest at least two continuous measurement periods all surpasses first threshold or all is lower than second threshold value, and described first threshold is not less than the currency of described strip parameter, when described second threshold value is not more than the currency of described strip parameter, upgrade described strip parameter according to the average each writing data quantity in the nearest measurement period.
In sum, the data manipulation method of the RAID that the embodiment of the invention provides and device, to be divided into a plurality of grain size intervals based on the logical block that RAID creates, carrying out striping at each grain size intervals handles, and, improved the data write performance according to the big or small stripe size of dynamically adjusting corresponding grain size intervals of the write data of professional I/O.
Should be noted that at last, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not breaking away from the spiritual scope of technical solution of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.

Claims (13)

1. the data manipulation method of a Redundant Array of Independent Disks (RAID) RAID is characterized in that, comprising:
Create logical block based on RAID, described logical block is divided into a plurality of grain size intervals, and carry out striping based on grain size intervals and handle;
Before described logical block is carried out write operation, whether the stripe size of the grain size intervals that judgement will write is complementary with the currency of strip parameter: as do not match, then the stripe size of the grain size intervals that will write according to the currency adjustment of described strip parameter is earlier carried out write operation according to adjusted stripe size again; Otherwise, directly carry out write operation according to the stripe size of the grain size intervals that will write;
Wherein, described strip parameter has an initial value, and according to described logical block writing data quantity of write operation is upgraded.
2. data manipulation method as claimed in claim 1 is characterized in that, further the writing data quantity size according to the professional I/O commonly used of described logical block correspondence is provided with described initial value.
3. data manipulation method as claimed in claim 1, it is characterized in that, describedly carry out striping based on grain size intervals and handle and to comprise: according to RAID array type and described initial value each grain size intervals in the described logical block is carried out striping respectively and handle, make the stripe size of each grain size intervals of described logical block all equal described initial value.
4. data manipulation method as claimed in claim 1, it is characterized in that, describedly carry out striping based on grain size intervals and handle and to comprise: according to RAID array type and described initial value first grain size intervals in the described logical block is carried out striping and handle, make the stripe size of described first grain size intervals all equal described initial value; And, write when full in current grain size intervals, according to the currency of RAID array type and described strip parameter, the next grain size intervals in the described logical block is carried out striping handle, make the stripe size of described next grain size intervals equal the currency of described strip parameter.
5. as claim 3 or 4 described data manipulation methods, it is characterized in that described basis is upgraded described logical block writing data quantity of write operation and comprised:
Record is to each writing data quantity of write operation of described logical block;
If continuous recording to writing data quantity be that the write operation of first numerical value reaches pre-determined number, and first numerical value is different with the currency of described strip parameter, then upgrades described strip parameter according to described first numerical value.
6. as claim 3 or 4 described data manipulation methods, it is characterized in that described basis is upgraded described logical block writing data quantity of write operation and comprised:
In the predetermined measurement period of statistics to average each writing data quantity of the write operation of described logical block;
If the average each writing data quantity at least two nearest continuous measurement periods all surpasses first threshold or all is lower than second threshold value, described first threshold is not less than the currency of described strip parameter, described second threshold value is not more than the currency of described strip parameter, then upgrades described strip parameter according to the average each writing data quantity in the nearest measurement period.
7. data manipulation method as claimed in claim 1 is characterized in that the size of each grain size intervals of described logical block is all identical.
8. the data manipulation device of a Redundant Array of Independent Disks (RAID) RAID is characterized in that, comprising:
The striping processing unit is used for creating logical block based on RAID, and described logical block is divided into a plurality of grain size intervals, and carries out striping based on grain size intervals and handle;
The strip parameter updating block is used to be provided with a strip parameter, and described strip parameter has an initial value, and according to described logical block writing data quantity of write operation is upgraded described strip parameter;
Write operation unit, be used for before described logical block is carried out write operation, whether the stripe size of the grain size intervals that judgement will write is complementary with the currency of described strip parameter: as do not match, then the stripe size of the grain size intervals that will write according to the currency adjustment of described strip parameter is earlier carried out write operation according to adjusted stripe size again; Otherwise, directly carry out write operation according to the stripe size of the grain size intervals that will write.
9. data manipulation device as claimed in claim 8 is characterized in that,
Described strip parameter updating block also is used for according to the writing data quantity size of the professional I/O commonly used of described logical block correspondence described initial value being set.
10. data manipulation device as claimed in claim 8 is characterized in that,
Described striping processing unit, also be used for each grain size intervals of described logical block being carried out striping respectively and handle, make the stripe size of each grain size intervals of described logical block all equal described initial value according to RAID array type and described initial value.
11. data manipulation device as claimed in claim 8 is characterized in that,
Described striping processing unit also is used for according to RAID array type and described initial value first grain size intervals of described logical block being carried out striping and handles, and makes the stripe size of described first grain size intervals all equal described initial value; And, write when full in current grain size intervals, according to the currency of RAID array type and described strip parameter, the next grain size intervals in the described logical block is carried out striping handle, make the stripe size of described next grain size intervals equal the currency of described strip parameter.
12. as claim 10 or 11 described data manipulation devices, it is characterized in that,
Described strip parameter updating block, also be used to write down each writing data quantity of write operation to described logical block, and continuous recording to writing data quantity be that the write operation of first numerical value reaches pre-determined number, and the currency of first numerical value and described strip parameter is not simultaneously, upgrades described strip parameter according to described first numerical value.
13. as claim 10 or 11 described data manipulation devices, it is characterized in that,
Described strip parameter updating block, in the measurement period that also is used to add up predetermined to average each writing data quantity of the write operation of described logical block, and the average each writing data quantity in nearest at least two continuous measurement periods all surpasses first threshold or all is lower than second threshold value, and described first threshold is not less than the currency of described strip parameter, when described second threshold value is not more than the currency of described strip parameter, upgrade described strip parameter according to the average each writing data quantity in the nearest measurement period.
CN2009100829610A 2009-04-27 2009-04-27 Data operating method of redundant arrays of independent disk and device Active CN101526886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100829610A CN101526886B (en) 2009-04-27 2009-04-27 Data operating method of redundant arrays of independent disk and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100829610A CN101526886B (en) 2009-04-27 2009-04-27 Data operating method of redundant arrays of independent disk and device

Publications (2)

Publication Number Publication Date
CN101526886A CN101526886A (en) 2009-09-09
CN101526886B true CN101526886B (en) 2011-09-07

Family

ID=41094758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100829610A Active CN101526886B (en) 2009-04-27 2009-04-27 Data operating method of redundant arrays of independent disk and device

Country Status (1)

Country Link
CN (1) CN101526886B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019617A (en) * 2012-11-25 2013-04-03 向志华 Establishing method for efficiently realizing internal RAID of SSD, data reading and writing method and device
CN104216660A (en) * 2013-05-30 2014-12-17 华为软件技术有限公司 Method and device for improving disk array performance
CN107203559B (en) * 2016-03-17 2021-01-01 华为技术有限公司 Method and device for dividing data strips
CN107807788B (en) * 2016-09-09 2021-06-15 北京忆恒创源科技有限公司 Block strip construction method and device and solid-state storage equipment
CN108228081B (en) * 2016-12-21 2021-03-02 伊姆西Ip控股有限责任公司 Method and apparatus for data protection
CN107132996B (en) * 2017-04-12 2020-02-21 杭州宏杉科技股份有限公司 Intelligent thin provisioning-based storage method, module and system
CN107632947A (en) * 2017-09-12 2018-01-26 记忆科技(深圳)有限公司 A kind of intelligent RAID data protection system
CN110308875B (en) * 2019-06-27 2023-07-14 深信服科技股份有限公司 Data read-write method, device, equipment and computer readable storage medium
CN112650441B (en) * 2019-10-11 2022-11-04 杭州海康威视数字技术股份有限公司 Stripe cache allocation method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6055354A (en) * 1996-04-15 2000-04-25 Discreet Logic Inc. Data storage apparatus
CN101055510A (en) * 2006-04-14 2007-10-17 中兴通讯股份有限公司 Method for promoting stream media data read-write efficiency
CN101149946A (en) * 2006-09-20 2008-03-26 中兴通讯股份有限公司 Method for treating stream media data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6055354A (en) * 1996-04-15 2000-04-25 Discreet Logic Inc. Data storage apparatus
CN101055510A (en) * 2006-04-14 2007-10-17 中兴通讯股份有限公司 Method for promoting stream media data read-write efficiency
CN101149946A (en) * 2006-09-20 2008-03-26 中兴通讯股份有限公司 Method for treating stream media data

Also Published As

Publication number Publication date
CN101526886A (en) 2009-09-09

Similar Documents

Publication Publication Date Title
CN101526886B (en) Data operating method of redundant arrays of independent disk and device
US10996863B1 (en) Nonvolatile memory with configurable zone/namespace parameters and host-directed copying of data across zones/namespaces
US11481144B1 (en) Techniques for directed data migration
US10222984B1 (en) Managing multi-granularity flash translation layers in solid state drives
CN102122235B (en) RAID4 (redundant array of independent disks) system and data reading and writing method thereof
US9684593B1 (en) Techniques using an encryption tier property with application hinting and I/O tagging
US9811288B1 (en) Managing data placement based on flash drive wear level
US9753668B2 (en) Method and apparatus to manage tier information
CN102150144B (en) Method and system for dynamic storage tiering using allocate-on-write snapshots
US7831764B2 (en) Storage system having plural flash memory drives and method for controlling data storage
US7296135B2 (en) Data misalignment detection and correction in a computer system utilizing a mass storage subsystem
US11249652B1 (en) Maintenance of nonvolatile memory on host selected namespaces by a common memory controller
CN101815989B (en) Data pre-staging method based on capturing dynamic storage tiering configurations
US20110035540A1 (en) Flash blade system architecture and method
US20070162692A1 (en) Power controlled disk array system using log storage area
US20100100668A1 (en) Control method for logical strips based on multi-channel solid-state non-volatile storage device
CN112041805A (en) Specifying media type in write command
CN101661473A (en) Solid state memory (ssm), computer system, and method of operating an ssm
US20170351602A1 (en) Storage device and non-volatile memory device
US9747040B1 (en) Method and system for machine learning for write command selection based on technology feedback
CN104778018A (en) Broad-strip disk array based on asymmetric hybrid type disk image and storage method of broad-strip disk array
US11061814B1 (en) Managing data storage caching and tiering
US9767021B1 (en) Optimizing destaging of data to physical storage devices
CN102799533A (en) Method and apparatus for shielding damaged sector of disk
US20070180214A1 (en) System and method for dynamic striping in a storage array

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: Xinhua three Technology Co., Ltd.

Address before: 310053 Hangzhou hi tech Industrial Development Zone, Zhejiang province science and Technology Industrial Park, No. 310 and No. six road, HUAWEI, Hangzhou production base

Patentee before: Huasan Communication Technology Co., Ltd.

CP03 Change of name, title or address