IP Library Granted Patent US 11,656,942
Granted Patent B2
US 11,656,942 · App. 16/885,947 · Granted May 23, 2023

Methods for data writing and for data recovery, electronic devices, and program products

Inventors: Jibing Dong (Beijing, CN); Jian Gao (Beijing, CN); Shaoqin Gong (Beijing, CN); Jianbin Kang (Beijing, CN); Chun Ma (Beijing, CN)
Assignee: EMC IP Holding Company LLC
G06F11/1088G06F3/064G06F3/0619G06F3/0689G06F9/30029G06F11/1004G06F11/1489
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,656,942
App. No.
16/885,947
Granted
May 23, 2023
Kind
B2
Abstract

Techniques for data recovery involve: reading target data corresponding to a first logical block from a first data block of a stripe of a RAID system, the target data being a compressed version of data in the first logical block; in accordance with a determination that an error occurs in the target data, reading data from a plurality of second data blocks of the stripe and first parity information from a first parity block of the stripe; comparing respective checksums of the data read from the plurality of second data blocks with a first predetermined checksum and a checksum of the first parity information with a second predetermined checksum; and determining recoverability of the target data based on a result of the comparison. Accordingly, it is possible to simplify the data recovery process, reduce the calculation and time costs in the data recovery, and improve the data recovery efficiency.

Claims (87)

1. A method for data recovery, comprising:

reading target data corresponding to a first logical block from a first data block of a stripe of a redundant array of independent disks (RAID) system, the target data being a compressed version of data in the first logical block;

in accordance with a determination that an error occurs in the target data, reading data from a plurality of second data blocks of the stripe and first parity information from a first parity block of the stripe;

comparing respective checksums of the data read from the plurality of second data blocks with a first predetermined checksum and a checksum of the first parity information with a second predetermined checksum; and

determining recoverability of the target data based on a result of the comparison.

2. The method of claim 1 , wherein determining the recoverability of the target data comprises:

in accordance with a determination that the respective checksums of the data read from the plurality of second data blocks matches the first predetermined checksum and the checksum of the first parity information matches the second predetermined checksum, reconstructing data stored in the first data block with the first parity information and the data read from the plurality of second data blocks; and

determining the target data corresponding to the first logical block from the reconstructed data.

3. The method of claim 1 , wherein the stripe further comprises a second parity block, the second parity block storing second parity information, and wherein determining the recoverability of the target data comprises:

in accordance with a determination that the checksum of the data read from only one of the plurality of second data blocks mismatches the first predetermined checksum and the checksum of the first parity information mismatches the second predetermined checksum, reconstructing the data stored in the first data block with the first parity information, the second parity information, and data read from other second data blocks of the plurality of second data blocks; and

determining the target data corresponding to the first logical block from the reconstructed data.

4. The method of claim 3 , wherein determining the recoverability of the target data comprises:

in accordance with a determination that the result of comparison indicates that two or more checksums mismatch, determining that the target data fails to be recovered.

5. The method of claim 1 , wherein the stripe further comprises a second parity block, the second parity block storing second parity information, and wherein determining the recoverability of the target data further comprises:

in accordance with a determination that the respective checksums of the data read from the plurality of second data blocks matches the first predetermined checksum and the checksum of the first parity information mismatches the second predetermined checksum, reconstructing the data stored in the first data block with the second parity information and the data read from the plurality of second data blocks; and

determining the target data corresponding to the first logical block from the reconstructed data.

6. The method of claim 1 , wherein determining the recoverability of the target data further comprises:

after the target data in the first data block is reconstructed, decompressing the target data;

comparing a checksum of the decompressed target data with an expected checksum for the first logical block;

in accordance with a determination that the checksum of the decompressed target data matches the expected checksum, determining that the target data has been successfully recovered; and

in accordance with a determination that the checksum of the decompressed target data mismatches the expected checksum, determining that the target data fails to be recovered.

7. The method of claim 1 , wherein each of the plurality of second data blocks stores compressed data from a plurality of second logical blocks and checksum seed data, the checksum seed data being stored between boundaries of the compressed target data of two of the plurality of logical blocks.

8. The method of claim 1 , wherein the first parity information is obtained by performing an XOR operation on data stored in the first data block and the plurality of second data blocks, and

wherein the second predetermined checksum is zero in a case that the number of data blocks of the stripe is an even number, and the second predetermined checksum is the same as the first predetermined checksum in a case that the number of data blocks of the stripe is an odd number.

9. The method of claim 1 , wherein the RAID system is a RAID 6 type storage system, and the stripe comprises two parity blocks.

10. The method of claim 1 , further comprising:

reading, from the plurality of second data blocks, checksum seed data of the data from the plurality of second data blocks;

calculating, using the checksum seed data, the respective checksums of the data read from the plurality of second data blocks; and

