Data sending method, data receiving method, and storage device
Abstract
A method of data replication, comprising: determining (E41), by a first storage device, when a first replication task is triggered; read (E41) a current time period number; modify (E104, E304) the current time period number; The method is characterized by the following: reading (E106, E42) a second number, where the second number is a number corresponding to a last completed replication task that is correlated with the current replication task; determine (E107, E43) a first number according to the modified current time period number and the second number, where the first number is a number before the current modified time period number and the first number is a number after the second number; and replicating (E108, E43) the data to be replicated and the address information of the data to be replicated stored in a cache of the first storage device and corresponding to the first number in a second storage device.

Term
7.1 yearsto projected expiry
Projected expiry 15 November 2033, counted from filing; an application has no term until it is granted.
- Priority
- Filed
- Published
- Today
- Projected expiry
8 claims: 2 independent, 6 dependent
- 1ES 2 610 784 T3 REIVINDICACIONES 1. Un método de replicación de datos, que comprende:determinar (E41), mediante un primer dispositivo de almacenamiento, cuándo se desencadena una primera tarea de replicación;leer (E41) un número de período de tiempo actual;modificar (E104, E304) el número de período de tiempo actual;el método se caracteriza por lo siguiente: leer (E106, E42) un segundo número, donde el segundo número es un número correspondiente a una última tarea de replicación completada que está correlacionada con la tarea de replicación actual;determinar (E107, E43) un primer número de acuerdo con el número de período de tiempo actual modificado y el segundo número, donde el primer número es un número anterior al número de período de tiempo actual modificado y el primer número es un número posterior al segundo número;y replicar (E108, E43) los datos que han de replicarse y la información de dirección de los datos que han de replicarse almacenados en una memoria caché del primer dispositivo de almacenamiento y correspondientes al primer número en un segundo dispositivo de almacenamiento.
- 2El método según la reivindicación 1, en la que la tarea de replicación correlacionada con la tarea de replicación actual se refiere a una tarea de replicación que pertenece a una misma relación de replicación que la tarea de replicación actual; cuando se desencadena una tarea de replicación actual, el método comprende además:recibir un identificador correspondiente a la relación de replicación;y la lectura de un segundo número comprende: leer el segundo número de acuerdo con el identificador.
- 3El método según la reivindicación 1, en el que, antes de que se desencadene la tarea de replicación actual, el método comprende además:recibir (E101) una primera solicitud de datos de escritura, en la que la primera solicitud de datos de escritura comprende datos que han de replicarse e información de dirección de los datos que han de replicarse;y añadir (E102) el primer número a los datos que han de replicarse y la información de dirección de los datos que han de replicarse, y escribir (E102) los datos que han de replicarse y la información de dirección de los datos que han de replicarse a los que se ha añadido el número de período de tiempo actual en la memoria caché.
- 4El método según la reivindicación 1, en el que la replicación de los datos que han de replicarse y la información de dirección de los datos que han de replicarse almacenados en una memoria caché del primer dispositivo de almacenamiento y correspondientes al primer número en un segundo dispositivo de almacenamiento comprende:cuando la información de dirección corresponde a una pluralidad de números, determinar que un último número de los números correspondientes a la información de dirección es el primer número;y replicar los datos que han de replicarse y la información de dirección de los datos que han de replicarse almacenados en la memoria caché y correspondientes al primer número en el segundo dispositivo de almacenamiento.
- 5Un dispositivo de almacenamiento, que comprende:un módulo (53) de determinación, configurado para determinar cúando se desencadena una tarea de replicación;un módulo (52) de lectura y escritura, configurado para leer un número de período de tiempo actual;modificar el número de período de tiempo actual;y caracterizado por que el módulo (52) de lectura y escritura está configurado además para leer un segundo número, en el que el segundo número es un número correspondiente a la última tarea de replicación completada que está correlacionada con la tarea de replicación actual;y por que ES 2 610 784 T3 el módulo (53) de determinación está configurado además para determinar un primer número de acuerdo con el número de período de tiempo actual y el segundo número, en el que el primer número es un número anterior al número de período de tiempo actual modificado y el primer número es un número posterior al segundo número;y un módulo (54) de replicación, configurado para replicar datos que han de replicarse e información de dirección de los datos que han de replicarse almacenados en una memoria caché del primer dispositivo de almacenamiento y correspondientes al primer número en un segundo dispositivo de almacenamiento.
- 6El dispositivo de almacenamiento según la reivindicación 5, en el que la tarea de replicación correlacionada con la tarea de replicación actual se refiere a una tarea de replicación que pertenece a una misma relación de replicación que la tarea de replicación actual; el dispositivo de almacenamiento comprende además:un módulo (51) de recepción;el módulo (51) de recepción está configurado para recibir un identificador correspondiente a la relación de replicación;y el módulo (52) de lectura y escritura está configurado en particular para leer el segundo número de acuerdo con el identificador.
- 7El dispositivo de almacenamiento según la reivindicación 5, en el que el módulo (51) de recepción está configurado además para recibir una primera solicitud de datos de escritura antes de que se desencadene la tarea de replicación actual, en el que la primera solicitud de datos de escritura comprende los datos que han de replicarse y la información de dirección de los datos que han de replicarse;y el módulo (52) de lectura y escritura está configurado además para añadir el primer número a los datos que han de replicarse y la información de dirección de los datos que han de replicarse, y escribir los datos que han de replicarse y la información de dirección de los datos que han de replicarse a los que se ha añadido el número de período de tiempo actual en la memoria caché.
- 8El dispositivo de almacenamiento según la reivindicación 5, en el que el módulo (54) de replicación está configurado en particular para cuando la información de dirección corresponde a una pluralidad de números, determinar un último número de los números correspondientes a la información de dirección como el primer número;y replicar los datos que han de replicarse y la información de dirección de los datos que han de replicarse almacenados en la memoria caché y correspondientes al primer número en el segundo dispositivo de almacenamiento.
Independent claims8
324 paragraphs in 14 sections, as filed
ES 2 610 784 T3
DESCRIPTION
Data sending method, data reception method and storage device.
Field of the invention
The present invention relates to storage technologies, and in particular to a data sending method, a data reception method and a storage device.
Background
Disaster data recovery, also known as remote data replication technologies, refers to the configuration of a non-local data system that is an available replication of local data. When disaster strikes local data or an entire application system, at least one available copy of essential system service data is stored non-locally.
A typical disaster recovery system includes a production center and a disaster recovery center. In the production center, servers and a storage array are deployed for the normal operation of services; and in the disaster recovery center, servers and a storage array are deployed to take over the services of the production center when a disaster occurs in the center. The storage array of either the production center or the disaster recovery center includes multiple volumes of data, and a data volume is a logical storage space that is formed by allocating physical storage space. After the data generated by the services in the production center has been written to the production matrix, the data can be replicated to the disaster recovery center using a disaster recovery link and written to the disaster recovery matrix. In order for the data in the disaster recovery center to take over the delivery of services after a disaster occurs, the consistency of the replicated data in the disaster recovery matrix must be ensured. Ensuring data consistency relies on dependency-based write data requests, where dependency must be ensured. All applications, operating systems, and databases depend by their very nature on the logic of this reliance on write data requests for the operation of their services. For example, write data not executed until request for write data 1 is complete. The order is confirmed. That is, the system will not issue the write data request 2 until it is ensured that the write data request 1 has been returned successfully and completely. In this way, services can be restored based on an inherent method when an execution process is interrupted due to a failure. Otherwise, it is possible that, for example, when data is read, the data stored by the write data request 2 may be read while the data stored by the write data request 1 cannot be read, and as a result of Therefore, the services cannot be restored.
In the prior art, snapshot technology is used to solve the problem. A snapshot is an image of data at a given time (instant copying starts). The purpose of a snapshot is to create a status view for a volume of data at a specific point in time. From this view, only data volume data can be viewed at creation time while modifications (new data written) to data volume after that time will not be reflected in snapshot view. Using this snapshot view, data replication can take place. For the production site, snapshot data is "static." As a result, the production center can replicate snapshot data to the disaster recovery center after taking a snapshot of data at each point in time. This not only implements remote data replication but will not affect the execution of a subsequent write data request at the production site. Regarding the disaster recovery center, the requirement of data consistency can also be satisfied. For example, when data from data write request 2 is successfully replicated to the disaster recovery center while data from data write request 1 is not replicated successfully, snapshot data can be used before the data write request 2 to restore the data in the disaster recovery center to a previous state.
Since the production center needs to process a snapshot when executing a request for write data, and store the generated snapshot data in a data volume dedicated to the snapshot data storage, when the production center replicates the storage data from snapshot to disaster recovery center, you need to read the snapshot data stored in the data volume in a cache and then send the snapshot data to the disaster recovery center. The data used to generate the snapshot data, however, possibly still exists in the cache but cannot be used properly. Each replication requires reading the snapshot data from the data volume, resulting in long, low-efficiency data replication.
Document CN102306115A describes an asynchronous remote replication method. The method comprises the following steps: after a production center receives a write request from a server, labeling the write request with a period number according to the current period number; write tagged request
ES 2 610 784 T3 with the period number on a local remote replication server LUN and tag the write request with a sequence number tagged with the period number according to a write sequence of the write request on the server remote replication LUN; and send the write request labeled with the period number and sequence number to a disaster recovery center.
Document CN101751230A describes a device and a method of calibrating an input and output data timestamp, wherein in a large-scale memory device, an integrated method is used to calibrate an input data timestamp. and output from a disk array controller; and during the timestamp calibration process, all input and output data passes through a high-speed cache memory switch board to calibrate the timestamp.
European patent EP1624376A describes a remote data copying arrangement for replicating server data writes issued to a first data storage system to a second remote storage system, wherein data consistency is ensured by making write requests to the second storage system while maintaining the original server write request sequence by associating each write request with a sequential update number.
Compendium
The present invention provides a data delivery method whereby the information carried in a write data request can be sent to a second storage device directly from a cache of a first storage device, increasing the efficiency of the storage device. data replication.
The present invention is defined in the accompanying independent claims 1 and 5.
In the present invention, after a first storage device receives a request for write data sent by a server, where the information carried in the request for write data includes data to be written and address information, the first device storage adds a first number to the data to be written and the address information and writes the information to the cache, where the first number is a current time period number. When a replication task is triggered, the first storage device reads the data to be written and the address information for the first number from the cache and sends the information to the second storage device. Also, when a replication task is triggered, the first storage device modifies the number of the current time period, so that the first storage device, when it receives a request for write data subsequently, adds the same number as the number of current time period modified to the information carried in the write data request. Therefore, in the cache, the information carried in a write data request to be sent to the second storage device is distinguished from the information carried in a write data request received by the first storage device. This performs a direct push of the information carried in a write data request from the cache to the second storage device. Since information is sent directly from the cache without the need to read it from a data volume, the data replication time is short, which increases the efficiency of data replication.
Brief description of the drawings
In order to more clearly illustrate the technical solutions of the present invention, drawings describing embodiments of the present invention or the prior art are attached. Apparently, the drawings accompanying the following description show only some embodiments of the present invention.
Figure 1 is an application network architecture schematic diagram of a data forwarding method according to an embodiment of the present invention;
Figure 2 is a flow chart of a data sending method according to an embodiment of the present invention;
Figure 3 is a flow chart of a data sending method according to an embodiment of the present invention;
Figure 4 is a signaling flow diagram of a data sending method according to an embodiment of the present invention;
Figure 5 is a schematic structural diagram of a storage device according to an embodiment of the present invention;
Figure 6 is a schematic structural diagram of another storage device according to one embodiment of the present invention;
Figure 7 is a schematic structural diagram of yet another storage device according to one embodiment of the present invention;
ES 2 610 784 T3
Figure 8 is a schematic structural diagram of yet another storage device according to one embodiment of the present invention;
Figure 9 is a schematic diagram of another application network architecture of a data forwarding method according to an embodiment of the present invention;
Figure 10 is a flow chart of a data replication method according to one embodiment of the present invention;
Figure 11 is a schematic structural diagram of another storage device according to one embodiment of the present invention;
Figure 12 is a schematic structural diagram of yet another storage device according to one embodiment of the present invention.
Description of the achievements
In order to make the objectives, technical solutions and advantages of the present invention more understandable, the following clearly and completely describes the technical solutions of the present invention with reference to the drawings that accompany the embodiments of the present invention.
A data sending method provided in an embodiment of the present invention can be implemented in a storage device. Figure 1 is a schematic system architecture diagram of a data sending method provided in one embodiment of the present invention. As shown in Figure 1, a production center includes one or more production servers, a connection device and a production matrix (corresponding to a first storage device in the following embodiments); and a system architecture of a disaster recovery center is similar to that of the production center, and includes disaster recovery servers, a connection device, and a disaster recovery array (corresponding to a second storage device in the following embodiments). In carrying out the present invention, there may be more than one disaster recovery center. The production center and disaster recovery center can transmit data over IP (Internet Protocol) or FC (Fiber Channel). There may be a control center between the production center and the disaster recovery center. The control center can be deployed in the production center or disaster recovery center, or deployed on a third-party appliance between the production center and the disaster recovery center. The control center is configured to send a signal to the disaster recovery matrix when the production matrix has a failure, so that the disaster recovery matrix takes over the server functions of the production matrix.
Production servers and disaster recovery servers can be any computing device known in the prior art, such as servers and desktops. Inside a server, an operating system and other applications are installed.
The connecting device can include any interface known in the prior art, between a storage device and a server, such as a fiber switch or other currently available switches.
The production array and the disaster recovery array can both be a storage device known in the prior art, such as a disk drive made up of one or more redundant arrays of inexpensive disk (RAID). , a concatenation of disks (JBOD), and one or more interconnected disk drives, such as a tape library, or a tape storage device of one or more storage drives, where the interconnected drive or drives belong to a Direct Access Storage Device (DASD).
Production array storage space can hold multiple volumes of data. A data volume is a logical storage space formed by allocating physical storage space. For example, a data volume can be a logical unit number (LUN), or a file system. In this embodiment of the present invention, the disaster recovery matrix has a similar structure to the production matrix.
Referring to Figure 1, this illustrates a data sending method according to an embodiment of the present invention. This embodiment of the present invention is applied in a first storage device, where the first storage device includes a controller, a cache memory (hereinafter referred to as cache memory) and a storage medium. The controller is a processor of the first storage device and is configured to execute input and output commands and other data services. Cache memory is a memory located between the controller and a hard disk, with less capacity but much higher speed than a hard disk. The storage medium is a primary memory of the first storage device, which is generally a non-volatile storage medium, such as a magnetic disk. In the embodiment of the present invention, all physical storage space included in the first storage device is referred to as the storage medium. In particular, the following stages can be executed
ES 2 610 784 T3 by the controller in the first storage device.
Step E101: the first storage device receives a first write data request sent by a server, where the first write data request carries data to be written and address information.
The address information can include a logic block address (LBA). When the first storage device includes multiple volumes of data, the address information may further include an identifier of a volume of data from the first storage device.
Step E102: adding a first number to the data to be written and the address information, and writing the data to be written and the address information to the cache, where the first number is a current time period number .
The first storage device may include a current time period number manager, and the current time period number manager stores the current time period number. The current time period number can be a numerical value, such as 0, 1, or 2, or a letter, such as a, b, or c, which is not limited herein.
When the first request for write data is received, a first number is added to the data to be written and to the address information carried in the first request for write data, where the first number is a value assigned by the number of current time period.
After the first number has been added to the information carried in the first write data request, the modified information carried in the first write data request is written to the cache, so that the data to be written, the Address information and the first number that are carried in the first write data request are all cached.
Furthermore, within a period of time, another write data request may also be received, and it is also necessary to add the first number to the information carried in the write data request and write the information in the cache. Note that before the current time period number changes, the first number is added to the information carried in all write data requests.
Step E103: reading the data to be written and the address information corresponding to the first number from the cache.
When a replication task is triggered, the first storage device can read the data to be written and the address information for the first number from the cache. It is understandable that there are multiple pieces of data to be written and address information corresponding to the first number.
A replication task means that the first storage device sends information carried in requests for write data received by a data volume within a period of time to a second storage device, where the same number as the period number is added current time to information carried in all write data requests. A replication task can be triggered by a timer or triggered manually, which is not limited here. The purpose of replication is to send the data to be written transported in write data requests that are received by the first storage device to the second storage device, so that the second storage device can take over the work of the first storage device. storage when it has a failure. It is understandable that the address information (such as an LBA) carried in the request for write data also needs to be sent to the second storage device, where the LBA is used to indicate an address in which the second storage device stores the data that they have to be written. Since the second storage device has the same physical structure as the first storage device, an LBA applicable to the first storage device is also applicable to the second storage device.
In carrying out the present invention, a replication task is specific to a data volume of the first storage device. When the first storage device includes multiple volumes of data, each volume of data corresponds to a replication task.
Step E104: modify the current time period number to identify the information carried in a subsequent write data request.
When a replication task is triggered, the current time period number manager needs to modify the current time period number. When a subsequent write data request is received, another number must be added to the information carried in the subsequent write data request, where that other number is a value assigned by the modified current time period number. Therefore, in the cache, the information carried in a request for write data to be sent to the second
ES 2 610 784 T3 storage device can be distinguished from the information carried in a write data request that the first storage device receives.
It should be noted that step E103 and step E104 are not subject to a time sequence.
Step E105: send the data to be written and the address information to the second storage device.
The first storage device sends the data to be written and the address information corresponding to the first number and read from the cache to the second storage device.
In particular, the first storage device can send all the read data to be written and the address information to the second storage device directly. Or, the first storage device may, after obtaining the identifiers of the data volumes from the second storage device, generate new write data requests according to the data to be written and the address information carried in each request for write data and the identifiers of the data volumes of the second storage device, and subsequently sending the new write data requests to the second storage device.
In the embodiment of the present invention, after the first storage device receives a request for write data sent by a server, where the information carried in the request for write data includes data to be written and address information, the first storage device adds a first number to the data to be written and the address information and writes the information to the cache, where the first number is a current time period number. When a replication task is triggered, the first storage device reads the data to be written and the address information for the first number from the cache and sends the information to the second storage device. Also, when a replication task is triggered, the first storage device modifies the current time period number, so that the first storage device, upon later receiving a request for write data, adds the same number as the number of current time period modified to the information carried in the write data request. Accordingly, in the cache, the information carried in a request for write data to be sent to the second storage device is distinguished from the information carried in a request for write data that is received by the first storage device. This performs a direct push of information carried in a write data request from the cache to the second storage device. Since information is sent directly from the cache without the need to read it from a data volume, the data replication time is short, which increases the efficiency of data replication.
It is understandable that, in the foregoing embodiment, when a replication task is triggered, the first storage device sends the data to be written and the address information corresponding to the current time period number to the second storage device, and also modify the current time period number to identify the information carried in a subsequent write data request. When a subsequent replication task is triggered, the first storage device sends the data to be written and the address information corresponding to the current modified time period number to the second storage device, and modifies the period number of current time. This ensures that the first storage device completely sends the information carried in the received write data requests to the second storage device in bulk.
However, when there are multiple disaster recovery centers, assuming a storage device corresponding to a second disaster recovery center is a third storage device, the first storage device also needs to send information carried in write data requests received by the first storage device to the third storage device. For the second storage device, when a replication task is triggered, the current time period number manager will modify that number. At this time, the number assigned by the current time period number to the second storage device and the one assigned to the third storage device are both the modified numbers. The information carried in the write data requests corresponding to the number prior to the modification of the current time period number, however, has not yet been sent to the third storage device.
Therefore, in a multi-center disaster recovery situation, the preceding implementation may further include the following steps:
Step E106: register a second number, where the second number is a number corresponding to the last replication task completed before a current replication task.
In the foregoing embodiment, the first number is the same as the current time period number and can be used to identify the current replication task. The current replication task means that the first device
Storage ES 2 610 784 T3 sends the information carried in write data requests received by a data volume within the current time period to the second storage device, where the same number as the current time period number is added to the information carried in all write data requests.
The second number is a number corresponding to the last replication task completed before the current replication task.
When there are multiple disaster recovery centers, the current time period number can be changed when a replication task is started to a storage device in another disaster recovery center. Therefore, it is necessary to record the number corresponding to a previously completed replication task.
If there is another number between the second number and the first number, the information carried in a write data request corresponding to this number is not sent to the second storage device and step E107 must be executed.
Step E107: Read, from the cache, the data to be written and the address information corresponding to a number after the second number and before the first number.
The specific reading process is similar to step E103, which will not be described further here.
It should be noted that step E107 and step E103 may not be time sequenced and therefore may be executed simultaneously.
Step E108: send the data to be written and the address information corresponding to the number after the second number and before the first number to the second storage device.
The specific shipping process is similar to step E105, which will not be described further here.
In the embodiment of the present invention, not only the information carried in write data requests corresponding to the current time period number is sent to the second storage device, rather, the information carried in write data requests corresponding to a number between the number corresponding to the previously completed replication task and the current time period number is also sent to the second storage device. This is applicable to a multiple disaster recovery center situation and ensures the integrity of data replication.
Referring to Figure 2, this illustrates an embodiment of a data receiving method in accordance with the present invention. The embodiment of the present invention is applicable to a situation where a disaster recovery center receives information carried in a write data request sent by a production center. The method can include the following stages:
Step E201: a second storage device receives address information sent by a first storage device.
In particular, the second storage device can receive data to be written and address information sent by the first storage device; or the second storage device may receive a request for write data sent by the first storage device, where the request for write data includes data to be written and address information, where the address information may be an address logical unit (LBA). When the second storage device includes multiple volumes of data, the address information may further include an identifier of a volume of data from the second storage device. Understandably, there could be more than one piece of address information.
After receiving the data to be written and the address information, the second storage device adds the same number as the current time period number to the data to be written and the address information, and writes the information in a cache so that the same number as the current time period number, the data to be written, and the address information are cached.
Notably, the second storage device also includes a current time period number manager, and the split time number manager stores the current time period number. The current time period number can be a numerical value, such as 0, 1, or 2, or a letter, such as a, b, or c, which is not limited herein. The current time period number expressed here may not be related to the current time period number of the first storage device.
Step E202: when it is determined that the first storage device has failed, the second storage device obtains, according to the address information, data to be written corresponding to a first number, where the address information corresponding to the first number is the same as the
ES 2 610 784 T3 received address information and the first number is a number that precedes the current time period number.
As a general rule, if both the first storage device and the second storage device are operating normally, the second storage device can receive information carried in all the write data requests sent by the first storage device, add the same number as the current time period number to the information carried in each write data request and cache the information. However, if the first storage device is faulty, the second storage device can possibly receive only a part of the data to be written corresponding to the current time period number of the first storage device. storage . In this case, the data stored by the second storage device is possibly not correct, and if the second storage device takes over the work of the first storage device directly, the consistency of the data cannot be guaranteed. For example, if a server sends a request for read data to the second storage device at that time, requesting to read data stored in the address information, the second storage device will look for a last number corresponding to the address information and then send the data to be written corresponding to the current time period number to the server, but the data will not be correct. Therefore, in that case, it is necessary to restore the data corresponding to a number earlier than the current time period number of the second storage device from the cached data of the second storage device.
In particular, it can be determined that the first storage device has failed by a method whereby a control center sends a signal to the second storage device, where the signal is used to indicate that the first storage device has failed and that the second storage device needs to take over the server roles of the first storage device.
Generally, when a replication task is complete, the control center can send a successful replication indication to both the first storage device and the second storage device. If the second storage device does not receive the prompt, it means that the ongoing replication task has not completed. Completion of a replication task means that the first storage device has sent information carried in all write data requests for the current time period number to the second storage device and that the second storage device has finished receiving information.
When the second storage device determines that the first storage device has failed, if the replication task in progress has completed, the second storage device can take over the work of the first storage device directly, thereby ensuring consistency. of the data. This situation goes beyond what is stated in the realization of the present invention.
However, if the replication task in progress has not completed, it is necessary to restore the data corresponding to the number before the current time period number on the second storage device from the cached data on the second storage device. storage.
A specific restoration procedure can be as follows: According to the received address information, check whether the address information corresponding to the number before the current time slot number is identical to the received address information, and if not, continue to check the address information corresponding to another number above until address information identical to the received address information is found, and subsequently obtaining the data to be written corresponding to a number of the received address information.
Step E203: adding a second number to the data to be written and the address information corresponding to the first number and writing the information to a cache.
The second number is a number obtained by modifying the current time period number and also the last number stored in the cache in the embodiment of the present invention. When a server sends a request for read data to the second storage device, requesting data stored in the address information, the second storage device learns by lookup that the last number corresponding to the address information is the second number and sends the data to be written corresponding to the second number to the server. Therefore, the consistency of the data is ensured.
In the embodiment of the present invention, the second storage device receives address information sent by the first storage device, and when the first storage device is faulty, it obtains data to be written corresponding to a number before the period number. of current time, adds a second number to the data to be written and the address information corresponding to the number before the current time slot number, and stores the information in a cache. Therefore, the consistency of the data is ensured.
Referring to Figure 3, Figure 3 illustrates an embodiment of a data sending method according to the
ES 2 610 784 T3 present invention. In the embodiment of the present invention, to distinguish between a cache in a production array and a cache in a disaster recovery array, the cache in the production array is referred to as the first cache and the cache in the disaster recovery matrix is referred to as the second cache in the embodiment of the present invention.
As shown in Figure 3, the method includes the following stages:
Step E301: the production matrix receives a request for write data A from a production server.
The write data request A includes a volume identifier, a write address A and data to be written A. Write address A is a logical address of a production array to which the write data is to be written A, how can an LBA be. Generally, when the production array executes the A write data request, it needs to translate the LBA to the physical block address (PBA), and then write the A write data to a storage medium according to the PBA. The identifier is an identifier of a data volume corresponding to the write data request A. In this embodiment, the production array is assumed to include a volume (hereinafter referred to as the primary volume). Next, the information carried in the write data request A includes an identifier of the primary volume, the write address A and the data to be written A.
Step E302: the production matrix modifies the write data request A into a write data request A, and the write data request A includes information carried in the write data request A and a first number.
In the embodiment of the present invention, a production matrix controller may include a current time period number (CTPN) manager. The current time period number manager records a current time period number that is used to generate the first number, and in particular the first number equals the current time period number.
After receiving the write data request A, the production matrix modifies the write data request A and converts it to the write data request A. In particular, a modification procedure may be to add the first number to the information carried in the write data request A. For example, when the current time period number is 1, the first number is also 1.
Optionally, a timestamp may be recorded when the write data request A is received and said timestamp is matched into a pre-stored numerical sequence so that a number corresponding to the timestamp is determined. In particular, the number sequence may be an allocation table or may be presented in other ways, which is not limited here. The number sequence includes multiple numbers, where each number corresponds to a section of the time stamps, as shown in Table 1.
Table 1
<td>Number</td><td>Time stamps section</td>
<td> 1</td><td> 9:01-10:00</td>
<td> 2</td><td> 10:01-11:00</td>
<td> 3</td><td> 11:01-12:00</td>
Assuming that the timestamp when the write data request A is received is 9:30, the corresponding number is 1, and then the write data request can be modified to become the write data request A 'according to the number.
Step E303: the production matrix writes the write data request A 'in the first cache, so that the information carried in the write data request A' is stored in the first cache. The information carried in the request for write data A 'includes the first number, the Identifier of the primary volume, the write address A and the data to be written A.
In the embodiment of the present invention, the first number may correspond to multiple requests for write data. Before modifying the current time period number in the CTPN, the first number is added to the information carried in all received write data requests.
ES 2 610 784 T3
It is understandable that after the write data request A has been received, a write data request B can be received and modified to the write data request B ', so that the write data request B' further includes the first number; and a write data request C may also be received and modified to a write data request C, so that the write data request C 'further includes the first number.
For example, after the write data request A ', the write data request B', and the write data request C 'have been written to the first cache, the information stored in the first cache can shown in table 2.
Table 2
<td>Number</td><td>Volume identifier</td><td>Writing direction</td><td>Data to be written</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction A</td><td>Data to be written A</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction B</td><td>Data to be written B</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction C</td><td>Data to be written C</td>
It should be noted that, in the embodiment of the present invention, it is assumed that the production matrix includes a data volume (which can be referred to as the primary volume), the identifiers of the data volumes transported in the request for data from Write A ', Write Data Request B', and Write Data Request C 'together constitute the primary volume identifiers. In another embodiment of the present invention, the production matrix may include multiple data volumes, and therefore the identifiers of the data volumes carried in the write data request A ', the write data request B' and the C 'write data request may be different. Also, Table 2 is just an example of storing information carried in cache write data requests. Optionally, the information can be stored in the form of a tree. The storage form is not limited here.
Taking Table 2 as an example, the numbers, volume identifiers and write addresses can be considered as indexes of Table 2. According to these indexes, it is possible to find the corresponding data to be written. When the indexes are the same, the data to be written for the indexes should also be the same. Therefore, when a new write data request is written, it is necessary to determine if the same information such as the number, volume identifier and write address of the new write data request is stored in memory. cache, and if so, the information carried in the new write data request is used to replace the old information. Understandably, when the write data request A, the write data request B 'and the write data request C' are written to the first memory, it is also necessary to determine whether their numbers, volume identifiers and addresses write are the same as the information already stored in the first cache, and since their numbers, volume identifiers and write addresses are different from the information already stored in the first cache, the write data request A ', the write data request B' and the write data request C 'can all be written to the first cache.
For example, if a request for write data D is received later and that request includes the primary volume identifier, the write address B, and the data to be written D, the request for write data D is modified at the request of write data D ', so that the request for write data D' further includes the first number. Therefore, when the write data request D 'is written to the cache, it is necessary to determine whether the same information as the number, the volume identifier and the write address of the write data request D' is stored in the first cache, and if so, the information carried in the write data request D 'is used to replace the old information. Since the number, volume identifier and write address carried in the write data request D 'are the same as the number, volume identifier and write address included in the write data request B' , in the first cache, the information from the write data request D 'will replace the information from the write data request B'.
ES 2 610 784 T3
In particular, after the write data request D 'has been written to the first cache, the information stored in the first cache can be shown in table 3.
Table 3
<td>Number</td><td>Volume identifier</td><td>Writing direction</td><td>Data to be written</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction A</td><td>Data to be written A</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction B</td><td>Data to be written D</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction C</td><td>Data to be written C</td>
Stage E304:
when a replication task is triggered, the production matrix modifies the current time period number included in the CTPN manager; for example, you can change the current time period number from 1 to 2.
In order to distinguish between the current time period number of the production matrix and the current time period number of the disaster recovery matrix, in the embodiment of the present invention, the current time period number of the Production matrix is referred to as a first current time period number, and the current time period number of the disaster recovery matrix is referred to as a second current time period number.
It is understandable that, after the first current time period number has been changed from 1 to 2, correspondingly, the number 2 will be added to the information carried in all subsequent received write data requests. For example, a request for write data E is received and it includes the identifier of the primary volume, the write address A and the data to be written E, and then the request for write data E is modified to request data write data E ', so that the write data request E' also includes the number 2. A request for write data F is received and it includes the identifier of the primary volume, a write address F and the data to be written F, and then the request for write data F is modified to request for write data F ', so that the write data request F' also includes the number 2. After the write data request E 'and the write data request F' are written to the first cache, the information stored in the first cache can be shown in Table 4.
Table 4
<td>Number</td><td>Volume identifier</td><td>Writing direction</td><td>Data to be written</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction A</td><td>Data to be written A</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction B</td><td>Data to be written D</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction C</td><td>Data to be written C</td>
<td> 2</td><td>Primary volume identifier</td><td>Writing direction A</td><td>Data to be written E</td>
<td> 2</td><td>Primary volume identifier</td><td>Writing direction F</td><td>Data to be written F</td>
ES 2 610 784 T3
Step E305: the disaster recovery matrix modifies the second current time period number included in its CTPN manager; for example, you can change it from 11 to 12.
In carrying out the present invention, the disaster recovery matrix may also include its own CTPN manager. When a production matrix replication task is triggered, the production matrix CTPN manager modifies the first current time period number, and the control center can also send a control signal to the recovery matrix before disasters, so the disaster recovery matrix also modifies the second current time period number included in your CTPN manager. Therefore, step E305 and step E304 are not subject to a time sequence.
Step E306A: the production matrix reads information carried in write data requests corresponding to the first number of the first cache.
In particular, according to the above description, the information carried in write data requests corresponding to the first number is shown in Table 3.
Step E306B: the production matrix obtains an identifier of a volume of data to be written to the disaster recovery matrix.
Step E306C: the production matrix generates new write data requests according to the identifier of the data volume and the information carried in the write data requests corresponding to the first number.
In particular, a request for write data A can be generated according to the identifier of the data volume, the write address A and the data to be written A; A request for write data D can be generated according to the identifier of the data volume, the write address B and the data to be written D; and a request for write data C can be generated according to the identifier of the data volume, the write address C and the data to be written C.
In another embodiment of the present invention, both the production matrix and the disaster recovery matrix can include multiple volumes of data, and thus the identifiers of the data volume included in the write data request A, the data request Write data D and the request for write data C may be different. However, the data volume identifiers in the disaster recovery matrix correspond to the data volume identifiers in the production matrix.
Step E307: the production matrix sends the new generated write data requests to the disaster recovery matrix.
In particular, the production matrix sends the write data request A, the write data request D and the write data request C to the disaster recovery matrix.
Step E308: the disaster recovery matrix modifies the received write data requests.
For example, the disaster recovery matrix can modify write data request A to write data write request A 'according to the second current time period number registered in the CTPN manager. In particular, a modification procedure may be to add the number 12 to the information carried in the write data request A.
Similarly, the number 12 may be added to the information carried in the write data request B and the write data request B will be modified to the write data request B '; and the number 12 may be added to the information carried in the write data request C, the latter being modified to the write data request C '.
Step E309: The disaster recovery array writes the modified write data requests to the second cache.
In particular, the information stored in the second cache can be shown in table 5.
ES 2 610 784 T3
Table 5
<td>Number</td><td>Volume identifier</td><td>Writing direction</td><td>Data to be written</td>
<td> 12</td><td>Secondary volume identifier</td><td>Writing direction A</td><td>Data to be written A</td>
<td> 12</td><td>Secondary volume identifier</td><td>Writing direction B</td><td>Data to be written D</td>
<td> 12</td><td>Secondary volume identifier</td><td>Writing direction C</td><td>Data to be written C</td>
Step E310: according to the existing write addresses in the write data requests, the disaster recovery matrix writes the data to be written to storage media corresponding to said write addresses.
Cache space is generally limited. Therefore, when its utilization rate reaches a specific threshold, it is necessary to write the cached data to a hard disk. In particular, the data to be written A is written to a storage medium corresponding to the write address A, the data to be written D is written to a storage medium corresponding to the write address B, and the data to be written C are written to a storage medium corresponding to the write address C.
Step E311: according to the write addresses existing in the write data requests, the production matrix writes the data to be written to storage means corresponding to said write addresses.
Similarly, when the production array cache space utilization rate reaches a specific threshold, the cache data must also be written to a hard disk. As can be seen from the above description, the following information is stored in the first cache.
<td>Number</td><td>Volume identifier</td><td>Writing direction</td><td>Data to be written</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction A</td><td>Data to be written A</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction B</td><td>Data to be written D</td>
<td> 1</td><td>Primary volume identifier</td><td>Writing direction C</td><td>Data to be written C</td>
<td> 2</td><td>Primary volume identifier</td><td>Writing direction A</td><td>Data to be written E</td>
<td> 2</td><td>Primary volume identifier</td><td>Writing direction F</td><td>Data to be written F</td>
In particular, for write data requests with the same volume identifier, the same write address but different numbers, the data to be written carried in a write data request with a smaller number is written first, and then the data to be written carried in a write data request with a larger number is written. For example, the data to be written D is written first and then the data to be written E. Or, the data to be written carried in a write data request is written directly with a larger number without writing the data to be written carried in a write data request with a smaller number. For example, the data to be written E is written directly.
Steps E310 and E311 are not time sequenced.
ES 2 610 784 T3
Step E312: when a replication task is triggered, the production matrix modifies the first current time period number included in its CTPN manager; for example, you can change the current time period number from 2 to 3.
Understandably, after the first current time period number in the production matrix CTPN is changed from 2 to 3, correspondingly, the number three will be added to the information carried in all received write data requests. by the production matrix afterwards.
Step E313: the disaster recovery matrix modifies the second current time period number included in its CTPN manager; For example, you can modify the second number of the current time period from 12 to 13.
It is understandable that after the second current time period number existing in the CTPN manager of the disaster recovery matrix is changed from 12 to 13, correspondingly, the number 13 will be added to the information carried in all requests write data received by the disaster recovery matrix later.
Step E314: the production matrix reads the information carried in write data requests corresponding to number 2, generates corresponding write data requests and sends the generated write data requests to the disaster recovery matrix.
In particular, as can be deduced from the above description, the information carried in the write data requests corresponding to number 2 includes the information carried in the write data request E and the information carried in the write data request F. Similarly, after the production matrix gets the data volume identifier from the disaster recovery matrix, the production matrix can generate a write data request E according to the data volume identifier, the write address A and the data to be written E, and generate a write data request F according to the identifier of the data volume, the write address F and the data to be written F. Therefore, the write data requests sent by the production matrix to the disaster recovery matrix are the write data request E and the data request from writing F.
It should be noted that, in the embodiment of the present invention, the production matrix does not send the write data requests to the disaster recovery matrix in a time sequence, and may also send the write data requests randomly. In particular, the production matrix can send the write data request E first and then the write data request F, or send the write data request F first and then the write data request E.
As can be deduced from the above description, at this time, the second current time period number of the CTPN manager of the disaster recovery matrix is 13. Therefore, after receiving the write data request E, the matrix For disaster recovery, you need to modify the write data request E to a write data request E 'that includes the number 13. Similarly, after receiving the write data request F, the disaster recovery matrix needs to modify the write data request F to a write data request F 'that includes the number 13.
Stage E315: The disaster recovery matrix is instructed to take over the server roles from the production matrix.
In carrying out the present invention, if the production array fails, the disaster recovery array needs to take over the server roles of the production array. Therefore, the disaster recovery matrix needs to meet the data consistency requirement.
As can be seen from step E314, in an ongoing replication task, the write data requests that the disaster recovery array should receive include the write data request E and the write data request F. The disaster recovery array will not take over server roles from the production array until the modified E write data request and F write data request are both successfully written to the second cache. When the disaster recovery matrix begins to take over server roles, it indicates that the ongoing replication cycle is complete and the data consistency requirement has been satisfied.
After the disaster recovery array has modified the write data request E to the write data request E 'and successfully written the write data request E' to the second cache but before the request for F 'write data is successfully written to the second cache, if the production array fails and the disaster recovery array begins to take over the server roles of the production array, the replication task in progress is not completed and the data consistency requirement has not been satisfied. Similarly, after the disaster recovery array has modified the write data request F to the write data request F 'and successfully written the write data request F' to the second cache but before the write data request E 'has been successfully written to the second cache, if the production array has a fault and the
ES 2 610 784 T3 disaster recovery array begins to take over server roles from the production array, the replication task in progress is not complete either, and the data consistency requirement is not satisfied.
In this case, the data in the disaster recovery array cache needs to be restored to a state where the replication task for number 12 is complete. In the following, it is assumed that the disaster recovery array has modified the write data request E to the write data request E 'and has successfully written the write data request E' to the second cache and that the write data request F 'was not successfully written to the second cache.
Step E316: The disaster recovery array obtains a write address carried in a write data request that has been successfully written to the second cache of the ongoing replication cycle.
As can be deduced from the above description, in the replication task corresponding to number 13, the write data request E 'has been successfully written to the second cache and the write address carried in the write data request E 'is write address A.
Step E317: According to the write address, the disaster recovery matrix checks the correspondence of the information carried in the write data requests corresponding to the number above to find the same write address as the write address A.
When the same write address as the write address is found, step E318 is executed. If not, the information carried in the write data requests corresponding to another preceding number (for example, number 11) is checked for correspondence until the same write address as the write address A carried in is found. the write data request E '.
As can be deduced from the above description, the information carried in write data requests corresponding to number 12 is shown in table 5. The write address carried in the write data request A is the same as the carried write address in the write data request E '.
Understandably, when the disaster recovery matrix includes multiple volumes of data and the information carried in each write data request includes the identifier of a data volume, both the write address and the volume identifier of the data correspond.
Step E318: generate a new write data request according to the information included in the found write address, and write the new write data request to the second cache, where the new write data request includes a number modified.
For example, the information read from the second cache includes the write address A and the data to be written A (and may also include the identifier of the secondary volume), and then a new write data request may be generated according to the information read and the number changed (for example, the number is changed from 13 to 14). After the new write data request is written to the second cache, a cache match is shown in Table 6.
Table 6
<td>Number</td><td>Volume identifier</td><td>Writing direction</td><td>Data to be written</td>
<td> 12</td><td>Secondary volume identifier</td><td>Writing direction A</td><td>Data to be written A</td>
<td> 12</td><td>Secondary volume identifier</td><td>Writing direction B</td><td>Data to be written D</td>
<td> 12</td><td>Secondary volume identifier</td><td>Writing direction C</td><td>Data to be written C</td>
<td> 13</td><td>Secondary volume identifier</td><td>Writing direction A</td><td>Data to be written E</td>
<td> 14</td><td>Secondary volume identifier</td><td>Writing direction A</td><td>Data to be written A</td>
When a server sends a read data request to the disaster recovery array, the server
ES 2 610 784 T3 identifier of the requested data volume is the identifier of the secondary volume and the write address is the write address A, the disaster recovery matrix will search the second cache for the data to be written with the identifier of the secondary volume and the write address A, corresponding to the last number, and will send the data to be written to the server. In the embodiment of the present invention, the data to be written A corresponding to the number 14 is sent from the second cache to the server.
In the embodiment of the present invention, the production matrix can send the information carried in the write data requests received from a cache to the disaster recovery matrix directly without the need to read related information from a data volume, thereby which increases the efficiency of data replication and ensures data consistency for the disaster recovery matrix.
In the prior art, data replication is carried out using snapshot data, where each time the production array executes a request for write data, it is first necessary to place the transported data in the request for data from write to a cache, read, according to a write address carried in the write data request, the old data stored in the address, and store the data in a data volume, and then write the data to the cache with the write address. A write data request response message is not returned until all these operations have been completed. Due to the additional stages of snapshot processing, the delay in processing a write data request is long. In the embodiment of the present edition, however, snapshot processing does not need to be carried out on the data, and therefore, although the write data requests are modified, the time taken is short. Therefore, compared to the prior art, the embodiment of the present invention reduces the delay in processing a request for write data.
Referring to Figure 5, this is a schematic structural diagram of a storage device 50 according to one embodiment of the present invention. As shown in Figure 5, the storage device includes a receive module 501, a read and write module 502, a current time period number manager 503, and a send module 504.
The receiving module 501 is configured to receive a first request for write data sent by a server, where the first request for write data carries data to be written and address information.
The address information can include a logical block address (logical unit address, LBA). When the storage device 50 includes multiple volumes of data, the address information may further include an identifier of a volume of data from the storage device 50.
The read and write module 502 is configured to add a first number to the data to be written and the address information and write the information to a cache, where the first number is a current time period number; and reading the data to be written and the address information corresponding to the first number from the cache.
The storage device 50 may include a current time period number manager 503, and the current time period number manager 503 stores the current time period number, where the current time period number may be a value. numeric, such as 0, 1 or 2, or a letter, such as a, b or c, which is not limited herein.
When the first request for write data is received, a first number is added to the data to be written and the address information carried in the first request for write data, where the first number is a value assigned by the number of current time period.
After the first number is added to the information carried in the first write data request, the modified information carried in the first write data request is written to the cache, so that the data to be written, the address information and the first number carried in the first write data request are all cached.
In addition, within a given period of time, another write data request may also be received, and it is also necessary to add the first number to the information carried in the write data request and write the information in the cache. It should be noted that before the current time period number changes, the first number is added to the information carried in all write data requests.
When a replication task is triggered, the storage device 50 can read the data to be written and the address information corresponding to the first number from the cache. It is understandable that there are multiple pieces of data to be written and address information corresponding to the first number.
ES 2 610 784 T3
A replication task means that the storage device 50 sends information carried in the write data requests that a volume of data receives within a period of time to a storage device in a disaster recovery center, where a same number as current time period number to information carried in all write data requests. A replication task can be started by a timer, or done manually, which is not limited here. The purpose of replication is to send the data to be written transported in write data requests received by the storage device 50 to the storage device at the disaster recovery center, so that the storage device at the disaster recovery center disaster recovery can take over the work of the storage device 50 when the storage device 50 fails. It is understandable that the address information (such as an LBA) carried in the request for write data must also be sent to the storage device at the disaster recovery center, where the LBA is used to indicate an address where the storage device is located. Storage in the disaster recovery center stores the data to be written. The storage device in the disaster recovery center has the same physical structure as the storage device 50. Accordingly, an LBA applicable to the storage device 50 is also applicable to the storage device in the disaster recovery center.
In carrying out the present invention, a replication task is specific to a volume of data on the storage device 50. When the storage device 50 includes multiple volumes of data, each volume of data corresponds to a replication task.
The current time period number manager 503 is configured to modify the current time period number in order to identify the information carried in a subsequent write data request.
When a replication task is triggered, the current time period number manager 503 needs to modify the current time period number. When a subsequent write data request is received, another number must be added to the information carried in the subsequent write data request, where said other number is a value assigned by the modified current time period number. Therefore, in the cache, the information carried in a request for write data that must be sent to the storage device at the disaster recovery center can be distinguished from the information carried in a request for write data that the device receives. 50 storage.
The dispatch module 504 is configured to send the data to be written and the address information to the storage device at the disaster recovery center.
The storage device 50 sends the data to be written and the address information corresponding to the first number read from the cache to the second storage device at the disaster recovery center.
In particular, the storage device 50 can send all the data to be read read and the address information to the storage device in the disaster recovery center directly. Or, the storage device 50 may, after obtaining data volume identifiers from the storage device at the disaster recovery center, generate new write data requests according to the data to be written and the address information. carried in each write data request and the identifiers of the data volumes of the storage device in the disaster recovery center, and then send the new write data requests to the storage device in the disaster recovery center.
In the embodiment of the present invention, after the storage device 50 receives a request for write data sent by a server, where the information carried in the request for write data includes data to be written and address information, the storage device 50 adds a first number to the data to be written and the address information and writes the information to the cache, where the first number is a current time period number. When a replication task is triggered, the storage device 50 reads the data to be written and the address information corresponding to the first number from the cache and sends the information to the storage device at the disaster recovery center. In addition, when a replication task is triggered, the storage device 50 modifies the current time period number, so that the storage device 50, when it subsequently receives a request for write data, adds the same number as the number of current time period modified to the information carried in the write data request. Therefore, in the cache, the information carried in a request for write data that must be sent to the storage device in the disaster recovery center is distinguished from the information carried in a request for write data that the device receives. 50 storage. This directly sends the information carried in a write data request from the cache to the storage device in the disaster recovery center. Since information is sent directly from the cache without the need to read it from a data volume, the data replication time is short, which increases the efficiency of data replication.
ES 2 610 784 T3
Referring to Figure 6, this is a schematic structural diagram of a storage device 60 in accordance with one embodiment of the present invention. As shown in Figure 6, the storage device 60 includes a receive module 601, a search module 602, and a write module 604.
The receiving module 601 is configured to receive address information sent by a storage device 50.
In particular, the storage device 60 can receive data to be written and address information sent by the storage device 50; or the storage device 60 may receive a request for write data sent by the storage device 50, where the request for write data includes data to be written and address information, where the address information may be an address of logical block (logical unit address, LBA). When the storage device 60 includes multiple volumes of data, the address information may further include an identifier of a volume of data from the storage device 60. Understandably, there could be more than one piece of address information.
After receiving the data to be written and the address information, the storage device 60 adds the same number as the current time period number to the data to be written and the address information and writes the information to a memory. cache, so that the same number as the current time period number, the data to be written, and the address information are cached.
It should be noted that the storage device 60 may also include a current time period number manager 603, and the current time period number manager 603 stores the current time period number. The current time period number can be a numerical value, such as 0, 1, or 2, or a letter, such as a, b, or c, which is not limited herein. The current time period number here may not be related to the current time period number in the storage device 50.
The search module 602 is configured so that when it is determined that the storage device 50 has failed, the storage device 60 obtains, according to the address information, the data to be written corresponding to a first number, where the Address information corresponding to the first number is the same as the received address information, and the first number is a number that precedes the current time period number.
Generally, if both the storage device 50 and the storage device 60 operate normally, the storage device 60 can receive information carried in all write data requests sent by the storage device 50, add the same number as the number of current time period to the information carried in each write data request, and store the information in the cache. However, if the storage device 50 fails, the storage device 60 may only receive a portion of the data to be written corresponding to the current time period number from the storage device 50. In this case, the data stored by the storage device 60 is possibly incorrect, and if the storage device 60 takes over the work of the storage device 50 directly, the consistency of the data cannot be guaranteed. For example, if a server sends a request for read data to the storage device 60 at that time, requesting to read data stored in the address information (such as an LBA), the storage device 60 will look for a last number corresponding to address information and then send the data to be written corresponding to the current time period number to the server, but that data will not be correct. Therefore, in this case, it is necessary to restore the data corresponding to a number earlier than the current time period number of the storage device 60 from the existing data in the cache memory of the storage device 60.
In particular, it can be determined whether the storage device 50 has failed by a method whereby a control center sends a signal to the storage device 60, where the signal is used to indicate that the storage device 50 has failed and that the storage device 60 needs to take over the server functions of the storage device 50.
As a general rule, when a replication task is complete, the control center can send a replication success indication to both the storage device 50 and the storage device 60. If the storage device 60 does not receive the indication, this means that the replication task in progress has not completed. Completion of a replication task means that the storage device 50 has sent information carried in all write data requests corresponding to the current time period number to the storage device 60 and the storage device 60 has finished receiving the information.
When the storage device 60 determines that the storage device 50 has failed, if the current replication task is complete, the storage device 60 can take over the work of the storage device 50 directly, thus ensuring data consistency. This situation goes beyond what is stated by the realization of the present invention.
ES 2 610 784 T3
However, if the replication task in progress is not completed, it is necessary to restore the data corresponding to the number before the current time period number of the storage device 60 from the existing data in the cache memory of the storage device 60. .
A specific restore mode is as follows: According to the received address information, search for address information corresponding to a number earlier than the current time period number for the same address information as the received address information, if the same address information is not found, continue searching address information corresponding to another number above until the address information is found, and then get the data to be written corresponding to the number.
The writing module 604 is configured to add a second number to the data to be written and the address information corresponding to the first number and write the information to a cache.
The second number is a number obtained by modifying the current time period number and also the last number stored in the cache in this embodiment. When a server sends a request for read data to the storage device 60, requesting to read data stored in the address information (such as an LBA), the storage device 60 learns by searching that the last number corresponding to the address information address is the second number and sends the data to be written corresponding to the second number to the server. This ensures consistency of the data.
In the embodiment of the present invention, the storage device 60 receives address information sent by the storage device 50, and when the storage device 50 fails, it obtains the data to be written corresponding to a number before the period number. of current time, adds a second number to the data to be written and the address information corresponding to the number before the current time period number, and stores the information in a cache. This ensures consistency of the data.
Referring to Figure 7, one embodiment of the present invention offers a storage device 700. Said storage device 700 may include a storage device known in the prior art. The embodiment of the present invention does not limit the specific implementation of the storage device 700. The storage device 700 includes:
A processor 710, a communication interface 720, a memory 730, and a communication bus 740.
Processor 710, communication interface 720, and memory 730 communicate with each other via communication bus 740.
Communication interface 720 is configured to communicate with a network element, eg, a server or a switch.
Processor 710 is configured to run a 732 program.
In particular, the program 732 may include a program code, and the program code includes an instruction for the operation of the computer.
Processor 710 may be a central processing unit CPU, or an ASIC application specific integrated circuit, or be configured as one or more integrated circuits that implement embodiments of the present invention.
Memory 730 is configured to store program 732. Memory 730 can include high speed RAM, or non-volatile memory, eg, at least one magnetic disk memory.
The 732 program may include, in particular:
a receiving module 501, configured to receive a first request for write data sent by a server, wherein the first request for write data carries data to be written and address information;
a read and write module 502, configured to add a first number to the data to be written and address information and write the information to a cache, where the first number is a current time period number, and read the data to be written and the address information corresponding to the first number from the cache;
a current time period number manager 503, configured to modify the current time period number to identify the information carried in a subsequent write data request; and a dispatch module 504, configured to send the data to be written and the address information to a storage device at the disaster recovery center.
ES 2 610 784 T3
For specific implementations of the 732 program modules, reference may be made to the corresponding modules in the embodiment illustrated in Figure 5, which are not described further herein.
Referring to Figure 8, one embodiment of the present invention offers a storage device 800.
Said storage device 800 may include a storage device known in the prior art. The embodiment of the present invention does not limit the specific implementation of the storage device 800. The storage device 800 includes:
a processor 810, a communication interface 820, a memory 830, and a communication bus 840.
Processor 810, communication interface 820, and memory 830 communicate with each other via communication bus 840.
Communications interface 820 is configured to communicate with a network element, for example, a server or a switch.
Processor 810 is configured to execute a program 832.
In particular, the program 832 may include a program code, and the program code includes an instruction for the operation of the computer.
Processor 810 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or be configured as one or more integrated circuits that implement embodiments of the present invention.
Memory 830 is configured to store program 832. Memory 830 can include high speed RAM or non-volatile memory, eg, at least one magnetic disk memory.
The 832 program may include, in particular:
a receiving module 601, configured to receive address information sent by a storage device 50;
a search module 602, configured for when it is determined that the storage device has failed, a storage device 60 obtains, according to the address information, the data to be written corresponding to a first number, where the information of address corresponding to the first number is the same as the received address information and the first number is a number before the current time period number; and a writing module 604, configured to add a second number to the data to be written and the address information corresponding to the first number and write the information to a cache.
For specific implementations of the modules in program 832, reference may be made to the corresponding modules in the embodiment illustrated in Figure 6, which is not further described herein.
It is possible for those skilled in the art to clearly understand that, for the purpose of a convenient and brief description, regarding the detailed operating process of the device and module discussed above, reference may be made to the corresponding process in the embodiments of method described above, whereby the details are not restated here.
The following describes an application of the method offered by this embodiment of the present invention to a scenario that includes at least two disaster recovery centers.
As shown in Figure 9, a storage system includes a production center and at least two disaster recovery centers.
The production center includes a production server, a connection device, and a production matrix. A system architecture of a disaster recovery center is similar to that of a production center, and includes a disaster recovery server, a plug-in device, and a disaster recovery matrix. The production center and disaster recovery center can perform data transmission via Internet Protocol (IP) or Fiber Channel (FC). There may be a control center between the production center and the disaster recovery center. The control center can be installed at the production center or disaster recovery center, or installed on a third-party appliance between the production center and the disaster recovery center. The control center is configured to send a signal to the disaster recovery matrix when the production matrix fails, so that the disaster recovery matrix takes over the server functions of the production matrix.
ES 2 610 784 T3
The production server and the disaster recovery server can be any computing device known in the prior art, such as servers and desktops. An operating system and other applications are installed inside a server.
The connecting device can include any interface, known in the prior art, between a storage device and a server, such as a fiber switch or other currently available switches.
Both the production array and the disaster recovery array can be a storage device known in the prior art, such as a redundant array of inexpensive disks (RAID), a concatenation of disks (JBOD), and one or more disk drives. interconnected disk, such as a tape library, a tape storage device of one or more storage drives, where said interconnected disk drives are a direct access storage device (DASD).
Production array storage space can hold multiple volumes of data. A data volume is logical storage space formed by allocating physical storage space. For example, a data volume can be a logical unit number (LUN), or a file system. In this embodiment of the invention, the disaster recovery matrix has a structure similar to that of the production matrix.
To ensure data security at the production site, a plurality of disaster recovery centers should generally be installed. The production center data is replicated to the plurality of disaster recovery centers, so that when both the production center and one of the disaster recovery centers experience a disaster, another disaster recovery center can continue to store the data and these are not lost. In this embodiment of the present invention, a task whereby the production array replicates data that it stores in a data volume in a disaster recovery array is referred to as a replication relationship (also referred to as a pair). Each replication relationship corresponds to a unique identifier (for example, identifier ID). Before a disaster occurs, because the production array continuously receives requests for write data from the server, the production array also needs to continually replicate the data that it stores in the disaster recovery array. Consequently, a replication relationship can be divided into a certain number of time periods, and a task by which the production matrix sends, within each time period, the information carried in a request for write data received by a Data volume to the disaster recovery matrix is referred to as a replication task.
The production array can include a current time period number manager that stores the current time period numbers. A current time period number can be a numerical value, such as 0, 1, or 2, or a letter, such as a, b, or c, which is not limited herein. It should be noted that the current time period number is applicable to all disaster recovery matrices. Each time a replication task is triggered, the current time period number is modified.
The fact that the current time period number is 1 is used as an example. When the production array receives a request for write data, a numeric value number 1 is added to the data to be written and the address information carried in the request for write data, and then the data to be written and the address information carried in the write data request together with the number with numeric value 1 are all written to a cache.
When a replication task is triggered for a first disaster recovery matrix, the production matrix modifies the current time period number from a numeric value 1 to a numeric value 2, so that a number with a numeric value is added 2 to the data to be written and the address information carried in a subsequently received write data request. The data to be written and the address information for the number with numeric value 1 are then sent to the first disaster recovery matrix.
When a replication task is triggered for a second disaster recovery matrix, the production matrix modifies the current time period number from a numeric value 2 to a numeric value 3, so that a number with a numeric value is added 3 to the data to be written and the address information carried in a subsequently received write data request.
When a replication task is triggered for a third disaster recovery matrix, the production matrix modifies the current time period number from a numeric value 3 to a numeric value 4, so that a number with a numeric value is added 4 to the data to be written and the address information carried in a subsequently received write data request.
However, when the replication task for the first disaster recovery matrix is triggered again, the production matrix modifies the current time period number from a numeric value 4 to a numeric value 5, so that it is added a number with numerical value 5 to the data to be
ES 2 610 784 T3 be written and the address information conveyed in a subsequently received write data request. It is assumed that the production matrix records only the current time period number. Therefore, at this time, according to this, only the data to be written and the address information corresponding to number 4 are sent to the first disaster recovery center. Accordingly, the data to be written and the address information corresponding to the number with numerical value 2 and the data to be written and the address information corresponding to the number with numerical value 3, and the data stored in the first array. recovery are inconsistent with those found in the production matrix. Similarly, the second and third disaster recovery matrices also face the problem that the received data to be written and the address information are incomplete.
Referring to Figure 10, this shows an embodiment of the data replication method proposed by the present invention to solve the problem. The method applies to a production matrix that corresponds to at least two disaster recovery matrices. In this embodiment of the present invention, for ease of description, the production array is referred to as a first storage device and one of the at least two disaster recovery arrays as a second storage device. It should be noted that reference will possibly be made to the embodiments shown in Figures 2 to 4 for the specific execution of the following steps.
The method includes the following stages:
Step 41: When a current replication task is triggered, the first storage device reads a current time period number.
The replication task can be triggered by a timer, or done manually, or triggered by other triggering procedures, which is not limited here. When the replication task is triggered, the first storage device can read the current time period number from a current time period number manager. It should be noted that when the replication task is triggered, the first storage device modifies the current time period number at a trigger point, and here, the current time period number read by the first storage device is the modified current time period number. For ease of description, the current time period number prior to modification is referred to in the following steps as a historical time period number.
Step 42: read a second number, where the second number is a number corresponding to a last completed replication task that is correlated to the current replication task.
In this embodiment of the present invention, the fact that the last completed replication task is correlated with the current replication task means that the current replication task and the last completed replication task belong to the same replication relationship, and therefore From the above description, it can be deduced that each replication relationship has a unique identifier. When the replication task is triggered, the first storage device can receive the identifier and read the second number according to that identifier.
In particular, when the current replication task is triggered by a timer, the identifier can be carried in the timer; and when the current replication task is triggered manually, the first storage device can receive the identifier as a token or in other ways.
In this embodiment of the present invention, each time a replication task is completed, a number corresponding to the completed replication task is logged. Optionally, only a number corresponding to the last completed replication task can be stored, and that number is updated when a next replication task completes; or, the numbers corresponding to all completed replication tasks can be stored, which is not limited here.
Understandably, a number corresponding to the last completed replication task is recorded in each replication relationship.
Step 43: determine, according to the current time period number and the second number, a first number, where the first number is a number before the current time period number when the replication task is triggered and the first number is a number after the second number.
For example, the current time period number is a numeric value 5 and the second number is a numeric value 2, and any number in a range (2-5) can be determined as the first number. It should be noted that the interval is an open interval that excludes the numeric value 2 and the numeric value 5.
Step 44: replicating data to be replicated and address information of the data to be replicated that is stored in the cache and corresponding to the first number on a second storage device.
ES 2 610 784 T3
In particular, the data to be replicated and the address information of the data to be replicated corresponding to the first number are read from the cache and the data to be replicated and the address information of the data to be replicated. replicates are sent to the second storage device.
Optionally, the first storage device can directly send the data to be replicated and the address information of the data to be replicated to the second storage device, or generate a request for write data according to the data to be replicated. replicate and address information of the data to be replicated and send the write data request to the second storage device.
Optionally, when a series of numbers satisfies the condition of being before the current time period number at the time of triggering the current replication task and after the number corresponding to the last completed replication task, and all numbers correspond to the same address information, only address information and data to be replicated corresponding to a last number can be sent to the second storage device. This last number is the most recently generated number. For example, the current time period number is assumed to be modified by adding 1 at a time, and the last number is the number with the highest numerical value.
In this embodiment of the present invention, when the current replication task is triggered, the first storage device determines the first number according to the current time period number and the second number, where the second number is a number corresponding to the last replication task before the current replication task and the first number is a number before the current time period number at the time the current and subsequent replication task was triggered to the second number, and replicates the data to be replicated and the address information of the data to be replicated that is stored in the cache and corresponds to the first number in the second storage device. Since all numbers between the second number and the current time period number can be determined as the first number, as long as a number is determined as the first number, the data to be replicated and the address information of the data to be have to be replicated corresponding to the number that can be replicated on the second storage device. Therefore, even if the current time period number changes when a replication task is triggered for another disaster recovery array, the first storage device can still find, according to the second number, the data that are to be replicated and the address information of the data to be replicated that is not replicated on the second storage device, and replicate them to the second storage device, thus ensuring the integrity of the replication.
Optionally, in the stated embodiment, before the current replication task is triggered, the method further includes:
Receiving a first request for write data, wherein said first request for write data includes the data to be replicated and the address information of the data to be replicated; and adding the first number to the data to be replicated and the address information of the data to be replicated and writing it to the cache, where the first number is a historical time period number. In particular, the historical time period number refers to a current time period number corresponding to a time when the first request for write data was received. It can be deduced from the embodiments shown in Figures 2 to 4 that when a replication task is triggered, the historical time period number must be changed to a current time period number.
Optionally, the method can also include:
receiving a second write data request, wherein said second write data request includes destination data and address information of the destination data;
adding a third number to the destination data and the address information of the destination data;
determining if the third number is the same as the first number;
when the third number is the same as the first number, determining whether the address information of the destination data is the same as the address information of the data to be replicated;
when the address information of the destination data is the same as the address information of the data to be replicated, replacing the cached data to be replicated with the destination data; and when the address information of the destination data is not the same as the address information of the data to be replicated, write, in the cache, the destination data and the address information of the destination data after adding the third number.
When the third number is not the same as the first number, the destination data and address information of
ES 2 610 784 T3 the destination data after adding the third number is written to the cache.
Referring to Figure 11, this is a schematic structural diagram of a storage device according to an embodiment of the present invention. As shown in Figure 11, the storage device includes:
a read and write module 52, a determination module 53, and a replication module 54.
The read-write module 52 is configured to read a current time period number when a current replication task is triggered, and read a second number, where the second number is a number corresponding to a last completed replication task that is mapped to the current replication task.
The determining module 53 is configured to determine, in accordance with the current time period number and the second number, a first number, where the first number is a number prior to the current time period number at the time it is triggered the current replication task and the first number is a number after the second number.
The replication module 54 is configured to replicate the data to be replicated and the address information of the data to be replicated stored in the cache and corresponding to the first number on a second storage device.
In the embodiment of the present invention, when the current replication task is triggered, the first storage device determines the first number according to the current time period number and the second number, where the second number is a number corresponding to the last replication job completed before the current replication job, the first number is a number before the current time period number at the time the current replication task was triggered and after the second number, and replicates the data to be replicated and the address information of the data to be replicates cached and corresponding to the first number on the second storage device. Since all numbers between the second number and the current time period number can be determined as the first number, as long as a number is determined as the first number, the data to be replicated and the address information of the data to be have to be replicated corresponding to the number that can be replicated on the second storage device. Therefore, even if the current time period number is changed when a replication task corresponding to the disaster recovery matrix is triggered, the first storage device can still find, according to the second number, the data that are to be replicated and the address information of the data to be replicated that is not replicated on the second storage device, and replicate them to the second storage device, thus ensuring the integrity of the replication.
Optionally, the storage device may further include a registration module 55, configured to register the second number.
Optionally, the fact that the last completed replication task is mapped to the current replication task means that the current replication task and the last completed replication task belong to the same replication relationship; and the storage device further includes a receiving module 51.
The receiving module 51 is configured to receive an identifier corresponding to the replication relationship.
The read and write module is configured, in particular, to read, according to the identifier, the second number corresponding to the current replication task.
Optionally, the receiving module 51 is configured to receive a first request for write data before the current replication task is triggered, where the first request for write data includes the data to be replicated and the address information of the data to be replicated; and the read and write module 52 is further configured to add the first number to the data to be replicated and the address information of the data to be replicated, and write it to the cache, where the first number is a number historical time period. The current time period number is formed by modifying the historical time period number.
Optionally, the replication module 54 is configured, in particular, for when the address information corresponds to a plurality of numbers, determining a last number of these numbers corresponding to the address information as the first number; and replicating the data to be replicated and the address information of the data to be replicated stored in the cache and corresponding to the first number in the second storage device.
The storage device provided by this embodiment of the present invention is used to execute the data replication method described in the disclosed embodiment. The description of the
ES 2 610 784 T3 implementation of the method to obtain a detailed description of the functions of the modules; no further details are provided here.
As can be seen in Figure 12, this shows a storage device provided by an embodiment of the present invention, including the following:
A processor 101, a memory 102, a system bus 105 (bus for short), and a communication interface 103. Processor 101, memory 102, and communication interface 103 are connected to and communicate with each other via system bus 105.
Processor 101 may be a single or multi-core central processing unit, or a specific integrated circuit, or be configured with one or more integrated circuits that implement embodiments of the present invention.
The memory 102 can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
Communication interface 103 is configured to communicate with a storage device.
Memory 102 is configured to store an executable instruction 1021 from the computer. In particular, the executable instruction 1021 of the computer may include program code.
When a computer is running, the processor 101 executes the computer's executable instruction 1021 and can execute the method process illustrated in Figure 10.
In the various embodiments set forth in the present application, it should be understood that the described device and method can be augmented in other ways. For example, the embodiment of the device described is merely exemplary. For example, the module division is merely a division of logical functions and in the actual implementation there may be other divisions. For example, a plurality of modules or components can be combined or integrated into another device, or some functions can be ignored or not carried out. Furthermore, the mutual couplings or direct couplings or communication connections shown or exposed can be implemented using some interfaces. Indirect communication links or couplings between devices or modules can be implemented electronically, mechanically, or in other ways.
The modules described as separate parts may or may not be physically separated, and the parts shown as modules may or may not be physical sub-modules, they may be located in one position, or they may be distributed over a plurality of network sub-modules. Some or all of the modules can be selected to achieve the objectives of the realization solution according to the actual needs.
Furthermore, the function modules in embodiments of the present invention may be integrated into one processing module, or each of the modules may physically exist alone, or two or more modules may be integrated into one module.
Those of ordinary skill in the art can understand that all or part of the steps of the disclosed embodiments can be implemented by hardware, or can be implemented by a program that instructs the corresponding hardware. The program may be stored on a computer-readable storage medium. The storage medium can be a read-only memory, a magnetic disk, or an optical disk.
Lastly, it should be noted that the embodiments set forth are merely descriptive for the technical solutions of the present invention and are not intended to limit it.
Contents14
9 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9
33 members in 13 offices
Priority claims9
| Document | Office | Kind | Date |
|---|---|---|---|
| 2013080203 | China | W | |
| 2013080203 | China | W | |
| PCTCN2013080203 | World Intellectual Property Organization (WIPO) | – | |
| 2013087229 | China | W | |
| 2013087229 | China | W | |
| PCTCN2013080203 | – | – | – |
| PCTCN2013087229 | – | – | – |
| WO2013CN80203 | – | – | – |
| WO2013CN87229 | – | – | – |
Members33
| Document | Office | Kind | |
|---|---|---|---|
| CN103649901A | China | A | |
| CA2868247A1 | Canada | A1 | |
| WO2015010327A1 | World Intellectual Property Organization (WIPO) | A1 | |
| WO2015010394A1 | World Intellectual Property Organization (WIPO) | A1 | |
| AU2013385792A1 | Australia | A1 | |
| EP2849048A1 | European Patent Office (EPO) | A1 | |
| KR20150035507A | Republic of Korea | A | |
| CN104520802A | China | A | |
| US2015113317A1 | United States of America | A1 | |
| EP2849048A4 | European Patent Office (EPO) | A4 | |
| JP2015527670A | Japan | A | |
| KR101602312B1 | Republic of Korea | B1 | |
| US9311191B2 | United States of America | B2 | |
| AU2013385792B2 | Australia | B2 | |
| RU2014145359A | Russian Federation | A | |
| AU2016203273A1 | Australia | A1 | |
| US2016188240A1 | United States of America | A1 | |
| RU2596585C2 | Russian Federation | C2 | |
| EP2849048B1 | European Patent Office (EPO) | B1 | |
| CA2868247C | Canada | C | |
| CN104520802B | China | B | |
| ES2610784T3This record | Spain | T3 | |
| EP3179359A1 | European Patent Office (EPO) | A1 | |
| CN107133132A | China | A | |
| EP3179359B1 | European Patent Office (EPO) | B1 | |
| JP2018041506A | Japan | A | |
| ES2666580T3 | Spain | T3 | |
| DK3179359T3 | Denmark | T3 | |
| JP6344798B2 | Japan | B2 | |
| NO3179359T3 | Norway | T3 | |
| HUE037094T2 | Hungary | T2 | |
| US10108367B2 | United States of America | B2 | |
| CN107133132B | China | B |
Numbers
- Publication
- 2610784
- Publication, DOCDB
- 2610784
- Publication, EPODOC
- ES2610784T
- Application
- 13878530
- Application, DOCDB
- 13878530
- Application, EPODOC
- ES20130878530T
Titles2
- Spanish
- Método de envío de datos, método de recepción de datos y dispositivo de almacenamiento
- English
- Data sending method, data reception method and storage device
Classification
- CPC, 14
- G06F11/2094
- G06F11/2064
- G06F3/065
- G06F11/2097
- G06F2201/82
- G06F12/0866
- G06F2212/1032
- G06F2212/466
- G06F3/06
- G06F11/2074
- G06F11/1451
- G06F11/1464
- G06F2201/84
- G06F2201/885
- IPC, 4
- G06F3 06
- G06F11 20
- G06F12 0866
- H04L69 40