Data recovery method for RAID system
Granted 21 Sep 2021 · 1 office action
Assignee: ACCELSTOR TECHNOLOGIES LTD
Law firm: Law firm · Log in to unlock
Attorney: Attorney · Log in to unlock
Inventors: Shih-Chiang Tsao, Ting-Fang Chien · Examiner: Michael Maskulinski · AU 2113 · TC 2100
Life of the application
10 dated eventsAbstract
A data recovery method for a Redundant Array of Independent Disks (RAID) system is provided. The RAID system includes a plurality of drives and a processor. Each drive includes a plurality of data pages. The drives form a plurality of data strips over the drives through stripping processing. Each data strip includes one of the data pages of every drive. The processor writes data to the data strips in a log-based manner and records whether each data page of each data strip is valid or invalid. During recovery of data from a broken one of the drives, data is recovered from a corresponding valid or written data page but is not recovered from a corresponding invalid or blank data page.
Description
9 parts›CROSS-REFERENCE TO RELATED APPLICATION
This non-provisional application claims priority under 35 U.S.C. § 119(a) to Patent Application No. 108113680 filed in Taiwan, R.O.C. on Apr. 18, 2019, the entire contents of which are hereby incorporated by reference.
›Technical Field
The present disclosure relates to a storage technology, and in particular, to a data recovery method for a RAID system.
›Related Art
In an existing Redundant Array of Independent Disks (RAID), after a drive is broken, it takes time to read data to calculate parity bits to recover data from the broken drive. The recovered data is then written to a replacement drive. Because the drives have large capacities, it will take a substantial time to read data from and write data to the drives. With existing solid-state drives (SSD), the time of reading and writing data is reduced, and a maximum read/write speed may be up to 500 MB/s. However, for example, if the capacity of a single drive is 2 TB, it still takes about one hour to read and write data.
›SUMMARY
An embodiment of the present disclosure provides a data recovery method for a RAID system. The RAID system includes a plurality of drives, and each drive includes a plurality of data pages. The drives form a plurality of data strips over the drives through stripping processing. Each data strip includes one of the data pages of every drive. Data is written to the data strips in a log-based manner. Data is recovered from a broken one of the drives in the data recovery method. The data recovery method includes: recognizing whether a data page of the broken drive is blank; performing calculation according to parity check to recover data from the data pages of the broken drive; and recovering data from a written data page, and skipping a blank data page.
Another embodiment of the present disclosure provides a data recovery method for a RAID system. The RAID system includes a first RAID and a second RAID. Each of the first RAID and the second RAID includes a plurality of drives. Each drive includes a plurality of data pages. The drives form a plurality of data strips over the drives through stripping processing. Each data strip includes one of the data pages of every drive. Data is written to the data strips in a log-based manner. Data is recovered from a broken drive in the first RAID in the data recovery method. The data recovery method includes: recognizing whether a data page of the broken drive is valid; performing calculation according to parity check to recover data from the data pages of the broken drive; and recovering data from a valid data page, and skipping an invalid data page and a blank data page.
Still another embodiment of the present disclosure provides a data recovery method for a RAID system. The RAID system includes a first RAID and a second RAID that are mirrors of each other, each of the first RAID and the second RAID includes a plurality of drives, and each drive includes a plurality of data pages. The drives form a plurality of data strips over the drives through stripping processing. Each data strip includes one of the data pages of every drive. Data is written to the data strips in a log-based manner. Data is recovered from a plurality of broken drives in the first RAID in the data recovery method. The data recovery method includes: recognizing whether a data page corresponding to the broken drives is valid; reading the drives corresponding to the broken drives in the second RAID; and recovering data from a valid data page, and skipping an invalid data page and a blank data page.
In conclusion, the RAID system and the data recovery method for same provided in the embodiments of the present disclosure can reduce data recovery time.
›BRIEF DESCRIPTION OF THE DRAWINGS
The present disclosure will become more fully understood from the detailed description given herein below for illustration only, and thus are not limitative of the present disclosure, and where:
FIG. 1 is a schematic architectural diagram of a RAID system according to a first embodiment of the present disclosure;
FIG. 2 is a schematic architectural diagram of a RAID system according to a second embodiment of the present disclosure;
FIG. 3 is a schematic architectural diagram of a RAID system according to a third embodiment of the present disclosure;
FIG. 4 is a flowchart of a data recovery method for a RAID system according to a first embodiment of the present disclosure;
FIG. 5 is a flowchart of a data recovery method for a RAID system according to a second embodiment of the present disclosure; and
FIG. 6 is a flowchart of a data recovery method for a RAID system according to a third embodiment of the present disclosure.
›DETAILED DESCRIPTION · 1 of 3
FIG. 1 is a schematic architectural diagram of a RAID system 100 according to a first embodiment of the present disclosure. The RAID system 100 includes a plurality of drives 110 and a processor 120 connected to the drives 110 , and in addition further includes an access interface, a memory, and the like. Details are not described herein. The drive 110 may be a conventional hard disk drive (HDD) or an SSD. The processor 120 is a processing unit capable of executing computer instructions and performing operations.
Referring to Table 1, a RAID that is formed by eight drives 110 (D 1 to D 8 ) is used for description. Herein, for example, the RAID is a RAID level 4. However, the present invention is not limited thereto. The drives 110 may be alternatively applied to a RAID level 5 or even a RAID level 6. Herein, the drive D 8 is a parity drive. The drives D 1 to D 8 form a plurality of data strips over the drives D 1 to D 8 through stripping processing. Herein, six data strips are used as an example for description. Data strips S 1 and S 2 have data, and data strips S 3 to S 6 are blank. Each drive 110 includes a plurality of data pages, and one data page is represented as one field in Table 1. Data (d 1 to d 14 ) is written to the data strips S 1 and S 2 in a log-based manner. During writing, it is assumed that each corresponding data strip S 1 or S 2 includes one of the data pages of every drive 110 , and each data page of non-parity drives 110 (that is, the drives D 1 to D 7 ) corresponds to one validity value (v indicates that the validity value is valid, and i indicates that the validity value is invalid). The data strip S 1 includes: one data page (the data d 1 is stored, and a validity value is valid) of the drive D 1 , one data page (the data d 2 is stored, and a validity value is valid) of the drive D 2 , one data page (the data d 3 is stored, and a validity value is invalid) of the drive D 3 , one data page (the data d 4 is stored, and a validity value is invalid) of the drive D 4 , one data page (the data d 5 is stored, and a validity value is invalid) of the drive D 5 , one data page (the data d 6 is stored, and a validity value is invalid) of the drive D 6 , one data page (the data d 7 is stored, and a validity value is invalid) of the drive D 7 , and one data page (a parity bit p 1 is stored) of the drive D 8 . The data strip S 2 includes: one data page (the data d 8 is stored, and a validity value is valid) of the drive D 1 , one data page (the data d 9 is stored, and a validity value is invalid) of the drive D 2 , one data page (the data d 10 is stored, and a validity value is invalid) of the drive D 3 , one data page (the data d 11 is stored, and a validity value is invalid) of the drive D 4 , one data page (the data d 12 is stored, and a validity value is invalid) of the drive D 5 , one data page (the data d 13 is stored, and a validity value is invalid) of the drive D 6 , one data page (the data d 14 is stored, and a validity value is invalid) of the drive D 7 , and one data page (a parity bit p 2 is stored) of the drive D 8 . It should be noted that the validity values are not stored on the drives 110 , but instead are stored on another storage medium, for example, a memory connected to the processor 120 . In an embodiment, the validity values are stored in the form of a mapping table. The mapping table records whether the validity value corresponding to each data page is valid or invalid. If the mapping table does not have a validity value corresponding to one or some data pages, it indicates that no data has been written to the data page or the data pages. To be specific, the data page or the data pages are blank pages. Herein, validity values are noted together in Table 1 and subsequent tables for ease of reading only, and it does not mean that the validity values are stored on the data pages.
FIG. 4 is a flowchart of a data recovery method applied to the RAID system 100 according to a first embodiment of the present disclosure. First, in step S 401 , it is recognized whether a data page of a broken drive D 2 obtained through recovery is blank. Specifically, the foregoing mapping table is searched to find whether there is a data page for which a validity value is not recorded. Referring to Table 2, for example, the drive D 2 is broken. After the broken drive D 2 is removed and replaced with a replacement drive D 2 ′, the processor 120 may calculate a parity bit p 1 according to parity check to recover data d 2 stored on a data page of the original D 2 ′ (step S 402 ). In step S 403 , data is recovered from a written data page, including a valid data page and an invalid data page; and a blank data page is skipped. Therefore, data d 9 that is on the drive D 2 and on a data strip S 2 is also recovered. In an embodiment, in step S 402 , calculation is performed according to parity check on only a data strip that includes a data page from which data needs to be recovered. In another embodiment, calculation may be alternatively performed according to parity check on all the data strips.
In this example, the used data recovery time is a sum of a data read time and a data write time (if a drive replacement time and a parity bit calculation time are not considered). The data read time is (W*D/D)T R . W is a quantity of written data pages of the broken drive D 2 , D is a quantity of non-parity drives 110 , and T R is a time it takes a drive to read data from one data page. Because the drives 110 can be read simultaneously, there is division by D. Herein, the data read time is 2T R . The data write time is W*T W , where T W is a time it takes a drive to write data to one data page. Herein, the data write time is 2T W . Assuming that T R and T W are the same (and are denoted by T), the used data recovery time is 4T. Compared with a conventional recovery manner in which data on all the data pages (for example, six data pages) of the broken drive D 2 is recovered and the used time is 6T R +6T W (that is, 12T), 66.67% of the time is saved.
›DETAILED DESCRIPTION · 2 of 3
Referring to Table 6, in some embodiments, the RAID system 100 further includes at least one hot spare drive. Herein, two hot spare drives DS 1 and DS 2 are used as an example.
Referring to Table 7, for example, the drive D 2 is broken. Herein, the broken drive D 2 does not need to be replaced. In this embodiment, the to-be-recovered data d 2 and the to-be-recovered data d 9 are recovered to the hot spare drives DS 1 and DS 2 . Herein, the to-be-recovered data on the data pages is evenly written to the hot spare drives DS 1 and DS 2 . Therefore, on a data strip S 1 , the hot spare drive DS 1 stores the data d 2 , and the hot spare drive DS 2 stores the data d 9 . In this example, the used data recovery time is a sum of a data read time and a data write time (if a parity bit calculation time is not considered). The data read time is (W*D/D)T R . Herein, the data read time is 2T R . The data write time is (W/Ds)T W , and Ds is a quantity of hot spare drives. Herein, the data write time is one T W . Assuming that T R and T W are the same (and are denoted by T), the used data recovery time is 3T. Compared with the first embodiment, 25% of the time is further saved. In some embodiments, the to-be-recovered data d 2 and the to-be-recovered data d 9 on the same broken drive may be alternatively written to one of the hot spare drives.
FIG. 2 is a schematic architectural diagram of a RAID system 200 according to a second embodiment of the present disclosure. The RAID system 200 includes a plurality of drives 210 and a processor 220 connected to the drives 210 , and in addition further includes an access interface, a memory, and the like. Details are not described herein. The drive 210 may be a conventional HDD or an SSD. The processor 220 is a processing unit capable of executing computer instructions and performing operations. Herein, the drives 210 are grouped into two groups, one group of drives 210 form a first RAID A, and the other group of drives 210 form a second RAID B.
Referring to Table 3, one RAID that is formed by eight drives 210 (D 1 to D 8 ) and one RAID that is formed by eight drives 210 (D 9 to D 16 ) are used for description. Herein, for stripping and log-based writing in a RAID, refer to the description of the foregoing first embodiment. Details are not repeated herein again. Data is stored on data strips S 1 and S 2 in the first RAID A, and data is stored on a data strip S 7 of the second RAID B.
FIG. 5 is a flowchart of a data recovery method applied to the RAID system 200 according to a second embodiment of the present disclosure. Similar to the foregoing embodiments, validity values corresponding to related data pages are stored in an area other than the drives 210 (for example, stored in a memory connected to the processor 220 in the form of a mapping table). In step S 501 , validity values corresponding to data pages of the broken drive D 2 in the mapping table are viewed, so that it can be recognized which data page of the broken drive D 2 is valid. Referring to Table 4, for example, the drive D 2 is broken. After the broken drive D 2 is removed and replaced with a replacement drive D 2 ′, in step S 502 , parity bits p 1 and p 2 are calculated according to parity check to recover data from the data pages of the broken drive D 2 . In step S 503 , data is recovered from a valid data page, and an invalid data page or a blank data page is skipped. Herein, data d 2 exists on a valid data page of the broken drive D 2 . In an embodiment, in step S 502 , calculation is performed according to parity check on only a data strip that includes a valid data page from which data needs to be recovered. In another embodiment, calculation may be alternatively performed on all the data strips according to parity check.
In the second embodiment, the recovered data d 2 is not stored on the replacement drive D 2 ′, but instead, data on the valid data page is recovered in the second RAID B. For example, the data d 2 is written to a data page of the drive D 9 on a data strip S 8 . Herein, the remaining valid data pages in the first RAID A are also copied onto the second RAID B. Herein, the valid data pages are still sequentially written in a log-based writing manner. The valid data page of the broken drive D 2 is written first, and the valid data pages of the remaining drives 210 are then written. After the data on the data pages is written, the processor 220 similarly calculates a corresponding parity bit p 8 . In addition, after data on all the valid data pages in the first RAID A has been written to the second RAID B, the processor 220 erases the first RAID A (that is, clears all the data pages in the first RAID A).
In this example, the used data recovery time is a sum of a data read time and a data write time (if a drive replacement time, a page erasure time, and a parity bit calculation time are not considered). The data read time is (N*D/D)T R +(M/D), N is a quantity of valid data pages of the broken drive D 2 , D is a quantity of non-parity drives 210 , and M is a quantity of the remaining valid data pages of the first RAID A. Herein, the data read time is (1+ 2/7)T R . The data write time is ((N+M)/D)T W . Because the drives 110 can be read and written simultaneously, there is division by D. Herein, the data write time is ( 3/7)T W . Assuming that T R and T W are the same (and are denoted by T), the used data recovery time is 1.71 T. More time is saved compared with the used time 4T in the first embodiment. Herein, because the quantity of valid data pages is relatively small, the time used in the second embodiment is shorter than that in the first embodiment.
In some embodiments, if data on a relatively large quantity of data pages needs to be recovered, the approach in the first embodiment (that is, the to-be-recovered data on the data pages is recovered to a replacement drive) uses a relatively short time and is adopted. In other words, before a recovery action is performed, the approach in the embodiment that uses a relatively short time is used to perform recovery. Specifically, according to the approach in the first embodiment, the to-be-recovered data on the data pages is written back to the replacement drive, the data read time is (N*D/D)T R , and the data write time is N*T W . Assuming that T R and T W are the same (and are denoted by T), according to the approach in the first embodiment, the used data recovery time is 2NT, and according to the approach in the foregoing second embodiment, the used data recovery time is (N+(N+2M)/D)T. That is, when (N+2M)/D>N, the approach in the first embodiment is adopted, or otherwise, the approach in the second embodiment is adopted.
›DETAILED DESCRIPTION · 3 of 3
FIG. 3 is a schematic architectural diagram of a RAID system 300 according to a third embodiment of the present disclosure. The RAID system 300 is a high availability (HA) cluster. That is, the RAID system 300 includes a first RAID 310 and a second RAID 320 that are mirrors of each other. The first RAID 310 include a first data pool 312 and a processor 311 connected to the first data pool 312 . The first data pool 312 includes the foregoing first RAID A and second RAID B. Therefore, the stored data is the same as that listed in Table 3. The second RAID 320 includes a second data pool 322 and a processor 321 connected to the second data pool 322 . The second data pool 322 includes a first RAID A′ that stores data the same as that in the first RAID A, and a second RAID B′ that stores data the same as that in the second RAID B. The data is therefore not otherwise listed. In some embodiments, each of the first data pool 312 and the second data pool 322 may alternatively include only one RAID. In some embodiments, each of the first data pool 312 and the second data pool 322 may alternatively include more than two RAIDs.
FIG. 6 is a flowchart of a data recovery method applied to the RAID system 300 according to a third embodiment of the present disclosure. Referring to Table 5, for example, drives D 1 and D 2 are broken. The broken drives D 1 and D 2 are removed and replaced with replacement drives D 1 ′ and D 2 ′. Similar to the foregoing embodiments, validity values corresponding to related data pages are stored in an area other than the drives (for example, validity values of a first data pool 312 are stored in a mapping table on a memory connected to a processor 311 ; and validity values of a second data pool 322 are stored in a mapping table on a memory connected to the processor 321 ). In step S 601 , it is recognized whether a data page of the broken drives D 1 and D 2 is valid. Specifically, validity values of corresponding data pages recorded in the mapping tables may be viewed to recognize whether a validity value of the data page of the broken drives D 1 and D 2 is valid. Different from that a parity bit is calculated to recover data in the second embodiment, in step S 602 , the drives corresponding to the broken drives D 1 and D 2 in a second RAID 320 are read to obtain the data pages of the broken drives D 1 and D 2 . In step S 603 , data is recovered (that is, written) from a valid data page to a corresponding first RAID 310 . Herein, similar to the foregoing second embodiment, an invalid data page and a blank data page are also skipped. Similar to the foregoing embodiments, after data is recovered, a corresponding parity bit p 1 ′ is also calculated. In addition, before data is recovered from the data pages, a first RAID A is erased first (that is, all the data pages in the first RAID A are cleared).
In this example, the used data recovery time is a sum of a data read time and a data write time (if a drive replacement time and a page erasure time are not considered). The data read time is (N/B)T R +(M/(D−B))T R , N is a quantity of valid data pages of the broken drives D 1 and D 2 , M is a quantity of valid data pages of the remaining drives in the first RAID A, B is a quantity of broken drives, and D is a quantity of non-parity drives. Herein, the data read time is ( 2/2)T R +(⅕)T R , that is, 1.2T R . The data write time is (N/B)T W +(M/(D−B))T W . Herein, the data read time is 1.2T W . Assuming that T R and T W are the same (and are denoted by T), and the used data recovery time is 2.4T. In the third embodiment, the time for calculating a parity bit to perform recovery is not required, and recovery can be performed when a plurality of drives is broken.
In conclusion, the RAID system and the data recovery method for same provided in the embodiments of the present disclosure can reduce data recovery time.
Claims as granted
1 claimLog in to read the claims of this application.
Log in to unlockClassifications
3 codes- G06F11/10
- G06F11/00
- G06F11/20
Claim changes
SoonSee which claims were amended, added or cancelled during examination, with every added and removed word marked.
The published claims of this application are not paired with the granted ones in what we hold.
File wrapper
See the full prosecution history — every USPTO and applicant action on this file, in order.
Log in to unlockDocuments
Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.
Log in to unlockChain of title
See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.
Log in to unlock