Utilizing parity caching and parity logging while closing the RAID5 write hole
First Claim
1. A method for parity caching, comprising:
- storing firstly first data to an array of drives using at least a first controller as part of a first write operation;
receiving first parity in non-volatile cache memory associated with said first controller as part of said first write operation;
storing secondly second data to said array of drives using said first controller as part of a second write operation;
providing a parity log related to said second data before starting said second write operation;
experiencing a double failure associated with said first controller and one of said array of drives after said providing step and before said starting of said second write operation; and
accessing said parity log to determine a location of said first parity to recover from said double failure.
5 Assignments
0 Petitions
Accused Products
Abstract
A method for enhancing the performance on non-full stripe writes while closing the RAID5 write hole is disclosed. When a RAID controller receives data to be written to a disk array, the controller stores the data in nonvolatile memory, and opens a write operation. When the current write operation is initiated, the controller reads the old data from the disk array and checks for cached parity that corresponds to the stripe of data that is to be modified. If the parity is cached, the controller reads the cached parity, and if the parity is not cached, the controller reads the old parity from the disk array. New parity is then computed. If the parity was cached, the controller will modify a parity log to show an outstanding data write. If the parity was not cached, the controller will open a parity log to show an outstanding data and parity write. The new parity is then cached in non-volatile memory. The controller then determines whether the following write operation is for the same stripe of data. If the following write operation is for the same stripe, the controller writes the new data to disk and opens a parity log for the following write operation to show an outstanding parity write, and terminates the current write operation. If the following write operation is not for the same stripe, the controller writes both the new data and new parity to disk, and terminates the current write operation.
137 Citations
24 Claims
-
1. A method for parity caching, comprising:
-
storing firstly first data to an array of drives using at least a first controller as part of a first write operation;
receiving first parity in non-volatile cache memory associated with said first controller as part of said first write operation;
storing secondly second data to said array of drives using said first controller as part of a second write operation;
providing a parity log related to said second data before starting said second write operation;
experiencing a double failure associated with said first controller and one of said array of drives after said providing step and before said starting of said second write operation; and
accessing said parity log to determine a location of said first parity to recover from said double failure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
replacing said first parity with second parity in said cache memory.
-
-
3. A method, as claimed in claim 2, further including:
-
transferring parity from said cache memory to said array of drives sometime after said second write operation; and
performing a third write operation before said transferring step and in which said parity transferred during said transferring step is different from said second parity.
-
-
4. A method, as claimed in claim 1, wherein:
said first write operation is a non-full stripe write to a first stripe of said array of drives.
-
5. A method, as claimed in claim 4, wherein:
said second write operation is a non-full stripe write to said first stripe and with said second write operation being performed before any other write operation after said first write operation to said first stripe.
-
6. A method, as claimed in claim 1, wherein said storing firstly step includes:
-
obtaining existing data from at least portions of a first stripe of said array of drives;
reading existing parity from said array of drives into said cache memory;
changing said existing parity in said cache memory to provide said first parity; and
writing said first data to said array of drives and not writing said first parity to said array of drives while maintaining said first parity in said cache memory.
-
-
7. A method, as claimed in claim 6, further including:
mirroring said first parity to a second controller.
-
8. A method, as claimed in claim 1, wherein:
said accessing step includes having a second controller access said parity log and determining said first parity using said parity log.
-
9. A method, as claimed in claim 8, wherein:
said second controller accesses said parity log before any caching can occur of second parity to said cache memory.
-
10. A method, as claimed in claim 8, wherein:
said step of determining said first parity includes obtaining said first parity from cache memory associated with said second controller.
-
11. A method, as claimed in claim 2, further including:
invalidating said parity log some time after said replacing step.
-
12. A method, as claimed in claim 11, wherein:
said invalidating step is conducted before said second write operation is terminated.
-
13. A method, as claimed in claim 11, wherein:
said invalidating step is conducted after opening another parity log for a third write operation.
-
14. A method, as claimed in claim 1, wherein:
said providing step is conducted in said cache memory associated with said first controller.
-
15. A method, as claimed in claim 1, wherein:
said starting said second write operation begins with reading previously stored data from said array of drives.
-
16. A method, as claimed in claim 1, wherein:
said starting said second write operation begins with a continuous, uninterrupted sequence of steps that results in said second data being written to said array of drives.
-
17. A method, as claimed in claim 2, wherein:
said starting said second write operation begins at least before said replacing step.
-
18. A method, as claimed in claim 1, wherein:
said parity log is obtained before termination of said first write operation and said starting said second write operation.
-
19. A system for parity caching, comprising:
-
an array of drives that stores data and parity including first data and second data;
at least a first cache memory; and
at least a first controller communicating with said array of drives and said first cache memory, said first controller performing the following related to a first write operation involving said first data and a second write operation involving said second data;
controlling storing of said first data as part of said first write operation to said array of drives;
controlling storing of first parity associated with said first data in said first cache memory, wherein said first parity is not written to said array of drives at completion of said first write operation and, at completion of said first write operation, said first data is stored with said array of drives and said first parity remains stored in said cache memory; and
controlling providing a parity log related to Said second data before starting said second write operation, said parity log including information indicating a location of said first parity in said first cache memory and wherein, when a double failure occurs with said first controller and one of said array of drives after said parity log is provided and before said second write operation is started, said parity log is accessed to determine said location of said first parity to recover from the double failure. - View Dependent Claims (20, 21, 22, 23, 24)
said controller controls providing a parity log related to said first data and in which said parity log related to said second data is provided before invalidating said parity log related to said first data.
-
-
21. A system, as claimed in claim 19, wherein:
said controller controls invalidating said parity log related to said second data some time after said starting said second write operation.
-
22. A system, as claimed in claim 19, wherein:
said starting said second write operation begins with reading previously stored data after receiving said second data that is to be written to said array of drives.
-
23. A system, as claimed in claim 19, further including:
a second controller involved with recovering from a double failure associated with said first controller and one of said array of drives using said parity log related to said second data.
-
24. A system, as claimed in claim 19, further including:
a second controller to which said first parity and said parity log is mirrored.
Specification