Read request response for reconstructed data in a degraded drive
A method comprising: receiving a request to read data stored in an array of drives; determining that the data is stored on one or more degraded drives in the array; reconstructing the data from one or more drives in the array other than the degraded drives; providing the reconstructed data in response to the request; and after providing the reconstructed data, writing the reconstructed data to one or more drives in the array other than the degraded drives.
1. A method comprising:
receiving a request to read data stored in a stripe of an array of drives;
determining, in response to receiving the request to read the data, that the data is stored on one or more degraded drives in the array;
reconstructing the data from one or more drives in the array other than the degraded drives;
storing the reconstructed data in a buffer;
providing the reconstructed data from the buffer in response to the request; and
after providing the reconstructed data, writing the reconstructed data to one or more drives in the array other than the degraded drives.
2. The method of claim 1 , wherein the data stored in the array is erasure encoded.
3. The method of claim 1 , wherein reconstructing the data from one or more drives in the array other than the degraded drives comprises:
reconstructing the data from other data in the same stripe, the other data being stored on the one or more drives in the array other than the degraded drives.
4. The method of claim 1 , wherein the reconstructed data comprises:
the data corresponding to the request to read the data stored in the array of drives; and
one or more additional pieces of data.
5. The method of claim 1 , wherein writing the reconstructed data to one or more drives in the array other than the degraded drives comprises:
identifying a plurality of blocks of reconstructed data; and
writing the plurality of blocks of reconstructed data as a stripe in the array.
6. The method of claim 1 , wherein writing the reconstructed data to one or more drives in the array other than the degraded drives comprises:
using a garbage collection process to write the reconstructed data to one or more drives in the array other than the degraded drives.
7. The method of claim 1 , wherein determining that the data is stored on one or more degraded drives in the array comprises:
determining that attempts to obtain the data have failed after a threshold time.
8. The method of claim 1 , wherein determining that the data is stored on one or more degraded drives in the array comprises:
determining that the one or more degraded drives have failed.
9. A system comprising:
one or more processors; and
a memory storing instructions which, when executed by the one or more processors, cause the system to:
receive a request to read data stored in a stripe of an array of drives;
determine, in response to receiving the request to read the data, that the data is stored on one or more degraded drives in the array;
reconstruct the data from one or more drives in the array other than the degraded drives;
storing the reconstructed data in a buffer;
provide the reconstructed data from the buffer in response to the request; and
after providing the reconstructed data, write the reconstructed data to one or more drives in the array other than the degraded drives.
10. The system of claim 9 , wherein the data stored in the array is erasure encoded.
11. The system of claim 9 , wherein reconstructing the data from one or more drives in the array other than the degraded drives comprises:
reconstructing the data from other data in the same stripe, the other data being stored on the one or more drives in the array other than the degraded drives.
12. The system of claim 9 , wherein the reconstructed data comprises:
the data corresponding to the request to read the data stored in the array of drives; and
one or more additional pieces of data.
13. The system of claim 9 , wherein writing the reconstructed data to one or more drives in the array other than the degraded drives comprises:
identifying a plurality of blocks of reconstructed data; and
writing the plurality of blocks of reconstructed data as a stripe in the array.
14. The system of claim 9 , wherein writing the reconstructed data to one or more drives in the array other than the degraded drives comprises:
using a garbage collection process to write the reconstructed data to one or more drives in the array other than the degraded drives.
15. The system of claim 9 , wherein determining that the data is stored on one or more degraded drives in the array comprises:
determining that attempts to obtain the data have failed after a threshold time, or
determining that the one or more degraded drives have failed.
16. A non-transitory computer readable medium storing instructions which, when executed by one or more processors, cause the one or more processors to perform steps comprising:
receiving a request to read data stored in a stripe of an array of drives;
determining, in response to receiving the request to read the data, that the data is stored on one or more degraded drives in the array;
reconstructing the data from one or more drives in the array other than the degraded drives;
storing the reconstructed data in a buffer;
providing the reconstructed data from the buffer in response to the request; and
after providing the reconstructed data, writing the reconstructed data to one or more drives in the array other than the degraded drives.
17. The computer readable medium of claim 16 ,
wherein the data stored in the array is erasure encoded,
wherein determining that the data is stored on one or more degraded drives in the array comprises determining that attempts to obtain the data have failed after a threshold time,
wherein reconstructing the data from one or more drives in the array other than the degraded drives comprises reconstructing the data from other data in the same stripe, the other data being stored on the one or more drives in the array other than the degraded drives, and
wherein writing the reconstructed data to one or more drives in the array other than the degraded drives comprises:
identifying a plurality of blocks of reconstructed data; and
writing the plurality of blocks of reconstructed data as a stripe in the array.