Patent ID: 6996691

Claim:
A method for copying data, written by a host computer to a local data storage array, to a backup copy of the data on a remote storage system, wherein a local array controller, connected to the local data storage array, is coupled to a remote array controller connected to the remote storage system, the method comprising the steps of: assigning a first current sequence number as the look-ahead limit for a write command associated with the data; upon command completion, storing a second current sequence number as the write command sequence number; placing the command in a queue; sending the command sequence number and look-ahead limit, with the command associated therewith, to the remote array controller; on reception of the received command by the remote array controller, if there are any outstanding writes in progress, then if the sequence number of the received command is less than a present look-ahead fence, then replacing the current look-ahead fence with the minimum of the current look-ahead fence and the look-ahead limit for the command; otherwise, if the sequence number of the received command is not less than the current look-ahead fence, then putting the command in a waiting queue; if there were no writes in progress, then setting the current look-ahead fence for the remote array controller to the look-ahead limit for the command; executing the command at the remote controller; when a write operation completes at the remote array controller, then if the look-ahead limit for the command is equal to the current look-ahead fence, then replacing the current look-ahead fence with the minimum value of the look-ahead limit of all currently outstanding said commands; and continuing to process said outstanding commands by directing each said command in the waiting queue back to the sending step.