Replicating data in a data storage system
First Claim
1. A computer-implemented method of replicating data in a data storage system, wherein the data storage system comprises at least:
- a first data storage device comprising a set of data regions;
a second data storage device comprising a set of data regions corresponding to the set of data regions of the first data storage device; and
a first host device in communication with the first data storage device and a second host device in communication with the second data storage device;
wherein the method comprises the steps of;
the first data storage device receiving a first write request from the first host device to update a first subset of the data regions;
the first data storage device updating data regions that are in the first subset in accordance with the first write request;
the first data storage device sending the first write request to the second data storage device;
the second data storage device receiving a second write request to update a second subset of the data regions from the second host device prior to receiving the first write request;
the second data storage device updating data regions that are in the second subset in accordance with the second write request;
the second data storage device receiving the first write request;
the second data storage device updating data regions that are in the first subset in accordance with the first write request;
the second data storage device sending a notification to the first data storage device indicating that the second data storage device has been updated in accordance with the first write request and a collision mask indicating the regions of the second write request overwritten by the first write request;
based on the received collision mask, the first data storage device determining that the first data storage device has not received the second write request;
based on the first data storage device being selected as a leader in the case of a collision between the first write request and the second write request, the first data storage device updating the first subset in accordance with the first write request;
the first data storage device sending a notification to the second data storage device indicating that the first data storage device has been updated in accordance with the first write request and sending a first flush message;
based on receiving the flush message, the second data storage device waiting for a notification indicating that the first data storage device has applied the second write request;
based on receiving the notification indicating that the first data storage device has applied the second write request, the second data storage device sending a second flush message to the first data storage device;
the first data storage device receiving the second write request from the second data storage device;
based on receiving the second flush message and the first data storage device being selected as the leader, the first data storage device updating only data regions that are in the second subset but not in the first subset in accordance with the second write request; and
the first data storage device sending a third flush message to the second data storage device.
2 Assignments
0 Petitions
Accused Products
Abstract
A first data storage device receives a first write request from a host device to update a first subset of the data regions and sends the first write request to a second data storage device. Prior to receiving a notification from the second device that it has been updated in accordance with the first write request, the first device receives a second write request from the second device to update a second subset of the data regions and one of the two devices is selected. If the first device is selected, the first device updates only its data regions that are in the second subset but not in the first subset according to the second write request. In the case that the second device is selected, the first device updates its data regions that are in the second subset according to the second write request.
33 Citations
12 Claims
-
1. A computer-implemented method of replicating data in a data storage system, wherein the data storage system comprises at least:
- a first data storage device comprising a set of data regions;
a second data storage device comprising a set of data regions corresponding to the set of data regions of the first data storage device; and
a first host device in communication with the first data storage device and a second host device in communication with the second data storage device;
wherein the method comprises the steps of;the first data storage device receiving a first write request from the first host device to update a first subset of the data regions; the first data storage device updating data regions that are in the first subset in accordance with the first write request; the first data storage device sending the first write request to the second data storage device; the second data storage device receiving a second write request to update a second subset of the data regions from the second host device prior to receiving the first write request; the second data storage device updating data regions that are in the second subset in accordance with the second write request; the second data storage device receiving the first write request; the second data storage device updating data regions that are in the first subset in accordance with the first write request; the second data storage device sending a notification to the first data storage device indicating that the second data storage device has been updated in accordance with the first write request and a collision mask indicating the regions of the second write request overwritten by the first write request; based on the received collision mask, the first data storage device determining that the first data storage device has not received the second write request; based on the first data storage device being selected as a leader in the case of a collision between the first write request and the second write request, the first data storage device updating the first subset in accordance with the first write request; the first data storage device sending a notification to the second data storage device indicating that the first data storage device has been updated in accordance with the first write request and sending a first flush message; based on receiving the flush message, the second data storage device waiting for a notification indicating that the first data storage device has applied the second write request; based on receiving the notification indicating that the first data storage device has applied the second write request, the second data storage device sending a second flush message to the first data storage device; the first data storage device receiving the second write request from the second data storage device; based on receiving the second flush message and the first data storage device being selected as the leader, the first data storage device updating only data regions that are in the second subset but not in the first subset in accordance with the second write request; and the first data storage device sending a third flush message to the second data storage device. - View Dependent Claims (2, 3, 4)
- a first data storage device comprising a set of data regions;
-
5. A computer system for replicating data in a data storage system, wherein the system comprises at least:
- a first data storage device comprising a set of data regions;
a second data storage device comprising a set of data regions corresponding to the set of data regions of the first data storage device;
a first host device in communication with the first data storage device and a second host device in communication with the second data storage device; and
one or more computer-readable storage media and program instructions stored on the one or more computer-readable storage media, the program instructions comprising;program instructions to receive, by the first data storage device, a first write request from the first host device to update a first subset of the data regions; program instructions to update, by the first data storage device, data regions that are in the first subset in accordance with the first write request; program instructions to send, by the first data storage device, the first write request to the second data storage device; program instructions to receive, by the second data storage device, a second write request to update a second subset of the data regions from the second host device prior to receiving the first write request; program instructions to update, by the second data storage device, data regions that are in the second subset in accordance with the second write request; program instructions to receive, by the second data storage device, the first write request; program instructions to update, by the second data storage device, data regions that are in the first subset in accordance with the first write request; program instructions to send, by the second data storage device, a notification to the first data storage device indicating that the second data storage device has been updated in accordance with the first write request and a collision mask indicating the regions of the second write request overwritten by the first write request; based on the received collision mask, program instructions to determine, by the first data storage device, that the first data storage device has not received the second write request; based on the first data storage device being selected as a leader in the case of a collision between the first write request and the second write request, program instructions to update, by the first data storage device, the first subset in accordance with the first write request; program instructions to send, by the first data storage device, a notification to the second data storage device indicating that the first data storage device has been updated in accordance with the first write request and send a first flush message; based on receiving the flush message, program instructions to wait, by the second data storage device, for a notification indicating that the first data storage device has applied the second write request; based on receiving the notification indicating that the first data storage device has applied the second write request, program instructions to send, by the second data storage device, a second flush message to the first data storage device; program instructions to receive, by the first data storage device, the second write request from the second data storage device; based on receiving the second flush message and the first data storage device being selected as the leader, program instructions to update, by the first data storage device, only data regions that are in the second subset but not in the first subset in accordance with the second write request; and program instructions to send, by the first data storage device, a third flush message to the second data storage device. - View Dependent Claims (6, 7, 8)
- a first data storage device comprising a set of data regions;
-
9. A computer program product for replicating data in a data storage system comprising at least:
- a first data storage device comprising a set of data regions;
a second data storage device comprising a set of data regions corresponding to the set of data regions of the first data storage device;
a first host device in communication with the first data storage device and a second host device in communication with the second data storage device;
one or more computer processors, one or more computer-readable storage media, and program instructions stored on one or more of the computer-readable storage media for execution by at least one of the one or more processors, the program instructions comprising;program instructions to receive, by the first data storage device, a first write request from the first host device to update a first subset of the data regions; program instructions to update, by the first data storage device, data regions that are in the first subset in accordance with the first write request; program instructions to send, by the first data storage device, the first write request to the second data storage device; program instructions to receive, by the second data storage device, a second write request to update a second subset of the data regions from the second host device prior to receiving the first write request; program instructions to update, by the second data storage device, data regions that are in the second subset in accordance with the second write request; program instructions to receive, by the second data storage device, the first write request; program instructions to update, by the second data storage device, data regions that are in the first subset in accordance with the first write request; program instructions to send, by the second data storage device, a notification to the first data storage device indicating that the second data storage device has been updated in accordance with the first write request and a collision mask indicating the regions of the second write request overwritten by the first write request; based on the received collision mask, program instructions to determine, by the first data storage device, that the first data storage device has not received the second write request; based on the first data storage device being selected as a leader in the case of a collision between the first write request and the second write request, program instructions to update, by the first data storage device, the first subset in accordance with the first write request; program instructions to send, by the first data storage device, a notification to the second data storage device indicating that the first data storage device has been updated in accordance with the first write request and send a first flush message; based on receiving the flush message, program instructions to wait, by the second data storage device, for a notification indicating that the first data storage device has applied the second write request; based on receiving the notification indicating that the first data storage device has applied the second write request, program instructions to send, by the second data storage device, a second flush message to the first data storage device; program instructions to receive, by the first data storage device, the second write request from the second data storage device; based on receiving the second flush message and the first data storage device being selected as the leader, program instructions to update, by the first data storage device, only data regions that are in the second subset but not in the first subset in accordance with the second write request; and program instructions to send, by the first data storage device, a third flush message to the second data storage device. - View Dependent Claims (10, 11, 12)
- a first data storage device comprising a set of data regions;
Specification