# US 2012/0254568 A1 · Determining whether to extend a drain time to copy data blocks from a first storage to a second storage

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2012/0254568 A1
- Document ID: US20120254568A1
- Status: Published application
- Kind: A1
- Application number: 13/474,081
- Filed: 2012-05-17
- Published: 2012-10-04
- Earliest claimed: 2010-11-17
- Assignees: International Business Machines Corporation
- Inventors: Theodore T. Harris, JR.; Paul A. Jennas, II; Jason L. Peipelman; Joshua M. Rhoades; Matthew J. Ward
- Web page: https://patentgrep.com/patent/US20120254568A1

## CPC

- G06F 3/065: {Replication mechanisms}
- G06F 3/0611: {in relation to response time}
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 11/2064: {while ensuring consistency}
- G06F 11/2071: {using a plurality of controllers}
- G06F 11/3409: {for performance assessment}
- G06F 11/3485: {for I/O devices}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided are a computer program product, system, and method for determining whether to extend a drain time to copy data blocks from a first storage to a second storage. A data structure indicates data blocks in the first storage to copy to the second storage. A drain operation copies the data blocks indicated in the first storage to the second storage for a drain time period. Write requests to the data blocks indicated in the data structure are queued during the drain time period, wherein the queued write requests are not completed while queued. Metric information based on the writes that occur to data blocks in the first storage are gathered during the drain time period; and in response to expiration of the drain time period, a determination is made from the gathered metric information of whether to continue the drain operation or terminate the drain operation.

## Claims

### Claim at position 1

1-17. (canceled)

### Claim 18

A method, comprising:
generating a data structure indicating data blocks in a first storage to copy to a second storage;
initiating a drain operation to copy the data blocks indicated in the first storage to the second storage for a drain time period;
queuing write requests to the data blocks indicated in the data structure during the drain time period, wherein the queued write requests are not completed while queued;
gathering metric information based on the writes that occur to data blocks in the first storage during the drain time period; and
in response to expiration of the drain time period, determining from the gathered metric information whether to continue the drain operation or terminate the drain operation.

### Claim 19 (depends on 18)

The method of claim 18, wherein the determining from the gathered metric information of whether to continue the drain operation comprises:
providing a performance metric threshold;
determining a metric value based on the gathered metric information; and
comparing the determined metric value to the performance metric threshold to determine whether to continue the drain operation.

### Claim 20 (depends on 19)

The method of claim 19, wherein the performance metric threshold comprises a first performance metric threshold, wherein the drain time period comprises a first drain time period, wherein the determined metric value comprises a first metric value, wherein the drain operation is continued for a second drain time period in response to the continuing of the drain operation, further comprising:
continuing to gather metric information during the second drain time period;
in response to the second drain time period expiring, determining a second metric value based on the gathered metric information; and
comparing the determined second metric value to a second performance metric to determine whether to continue the drain operation.

### Claim 21 (depends on 19)

The method of claim 19, wherein the gathered metric information indicates received write requests and collisions, wherein collisions comprise write requests directed to data blocks indicated in the data structure as not copied to the second storage, wherein the performance metric threshold indicates a collision ratio threshold, wherein the determined metric value comprises a determined collision ratio of a number of collisions and number of received write requests indicated in the gathered metric information, and wherein the drain operation is continued in response to determining that the determined collision ratio is less than the collision ratio threshold.

### Claim 22 (depends on 19)

The method of claim 19, wherein the gathered metric information indicates a time to complete received write requests, wherein the performance metric threshold indicates a write time threshold, wherein the determined metric value comprises a determined average write time based on the gathered metric information, further comprising:
continuing the drain operation in response to determining that the determined average write time is less than the collision ratio; and
terminating the drain operation in response to determining that the determined average write time is greater than the collision ratio.

### Claim 23 (depends on 19)

The method of claim 19, wherein the gathered metric information indicates a number of blocks indicated in the data structure not yet copied to the second storage and a number of collisions, wherein collisions comprise write requests directed to data blocks indicated in the data structure as not copied to the second storage, wherein the performance metric threshold indicates a collision number threshold and a blocks-to-drain threshold, wherein the determined metric value comprises a determined blocks-to-drain and determined number of collisions, further comprising:
continuing the drain operation in response to determining that the determined blocks-to-drain is less than the blocks-to-drain threshold and the determined number of collisions is less than the collision number threshold.

### Claim 24 (depends on 18)

The method of claim 18, further comprising:
updating the data structure to indicate that a data block indicated in the data structure was copied to the second storage in response to copying the data block from the first storage to the second storage;
determining whether a received write request is directed to a data block indicated in the data structure as not copied to the second storage, wherein the write request to the data block indicated in the data structure as not copied to the second storage is queued; and
performing the write request to the data block in response to determining that the data structure does not indicate the data block as not copied to the second storage.

### Claim 25 (depends on 20)

The method of claim 20, until the drain operation has completed resulting in all the data blocks indicated in the data structure copied to the second storage, performing iterations of the following operations:
continuing the drain operation for an additional drain time period in response to determining to continue the drain in response to comparing the second metric value or subsequently calculated additional metric value with the second performance metric;
continuing to gather metric information during the additional drain time period;
in response to the additional drain time period expiring before all the data blocks indicated in the data structure have been copied to the second storage, determining an additional metric value based on the gathered metric information;
determining whether the determined additional metric value is less than the second performance metric threshold; and
returning to the continuing of the drain operation for the additional time period.

### Claim 26 (depends on 21)

The method of claim 21, wherein the collision ratio threshold comprises a first collision ratio threshold, wherein the drain time period comprises a first drain time period, wherein the determined collision ratio comprises a first collision ratio, wherein the drain operation is continued for a second drain time period in response to the continuing of the drain operation, further comprising:
continuing to gather metric information indicating write requests received and write requests directed to data blocks indicated in the data structure as not copied to the second storage during the second drain time period;
in response to the second drain time period expiring, determining a second collision ratio based on the gathered metric information;
determining whether the determined second collision ratio is less than a second collision ratio threshold; and
continuing the drain operation in response to determining that the determined second collision ratio is less than the second collision ratio.

### Claim 27 (depends on 26)

The method of claim 26, wherein the second collision ratio threshold is less than the first collision ratio threshold.

### Claim 28 (depends on 19)

The method of claim 19, wherein the data blocks indicated in the data structure are part of a consistency group of updated data in the first storage consistent as of a point of time, further comprising:
in response to the comparing of the determined metric value to the performance metric threshold indicating to not continue the drain operation by performing:
terminating the drain operation; and
failing the copy operation of the data blocks indicated in the data structure from the first storage to the second storage.