calculating the checksum of the first parity information based on the respective checksums of the data read from the plurality of second data blocks.

11. A method for data writing, comprising:

in accordance with a determination that target data in a plurality of logical blocks are to be written into a data block of a stripe of a redundant array of independent disks (RAID) system, compressing the target data in the plurality of logical blocks in unit of logical blocks;

determining checksum seed data based on the compressed target data such that a checksum of the compressed target data and the checksum seed data is equal to a first predetermined checksum; and

writing the compressed target data and the checksum seed data into the data block.

12. The method of claim 11 , wherein writing the compressed target data and the checksum seed data into the data block comprises:

storing the checksum seed data between boundaries of the compressed target data of two of the plurality of logical blocks.

13. The method of claim 11 , wherein the stripe comprises a plurality of data blocks for storing data, the data block being included in the plurality of data blocks, and a checksum of data stored in the plurality of data blocks is equal to the first predetermined checksum, and

wherein the stripe comprises a plurality of parity blocks, and parity information stored in a first parity block of the plurality of parity blocks is obtained by performing an XOR operation on the data stored in the plurality of data blocks, a checksum of the parity information is a second predetermined checksum which is determined based on the number of the plurality of data blocks.

14. The method of claim 13 , wherein the second predetermined checksum is zero in a case that the number of the plurality of data blocks is an even number, and the second predetermined checksum is the same as the first predetermined checksum in a case that the number of the plurality of data blocks is an odd number.

15. The method of claim 11 , wherein the RAID system is a RAID 6 type storage system, and the stripe comprises two parity blocks.

16. An electronic device, comprising:

at least one processor; and

at least one memory having computer program instructions stored therein, the at least one memory and the computer program instructions being configured to, with the at least one processor, cause the electronic device to perform acts comprising:

reading target data corresponding to a first logical block from a first data block of a stripe of a redundant array of independent disks (RAID) system, the target data being a compressed version of data in the first logical block;

in accordance with a determination that an error occurs in the target data, reading data from a plurality of second data blocks of the stripe and first parity information from a first parity block of the stripe;

comparing respective checksums of the data read from the plurality of second data blocks with a first predetermined checksum and a checksum of the first parity information with a second predetermined checksum; and

determining recoverability of the target data based on a result of the comparison.

17. The electronic device of claim 16 , wherein determining recoverability of the target data comprises:

in accordance with a determination that the respective checksums of the data read from the plurality of second data blocks matches the first predetermined checksum and the checksum of the first parity information matches the second predetermined checksum, reconstructing data stored in the first data block with the first parity information and the data read from the plurality of second data blocks; and

determining the target data corresponding to the first logical block from the reconstructed data.

18. The electronic device of claim 16 , wherein the stripe further comprises a second parity block, the second parity block storing second parity information, and wherein determining the recoverability of the target data comprises:

in accordance with a determination that the checksum of the data read from only one of the plurality of second data blocks mismatches the first predetermined checksum and the checksum of the first parity information mismatches the second predetermined checksum, reconstructing the data stored in the first data block with the first parity information, the second parity information, and data read from other second data blocks of the plurality of second data blocks; and

determining the target data corresponding to the first logical block from the reconstructed data.

19. The electronic device of claim 18 , wherein determining the recoverability of the target data comprises:

in accordance with a determination that the result of comparison indicates that two or more checksums mismatch, determining that the target data fails to be recovered.

20. The electronic device of claim 16 , wherein the stripe further comprises a second parity block, the second parity block storing second parity information, and wherein determining the recoverability of the target data further comprises:

in accordance with a determination that the respective checksums of the data read from the plurality of second data blocks matches the first predetermined checksum and the checksum of the first parity information mismatches the second predetermined checksum, reconstructing the data stored in the first data block with the second parity information and the data read from the plurality of second data blocks; and

determining the target data corresponding to the first logical block from the reconstructed data.

21. The electronic device of claim 16 , wherein determining the recoverability of the target data further comprises:

after the target data in the first data block is reconstructed, decompressing the target data;

comparing a checksum of the decompressed target data with an expected checksum for the first logical block;

in accordance with a determination that the checksum of the decompressed target data matches the expected checksum, determining that the target data has been successfully recovered; and

in accordance with a determination that the checksum of the decompressed target data mismatches the expected checksum, determining that the target data fails to be recovered.

22. The electronic device of claim 16 , wherein each of the plurality of second data blocks stores compressed data from a plurality of second logical blocks and checksum seed data, the checksum seed data being stored between boundaries of the compressed target data of two of the plurality of logical blocks.

23. The electronic device of claim 16 , wherein the first parity information is obtained by performing an XOR operation on data stored in the first data block and the plurality of second data blocks, and

