HARD DISK ARRAY AND METHOD FOR RECONSTRUCTING THEREOF
A method for reconstructing hard disk array is disclosed. In the method, at least one to-be-fixed hard disks among a plurality of hard disks of the hard disk array are determined. Then, instead of reconstructing and re-writing the hard-disk array, writing into the at least one to-be-fixed hard disks a data of the at least one to-be-fixed hard disks according to a mapping table is performed, the data corresponds to a backup data of the plurality of hard disks.
Latest INDUSTRIAL TECHNOLOGY RESEARCH INSTITUTE Patents:
- Catalyst coated membrane and preparation method thereof, membrane electrode and fuel cell
- Marine fuel cell-based integrated heat, electricity, and cooling supply system
- ACTIVE METAL-CONTAINING M-CHA/M-MOR COMPOSITE MOLECULAR SIEVE AND PREPARATION METHOD
- Piston press system and test method for predicting roll service life of high-pressure grinding rolls
- Method for improving one-time seedling rate of microspore embryoids of brassica campestris SSP. chinensis makino
This non-provisional application claims priority under 35 U.S.C. § 119(a) on Patent Application No(s). 201611196546.4 filed in P.R.C., on Dec. 22, 2016, the entire contents of which are hereby incorporated by reference.
TECHNICAL FIELDThe disclosure relates to a hard disk array and a method for reconstructing thereof.
BACKGROUNDIn the field of redundant array of independent disks (RAID), multiple hard disks are combined to become a logical block. For operation system, the entire hard disk array would be treated a hard disk with great capacity, which implies augmenting the equivalent disk capacity connected to a channel. The hard disk array can be categorized into many types, and each type has its own theoretical pros and cons. Different types of hard disk array balance between increasing the authenticity of data and increasing the memory to increase read-write efficiency by different measurements.
By different types of hard disk array, certain types of hard disk array may be able to handle the situation when one single hard disk breaks down. However, due to the structure of hard disk array and the allocation of data, the hard disk array fails when multiple hard disks among the hard disks fail. If users have already back their data up and try to restore the hard disk array, at the time when renewing the broken hard disk with a new hard disk, the data in the unspoiled hard disk should be renewed as well. In such progress, lots of time is consumed for re-writing data that is correct originally. The progress, in which plenty of time and energy are taken up, is also inefficient.
SUMMARYAccording to an embodiment of the present disclosure, a method for reconstructing a hard disk array is disclosed. The method comprises determining at least one to-be-fixed hard disks among a plurality of hard disks of the hard disk array; and writing into the at least one to-be-fixed hard disks a data of the at least one to-be-fixed hard disks according to a mapping table and an information of the at least one to-be-fixed hard disks, the data corresponding to a backup data of the plurality of hard disks.
According to another embodiment of the present disclosure, a hard disk array is disclosed. The hard disk array comprises: a first hard disk; a second hard disk; a third hard disk; and a controller, electrically connected to the first hard disk, the second hard disk and the third hard disk, and configured to determine at least one to-be-fixed hard disks among the first hard disk, the second hard disk and the third hard disk, and to write into the at least one to-be-fixed hard disks a data of the at least one to-be-fixed hard disks according to a mapping table and an information of the at least one to-be-fixed hard disks, the data corresponding to a backup data of the plurality of hard disks.
The present disclosure will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only and thus are not limitative of the present disclosure and wherein:
In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the disclosed embodiments. It will be apparent, however, that one or more embodiments may be practiced without these specific details. In other instances, well-known structures and devices are schematically shown in order to simplify the drawing.
The following would be described with
With
The controller 390 electrically connects with the first backup hard disk 310, the second backup hard disk 330, the third backup hard disk 350 and the fourth backup hard disk 370. The backup hard disk array 30 and the hard disk array 10 have a similar architecture. The first backup hard disk 310 is configured to store the backup data of the first hard disk 110, the second backup hard disk 330 is configured to store the backup data of the second hard disk 130, the third backup hard disk 350 is configured to store the backup data of the third hard disk 150 and the fourth backup hard disk 370 is configured to store the backup data of the fourth hard disk 170. The above description is an exemplary; however, the backup data of each hard disk need not to be corresponded one by one to the backup hard disks in real practice. Duplicate data need not to be stored exactly at the same place if an extra comparison is available. The backup hard disk array 30 has N backup hard disks, where N is an integer no less than 3. The present embodiment take N to be 4 as an exemplary, but the number of 4 should not be limiting the scope of the present disclosure.
The controller 190 is configured to monitor the status of the first hard disk 110 of the hard disk array 10, the second hard disk 130 of the hard disk array 10, the third hard disk 150 of the hard disk array 10 and the fourth hard disk 170 of the hard disk array 10. After the controller determines there are at least one to-be-fixed hard disks among the first hard disk 110, the second hard disk 130, the third hard disk 150 and the fourth hard disk 170, the controller 190 may retrieve the backup data from the backup hard disk array 30 by the previously-described architecture. The controller 190 may write into the at least one to-be-fixed hard disks into a data among a backup data and corresponding the at least one to-be-fixed hard disks according to a mapping table. The mapping table may be, such as a corresponding model between the logical block of the hard disk array and the practically physical block. The detail description about the mapping table would be omitted because it may be understood by a person with ordinary skill in the art after referring to the specification of the present disclosure. The following description would delineate the modification of data in the sectors of the first hard disk 110, the second hard disk 130, the third hard disk 150 and the fourth hard disk 170, when the first hard disk 110 and the second hard disk 130 failed.
Please refer to
The error correction codes are stored in sectors Pa, Pb, Pc, Pd. The error correction code in sector Pa is generated according to values of sector a1, sector a2 and sector a3; the error correction code in sector Pb is generated according to values of sectors b1, sector b2 and sector b3; the error correction code in sector Pc is generated according to values of sectors c1, sector c2 and sector c3; and the error correction code in sector Pd is generated according to values of sectors d1, sector d2 and sector d3. In one embodiment, the error correction codes are generated by, but not limited to, parity bit.
That is to say, the error correction code in sector Pa is generated according to values of sector a1, sector a2 and sector a3. Logically, when the corresponding data of sector a1, sector a2 and sector a3 are written into the hard disk array 10, it is practically to write the corresponding data of sector a1, sector a2, sector a3 and sector Pa into the first hard disk 110, the second hard disk 130 the third hard disk 150 and the fourth hard disk 170 respectively.
Please next refer to
Please refer to
Please next refer to
Please next refer to
Please next refer to
In one embodiment, the controller 190 may comprise, such as an access record. The access record associates with a timestamp of the first hard disk 110, the second hard disk 130 and the third hard disk 150. The controller 190, according to the access record, selectively repairs the second hard disk 130 according to the first hard disk 110 and the third hard disk 150. To be more specific, the controller 190 compares the backup data with the access record, to determine whether a data time of the data among the backup data and corresponding to the second hard disk corresponds to the access record. When the data time corresponds to the access record, the controller 190 repairs the second hard disk 130 according to the first hard disk 110 and the second hard disk 130.
In one embodiment, the access record may be, such as at what timings the first hard disk 110, the second hard disk 130 and the third hard disk 150 are written into data, or may be such as at what timings the data stored in the first hard disk 110, the second hard disk 130 and the third hard disk 150 are read. The timestamp may be, such as the timing the first hard disk 110, the second hard disk 130 and the third hard disk 150 are accessed. In other words, the access timing of each data or the access timing of each sector are recorded in the access record. The access record may be, such as stored respectively in the first hard disk 110, the second hard disk 130 and the third hard disk 150, or may be, such as stored in the controller 190, and there is no limitation of where to be stored. In another embodiment, when one of hard disks (the first hard disk 110, the second hard disk 130 and the third hard disk 150) is accessed, the controller 190 generates the corresponding access timestamp according the current timing, and adjusts the access record accordingly. The above description is only for exemplary purpose, the form of the access record and the access timestamp should not be limited.
Please refer to
Please next refer to
The above embodiments may be adapted for RAID 5 architecture. Under RAID 0 architecture, when one hard disk failed, the controller 190 may reconstruct the sector of a broken hard disk according to the mapping table and the corresponding backup hard disk. An embodiment in which RAID 6 architecture is utilized would be given in the following.
Please refer to
The error correction codes in sector Pa and sector Qa are generated according to values of sector a1, sector a2 and sector a3. Logically, when the corresponding data of sector a1, sector a2 and sector a3 are written into the hard disk array, it is practically to write the corresponding data of sector a1, sector a2, sector a3, sector Pa and sector Qa into the first hard disk, the second hard disk, the third hard disk, the fourth hard disk and the fifth hard disk.
Please next refer to
Please refer to
Please next refer to
After sector b1 is reconstructed, the controller restores the data of sector b2 according to the data of sector b1, the error correction code of sector Qb and the data of sector b3, the controller then reconstructs sector b2 according to the restored data and the mapping table. The controller further re-calculates and then gives out an error correction code according to the data of sector b1, the data of the reconstructed sector b2 and the data of sector b3, and reconstructs sector Pb according to the re-calculated error correction code and the mapping table.
After sector c1 is reconstructed, the controller re-calculates and then gives out an error correction code according to the data of sector c1, the data of sector c2 and the data of sector c3, and reconstructs sector Pc and sector Qc according to the re-calculated error correction code and the mapping table.
After sector d1 is reconstructed, the controller re-calculates and then gives out an error correction code according to the data of sector d1, the data of sector d2 and the data of sector d3, and reconstructs sector Pd and sector Qd according to the re-calculated error correction code and the mapping table.
A method for reconstructing hard disk array is disclosed as well in the present disclosure. The following would be described with the reference of
In one embodiment, the hard disk array is capable of error correcting. The hard disk array comprises a first hard disk, a second hard disk and a third disk, and the at least one to-be-fixed hard disks comprise the first hard disk and the second hard disk. In the step of writing into the at least one to-be-fixed hard disks a data among a backup data and corresponding the at least one to-be-fixed hard disks, the data among the backup data and corresponds to the first hard disk is firstly written into the first hard disk. Moreover, according to the data among the backup data and corresponding to the second hard disk, selectively repairs the second hard disk according to the first hard disk and the third hard disk.
In one embodiment, in the step of according to the access record and the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk, the backup data and the access record are compared to determine whether a data time of the data among the backup data and corresponding to the second hard disk corresponds to a timestamp of the access record, and repairing the second hard disk according to the first hard disk and the second hard disk when the data time corresponds to the access record. For example, when the data time is later than the timestamp, that means the backup data is backed up after the last time the second hard disk is accessed, which also means the data among the backup data corresponding to the second hard disk is the latest. Moreover, the data of the second hard disk may be obtained by computing the data of the error correction code of the first hard disk and the third hard disk. Otherwise, it means no latest data of the second hard disk is among the backup data. Under this scenario, the reconstruction of the second hard disk may be completed when the backup data is written into, and the error correction codes of the first hard disk and/or the third hard disk should be modified accordingly.
In one embodiment, in the step of according to the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk, the data among the backup data and corresponding to the second hard disk is written into the second hard disk when the data time does not correspond to the access record.
In one embodiment, when the data time does not correspond to the access record, the error correction code stored in the first hard disk, the second hard disk or the third hard disk are modified according to the data of the first hard disk, the second hard disk and the third hard disk.
In one embodiment, the first hard disk and the second hard disk each has a plurality of sectors, and in the step of according to the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk, the backup data and the access record are compared to determine whether a data time of the data of a first sector of the plurality of sectors among the backup data and corresponding to the second hard disk corresponds to the access record, and repairing the second hard disk according to the first hard disk and the second hard disk when the data time corresponds to the access record.
In one embodiment, in the step of according to the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk, the data among the backup data and corresponding to the first sector is written into the first sector when the data time does not correspond to the access record.
In one embodiment, when the data time does not correspond to the access record, the error correction code stored in the first hard disk, the second hard disk or the third hard disk are modified according to the data of the first hard disk, the first sector and the third hard disk.
Claims
1. A method for reconstructing a hard disk array, comprising:
- determining at least one to-be-fixed hard disks among a plurality of hard disks of the hard disk array; and
- writing into the at least one to-be-fixed hard disks, a data among a backup data and corresponding the at least one to-be-fixed hard disks according to a mapping table and information of the at least one to-be-fixed hard disks.
2. The method as claimed in claim 1, wherein the hard disk array is a capable of error correcting, the plurality of hard disks comprise a first hard disk, a second hard disk and a third hard disk, and the at least one to-be-fixed hard disk comprise the first hard disk and the second hard disk, the step of writing into the at least one to-be-fixed hard disks, a data among a backup data and corresponding the at least one to-be-fixed hard disks comprises:
- writing into the first hard disk, the data among the backup data and corresponding to the first hard disk; and
- according to the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk.
3. The method as claimed in claim 2, further comprising providing an access record associating with an access timestamp of the first hard disk, the second hard disk and the third hard disk, and in the step of according to the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk, further comprising according to the access record to selectively repair the second hard disk according to the first hard disk and the third hard disk.
4. The method as claimed in claim 3, wherein the step of according to the access record and the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk comprises:
- comparing the backup data and the access record to determine whether a data time of the data among the backup data and corresponding to the second hard disk corresponds to the access record; and
- repairing the second hard disk according to the first hard disk and the second hard disk when the data time corresponds to the access record.
5. The method as claimed in claim 4, wherein the step of according to the access record and the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk comprises:
- writing into the second hard disk the data among the backup data and corresponding to the second hard disk when the data time does not correspond to the access record.
6. The method as claimed in claim 4, wherein when the data time does not correspond to the access record, further comprising:
- modifying an error correction code stored in the first hard disk, the second hard disk or the third hard disk according to the data of the first hard disk, the second hard disk and the third hard disk.
7. The method as claimed in claim 3, wherein the first hard disk and the second hard disk have a plurality of sectors, and the step of according to the access record and the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk comprises:
- comparing the backup data and the access record to determine whether a data time of the data of a first sector of the plurality of sectors among the backup data and corresponding to the second hard disk corresponds to the access record; and
- repairing the second hard disk according to the first hard disk and the second hard disk when the data time corresponds to the access record.
8. The method as claimed in claim 7, wherein the step of according to the access record and the data among the backup data and corresponding to the second hard disk, selectively repairing the second hard disk according to the first hard disk and the third hard disk comprises:
- writing into the first sector the data among the backup data and corresponding to the first sector when the data time does not correspond to the access record.
9. The method as claimed in claim 4, wherein when the data time does not correspond to the access record, further comprising:
- modifying an error correction code stored in the first hard disk, the second hard disk or the third hard disk according to the data of the first hard disk, a first sector and the third hard disk.
10. A hard disk array, comprising:
- a first hard disk;
- a second hard disk;
- a third hard disk; and
- a controller, electrically connected with the first hard disk, the second hard disk and the third hard disk, and configured to determine at least one to-be-fixed hard disks among the first hard disk, the second hard disk and the third hard disk, and to write into the at least one to-be-fixed hard disks, a data among a backup data and corresponding the at least one to-be-fixed hard disks according to a mapping table.
11. The hard disk array as claimed in claim 10, wherein the at least one to-be-fixed hard disks comprise the first hard disk and the second hard disk, the controller writes into the first hard disk a data among the backup data and corresponding to the first hard disk, and the controller further, according to the data among the backup data and corresponding to the second hard disk, selectively repairs the second hard disk according to the first hard disk and the third hard disk.
12. The hard disk array as claimed in claim 11, the controller further, according to the data among the backup data and corresponding to the second hard disk, selectively repairs the second hard disk according to the first hard disk and the third hard disk, and wherein the controller, according to an access record, selectively repairs the second hard disk according to the first hard disk and the third hard disk;
- wherein the access record associates with an access timestamp of the first hard disk, the second hard disk and the third hard disk.
13. The hard disk array as claimed in claim 12, wherein the controller further compares the backup data and the access record to determine whether a data time of the data among the backup data and corresponding to the second hard disk corresponds to the access record, and repairs the second hard disk according to the first hard disk and the second hard disk when the data time corresponds to the access record
14. The hard disk array as claimed in claim 13, wherein the controller writes into the second hard disk the data among the backup data and corresponding to the second hard disk when the data time does not correspond to the access record.
15. The hard disk array as claimed in claim 13, wherein the controller modifies an error correction code stored in the first hard disk, the second hard disk or the third hard disk according to the data of the first hard disk, the second hard disk and the third hard disk.
16. The hard disk array as claimed in claim 12, wherein the controller compares the backup data and the access record to determine whether a data time of the data of a first sector of a plurality of sectors among the backup data and corresponding to the second hard disk corresponds to the access record, and repairs the second hard disk according to the first hard disk and the second hard disk when the data time corresponds to the access record.
17. The hard disk array as claimed in claim 16, wherein the controller writes into the first sector the data among the backup data and corresponding to the first sector when the data time does not correspond to the access record.
18. The hard disk array as claimed in claim 13, wherein the controller modifies an error correction code stored in the first hard disk, the second hard disk or the third hard disk according to the data of the first hard disk, a first sector and the third hard disk.
Type: Application
Filed: Dec 27, 2016
Publication Date: Jun 28, 2018
Applicant: INDUSTRIAL TECHNOLOGY RESEARCH INSTITUTE (Hsinchu)
Inventor: Wei-Ru LI (Taoyuan City)
Application Number: 15/391,272