Background technology
Traditional data storage system uses disc array system (RAID usually to the mode that data are protected; RedundantArrayofIndependentDisks); disc array system gets up to become a disc driver array by a plurality of disc driver combination; and reach enhancing Data Integration degree; strengthen fault tolerance, increase the object of data processing amount or memory size.Different disk array patterns is divided in disc array system, such as common are RAID-0, RAID-1, RAID-5, RAID-6, RAID-10, RAID-50, the disk array patterns such as RAID-60, often kind of disk array pattern has its theoretic the strengths and weaknesses, and different disk array patterns averages out between increase data reliability and increase read-write usefulness two targets.
As shown in Figure 1, the organigram of frequently-used data stocking system, data storage system 10 is the disc array system of a RAID-5 disk array pattern, there are four disc drivers 11, 13, 15 and 17, while its data protection unit (or claiming data protection schemes) mainly writes disc driver 11 ~ 17 by one for write data scatter (grouping), intert between data and data and add parity information, when wherein a disc driver (such as 17) is broken down or damages, as long as after failed disk drive 17 is changed, the parity information that the front end of the up till now section sector of utilization and rear end are interted, can calculate and restore the content stored by failed disk drive 17, thus the object of data protection is reached.
Such as data A will be grouped into the parity information Ap of data A1, data A2, data A3 and corresponding data A, and A1, A2, A3 and Ap is write in disc driver 11,13,15 and 17 respectively.Data B will be grouped into the parity information Bp of data B1, data B2, data B3 and corresponding data B, and B1, B2, B3 and Bp is write in disc driver 11,13,15 and 17 respectively.Data C will be grouped into the parity information Cp of data C1, data C2, data C3 and corresponding data C, and C1, C2, C3 and Cp is write in disc driver 11,13,15 and 17 respectively.Data D will be grouped into the parity information Dp of data D1, data D2, data D3 and corresponding data D, and D1, D2, D3 and Dp is write in disc driver 11,13,15 and 17 respectively.And when one of them disc driver of data storage system 10 breaks down; such as disc driver 17; as long as after failed disk drive 17 is changed; about parity information Ap, Bp, Cp and Dp that the front end of this section of sector and rear end are interted before recycling; can calculate and reply the content of failed disk drive 17, and then reaching the object of data protection.
The advantage of RAID-5 disk array pattern is that reading speed is fast, and during any disk drive failure, data calculation can be returned after replacing failed disk drive.But RAID-5 pattern, after any disk drive failure, during more renewing disc driver, also cannot carry out data protection to new write data.
As shown in Figure 2, the organigram of another frequently-used data stocking system, data storage system 20 is the disc array system of a RAID-6 disk array pattern, there are five disc drivers 21, 23, 25, 27 and 29, the while that its data protection unit being by data scatter or grouping write disc driver, intert between data and data and add parity information, when a certain disc driver, such as disc driver 23, when breaking down, as long as after failed disk drive 23 is changed, the parity information that the front end of the up till now section sector of utilization and rear end are interted, the content of failed disk drive 23 can be calculated back, and then reach the object of data protection.
Be with frequently-used data stocking system (RAID-5) difference shown in Fig. 1: RAID-6 pattern increases by second independently parity information block.Two independently parity information use different algorithms, make the reliability of data very high, when any two disc drivers lose efficacy, also can not affect its data integrity simultaneously, but its complicated and a large amount of computing can make system effectiveness reduce.
Data A shown in Fig. 2 will be grouped into data A1, data A2, two of data A3 and corresponding data A independently parity information Ap and Aq, and A1, A2, A3, Ap and Aq is write in disc driver 21,23,25,27 and 29 respectively.Data B by be grouped into data B1, data B2, two of data B3 and corresponding data B independently parity information Bp and and Bq, and respectively B1, B2, B3, Bp and Bq to be write in disc driver 21,23,25,27 and 29.Data C will be grouped into data C1, data C2, two of data C3 and corresponding data C independently parity information Cp and Cq, and C1, C2, C3, Cp and Cq is write in disc driver 21,23,25,27 and 29 respectively.Data D will be grouped into data D1, data D2, two of data D3 and corresponding data D independently parity information Dp and Dq, and D1, D2, D3, Dp and Dq is write in disc driver 21,23,25,27 and 29 respectively.And when data storage system 20 wherein any one or two disc drivers break down time; as long as after failed disk drive is changed; parity information Ap, Bp, Cp, Dp, Aq, Bq, Cq, Dq that the front end of the up till now section sector of recycling and rear end are interted; the content of failed disk drive can be calculated back, and reach the object of data protection.
But RAID-6 disk array pattern needs to distribute to the larger disk space of parity information and extra verify calculation, has larger overhead and calculated amount relative to RAID-5 disk array pattern, its write usefulness is thus not good.Again; although RAID-6 disk array pattern can after the damage of one or two disc driver; during more renewing disc driver, the data of new write are protected; but its data protection schemes (or claim: data protection unit) need the computing time long compared with other mechanism; and equally before not upgrading damage disc driver, after disc driver damage, newly write the object that data also can not get data protection.
Summary of the invention
Fundamental purpose of the present invention; be to provide a kind of data storage system, can when a disc driver damage, the uninterrupted protection new write data being carried out to data; till damage disk array is repaired or substitutes, with this to improve the defencive function of new write data.
Secondary objective of the present invention; be to provide a kind of data storage method; by the data protection unit of each disk array itself; when a certain disk array is damaged; other normal magnetic flux disk arrays are uninterrupted carries out data protection to new write data; till damage disk array is repaired or substitutes, not only can improve the defencive function of new write data with this, the storage usefulness of system can be maintained again simultaneously.
In order to reach above object, the invention provides a kind of data storage system, comprising: a plurality of disk array, each disk array is made up of a plurality of disc driver, and each disk array all has a corresponding data protection unit, and a controller, connect those disk arrays and data correspondence table, controller can to the physical storage position in those disk arrays to set up an index data, and this index data is stored in data correspondence table, controller carries out write and the reading of data to those disk arrays according to the index data in data correspondence table, when the disc driver in one of them disk array is damaged, this disk array of definable is a damage disk array, disk array without disc driver damage is then defined as at least one normal magnetic flux disk array, controller controls and stops newly writing data by one to write this damage disk array, and by this new write data write normal magnetic flux disk array, these new write data are then subject to the data protection of the data protection unit of this normal magnetic flux disk array.
In order to reach above object, the invention provides a kind of data storage method, comprise the following steps: that a controller sets up an index data to the physical storage position in a plurality of disk array, and each disk array all having a corresponding data protection unit; This index data is stored in a data correspondence table by controller; Controller carries out write and the reading of data to those disk arrays according to the index data in data correspondence table; When the disc driver in one of them disk array is damaged, be defined as a damage disk array, disk array without disc driver damage is then defined as at least one normal magnetic flux disk array, and controller stops newly writing data by one and writes this damage disk array; And controller is by this new write data write normal magnetic flux disk array, these new write data are then subject to the data protection of the data protection unit of this normal magnetic flux disk array.
In order to reach above object, the invention provides a kind of data storage method, comprise the following steps: that a controller connects a plurality of disk array, and each disk array all having a corresponding data protection unit; Controller divides into groups one for write data, to become multiple integrated data, respectively each integrated data is write in different disk arrays again, during the logical data address of those integrated datas is shown with corresponding content storage to data of physical storage position are corresponding by controller; And when the disc driver in one of them disk array is damaged; be defined as a damage disk array; disk array without disc driver damage is then defined as at least one normal magnetic flux disk array; controller is according to the integrated data in data correspondence table; the integrated data newly writing data by one is stopped to write this damage disk array; and by the integrated data of these new write data write normal magnetic flux disk array, these new write data are then subject to the data protection of the data protection unit of this normal magnetic flux disk array.
In one embodiment of the invention, wherein disk array is RAID-1, RAID-5, RAID-6, RAID-10, RAID-50 or RAID-60 disk array pattern.
In one embodiment of the invention, wherein disk array is made up of different disk array pattern.
In one embodiment of the invention, its middle controller first divides into groups one for write data, more respectively by each group of corresponding different disk array of data write, the grouping of this wish write data is also set up this index data by controller.
In one embodiment of the invention, wherein disk array has a reservation storage area block, and when one of them disk array becomes this damage disk array, these new write data can write in this reservation storage area block of this normal magnetic flux disk array.
In one embodiment of the invention, comprise the following steps: that controller will control and the subsequent logic address date causing an electronic installation be electrically connected with controller to read less than this damage disk array.
In one embodiment of the invention, comprise the following steps: that controller is according to the integrated data in data correspondence table, in this integrated data of part write normal magnetic flux disk array is retained in storage area block.
In one embodiment of the invention, comprise the following steps: when this damage disk array produces, controller substitutes storage location by increasing by one on the logical data address of integrated data and the corresponding content of physical storage position.
Embodiment
The present invention can be illustrated by following embodiment and be fully understood, and those skilled in the art can be implemented according to this, and right enforcement of the present invention not can be limited it and implement kenel by following case study on implementation.Wherein identical label represents identical assembly all the time.
Refer to Fig. 3, the organigram of data storage system one embodiment of the present invention.As shown in the figure, data storage system 30 comprises the corresponding table 35 of controller 33, data and multiple disk array 371,373 and 375.Controller 33 can be electrically connected the electronic installation 31 of an outside.
Wherein disk array 371,373 and 375 respectively by a plurality of disc driver 372,374 ..378 formed; each disk array 371,373,375 has respective data protection schemes (or claim: data protection unit) 3715,3735,3755; with carry out the protection of write data; such as: the disk array patterns such as RAID-1, RAID-5, RAID-6, RAID-10, RAID-50 or RAID-60, but not as limit.Controller 33 will distinguish the corresponding table 35 of connection data and disk array 371,373 and 375, controller 33 storage location, the physical storage position of physical storage block and/or the physical storage position of written data can set up an index data 351 to the data in disk array 371,373 and 375, and index data 351 being stored in the corresponding table 35 of data, controller 33 carries out write and the reading of data according to index data 351 pairs of disk arrays 371,373 and 375 of the corresponding table 35 of data.
When the healthy and normal operation of each disc drivers 372,374,378 of all disk arrays 371,373 and 375, controller 33 is assigned to the physical storage block (maybe can claim: physical storage position) of one of them disc driver 372,374,378 of any one disk array 371,373 and 375 in any way for write data 331 by one, and data write index datas 351 such as the logical data address of institute's written data and physical storage positions.But when a certain disc driver (the such as disc driver 374) damage of (such as disk array 371) in one of them disk array, disk array 371 will be defined as a damage disk array by controller 33, and other do not have the disk array 373,375 damaging disc driver and are then defined as at least one normal magnetic flux disk array by controller 33.Again, controller 33 will control and stops that newly write data 333 write is had the disk array 371 of damage disc driver 374, and will newly write data 333 and write the physical storage position of normal magnetic flux disk array 373,375.And the normal magnetic flux disk array 373,375 of normal operation still protects new write data 333 according to the data protection unit 3735,3755 of its disk array itself.Meanwhile, the data stored in damage disk array 371 still can be read, and are just no longer arranged to store new write data 333.To reach after the disc driver 374 of damage disk array 371 is damaged, new write data 333 still can have data protection, maintain the object of the storage usefulness of system simultaneously.
In one embodiment of the invention, the disk array pattern that its disk array 371,373 and 375 can be a same agreement formed, and such as disk array 371,373 and 375 is all by RAID-5 disk array pattern.Or, its disk array 371,373 and 375 is made up of the disk array pattern of different agreement, such as disk array 371 is a RAID-5 disk array pattern, and disk array 373 is a RAID-6 disk array pattern, disk array 375 is made up of a RAID-10 disk array pattern again.
Wherein, electronic installation 31 can be a computing machine, pocket computer or intelligent mobile phone etc., but not as limit, electronic installation 31 links with controller 33 in a wired or wireless manner, user-operable electronic installation 31 is to carry out data access to disk array 371,373 and 375.
Refer to Fig. 4, the organigram of the another embodiment of data storage system of the present invention.As shown in the figure, data storage system 40 comprises the corresponding table 45 of controller 43, data and disk array 471,473 and 475.
Wherein disk array 471,473 and 475 is made up of a plurality of disc driver 372,374,378 respectively; each disk array is protected according to the data security unit of itself separately; such as: the disk array patterns such as RAID-1, RAID-5, RAID-6, RAID-10, RAID-50 or RAID-60, but not as limit.Controller 43 will connect the corresponding table 45 of data and disk array 471,473 and 475 respectively, controller 43 can set up an index data 451 to the physical storage position in disk array 471,473 and 475, wherein, disk array 471 has physical storage position A1, A2...An, disk array 473 has physical storage position B1, B2...Bm, and disk array 475 has physical storage position M1, M2...Mo.Physical storage position A1, A2...An, B1, B2...Bm and M1, M2...Mo are given the reference numeral of logical data address by controller 43 in order, such as 1:A1,2:A2...n:An, n+1:B1, n+2:B2...n+m:Bm)." 1:A1 " namely represents that electronic installation 31 institute is for reading or writeable logical data address 1, and its corresponding real physical storage position is then the A1 of disk array 471." n+1:B1 " namely represents that electronic installation 31 institute is for reading or writeable logical data address n+1, and its corresponding physical storage position is then the B1 of disk array 473.Controller 43 is set up index data 451 and is stored in the corresponding table 45 of data, and index data 451 is by the relation content of the logical data address and physical storage position that record storage data.
When the healthy and normal operation of each disc drivers of all disk arrays 471,473 and 475, controller 43 will be assigned to a wherein physical storage position of one of them disc driver 372,374,378 of any one disk array 471,473 and 475 in any way for write data 331.Electronic installation 31 and/or controller 43 will carry out write and the reading of data to storage location A1, A2...An, B1, B2...Bm and the M1 in disk array 471,473 and 475, M2...Mo according to the index data 451 (1:A1,2:A2...n:An, n+1:B1, n+2:B2...n+m:Bm) in the corresponding table 45 of data.
When a wherein disc driver damage in wherein some disk arrays, the disc driver 372 of such as disk array 471, sign and definition disk array 471 are a damage disk array by controller 43, and other disk array 473,475 of normal operation then can indicate and be defined as at least one normal magnetic flux disk array.Controller 43 stops that new write data 333 are write this and has damage disk array 471; and write in the physical storage position of other normal magnetic flux disk arrays 473,475 by newly writing data 333, and disk array 473,475 still can protect afterwards write new write data 333 according to the data security unit 3735,3755 of its disk array itself.
Controller 43 of the present invention by the logical data address (also can claim subsequent logic data address) controlled corresponding to the physical storage position that is not yet written into of damage disk array 471 not read by electronic installation 31; namely electronic installation 31 like this and/or controller 43 can be avoided being stored in damage disk array 471 by newly writing data 333; and be stored in health and the normal magnetic flux disk array 473,475 of normal operation by newly writing data 333, and be subject to the safeguard protection of disk array 473,475.Meanwhile, before meeting accident in damage disk array 471, stored still can being read for write data 331, thus reaches after disc driver 374 is damaged, and new write data 333 still can have data protection, maintain the object of the storage usefulness of system simultaneously.
Refer to Fig. 5, the organigram of the another embodiment of data storage system of the present invention.As shown in the figure, data storage system 50 comprises the corresponding table 55 of controller 53, data and disk array 5 71,573 and 575.
Wherein disk array 5 71,573 and 575 is made up of a plurality of disc driver 372,374,378 respectively; the data safety mechanism (data protection unit) 3715,3735,3755 that each disk array 5 71,573 and 575 has itself agreement carries out data protection; such as: the data protection schemes of the disk array patterns such as RAID-1, RAID-5, RAID-6, RAID-10, RAID-50 or RAID-60, but not as limit.Controller 53 will connect the corresponding table 55 of data and disk array 5 71,573 and 575 respectively, and controller 53 can carry out write and the reading of data to disk array 5 71,573 and 575.Wherein, controller 53 first divides into groups one for write data 331, such as will distribute for write data 331 or be grouped into odd number group: " 1:A1,3:A2,5:A3 ... j:An " and even number set: " 2:B1,4:B2,6:B3 ... k:Bm ", wherein " 1:A1 " namely represents that wish write data (A1) 331 is assigned to odd number group, and its logical data address number is 1, its entity storage location is A1." 2:B1 " namely represents that wish write data (B1) 331 is assigned to even number set, and its logical data address number is 2, and its entity storage location is B1.Then, each group writes in different disk array 5s 71,573 for write data 331 by controller 53 more respectively, such as by odd number group: data (A1, A2, the A3 of " 1:A1,3:A2,5:A3 ... j:An " ... An) write in disk array 5 71, and by even number set: data (B1, B2, the B3 of " 2:B1,4:B2,6:B3 ... k:Bm " ... Bm) write in disk array 5 73.Meanwhile, controller 53 by those integrated datas: " 1:A1,3:A2,5:A3 ... j:An " and " 2:B1,4:B2,6:B3 ... k:Bm " is stored in the corresponding table 55 of data and/or index data.
When a certain disc driver in one of them disk array is damaged, the disc driver 372 of such as disk array 5 71, controller 53 is by sign and to define disk array 5 71 be a damage disk array, and other disk array 5s 73,575 without disc driver damage are then labeled and are defined as at least one normal magnetic flux disk array.Controller 53 is by the integrated data in corresponding for foundation data table 55 and/or index data; stop the next one newly being write data 333 and write damage disk array 5 71; but write newly writing data 333 in the physical storage position of normal magnetic flux disk array 573,575 according to the corresponding table 55 of data, and normal magnetic flux disk array 573,575 still protected according to the data protection unit 3735,3755 of disk array.Meanwhile, what stored before meeting accident in damage disk array 5 71 still can be read for write data 331, thus reaches after disc driver 372 is damaged, and new write data 333 still can have by the function of data protection, maintain the object of the storage usefulness of system simultaneously.
In further embodiment of this invention, disk array 5 71,573 and 575 can be respectively equipped with and retain storage area block 5711,5731 and 5751, retains storage area block 5711,5731 and 5751 for storing the new write data 333 that originally should write in the damage disk array 5 71 with damage disc driver 372.Such as, when disc driver damage occurs disk array 5 71, controller 53 can will should write the odd number group of damage disk array 5 71 originally: the data (A3 of " 5:A3 ... j:An " ... An) arrange in the reservation storage area block 5731 of write disk array 5 73.The setting retaining storage area block 5731 can avoid the even number set that should write disk array 5 73: data (B1, B2, the B3 of " 2:B1,4:B2,6:B3 ... k:Bm " ... Bm) whole free spaces of disk array 5 73 are exhausted, and when disc driver damage occurs disk array 5 71, disk array 5 73 can supply the odd number group of new write without storage area: the data (A3 of " 5:A3 ... j:An " ... An).
In further embodiment of this invention, when a certain disc driver in one of them disk array is damaged, the disc driver 372 of such as disk array 5 71, the physical storage position that controller 53 will indicate stored by new write data 333 reality in the corresponding table 55 of data.Such as, before the storage data of logical data address 5, the a certain disc driver 372 of disk array 5 71 has deterioration extent, electronic installation 31 still can read physical storage position 1...j and 2....k, but " 5:A3... " at the corresponding table 55 of data is partly increased the sign " 5:A3/5731 " (as Suo Shi dotted line/5731) that substitutes storage location 555 by controller 53, remind controller 53 electronic installation 31 can have been transferred for the new write data 333 of write or reading the reservation storage area block 5731 that write is arranged in disk array 5 73.
According to the classified data in the corresponding table 55 of data, stop the next one newly being write data 333 and write damage disk array 5 71, but write in the physical storage position of other normal magnetic flux disk arrays 573 or 575 by newly writing data 333, and normal magnetic flux disk array 573, 575 still according to the data protection unit 3735 of disk array pattern, 3755 protected, damage the wish write data 331 stored in disk array 5 71 still can be read simultaneously, thus reach after disc driver damage, new write data 333 still can have data protection function, maintain the object of the storage usefulness of system simultaneously
Refer to Fig. 6 and Fig. 4, Fig. 6 is the process flow diagram of data storage method one embodiment of the present invention.As shown in the figure, step S601, storage location in controller 43 pairs of disk arrays 471 and 473 sets up index data 451 (1:A1,2:A2 ... n:An, n+1:B1, n+2:B2 ... n+m:Bm), and by index data 451 be stored in the corresponding table 45 of data.Step S603, controller 43 carries out write and the reading of data according to the index data 451 pairs of disk arrays 471,473 and 475 in the corresponding table 45 of data.Step S605, when the disc driver in one of them disk array is damaged, the disc driver 372 of such as disk array 471, controller 43 stops newly writing data 333 by one and writes in the damage disk array 471 of existing damage disc driver.Step S607; controller 43 writes newly writing data 333 in the physical storage position of normal magnetic flux disk array 473,475 of other normal operations, and the normal magnetic flux disk array 473,475 of normal operation still carries out the protection of data according to the data protection unit 3735,3755 of its disk array pattern.And there is stored still can being read for write data 331 in the damage disk array 471 of damage disc driver, thus reach after disc driver damage, new write data 333 still can have data protection, maintain the object of the storage usefulness of system simultaneously.
Refer to Fig. 7 and Fig. 5, Fig. 7 is the process flow diagram of another embodiment of data storage method of the present invention.As shown in the figure, step 701, controller 53 connects disk array 5 71,573 and 575.Step S703, data for write are divided into groups by controller 53, such as the data for write are divided into odd number group: " 1:A1,3:A2,5:A3 ... j:An " and even number set: " 2:B1,4:B2,6:B3 ... k:Bm ", wherein " 1:A1 " namely represents that wish write data A1 (331) is divided to odd number group, and it is numbered 1, " 2:B1 " namely represents that wish write data B1 (331) is divided to even number set, and it is numbered 2.Respectively each group of data are write again in different disk array 5s 71,573 and 575, such as by odd number group: data (A1, A2, the A3 of " 1:A1,3:A2,5:A3 ... j:An " ... An) write in disk array 5 71, and by even number set: data (B1, B2, the B3 of " 2:B1,4:B2,6:B3 ... k:Bm " ... Bm) write in disk array 5 73.Meanwhile, controller 53 is by integrated data: " 1:A1,3:A2,5:A3 ... j:An " and " 2:B1,4:B2,6:B3 ... k:Bm " is stored in the corresponding table 55 of data.Step S705, when the disc driver in one of them disk array is damaged, controller 53, according to the classified data in the corresponding table 55 of data, stops the next one newly being write data 333 and writes in damage disk array 5 71.Step S707; controller 53 writes newly writing data 333 in the physical storage position of normal magnetic flux disk array 573,575 of other normal operations according to the corresponding table 55 of data, and normal magnetic flux disk array 573,575 still does data protection according to the data protection unit 3735,3755 of the disk array pattern of itself agreement to new write data 333.And damage still can being read for write data 331 of having stored in disk array 5 71, thus reach after disc driver damage, new write data 333 still can have data protection, maintain the object of the storage usefulness of system simultaneously.
Refer to Fig. 8 and Fig. 5, Fig. 8 is the process flow diagram of the another embodiment of data storage method of the present invention.As shown in the figure, namely be with difference embodiment illustrated in fig. 7: step S807, controller 53 is according to the classified data in the corresponding table 55 of data, write one in the normal magnetic flux disk array 573,575 of normal operation retain in storage area block 5731,5751 by newly writing data 333, the setting retaining storage area block 5731,5751 can avoid whole free spaces of normal magnetic flux disk array 573,575 to be exhausted, and does not have space to allow the data that originally should write damage disk array 5 71 carry out the problem write.
As described above, be only a preferred embodiment of the present invention, not be used for limiting scope of the invention process, namely all equalizations of doing according to shape, structure, characteristic and the spirit described in the present patent application the scope of the claims change and modify, and all should be included in claim of the present invention.