This invention relates to data storage, and in particular, to remote mirroring of data.
Content providers on the internet often maintain multiple content servers, each of which contains a complete copy of the content contained in a master server. By distributing the task of serving content among multiple content servers, content providers reduce the latency associated with satisfying a request for content. The process of maintaining a complete and current copy of the content stored on a master server is referred to as xe2x80x9cmirroring.xe2x80x9d The content servers on which such copies are maintained are referred to as xe2x80x9cmirror servers,xe2x80x9d or xe2x80x9cmirrors.xe2x80x9d
In a distributed content serving system, it is desirable for a change in the content stored on the master server to be propagated among all the mirrors as quickly as possible. It is also desirable for this propagation to occur automatically and without significantly increasing the latency associated with serving content.
Mirroring is also used to safeguard data in a distributed data storage system. In this application, the content of a mirror is updated in response to changes in the content of a primary data storage system. This, however, introduces latency associated with establishing communication between the primary data storage system and the mirror.
To reduce latency, it is desirable to locate the mirror proximate to the data storage system. This results in faster and more reliable communication between the primary data storage system and the mirror. However, such a mirror does not protect the data against destruction of the premises on which both the primary data storage system and the mirror are located.
In a data storage system, it may be desirable to provide another mirror at a location that is distant from the primary data storage system. However, the introduction of a second mirror means that changes to the data on the primary data storage system must be propagated to two different mirrors. This can increase the latency associated with making changes to the data in the primary data storage system.
A data storage system incorporating the invention reduces latency associated with mirroring source data at more than one remote mirror by providing data structures that enable a plurality of processors to concurrently mirror source data to more than one remote mirror. This enables a first processor to be mirroring source data at a first remote mirror at the same time that a second processor is mirroring the same source data at a second remote mirror.
The invention provides for mirroring source data at a plurality of remote mirrors by preparing a mask indicating a plurality of remote mirrors designated to receive the source data. This mask is then posted in a common memory that is accessible to a plurality of processors. Each of the processors is associated with at least one of the remote mirrors. For each mirror, a mirror request is placed on a queue associated with that mirror.
Each processor in the plurality of processors scans a queue associated with one of the remote mirrors. When a processor identifies a mirror request in a queue associated with a remote mirror, it attempts execution of the mirror request. The processor then modifies a mask in response to an outcome of that attempt.
In synchronous mirroring, the method provides for the inspection of a status field maintained in the common memory. Through inspection of the status field, it is possible to determine whether each of the processors has attempted to mirror the source data, and if so, whether any of the attempts were unsuccessful.
In the case of synchronous mirror, the method can also provide for the creation of a request buffer in the common memory. The request buffer includes information identifying the source data and, optionally, information derived from the source data that can be used to validate the source data. Each mirror request associated with the mirroring operation includes a pointer to the request buffer.
Optionally, an elapsed time since the queuing of the mirror request is monitored. If this elapsed time exceeds some threshold value, the status field is modified to indicate withdrawal of the mirror request.
The mask identifies where the source data is to be mirrored. In one embodiment, the mask has a plurality of mask elements, each of which corresponds to a remote mirror. To prepare the mask, a subset of the plurality of mask elements is modified to indicate the existence of source data to be sent to a mirror corresponding to the selected mask element.
In some cases, there is an unsuccessful attempt to mirror source data. As a result, an optional feature includes selecting, from a mask, a mask element corresponding to the remote mirrors and modifying the mask element in response to the outcome of the attempt.
Once all mirroring events have been completed, it is useful to send an acknowledgement signal to a host to indicate an outcome of the storage operation. The method can thus include determining whether all mirror requests for mirroring the source data have been attempted. This can be achieved by modifying a first mask if a mirroring attempt was unsuccessful and modifying a second mask if the attempt was successful. Success or failure of each mirroring attempt can be determined on the basis of the first and second mask. To determining whether all mirror requests for mirroring the source data have at least been attempted, the method provides for comparing the first and second masks with a third mask, the third mask containing information indicative of which remote mirrors are to receive the source data.
The invention also includes a system for carrying out the foregoing methods. Such a system includes first and second processors designated to communicate with first and second remote mirrors, respectively. First and second queues in the system receive requests to mirror source data at first and second mirrors, respectively. Each of the queues is periodically scanned by its associated processor. As used herein, the term xe2x80x9cperiodicallyxe2x80x9d does not imply a regular, fixed period; it instead means xe2x80x9cfrom time to timexe2x80x9d, or xe2x80x9casynchronouslyxe2x80x9d. A mask provides information indicative of any pending mirror requests for sending the source data to the first and second mirrors.