Method and apparatus for optimizing recovery of single-disk failure
First Claim
1. A method for optimizing recovery of a failure of a single-disk, comprising:
- using a processor of a computer system to execute the following steps;
obtaining, according to current load information of an erasure-coded storage system comprising a first disk and a second disk, an amount of data expected to be read and an allowed number of iterations, wherein the first disk comprises a first portion and a second portion, and the second disk comprises a third portion and a fourth portion, the first portion and the third portion store failed data in a first stripe, and the second portion and the fourth portion store failed data in a second stripe;
obtaining a recovery optimization policy for the failed data in each single stripe of the first stripe and the second stripe, and combining the recovery optimization policy for the failed data in the each single stripe to obtain an initial recovery policy for the first stripe and the second stripe;
further optimizing the initial recovery policy by using a greedy algorithm based on tabu search, subject to the amount of data expected to be read and the allowed number of iterations, to obtain an optimal recovery policy with a smallest quantity of seeks, so that the failure of the single-disk is recovered according to the optimal recovery policy;
wherein the step of optimizing the initial recovery policy by using a greedy algorithm based on tabu search, subject to the amount of data expected to be read and the allowed number of iterations, to obtain an optimal recovery policy with a smallest quantity of seeks, further comprises;
initializing a tabu list to an empty set, wherein the tabu list stores a quantity of seeks needed by an optimal solution that is found during each iteration;
during each iteration, performing an input by using the optimal recovery solution in a last iteration as the initial recovery policy in the current iteration; and
after the allowed number of iterations, selecting a solution with the smallest quantity of seeks from the tabu list to serve as the optimal recovery policy; and
recovering the failure of the single-disk according to the optimal recovery policy,wherein the optimal recovery policy is to read data from the each single stripe according to the amount of data expected to be read and a decoding rule of an erasure code to recover the failed data stored in the each single stripe, andwherein to read the data from the each single stripe, the following steps further comprise rotating a magnetic head of the single-disk to a position where the data resides.
0 Assignments
0 Petitions
Accused Products
Abstract
The present invention discloses a method for optimizing recovery of a single-disk failure, including the following steps: obtaining, according to current load information, an amount of data expected to be read and an allowed number of iterations; obtaining a recovery optimization policy for failed data in each single stripe, and combining an initial recovery policy for multiple stripes; and further optimizing the initial recovery policy by using a greedy algorithm based on tabu search, subject to the amount of data expected to be read and the allowed number of iterations, to finally obtain an optimal recovery policy with a smallest quantity of seeks. The optimization method of the present invention reduces the amount of data to be read and the quantity of seek operations, and improves the efficiency of recovering a single-disk failure. The present invention further discloses an apparatus for optimizing recovery of a single-disk failure.
8 Citations
6 Claims
-
1. A method for optimizing recovery of a failure of a single-disk, comprising:
-
using a processor of a computer system to execute the following steps; obtaining, according to current load information of an erasure-coded storage system comprising a first disk and a second disk, an amount of data expected to be read and an allowed number of iterations, wherein the first disk comprises a first portion and a second portion, and the second disk comprises a third portion and a fourth portion, the first portion and the third portion store failed data in a first stripe, and the second portion and the fourth portion store failed data in a second stripe; obtaining a recovery optimization policy for the failed data in each single stripe of the first stripe and the second stripe, and combining the recovery optimization policy for the failed data in the each single stripe to obtain an initial recovery policy for the first stripe and the second stripe; further optimizing the initial recovery policy by using a greedy algorithm based on tabu search, subject to the amount of data expected to be read and the allowed number of iterations, to obtain an optimal recovery policy with a smallest quantity of seeks, so that the failure of the single-disk is recovered according to the optimal recovery policy;
wherein the step of optimizing the initial recovery policy by using a greedy algorithm based on tabu search, subject to the amount of data expected to be read and the allowed number of iterations, to obtain an optimal recovery policy with a smallest quantity of seeks, further comprises;initializing a tabu list to an empty set, wherein the tabu list stores a quantity of seeks needed by an optimal solution that is found during each iteration;
during each iteration, performing an input by using the optimal recovery solution in a last iteration as the initial recovery policy in the current iteration; andafter the allowed number of iterations, selecting a solution with the smallest quantity of seeks from the tabu list to serve as the optimal recovery policy; and recovering the failure of the single-disk according to the optimal recovery policy, wherein the optimal recovery policy is to read data from the each single stripe according to the amount of data expected to be read and a decoding rule of an erasure code to recover the failed data stored in the each single stripe, and wherein to read the data from the each single stripe, the following steps further comprise rotating a magnetic head of the single-disk to a position where the data resides. - View Dependent Claims (2, 3)
-
-
4. A non-transitory computer readable medium having stored thereon executable instructions that when executed by one or more processors of a computer system, cause the computer system to
obtain, by an obtaining module, according to current load information of an erasure-coded storage system comprising a first disk and a second disk, an amount of data expected to be read and an allowed number of iterations, wherein the first disk comprises a first portion and a second portion, and the second disk comprises a third portion and a fourth portion, the first portion and the third portion store failed data in a first stripe, and the second portion and the fourth portion store failed data in a second stripe; -
obtain, by a combining module, a recovery optimization policy for the failed data in each single stripe of the first stripe and the second stripe, combine, by the obtaining module, the recovery optimization policy for the failed data in each single stripe to obtain an initial recovery policy for the first stripe and the second stripe; and
further optimzied, by an optimizing module, the initial recovery policy by using a greedy algorithm based on tabu search, subject to the amount of data expected to be read and the allowed number of iterations, to obtain an optimal recovery policy with a smallest quantity of seeks, so that the single-disk failure is recovered according to the optimal recovery policy;
wherein the optimizing module is further configured to;initialize a tabu list to an empty set, wherein the tabu list stores a quantity of seeks needed by an optimal solution that is found during each iteration; during each iteration, perform an input by using the optimal recovery solution in a last iteration as the initial recovery policy in the current iteration; and
after the allowed number of iterations, select a solution with the smallest quantity of seeks from the tabu list to serve as the optimal recovery policy; andrecovering the failure of the single-disk according to the optimal recovery policy, wherein the optimal recovery policy is to read data from the each single stripe according to the amount of data expected to be read and a decoding rule of an erasure code to recover the failed data stored in the each single stripe, and wherein to read the data from the each single stripe, the executable instructions further cause the computer system to rotate a magnetic head of the single-disk to a position where the data resides. - View Dependent Claims (5, 6)
-
Specification