wherein the second predetermined checksum is zero in a case that the number of data blocks of the stripe is an even number, and the second predetermined checksum is the same as the first predetermined checksum in a case that the number of data blocks of the stripe is an odd number.

24. The electronic device of claim 16 , wherein the RAID system is a RAID 6 type storage system, and the stripe comprises two parity blocks.

25. An electronic device, comprising:

at least one processor; and

at least one memory having computer program instructions stored therein, the at least one memory and the computer program instructions configured to, with the at least one processor, cause the electronic device to perform acts comprising:

in accordance with a determination that target data in a plurality of logical blocks are to be written into a data block of a stripe of a redundant array of independent disks (RAID) system, compressing the target data in the plurality of logical blocks in unit of logical blocks;

determining checksum seed data based on the compressed target data such that a checksum of the compressed target data and the checksum seed data is equal to a first predetermined checksum; and

writing the compressed target data and the checksum seed data into the data block.

26. The electronic device of claim 25 , wherein writing the compressed target data and the checksum seed data into the data block comprises:

storing the checksum seed data between boundaries of the compressed target data of two of the plurality of logical blocks.

27. The electronic device of claim 25 , wherein the stripe comprises a plurality of data blocks for storing data, the data block being included in the plurality of data blocks, and a checksum of data stored in the plurality of data blocks is equal to the first predetermined checksum, and

wherein the stripe comprises a plurality of parity blocks, and parity information stored in a first parity block of the plurality of parity blocks is obtained by performing an XOR operation on the data stored in the plurality of data blocks, a checksum of the parity information is a second predetermined checksum which is determined based on the number of the plurality of data blocks.

28. The electronic device of claim 27 , wherein the second predetermined checksum is zero in a case that the number of the plurality of data blocks is an even number, and the second predetermined checksum is the same as the first predetermined checksum in a case that the number of the plurality of data blocks is an odd number.

29. The electronic device of claim 25 , wherein the RAID system is a RAID 6 type storage system, and the stripe comprises two parity blocks.

30. A computer program product having a non-transitory computer readable medium which stores a set of instructions to perform data recovery; the set of instructions, when carried out by computerized circuitry, causing the computerized circuitry to perform a method of:

reading target data corresponding to a first logical block from a first data block of a stripe of a redundant array of independent disks (RAID) system, the target data being a compressed version of data in the first logical block;

in accordance with a determination that an error occurs in the target data, reading data from a plurality of second data blocks of the stripe and first parity information from a first parity block of the stripe;

comparing respective checksums of the data read from the plurality of second data blocks with a first predetermined checksum and a checksum of the first parity information with a second predetermined checksum; and

determining recoverability of the target data based on a result of the comparison.

31. A computer program product having a non-transitory computer readable medium which stores a set of instructions to perform data writing; the set of instructions, when carried out by computerized circuitry, causing the computerized circuitry to perform a method of:

in accordance with a determination that target data in a plurality of logical blocks are to be written into a data block of a stripe of a redundant array of independent disks (RAID) system, compressing the target data in the plurality of logical blocks in unit of logical blocks;

determining checksum seed data based on the compressed target data such that a checksum of the compressed target data and the checksum seed data is equal to a first predetermined checksum; and

writing the compressed target data and the checksum seed data into the data block.

Assignments (9)
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053574/0221) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
Reel/Frame 060333/0001 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053578/0183) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
Reel/Frame 060332/0864 →
RELEASE OF SECURITY INTEREST IN PATENTS PREVIOUSLY RECORDED AT REEL/FRAME (053573/0535) Recorded Jun 10, 2022
From: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
To: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
Reel/Frame 060333/0106 →
RELEASE OF SECURITY INTEREST AT REEL 053531 FRAME 0108 Recorded Nov 2, 2021
From: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
To: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
Reel/Frame 058001/0371 →
SECURITY INTEREST Recorded Aug 21, 2020
From: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 053578/0183 →
SECURITY INTEREST Recorded Aug 21, 2020
From: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 053573/0535 →
SECURITY INTEREST Recorded Aug 21, 2020
From: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
To: THE BANK OF NEW YORK MELLON TRUST COMPANY, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 053574/0221 →
SECURITY AGREEMENT Recorded Aug 18, 2020
From: DELL PRODUCTS L.P.; EMC IP HOLDING COMPANY LLC
To: CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH
Reel/Frame 053531/0108 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 7, 2020
From: DONG, JIBING; GAO, JIAN; GONG, SHAOQIN; KANG, JIANBIN; MA, CHUN
To: EMC IP HOLDING COMPANY LLC
Reel/Frame 053137/0501 →
Priority Claims (1)
CN 201911054443.8 · Oct 31, 2019 · national
Continuity (1)
Related Publication 20210133029A1 · May 6, 2021
Cited By (1)
US 12,436,843