WO2015085529A1 - Data replication method, data replication device and storage device - Google Patents

Data replication method, data replication device and storage device Download PDF

Info

Publication number
WO2015085529A1
WO2015085529A1 PCT/CN2013/089173 CN2013089173W WO2015085529A1 WO 2015085529 A1 WO2015085529 A1 WO 2015085529A1 CN 2013089173 W CN2013089173 W CN 2013089173W WO 2015085529 A1 WO2015085529 A1 WO 2015085529A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
data
copied
copy
information
Prior art date
Application number
PCT/CN2013/089173
Other languages
French (fr)
Chinese (zh)
Inventor
陈怡佳
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2013/089173 priority Critical patent/WO2015085529A1/en
Priority to CN201380002386.3A priority patent/CN104363977A/en
Publication of WO2015085529A1 publication Critical patent/WO2015085529A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2082Data synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2058Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring using more than 2 mirrored copies
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2071Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring using a plurality of controllers
    • G06F11/2074Asynchronous techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2071Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring using a plurality of controllers
    • G06F11/2076Synchronous techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Provided are a data replication method, a data replication device and a storage device. The method comprises: receiving, by a second storage device, replication progress information sent by a first storage device, the replication progress information being used for indicating data which has already been replicated by the first storage device to a third storage device; when the first storage device fails, according to the replication progress information and data which is to be replicated and is saved by the second storage device, determining data which has not been replicated in the data to be replicated, the data to be replicated being data to be replicated by the first storage device to third storage device; and sending the data which has not been replicated to the third storage device. The efficiency of data replication can be improved.

Description

数据复制方法、 数据复制装置和存储设备 技术领域  Data replication method, data replication device and storage device
本发明涉及存储技术, 尤其涉及一种数据复制方法、 数据复制装置和 存储设备。  The present invention relates to storage technologies, and more particularly to a data replication method, a data replication device, and a storage device.
背景技术 Background technique
传统的两地三中心的数据容灾,由部署在两个地方的三个数据中心组成。 例如, 三个数据中心分别是数据中心 、 数据中心 B和数据中心 C。 其中, 数据 中心 A和数据中心 B位于同一个城市的两个不同位置, 其距离往往在 1 00km以 内。 而数据中心 C则位于较远距离 (如 1 000km )之外的另一个城市。  The traditional two-site data center disaster recovery consists of three data centers deployed in two places. For example, the three data centers are Data Center, Data Center B, and Data Center C. Among them, data center A and data center B are located at two different locations in the same city, and the distance is often within 100 km. Data Center C is located in another city that is far away (eg, 1 000km).
数据中心 A和数据中心 B之间由于距离较近, 可采用同步远程复制的方 式进行数据容灾, 因此数据中心 A和数据中心 B中保存的数据是一致的。 数 据中心 A和数据中心 C之间由于距离较远, 通常采用异步远程复制的方式进 行数据容灾。  Because data center A and data center B are close to each other, synchronous remote replication can be used for data disaster recovery. Therefore, data stored in data center A and data center B are consistent. Due to the long distance between Data Center A and Data Center C, asynchronous remote replication is usually used for data disaster recovery.
然而, 若数据中心 A发生灾难, 那么数据中心 A和数据中心 C之间的复 制链路中断, 数据中心 B可以以异步远程复制的方式重新复制所有数据给数 据中心 C。  However, if data center A experiences a disaster, the replication link between data center A and data center C is interrupted, and data center B can re-copy all data to data center C in an asynchronous remote replication manner.
发明内容 Summary of the invention
本发明实施例提供了一种数据复制方法、 数据复制装置和存储设备, 以提高数据复制的效率。  Embodiments of the present invention provide a data replication method, a data replication device, and a storage device to improve data replication efficiency.
本发明实施例第一方面提供了一种数据复制方法, 所述方法应用于存 储系统中, 所述存储系统包括至少三个存储设备, 其中第一存储设备和第 二存储设备中保存相同的数据, 所述方法包括:  A first aspect of the embodiments of the present invention provides a data replication method, where the method is applied to a storage system, where the storage system includes at least three storage devices, where the first storage device and the second storage device store the same data. , the method includes:
所述第二存储设备接收所述第一存储设备发送的复制进度信息, 所述 复制进度信息用于指示所述第一存储设备已复制到第三存储设备的数据; 当所述第一存储设备发生故障时, 根据所述复制进度信息和所述第二 存储设备保存的待复制数据确定所述待复制数据中尚未复制的数据, 所述 待复制数据是所述第一存储设备待复制到所述第三存储设备的数据; The second storage device receives the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied data to the third storage device; Determining, in the data to be copied, the data that has not been copied in the data to be copied according to the replication progress information and the data to be copied saved by the second storage device, where the data to be copied is the first a data to be copied by the storage device to the third storage device;
将所述尚未复制的数据发送给所述第三存储设备。  Transmitting the unreplicated data to the third storage device.
在第一方面的第一种实施方式中, 所述第二存储设备接收第一存储设 备发送的复制进度信息包括:  In a first implementation manner of the first aspect, the receiving, by the second storage device, the replication progress information sent by the first storage device includes:
所述第二存储设备接收所述第一存储设备发送的包含进度地址字段 的消息, 所述进度地址字段用于表示所述复制进度信息。  The second storage device receives a message that is sent by the first storage device and includes a progress address field, where the progress address field is used to indicate the copy progress information.
结合第一方面或第一方面的第一种实施方式, 在第一方面的第二种实 施方式中, 所述第二存储设备中保存有复制数据信息, 所述复制数据信息 用于获得所述待复制数据。  With reference to the first aspect, or the first implementation manner of the first aspect, in the second implementation manner of the first aspect, the second storage device is configured with the saved data information, where the copied data information is used to obtain the Data to be copied.
结合第一方面的第二种实施方式, 在第一方面的第三种实施方式中, 还包括: 当接收到所述第一存储设备发送的复制启动信息时, 根据所述复 制启动信息生成所述复制数据信息。  With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the method further includes: when receiving the replication startup information sent by the first storage device, generating, according to the replication startup information Copy data information.
结合第一方面的第二种实施方式, 在第一方面的第四种实施方式中, 还包括: 接收所述第一存储设备发送的所述复制数据信息。  With reference to the second implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the method further includes: receiving the copy data information that is sent by the first storage device.
结合第一方面的以上任一种实施方式, 在第一方面的第五种实施方式 中, 当所述第一存储设备发生故障时, 还包括: 接收所述第三存储设备发 送的检测信息, 所述检测信息用于指示所述第一存储设备发生故障。  With reference to any one of the above embodiments, in a fifth implementation manner of the first aspect, when the first storage device fails, the method further includes: receiving detection information sent by the third storage device, The detection information is used to indicate that the first storage device is faulty.
本发明实施例第二方面提供了一种数据复制方法, 所述方法应用于存 储系统中, 所述存储系统包括至少三个存储设备, 其中第一存储设备和第 二存储设备中保存相同的数据, 所述方法包括:  A second aspect of the embodiments of the present invention provides a data replication method, where the method is applied to a storage system, where the storage system includes at least three storage devices, where the first storage device and the second storage device store the same data. , the method includes:
所述第二存储设备接收所述第一存储设备发送的复制进度信息, 所述 复制进度信息用于指示所述第一存储设备已复制到第三存储设备的数据; 根据所述复制进度信息将第一复制数据信息修改为第二复制数据信 息; 当所述第一存储设备发生故障时, 根据所述第二复制数据信息和所述 第二存储设备保存的待复制数据确定所述待复制数据中尚未复制的数据, 所述待复制数据是所述第一存储设备待复制到所述第三存储设备的数据; 将所述尚未复制的数据发送给所述第三存储设备。 The second storage device receives the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied data to the third storage device; according to the replication progress information Modifying the first copy data information into the second copy data information; Determining, in the data to be copied, the data that has not been copied in the data to be copied according to the second copy data information and the data to be copied saved by the second storage device, where the data to be copied is Decoding data of the first storage device to the third storage device; and transmitting the unreplicated data to the third storage device.
在第二方面的第一种实施方式中, 所述第二存储设备接收第一存储设 备发送的复制进度信息包括:  In a first implementation manner of the second aspect, the receiving, by the second storage device, the replication progress information sent by the first storage device includes:
所述第二存储设备接收所述第一存储设备发送的包含进度地址字段 的消息, 所述进度地址字段用于表示所述复制进度信息。  The second storage device receives a message that is sent by the first storage device and includes a progress address field, where the progress address field is used to indicate the copy progress information.
结合第二方面的第一种实施方式, 在第二方面的第二种实施方式中, 所述第一复制数据信息用于获得接收所述复制进度信息之前, 最近一次尚 未复制到所述第三存储设备的数据。  With reference to the first implementation manner of the second aspect, in a second implementation manner of the second aspect, the first copy data information is used to obtain the third time before the receiving the copy progress information Storage device data.
结合第二方面的第二种实施方式, 在第二方面的第三种实施方式中, 还包括: 当接收到所述第一存储设备发送的复制启动信息时, 根据所述复 制启动信息生成第一复制数据信息。  With reference to the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the method further includes: when receiving the replication startup information sent by the first storage device, generating, according to the replication startup information A copy of the data information.
在第二方面的第四种实施方式中, 还包括: 接收所述第一存储设备发 送的所述复制数据信息。  In a fourth implementation manner of the second aspect, the method further includes: receiving the copy data information sent by the first storage device.
结合第二方面的以上任一种实施方式, 在第二方面的第五种实施方式 中, 当所述第一存储设备发生故障时, 还包括: 接收所述第三存储设备发 送的检测信息, 所述检测信息用于指示所述第一存储设备发生故障。  With reference to any one of the above embodiments, in a fifth implementation manner of the second aspect, when the first storage device fails, the method further includes: receiving detection information sent by the third storage device, The detection information is used to indicate that the first storage device is faulty.
本发明实施例第三方面提供了一种数据复制装置, 所述数据复制装置 位于第二存储设备中, 包括:  A third aspect of the embodiments of the present invention provides a data replication apparatus, where the data replication apparatus is located in a second storage device, and includes:
接收模块, 用于接收第一存储设备发送的复制进度信息, 所述复制进 度信息用于指示所述第一存储设备已复制到第三存储设备的数据;  a receiving module, configured to receive the copy progress information sent by the first storage device, where the copy progress information is used to indicate that the first storage device has copied data to the third storage device;
确定模块, 用于当所述第一存储设备发生故障时, 根据所述复制进度 信息和所述第二存储设备保存的待复制数据确定所述待复制数据中尚未 复制的数据, 所述待复制数据是所述第一存储设备待复制到所述第三存储 设备的数据; a determining module, configured to determine, according to the copy progress information and the to-be-copied data saved by the second storage device, data that has not been copied in the data to be copied, where the first storage device is faulty, where the data to be copied is to be copied. Data is that the first storage device is to be copied to the third storage Equipment data;
发送模块, 用于将所述尚未复制的数据发送给所述第三存储设备。 在第三方面的第一种实施方式中, 所述接收模块, 用于接收所述第一 存储设备发送的包含进度地址字段的消息, 所述进度地址字段用于表示所 述复制进度信息。  And a sending module, configured to send the unreplicated data to the third storage device. In a first implementation manner of the third aspect, the receiving module is configured to receive a message that is sent by the first storage device and includes a progress address field, where the progress address field is used to indicate the copy progress information.
结合第三方面或者第三方面的第一种实施方式, 在第三方面的第二种 实施方式中, 所述第二存储设备中保存有复制数据信息, 所述复制数据信 息用于获得所述待复制的数据。  With reference to the third aspect, or the first implementation manner of the third aspect, in the second implementation manner of the third aspect, the second storage device is configured with the saved data information, where the copied data information is used to obtain the The data to be copied.
结合第三方面的第二种实施方式, 在第三方面的第三种实施方式中, 还包括: 生成模块, 用于当接收到所述第一存储设备发送的复制启动信息 时, 根据所述复制启动信息生成所述复制数据信息。  With reference to the second embodiment of the third aspect, in a third implementation manner of the third aspect, the method further includes: a generating module, configured to: when receiving the copy startup information sent by the first storage device, according to the The copy start information generates the copy data information.
结合第三方面的第二种实施方式, 在第三方面的第四种实施方式中, 所述接收模块, 还用于接收所述第一存储设备发送的所述复制数据信息。  With reference to the second implementation manner of the third aspect, in a fourth implementation manner of the third aspect, the receiving module is further configured to receive the copy data information that is sent by the first storage device.
结合第三方面的以上任一种实施方式, 在第三方面的第五种实施方式 中, 所述接收模块, 还用于当所述第一存储设备发生故障时, 接收所述第 三存储设备发送的检测信息, 所述检测信息用于指示所述第一存储设备发 生故障。  With reference to any one of the above embodiments, in a fifth implementation manner of the third aspect, the receiving module is further configured to: when the first storage device fails, receive the third storage device The detected detection information is used to indicate that the first storage device is faulty.
本发明实施例第四方面提供了一种数据复制装置, 所述数据复制装置 位于第二存储设备中, 包括:  A fourth aspect of the embodiments of the present invention provides a data replication device, where the data replication device is located in a second storage device, and includes:
接收模块, 用于接收第一存储设备发送的复制进度信息, 所述复制进 度信息用于指示所述第一存储设备已复制到第三存储设备的数据;  a receiving module, configured to receive the copy progress information sent by the first storage device, where the copy progress information is used to indicate that the first storage device has copied data to the third storage device;
修改模块, 用于根据所述复制进度信息将第一复制数据信息修改为第 二复制数据信息;  a modifying module, configured to modify the first copy data information into the second copy data information according to the copy progress information;
确定模块, 用于当所述第一存储设备发生故障时, 根据所述第二复制 数据信息和所述第二存储设备保存的待复制数据确定所述待复制数据中 尚未复制的数据, 所述待复制数据是所述第一存储设备待复制到所述第三 存储设备的数据; a determining module, configured to determine, according to the second copy data information and the to-be-copied data saved by the second storage device, data that has not been copied in the data to be copied when the first storage device is faulty, The data to be copied is the first storage device to be copied to the third Storage device data;
发送模块, 用于将所述尚未复制的数据发送给所述第三存储设备。 在第四方面的第一种实施方式中, 所述接收模块, 用于接收所述第一 存储设备发送的包含进度地址字段的消息, 所述进度地址字段用于表示所 述复制进度信息。  And a sending module, configured to send the unreplicated data to the third storage device. In a first implementation manner of the fourth aspect, the receiving module is configured to receive a message that is sent by the first storage device and includes a progress address field, where the progress address field is used to indicate the copy progress information.
在第四方面的第二种实施方式中, 所述第一复制数据信息用于获得接 收所述复制进度信息之前, 最近一次尚未复制到所述第三存储设备的数 据。  In a second implementation manner of the fourth aspect, the first copy data information is used to obtain data that has not been copied to the third storage device last time before the copy progress information is received.
结合第四方面的第二种实施方式, 在第四方面的第三种实施方式中, 还包括: 生成模块, 用于当接收到所述第一存储设备发送的复制启动信息 时, 根据所述复制启动信息生成第一复制数据信息。  With the second implementation of the fourth aspect, in a third implementation manner of the fourth aspect, the method further includes: a generating module, configured to: when receiving the copy startup information sent by the first storage device, according to the The copy start information generates the first copy data information.
在第四方面的第四种实施方式中, 所述接收模块, 还用于接收所述第 一存储设备发送的所述第一复制数据信息。  In a fourth implementation manner of the fourth aspect, the receiving module is further configured to receive the first copy data information that is sent by the first storage device.
结合第四方面的以上任一种实施方式, 在第四方面的第五种实施方式 中, 所述接收模块, 还用于当所述第一存储设备发生故障时, 接收所述第 三存储设备发送的检测信息, 所述检测信息用于指示所述第一存储设备发 生故障。  With reference to any one of the above embodiments, in a fifth implementation manner of the fourth aspect, the receiving module is further configured to: when the first storage device fails, receive the third storage device The detected detection information is used to indicate that the first storage device is faulty.
本发明实施例第五方面, 提供了一种存储设备, 包括: 处理器、 存储 器和通信总线;  A fifth aspect of the embodiments of the present invention provides a storage device, including: a processor, a memory, and a communication bus;
其中, 所述处理器和所述存储器通过所述通信总线进行通信;  Wherein the processor and the memory communicate via the communication bus;
所述存储器用于保存程序;  The memory is used to save a program;
所述处理器用于执行所述程序, 以实现本发明实施例第一方面所述的 数据复制方法。  The processor is configured to execute the program to implement the data copying method according to the first aspect of the embodiments of the present invention.
本发明实施例第六方面, 提供了一种存储设备, 包括: 处理器、 存储 器和通信总线;  A sixth aspect of the embodiments of the present invention provides a storage device, including: a processor, a memory, and a communication bus;
其中, 所述处理器和所述存储器通过所述通信总线进行通信; 所述存储器用于保存程序; Wherein the processor and the memory communicate via the communication bus; The memory is used to save a program;
所述处理器用于执行所述程序, 以实现本发明实施例第二方面所述的 数据复制方法。  The processor is configured to execute the program to implement the data copying method according to the second aspect of the embodiments of the present invention.
在本发明实施例中,第二存储设备接收第一存储设备发送的复制进度信 息, 所述复制进度信息用于指示所述第一存储设备已复制到第三存储设备 的数据; 当第一存储设备发生故障时, 第二存储设备可以根据所述复制进 度信息和所述第二存储设备保存的待复制数据确定所述待复制数据中尚 未复制的数据, 并将所述尚未复制的数据发送给所述第三存储设备。 由于 第二存储设备可以确定出尚未复制的数据, 避免了重新发送所有的待复制 数据, 提高了复制效率。  In the embodiment of the present invention, the second storage device receives the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied data to the third storage device; When the device is faulty, the second storage device may determine, according to the replication progress information and the data to be copied saved by the second storage device, data that has not been copied in the data to be copied, and send the data that has not been copied to the data. The third storage device. Since the second storage device can determine the data that has not been copied, it avoids resending all the data to be copied, which improves the copying efficiency.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不 付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are Some embodiments of the present invention may also be used to obtain other drawings based on these drawings without departing from the skilled artisan.
图 1为本发明实施例提供的一种数据复制方法的应用网络架构示意图; 图 2为本发明实施例提供的一种数据复制方法的流程示意图; 图 3为本发明实施例提供的差异位图的示意图;  1 is a schematic diagram of an application network architecture of a data replication method according to an embodiment of the present invention; FIG. 2 is a schematic flowchart of a data replication method according to an embodiment of the present invention; FIG. 3 is a difference bitmap provided by an embodiment of the present invention; Schematic diagram
图 4为本发明实施例提供的另一种数据复制方法的流程示意图 图 5为本发明实施例提供的再一种数据复制方法的信令交互图; 图 6为本发明实施例提供的一种数据复制装置的结构示意图; 图 7为本发明实施例提供的另一种数据复制装置的结构示意图; 图 8为本发明实施例提供的一种存储设备的结构示意图;  4 is a schematic flowchart of another data replication method according to an embodiment of the present invention. FIG. 5 is a signaling interaction diagram of another data replication method according to an embodiment of the present invention. FIG. FIG. 7 is a schematic structural diagram of another data replication apparatus according to an embodiment of the present invention; FIG. 8 is a schematic structural diagram of a storage device according to an embodiment of the present invention;
图 9为本发明实施例提供的另一种存储设备的结构示意图。  FIG. 9 is a schematic structural diagram of another storage device according to an embodiment of the present invention.
具体实施方式 detailed description
为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有作出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。 In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the following will be combined with the present invention. The technical solutions in the embodiments of the present invention are clearly and completely described in the drawings, and the embodiments are described as a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例的系统架构  System architecture of an embodiment of the present invention
本发明实施例提供的数据复制方法可以在存储系统中实现。 图 1为本发 明实施例提供的存储系统的架构示意图, 如图 1所示, 所述存储系统包括至 少一个应用服务器 11 (又称主机)、 至少一个生产中心和至少两个灾备中心。  The data replication method provided by the embodiment of the present invention can be implemented in a storage system. 1 is a schematic structural diagram of a storage system according to an embodiment of the present invention. As shown in FIG. 1, the storage system includes at least one application server 11 (also referred to as a host), at least one production center, and at least two disaster recovery centers.
所述应用服务器 11可以包括当前技术已知的任何计算设备, 如服务器、 台式计算机等等。  The application server 11 may comprise any computing device known in the art, such as a server, desktop computer, and the like.
生产中心包括生产阵列 22。 灾备中心包括一级站点和二级站点。 生产中 心与一级站点、 二级站点之间可以采用星形组网方式或者其他组网方式进行 组网, 在此不作限定。 其中, 一级站点包括灾备阵列 33 , 二级站点包括灾备 阵列 44。  The production center includes a production array 22 . The disaster recovery center includes a primary site and a secondary site. The production center and the primary site and the secondary site can be connected in a star network or other networking mode, which is not limited here. The primary site includes a disaster recovery array 33 and the secondary site includes a disaster recovery array 44.
生产中心可以接收主机 11发送的写数据请求,将所述写数据请求中携带 的数据保存在生产阵列 22中。 当生产中心在接收到主机发送的写数据请求 后, 需要将写数据请求携带的数据同步到一级站点。 另外, 在本发明实施 例中, 一级站点也可以接收主机(图中未示出)发送的写数据请求, 将所述 写数据请求中携带的数据保存在灾备阵列 33中。 同样的, 当一级站点接收 到主机发送的写数据请求后, 也需要将写数据请求携带的数据同步到生产 阵列。  The production center can receive the write data request sent by the host 11 and save the data carried in the write data request in the production array 22. After the production center receives the write data request sent by the host, it needs to synchronize the data carried by the write data request to the primary site. In addition, in the embodiment of the present invention, the primary site may also receive a write data request sent by the host (not shown), and save the data carried in the write data request in the disaster recovery array 33. Similarly, when the primary site receives the write data request sent by the host, it also needs to synchronize the data carried by the write data request to the production array.
生产阵列 22可以是当前技术已知的存储设备, 如独立磁盘冗余阵列 ( Redundant Arrays of Inexpensive Disks, RAID )、磁盘 ( Just a Bunch Of Disks, JBOD ) 、 直接存取存储器 ( Direct Access Storage Device, DASD ) 的一个或多个互连的磁盘驱动器, 诸如磁带库、 一个或多个存储单元的磁 带存储设备。 举例来说, 生产阵列 22可以包含控制器和存储器 (图中未 示出) , 其中控制器包含处理器和緩存。 处理器, 用于执行输入输出 10 命令以及其他数据业务; 緩存是存在于控制器与硬盘之间的存储器, 容量 较硬盘小但速度比硬盘高得多; 存储介质是生产阵列 22主要的存储器, 用于提供存储空间, 通常情况下是指非易失性存储介质, 例如, 磁盘灾备 阵列 33和灾备阵列 44都与生产阵列 22的系统架构类似。 The production array 22 may be a storage device known in the prior art, such as Redundant Arrays of Inexpensive Disks (RAID), Just a Bunch Of Disks (JBOD), Direct Access Storage Device (Direct Access Storage Device, DASD ) One or more interconnected disk drives, such as tape libraries, tape storage devices with one or more storage units. For example, production array 22 can include controllers and memories (not shown) Shown) where the controller contains the processor and the cache. A processor for executing input and output 10 commands and other data services; the cache is a memory existing between the controller and the hard disk, the capacity is smaller than the hard disk but the speed is much higher than the hard disk; the storage medium is the main memory of the production array 22, The storage space is generally used to refer to a non-volatile storage medium. For example, the disk disaster recovery array 33 and the disaster recovery array 44 are similar to the system architecture of the production array 22.
生产阵列 22的存储空间可以包括多个数据卷, 数据卷是由物理存储 空间映射而成的一段逻辑存储空间, 例如, 数据卷可以是逻辑单元(Logic Unit Number, LUN ) , 也可以是文件系统。 此外, 灾备阵歹l 33和灾备阵列 44的存储空间均可以包括多个数据卷。  The storage space of the production array 22 may include multiple data volumes. The data volume is a logical storage space mapped by physical storage space. For example, the data volume may be a Logic Unit Number (LUN) or a file system. . In addition, the storage space of the disaster recovery array 33 and the disaster recovery array 44 may include multiple data volumes.
举例来说, 在本发明实施例中, 生产中心和一级站点可以部署在同一个 城市的两个不同位置, 其距离可以在 100km以内。 生产中心与一级站点之间 可以通过 IP ( Internet Protocol )或者 FC ( Fiber Chanel )进行数据传输。 生产 阵列 22和灾备阵列 33之间可以采用同步远程复制的方式实现数据容灾。 例 如, 当生产阵列 22接收到主机 11发送的写数据请求时, 可以将所述写数据 请求携带的数据写入生产阵列 22中,再将所述写数据请求携带的数据发送灾 备阵列 33 , 用于灾备阵列 33存储所述数据。 待所述数据成功写入灾备阵列 33之后,生产阵列 22再向主机 11返回所述写数据请求的写完成响应 (又称, 所述写数据请求的响应消息) 。  For example, in an embodiment of the invention, the production center and the primary site may be deployed at two different locations in the same city, and the distance may be within 100 km. Data transmission can be performed between the production center and the primary site via IP (Internet Protocol) or FC (Fiber Chanel). Synchronous remote replication can be used to implement data disaster recovery between the production array 22 and the disaster recovery array 33. For example, when the production array 22 receives the write data request sent by the host 11, the data carried by the write data request may be written into the production array 22, and the data carried by the write data request is sent to the disaster recovery array 33. The disaster recovery array 33 stores the data. After the data is successfully written into the disaster recovery array 33, the production array 22 returns a write completion response (also referred to as a response message of the write data request) of the write data request to the host 11.
因此, 可以理解的是, 在本发明实施例中, 由于生产中心和一级站点 都可以接收主机的数据, 并且, 生产中心和一级站点中存储的数据是一致 的, 所以生产中心和一级站点的角色可以互换。  Therefore, it can be understood that, in the embodiment of the present invention, since the production center and the first-level site can receive the data of the host, and the data stored in the production center and the first-level site are consistent, the production center and the first-level The roles of the sites are interchangeable.
二级站点可以部署在较远距离(如 1000km )之外的另一个城市。 生产中 心与二级站点之间可以通过 IP ( Internet Protocol )或者 FC ( Fiber Chanel )进 行数据传输。 生产阵列 22和灾备阵列 44之间可以采用异步远程复制的方式 实现数据容灾。 例如, 当生产阵列 22接收到主机 11发送的写数据请求时, 可以将所述写数据请求携带的数据写入生产阵列 22中, 然后向主机 11返回 所述写数据请求的写完成响应。 间隔一段时间之后, 生产阵列 22再将所述写 数据请求携带的数据发送给灾备阵列 44, 用于灾备阵列 44存储所述数据。 由此可见, 灾备阵列 44中存储的数据会比生产阵列 22中存储的数据有一定 时间的延迟。通常情况下,生产阵列 22在一段时间内会接收多个写数据请求, 并且生产阵列 22在向灾备阵列 44进行异步远程复制时,主机 11仍然可能发 送写数据请求给生产阵列 22。 因此有必要将生产阵列 22发送给灾备阵列 44 的数据与其接收的尚未复制到灾备阵列 33的数据区分开。 The secondary site can be deployed in another city beyond a long distance (eg 1000km). Data transmission can be performed between the production center and the secondary site through IP (Internet Protocol) or FC (Fiber Chanel). Data remote disaster recovery can be implemented between the production array 22 and the disaster recovery array 44. For example, when the production array 22 receives the write data request sent by the host 11, the data carried by the write data request can be written into the production array 22 and then returned to the host 11. The write completion request of the write data request. After a period of time, the production array 22 sends the data carried by the write data request to the disaster recovery array 44 for the disaster recovery array 44 to store the data. As can be seen, the data stored in the disaster recovery array 44 will have a certain time delay than the data stored in the production array 22. Typically, production array 22 will receive multiple write data requests over a period of time, and while production array 22 is performing asynchronous remote replication to disaster recovery array 44, host 11 may still send write data requests to production array 22. It is therefore necessary to distinguish the data that the production array 22 sends to the disaster recovery array 44 from the data it has received that has not been replicated to the disaster recovery array 33.
在本发明实施例中, 可以利用快照技术解决这个问题。 快照是数据在某 个时间点的映像。快照的目的是为数据卷创建一个在特定时间点的状态视图, 通过这个视图只可以看到数据卷在创建时刻的数据, 在此时间点之后数据卷 的修改(有新的数据写入) , 不会反映在快照视图中。 利用这个快照视图, 就可以做数据的复制。 对于生产阵列 22而言, 由于快照数据是 "静止的" , 因此生产阵列 22可以在将各个时间点的数据增加快照之后,再将快照数据复 制到灾备阵列 44, 既可以完成远程数据复制, 也不会影响在生产阵列 22继 续接收主机 11发送的写数据请求。 因此,生产阵列 22可以每隔一段时间 (例 如, 一个小时)对一个数据卷中的数据进行快照处理, 以形成该时刻的数据 卷的数据副本, 将所述数据副本发送给灾备阵列 44。 需要说明的是, 所述数 据副本即当前复制任务对应的待复制给灾备阵列 44的数据。  In the embodiment of the present invention, the snapshot technology can be utilized to solve this problem. A snapshot is an image of data at a point in time. The purpose of the snapshot is to create a state view for the data volume at a specific point in time. Only the data of the data volume at the time of creation can be seen through this view. After this time point, the data volume is modified (new data is written). Will not be reflected in the snapshot view. With this snapshot view, you can copy the data. For the production array 22, since the snapshot data is "stationary", the production array 22 can copy the snapshot data to the disaster recovery array 44 after the data of each time point is increased, and the remote data replication can be completed. It also does not affect the write data request sent by the host 11 to continue to be received at the production array 22. Therefore, the production array 22 can snapshot the data in a data volume at intervals (e.g., one hour) to form a data copy of the data volume at that time, and send the data copy to the disaster recovery array 44. It should be noted that the data copy is the data to be copied to the disaster recovery array 44 corresponding to the current replication task.
可选的,本发明实施例还可以利用给生产阵列 22接收到的每个写数据请 求增加时间片编号的方式来解决上述问题。 例如, 生产阵列 22中可以包含 一个当前时间片编号管理器, 所述当前时间片编号管理器中保存有当前时 间片编号, 当前时间片编号可以用数值表示, 例如 0、 1、 2, 也可以用字 母表示, 例如 a、 b、 c, 在此不做限定。 当生产阵列 22接收到写数据请求 时, 在写数据请求携带的数据和数据的地址中增加第一编号, 所述第一编 号是由当前时间片编号赋值给它的。 当一个异步远程复制任务触发时, 修 改所述当前时间片编号, 以标识后续的写数据请求, 并且将第一编号对应 的数据和数据的地址发送给灾备阵列 44。 需要说明的是, 所述第一编号对 应的数据即当前复制任务对应的待复制给灾备阵列 44的数据。 此外, 在本 发明实施例中,还可以采用其他方式获得当前复制任务对应的待复制给灾备 阵列 44的数据, 在此不做限定。 Optionally, the embodiment of the present invention may also solve the above problem by using a method of adding a time slice number to each write data request received by the production array 22. For example, the production array 22 may include a current time slice number manager, where the current time slice number manager stores the current time slice number, and the current time slice number may be represented by a numerical value, such as 0, 1, or 2, or It is represented by letters, such as a, b, c, which are not limited here. When the production array 22 receives the write data request, a first number is added to the address of the data and data carried by the write data request, and the first number is assigned to it by the current time slice number. When an asynchronous remote copy task is triggered, the current time slice number is modified to identify a subsequent write data request, and the first number is corresponding. The data and data addresses are sent to the disaster recovery array 44. It should be noted that the data corresponding to the first number is the data to be copied to the disaster recovery array 44 corresponding to the current replication task. In addition, in the embodiment of the present invention, the data to be copied to the disaster recovery array 44 corresponding to the current replication task may be obtained in other manners, which is not limited herein.
另外, 一级站点和二级站点之间也可以通过 IP ( Internet Protocol )或者 In addition, IP (Internet Protocol) can also be used between the primary site and the secondary site.
FC ( Fiber Chanel )进行数据传输。 因此, 灾备阵歹l 33和灾备阵列 44之间也 可以采用异步远程复制的方式实现数据容灾, 其具体的实现方式与生产阵列 22和灾备阵列 44之间的数据容灾方式类似, 这里不再贅述。 然而, 在生产 阵列 22工作正常的情况下, 灾备阵列 33可以不启动异步远程复制, 仅由生 产阵列 22将存储的数据复制给灾备阵列 44。 当生产阵列 22发生故障时, 灾 备阵列 33可以接替生产阵列 22继续完成异步远程复制任务。 FC (Fiber Chanel) performs data transmission. As a result, data disaster recovery can be implemented by using the asynchronous remote replication mode between the disaster recovery array 33 and the disaster recovery array 44. The specific implementation is similar to the data disaster recovery mode between the production array 22 and the disaster recovery array 44. , I won't go into details here. However, in the case that the production array 22 is working properly, the disaster recovery array 33 may not initiate asynchronous remote replication, and only the production array 22 copies the stored data to the disaster recovery array 44. When the production array 22 fails, the disaster array 33 can take over the production array 22 to continue the asynchronous remote replication task.
数据复制方法  Data replication method
下面介绍本发明实施例提供的数据复制方法, 如图 2所示, 为本发明实 施例提供的数据复制方法的流程图, 为了描述方便, 将上述的生产阵列 22称 为第一存储设备, 灾备阵列 33称为第二存储设备, 灾备阵列 44称为第三存 储设备。 每个存储设备均可以包含控制器和存储器, 其中控制器可以包含处 理器和緩存, 执行下述步骤的可以是第二存储设备中的处理器。 所述方法应 用于存储系统中, 所述存储系统包括至少三个存储设备, 其中第一存储设 备和第二存储设备中保存相同的数据, 所述方法包括:  The following describes the data replication method provided by the embodiment of the present invention. As shown in FIG. 2, it is a flowchart of a data replication method according to an embodiment of the present invention. For the convenience of description, the foregoing production array 22 is referred to as a first storage device. The standby array 33 is referred to as a second storage device, and the disaster recovery array 44 is referred to as a third storage device. Each storage device may include a controller and a memory, wherein the controller may include a processor and a cache, and the following steps may be performed by a processor in the second storage device. The method is applied to a storage system, where the storage system includes at least three storage devices, wherein the first storage device and the second storage device store the same data, and the method includes:
步骤 21 : 第二存储设备接收第一存储设备发送的复制进度信息, 所述 复制进度信息用于指示所述第一存储设备已复制到第三存储设备的数据。  Step 21: The second storage device receives the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied data to the third storage device.
对于第一存储设备来说,当复制任务触发时,需要将本次复制任务(除 非特别指明, 本发明实施例的本次复制任务都是指当前复制任务)的待复 制到第三存储设备的数据发送给所述第三存储设备。 复制任务(也叫异步 远程复制任务)是指第一存储设备将一段时间内一个数据卷接收到的写数 据请求携带的数据发送给第三存储设备。 具体而言, 第一存储设备可以将 这段时间内一个数据卷接收到的所有的数据都发送给第三存储设备, 也可 以将这段时间内接收到相对于上一次复制任务的差异数据 (也称增量数 据)发送给第三存储设备, 在此不做限定。 For the first storage device, when the replication task is triggered, it is necessary to copy the current task to the third storage device (unless otherwise specified, the current replication task in the embodiment of the present invention refers to the current replication task). Data is sent to the third storage device. A replication task (also called an asynchronous remote replication task) means that the first storage device sends data carried by the write data request received by one data volume for a period of time to the third storage device. Specifically, the first storage device can During this time, all the data received by one data volume is sent to the third storage device, and the difference data (also called incremental data) received relative to the last replication task can be sent to the third time during this period. Storage devices are not limited here.
举例来说, 第一存储设备在复制任务触发之前, 接收到主机发送的多 个写数据请求, 其中, 每个写数据请求均携带有数据和所述数据的地址。 第一存储设备可以根据所述多个写数据请求更新预先设置的差异数据信 息 (例如, 差异位图) 。 在本发明实施例中, 差异数据信息用于记录所述 当前复制任务触发之前、 最近一次已完成的复制任务触发之后写入所述第 一存储设备的数据。  For example, the first storage device receives multiple write data requests sent by the host before the replication task is triggered, where each write data request carries data and an address of the data. The first storage device may update the pre-set differential data information (e.g., a difference bitmap) based on the plurality of write data requests. In the embodiment of the present invention, the difference data information is used to record data written to the first storage device after the trigger of the most recent replication task before the current replication task is triggered.
如图 3所示, 差异位图的每个格子对应一段地址, 并且, 每个格子中 保存一个标志位, 可以是 1 , 也可以是 0。 " 1 " 代表这段时间内在该段地 址中有数据写入; "0" 代表这段时间内在该段地址中没有数据写入。 因 此, 当接收到的写数据请求携带的地址属于某个格子的地址范围时, 将该 格子的标志位置为 1。 此外, 一种可选的实施方式是, 差异位图的每个格 子对应一个地址, 当接收到写数据请求携带的地址与某个格子的地址相同 时, 将该格子的标志位置为 1。 在本发明实施例中, 差异位图可以保存在 第一存储设备的緩存中, 也可以保存在第一存储设备的存储器中。 可以理 解的是, 本发明实施例还可以采用其他标志位表示是否有数据写入, 在此 不做限定。  As shown in FIG. 3, each grid of the difference bitmap corresponds to an address, and a flag is stored in each grid, which may be 1 or 0. " 1 " means that data is written in the address of the segment during this time; "0" means that no data is written in the segment address during this time. Therefore, when the address carried by the received write data request belongs to the address range of a certain grid, the flag position of the grid is set to 1. In addition, in an optional implementation manner, each cell of the difference bitmap corresponds to an address, and when the address that is received by the write data request is the same as the address of a certain cell, the flag of the cell is set to 1. In the embodiment of the present invention, the difference bitmap may be saved in the cache of the first storage device or may be saved in the memory of the first storage device. It can be understood that the embodiment of the present invention can also use other flag bits to indicate whether data is written, which is not limited herein.
可选的, 差异数据信息除了可以是差异位图之外, 也可以是差异二叉 树、 差异 B+树以及其他树, 用以记录所述当前复制任务触发之前、 最近 一次已完成的复制任务触发之后写入所述第一存储设备的数据。 其中, 每 个叶子节点对应一段地址, 并且, 每个叶子节点中保存一个标志位, 可以 是 1 , 也可以是 0。 " 1 " 代表这段时间内在该段地址中有数据写入; "0" 代表这段时间内在该段地址中没有数据写入。 因此, 当接收到的写数据请 求携带的地址属于某个叶子节点的地址范围时, 将该叶子节点的标志位置 为 1。 此外, 一种可选的实施方式是, 树的每个叶子节点对应一个地址, 当接收到写数据请求携带的地址与某个叶子节点的地址相同时, 将该叶子 节点的标志位置为 1。 在本发明实施例中, 树可以保存在第一存储设备的 緩存中, 也可以保存在第一存储设备的存储器中。 可以理解的是, 本发明 实施例还可以采用其他标志位表示是否有数据写入, 在此不做限定。 Optionally, the difference data information may be a difference binary map, a difference binary tree, a difference B+ tree, and other trees, and is used to record that the current replication task is triggered before the last completed replication task is triggered. Data entering the first storage device. Each leaf node corresponds to an address, and each leaf node stores a flag, which may be 1 or 0. " 1 " means that data is written in the address of the segment during this time; "0" means that no data is written in the segment address during this time. Therefore, when the address carried by the received write data request belongs to an address range of a leaf node, the flag position of the leaf node is Is 1. In addition, in an optional implementation manner, each leaf node of the tree corresponds to an address, and when the address that is received by the write data request is the same as the address of a leaf node, the flag position of the leaf node is 1. In the embodiment of the present invention, the tree may be saved in the cache of the first storage device, or may be saved in the memory of the first storage device. It is to be understood that the embodiment of the present invention may also use other flag bits to indicate whether data is written, which is not limited herein.
可选的, 差异数据信息还可以是差异链表或者其他表, 用以记录所述 当前复制任务触发之前、 最近一次已完成的复制任务触发之后写入所述第 一存储设备的数据。 其中, 每个表项对应一段地址, 并且, 每个表项中保 存一个标志位, 可以是 1 , 也可以是 0。 " 1 " 代表这段时间内在该段地址 中有数据写入; "0" 代表这段时间内在该段地址中没有数据写入。 因此, 当接收到的写数据请求携带的地址属于某个表项的地址范围时, 将该叶子 节点的标志位置为 1。 此外, 一种可选的实施方式是, 表的每个表项对应 一个地址, 当接收到写数据请求携带的地址与某个表项的地址相同时, 将 该表项的标志位置为 1。 在本发明实施例中, 表可以保存在第一存储设备 的緩存中, 也可以保存在第一存储设备的存储器中。 可以理解的是, 本发 明实施例还可以采用其他标志位表示是否有数据写入, 在此不做限定。  Optionally, the difference data information may also be a differential linked list or other table, configured to record data written to the first storage device after the trigger of the last completed replication task before the current replication task is triggered. Each entry corresponds to an address, and each entry retains a flag, which may be 1 or 0. "1" means that data is written in the segment address during this time; "0" means that no data is written in the segment address during this time. Therefore, when the address carried by the received write data request belongs to an address range of an entry, the flag position of the leaf node is set to 1. In addition, an optional implementation manner is that each entry of the table corresponds to an address, and when the address that is received by the write data request is the same as the address of an entry, the flag of the entry is set to 1. In the embodiment of the present invention, the table may be saved in the cache of the first storage device, or may be saved in the memory of the first storage device. It can be understood that the embodiment of the present invention can also use other flag bits to indicate whether there is data writing, which is not limited herein.
可选的, 差异数据信息还可以是日志等形式, 用以记录所述当前复制 任务触发之前、 最近一次已完成的复制任务触发之后写入所述第一存储设 备的数据, 在此不再贅述。  Optionally, the difference data information may also be in the form of a log or the like, and is used to record data that is written to the first storage device after the triggering of the last completed replication task before the current replication task is triggered, and details are not described herein again. .
为了描述方便, 下面的步骤以差异位图为例来进行说明。  For convenience of description, the following steps are described by taking a difference bitmap as an example.
当复制任务触发时, 第一存储设备可以根据差异位图生成复制数据信 息 (下面步骤以复制位图为例) , 所述复制数据信息用于指示待复制到第 三存储设备的数据的地址信息, 因此可以利用复制数据信息可以获得当前 复制任务对应的待复制到第三存储设备的数据。  When the copy task is triggered, the first storage device may generate the copy data information according to the difference bitmap (the following steps take the copy bitmap as an example), and the copy data information is used to indicate the address information of the data to be copied to the third storage device. Therefore, the data to be copied to the third storage device corresponding to the current replication task can be obtained by using the duplicate data information.
一种生成复制位图的实施方式是, 将复制任务触发时刻的差异位图复 制一份作为复制位图, 然后将差异位图清零继续记录之后接收的写数据请 求携带的数据, 或者将差异位图删除, 并生成一份新的差异位图用以继续 记录之后接收的写数据请求携带的数据; 另一种生成复制位图的实施方式 是, 直接将复制任务触发时的差异位图作为复制位图, 再将上一次复制任 务对应的复制位图清零后作为差异位图, 继续记录之后接收的写数据请求 携带的数据, 由此可见, 对于这种实施方式而言, 第一存储设备中可以至 少包含一张差异位图和一张复制位图, 随着每次复制任务的触发, 差异位 图和复制位图的角色可以进行互换。 此外, 本发明实施例也不限定其他一 些根据差异位图生成复制位图的实施方式。 An implementation method for generating a copy bitmap is to copy a difference bitmap of a copy task trigger time as a copy bitmap, and then clear the difference bitmap to continue recording after receiving the write data. Find the carried data, or delete the difference bitmap, and generate a new difference bitmap to continue to record the data carried by the write data request received afterwards; another way to generate the copy bitmap is to copy directly The difference bitmap when the task is triggered is used as the copy bitmap, and then the copy bitmap corresponding to the last copy task is cleared as the difference bitmap, and the data carried by the write data request received after the recording is continued, thereby showing that In an embodiment, the first storage device may include at least one difference bitmap and one copy bitmap, and the roles of the difference bitmap and the copy bitmap may be interchanged with each trigger task. In addition, the embodiments of the present invention do not limit other implementations for generating a duplicate bitmap according to the difference bitmap.
对于第二存储设备而言, 由于它与第一存储设备之间是采用同步远程 复制的方式进行数据容灾, 所以其存储的数据与第一存储设备是一致的。 当第一存储设备触发与第三存储设备之间的异步远程复制任务时, 可以由 第一存储设备发送给第二存储设备一个复制启动消息, 所述复制启动消息 中包含复制启动信息, 用以通知第二存储设备当前复制任务触发。 当第二 存储设备接收所述复制启动信息时,可以根据本端的差异数据信息(例如, 差异位图)生成复制数据信息 (例如, 复制位图) 。 其中, 第二存储设备 的差异位图的内容、 用途以及生成方式均与第一存储设备的差异位图相 同, 并且, 第二存储设备的复制位图的内容和用途均与第一存储设备的复 制位图相同。 然而, 就第二存储设备的复制位图的生成方式而言, 可以与 第一存储设备的复制位图的生成方式相同, 也可以由第一存储设备将第一 存储设备的复制位图携带在所述复制启动消息中发送给第二存储设备。  For the second storage device, since the data is disaster-tolerant between the first storage device and the first storage device, the stored data is consistent with the first storage device. When the first storage device triggers the asynchronous remote copy task with the third storage device, the first storage device may send a copy start message to the second storage device, where the copy start message includes copy start information for Notifying the second storage device that the current replication task is triggered. When the second storage device receives the copy start information, the copy data information (for example, a copy bitmap) may be generated according to the difference data information (for example, a difference bitmap) of the local end. The content, usage, and generation manner of the difference bitmap of the second storage device are the same as the difference bitmap of the first storage device, and the content and use of the duplicate bitmap of the second storage device are both the same as the storage device of the first storage device. The copy bitmap is the same. However, in the manner of generating the copy bitmap of the second storage device, the copy bitmap of the first storage device may be generated in the same manner, or the copy bitmap of the first storage device may be carried by the first storage device. The copy initiation message is sent to the second storage device.
根据上面的描述可知, 第二存储设备也可以采用树、 链表以及日志等 形式记录差异数据信息, 在此不做限定。  According to the above description, the second storage device may also record the difference data information in the form of a tree, a linked list, and a log, and is not limited herein.
当第一存储设备开始复制时, 举例来说, 第一存储设备可以根据复制 位图获得本次复制任务对应的待复制数据。 具体而言, 第一存储设备可以 根据复制位图确定待复制数据所在的地址, 再根据这些地址从存储器, 或 者直接从緩存中获取待复制数据, 按照地址顺序, 生成若干个写数据命令 发送给第三存储设备。 When the first storage device starts to copy, for example, the first storage device can obtain the data to be copied corresponding to the current replication task according to the copy bitmap. Specifically, the first storage device may determine, according to the copy bitmap, an address where the data to be copied is located, and then obtain data to be copied from the memory according to the addresses, or directly from the cache, and generate a plurality of write data commands according to the address sequence. Send to the third storage device.
可以理解的是, 第一存储设备在将本次复制任务对应的待复制数据复 制给第三存储设备时, 可能并不是通过一个写数据命令就可以将所有的待 复制数据都发送给第三存储设备, 要完成一次复制任务往往向第三存储设 备发送多个写数据命令。  It can be understood that, when the first storage device copies the data to be copied corresponding to the current copy task to the third storage device, all the data to be copied may not be sent to the third storage by using a write data command. The device, to complete a copy task, often sends multiple write data commands to the third storage device.
在本发明实施例中, 第一存储设备每次向第三存储设备发送一个写数 据命令, 都可以向第二存储设备发送一个复制进度信息, 用于指示所述第 一存储设备已复制到第三存储设备的数据。  In the embodiment of the present invention, each time the first storage device sends a write data command to the third storage device, the first storage device may send a copy progress information to the second storage device, where the first storage device is copied to the first storage device. Three storage device data.
然而, 当第一存储设备尚未将本次复制任务对应的所有待复制数据全 部发送给第三存储设备时, 发生故障, 就需要第二存储设备接替第一存储 设备继续将尚未复制的数据复制到第三存储设备。  However, when the first storage device has not sent all the data to be copied corresponding to the current replication task to the third storage device, a failure occurs, and the second storage device is required to take over the first storage device and continue to copy the data that has not been copied to Third storage device.
步骤 22: 当第一存储设备发生故障时,根据所述复制进度信息和所述 第二存储设备保存的待复制数据确定所述待复制数据中尚未复制的数据, 所述待复制数据是所述第一存储设备待复制到第三存储设备的数据。  Step 22: When the first storage device is faulty, determining, according to the replication progress information and the data to be copied saved by the second storage device, data that has not been copied in the data to be copied, where the data to be copied is the The data of the first storage device to be copied to the third storage device.
第二存储设备和第一存储设备之间可以通过心跳进行通信, 当第二存 储设备检测不到第一存储设备的心跳信号时, 可以获知第一存储设备发生 故障; 另一种可选的实施方式是, 当第三存储设备发现与第一存储设备之 间的复制中断时, 可以向第二存储设备发送一个检测信息, 用于指示第一 存储设备发生故障。  The second storage device and the first storage device can communicate with each other through a heartbeat. When the second storage device does not detect the heartbeat signal of the first storage device, the first storage device may be known to be faulty. Another optional implementation The method is: when the third storage device finds that the replication between the storage device and the first storage device is interrupted, the device may send a detection information to the second storage device to indicate that the first storage device is faulty.
复制进度信息可以是一个地址或者一段地址, 用于表示第一存储设备 已经复制完成的数据的地址。  The copy progress information may be an address or an address indicating the address of the data that the first storage device has copied.
可选的, 复制进度信息也可以是一个复制位图。 当第一存储设备每次 向第三存储设备发送完成一部分数据时, 可以根据这部分数据的地址修改 复制位图。 例如, 删除复制位图中已复制的数据的地址所在的格子, 或者 将复制位图中已复制的数据的地址所在的格子的标志位置为 0。 然后, 将 修改后的复制位图发送给第二存储设备。 由于第二存储设备事先保存有所述待复制到第三存储设备的数据, 所 述待复制到第三存储设备的数据除去已复制的数据就是所述待复制数据 中尚未复制的数据。 需要说明的是, 所述待复制数据是指本次复制任务需 要复制到第三存储设备的所有数据, 是第一存储设备已复制到第三存储存 储的数据与所述尚未复制的数据的总和。 Optionally, the replication progress information may also be a duplicate bitmap. When the first storage device transmits a part of the data to the third storage device each time, the copy bitmap can be modified according to the address of the part of the data. For example, delete the grid where the address of the copied data in the copy bitmap is located, or set the flag position of the grid where the address of the copied data in the bitmap is located to 0. Then, the modified copy bitmap is sent to the second storage device. The data to be copied to the third storage device is the data that has not been copied from the data to be copied, because the data to be copied to the third storage device is saved in advance. It should be noted that the data to be copied refers to all data that needs to be copied to the third storage device in the current copying task, and is the sum of the data that the first storage device has copied to the third storage storage and the unreplicated data. .
可选的, 其确定方式可以是: 第二存储设备根据所述复制进度信息, 以及复制位图确定所述待复制数据中尚未复制的数据的地址。 这里的复制 位图是指第二存储设备中事先保存的复制位图, 可以是第二存储设备在本 次复制任务触发时根据差异位图生成的复制位图, 也可以是第一存储设备 发送给第二存储设备的复制位图, 在此不做限定。  Optionally, the determining manner may be: the second storage device determines, according to the copy progress information, and the copy bitmap, an address of the data that has not been copied in the data to be copied. The copy bitmap is a copy bitmap that is saved in advance in the second storage device, and may be a duplicate bitmap generated by the second storage device according to the difference bitmap when the current replication task is triggered, or may be sent by the first storage device. The copy bitmap of the second storage device is not limited herein.
步骤 23 : 将所述尚未复制的数据发送给所述第三存储设备。  Step 23: Send the unreplicated data to the third storage device.
在步骤 22获得尚未复制的数据的地址之后, 可以根据该地址从第二 存储设备的存储器或者緩存中获得所述尚未复制的数据。  After obtaining the address of the unreplicated data in step 22, the unreplicated data can be obtained from the memory or cache of the second storage device based on the address.
可选的, 当第二存储设备采用快照技术获得所述数据卷的副本时, 可 以根据所述尚未复制的数据的地址从存储器的快照卷中获得所述尚未复 制的数据。  Optionally, when the second storage device obtains a copy of the data volume by using a snapshot technology, the unreplicated data may be obtained from a snapshot volume of the memory according to the address of the unreplicated data.
可选的, 当第二存储设备采用给每个写数据请求增加时间片编号的方 式获得所述数据卷的副本时, 可以根据所述尚未复制的数据的地址从緩存 中获得所述尚未复制的数据。  Optionally, when the second storage device obtains a copy of the data volume by adding a time slice number to each write data request, the unreplicated data may be obtained from the cache according to the address of the unreplicated data. data.
在第二存储设备获得所述尚未复制的数据之后, 可以按照地址顺序生 成一个或多个写数据命令, 发送给第三存储设备。 需要说明的是, 在本发 明实施例中, 所述已复制的数据和所述尚未复制的数据在发送给第三存储 设备之后, 是存储在第三存储设备的同一个数据卷中的。  After the second storage device obtains the unreplicated data, one or more write data commands may be generated in the address order and sent to the third storage device. It should be noted that, in the embodiment of the present invention, the copied data and the unreplicated data are stored in the same data volume of the third storage device after being sent to the third storage device.
在本发明实施例中,第二存储设备接收第一存储设备发送的复制进度信 息, 所述复制进度信息用于指示所述第一存储设备已复制到第三存储设备 的数据; 当第一存储设备发生故障时, 第二存储设备可以根据所述复制进 度信息和所述第二存储设备保存的待复制数据确定所述待复制数据中尚 未复制的数据, 并将所述尚未复制的数据发送给所述第三存储设备。 由于 第二存储设备可以确定出尚未复制的数据, 避免了重新发送所有的待复制 数据, 提高了复制效率。 In the embodiment of the present invention, the second storage device receives the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied data to the third storage device; When the device fails, the second storage device can be copied according to the The degree information and the data to be copied saved by the second storage device determine data that has not been copied in the data to be copied, and send the data that has not been copied to the third storage device. Since the second storage device can determine the data that has not been copied, re-sending all the data to be copied is avoided, and the copying efficiency is improved.
在上述实施例的步骤 21 中, 所述第二存储设备接收第一存储设备发 送的复制进度信息具体可以是:  In the step 21 of the foregoing embodiment, the receiving, by the second storage device, the replication progress information sent by the first storage device may be:
第一存储设备向第二存储设备发送复制进度消息, 所述复制进度消息 携带进度地址字段, 所述进度地址字段用于表示所述复制进度信息。 举例 来说, 所述进度地址字段可以包含一个地址或者一段地址。 当所述进度地 址字段包含一个地址时, 所述一个地址用于表示第一存储设备当前已复制 完成的最后一个数据的地址; 当所述进度地址字段包含一段地址时, 所述 一段地址用于表示第一存储设备当前已复制完成的所有数据的地址。 需要 说明的是, 只要携带进度地址字段的消息都可以视作本发明实施例中的复 制进度消息, 本发明实施例并没有对该消息的名称做任何限定。  The first storage device sends a replication progress message to the second storage device, where the replication progress message carries a progress address field, where the progress address field is used to indicate the replication progress information. For example, the progress address field can contain an address or an address. When the progress address field includes an address, the one address is used to indicate an address of the last data that the first storage device has successfully copied; when the progress address field includes a segment of the address, the segment of the address is used for Indicates the address of all data that the first storage device has currently copied. It should be noted that, as long as the message carrying the progress address field can be regarded as the copy progress message in the embodiment of the present invention, the name of the message is not limited in the embodiment of the present invention.
可选的, 所述复制进度消息中还可以携带复制任务的标识字段, 所述 复制任务的标识字段包含复制任务的标识。 根据前面的描述可知, 复制任 务是指第一存储设备将一段时间内一个数据卷接收到的写数据请求携带 的数据发送给第三存储设备。 当第一存储设备中包含多个数据卷时, 就会 产生多个复制任务, 每个数据卷对应一个复制任务, 并且每个复制任务都 有一个唯一的标识(例如 ID )。 第二存储设备可以根据所述复制任务的标 识确定本次复制任务, 并获得本次复制任务对应的复制位图。 具体的, 在 本发明实施例中, 可以预先配置第一存储设备、 第二存储设备以及第三存 储设备中各个 LUN之间的复制关系, 一个复制关系可以包含多个复制任 务, 上面描述的当前复制任务(又称本次复制任务)是指所述复制关系中 的其中一个复制任务。 在设置的复制关系中, 可以包括复制关系的标识, 也可以包括第一存储设备、 第二存储设备以及第三存储设备的 LUN的标 识。 当然, 复制关系的标识也可以用其他的标识来表示, 在此不做限定, 只要能让各存储设备识别出当前复制任务所属的复制关系即可。 在实际应 用中, 可以在第一存储设备、 第二存储设备以及第三存储设备均保存有这 个复制关系。 可以理解的是, 复制任务是根据该复制关系启动的两个不同 存储设备中的 LUN之间的复制任务, 并且在某一时刻, 具有复制关系的 两个数据卷之间只可能存在一个复制任务, 本发明实施例主要涉及一个复 制任务中各个设备之间的交互过程, 因此在本发明实施例中, 可以用复制 关系的标识来表示一个复制任务。 换一种表达方式, 在本发明实施例中, 复制任务的标识可以与复制关系的标识相同。 当然, 实际应用中, 若为了 区分具有复制关系的两个数据卷之间在不同时间段存在的多个复制任务, 复制任务的标识也可以与复制关系的标识不同, 例如, 复制任务的标识可 以在复制关系的标识的基础上再增加时间标识, 用于表示该复制任务是在 具有同一个复制关系的两个数据卷之间不同时刻启动的复制任务。 Optionally, the replication progress message may further include an identifier field of the replication task, where the identifier field of the replication task includes an identifier of the replication task. According to the foregoing description, the copy task refers to that the first storage device sends data carried by the write data request received by one data volume to the third storage device for a period of time. When the first storage device contains multiple data volumes, multiple replication tasks are generated, one for each data volume, and each replication task has a unique identifier (such as an ID). The second storage device may determine the current replication task according to the identifier of the replication task, and obtain a replication bitmap corresponding to the current replication task. Specifically, in the embodiment of the present invention, a replication relationship between each LUN in the first storage device, the second storage device, and the third storage device may be pre-configured, and a replication relationship may include multiple replication tasks, as described above. A replication task (also known as this replication task) refers to one of the replication tasks in the replication relationship. In the set replication relationship, the identifier of the replication relationship may be included, and the labels of the LUNs of the first storage device, the second storage device, and the third storage device may also be included. Knowledge. Certainly, the identifier of the replication relationship may also be represented by other identifiers, which is not limited herein, as long as the storage device can identify the replication relationship to which the current replication task belongs. In a practical application, the replication relationship may be saved in the first storage device, the second storage device, and the third storage device. It can be understood that the replication task is a replication task between LUNs in two different storage devices initiated according to the replication relationship, and at some point, only one replication task may exist between two data volumes having a replication relationship. The embodiment of the present invention mainly relates to an interaction process between devices in a replication task. Therefore, in the embodiment of the present invention, a replication task identifier may be used to represent a replication task. In another embodiment, in the embodiment of the present invention, the identifier of the replication task may be the same as the identifier of the replication relationship. Of course, in an actual application, if a plurality of replication tasks exist between two data volumes having a replication relationship at different time intervals, the identifier of the replication task may be different from the identifier of the replication relationship. For example, the identifier of the replication task may be A time stamp is further added on the basis of the identifier of the replication relationship, and is used to indicate that the replication task is a replication task initiated at different times between two data volumes having the same replication relationship.
可选的, 当第一存储设备、 第二存储设备、 第三存储设备各自包含多 个数据卷时, 所述复制进度消息中还可以携带在当前复制过程中第一存储 设备的数据卷的标识、 第二存储设备的数据卷的标识以及第三存储设备的 数据卷的标识来确定。 例如, A LUN001 B LUN002 CLUN003 , 用于表示 该复制任务是将数据从存储设备 A中标识为 001的 LUN,和 /或存储设备 B中标识为 002的 LUN复制到存储设备 C中标识为 003的 LUN中。  Optionally, when the first storage device, the second storage device, and the third storage device each include multiple data volumes, the replication progress message may further carry an identifier of the data volume of the first storage device in the current replication process. And determining, by the identifier of the data volume of the second storage device and the identifier of the data volume of the third storage device. For example, A LUN001 B LUN002 CLUN003 is used to indicate that the replication task is a LUN that identifies data as 001 from the storage device A, and/or a LUN that is identified as 002 in the storage device B is copied to the storage device C with the identifier 003. In the LUN.
可选的, 所述复制进度消息中还可以携带操作码字段, 所述操作码字 段包含所述复制进度消息的操作码, 用于指示所述消息是用于向第二存储 设备发送复制进度信息的消息。  Optionally, the copy progress message may further include an operation code field, where the operation code field includes an operation code of the copy progress message, where the message is used to send the copy progress information to the second storage device. Message.
举例来说, 实际应用中, 在复制进度消息的头部可以包含操作码(例 如 opCode )字段、 源设备 ID (例如, srcAppId) 字段以及目标设备 ID (例 如, dstAppId ) 字段。 其中, 操作码字段用于表示该消息的类型为复制进 度消息。 源设备 ID字段用于标识该复制进度消息的发起者 (在实施例中 是指第一存储设备) , 目标设备 ID字段用于标识该复制进度消息的接收 者(在实施例中是指第二存储设备)。 源设备 ID以及目标设备 ID字段均 可以用 IP 地址来标识。 复制进度消息的内容部分(例如, 复制进度消息 中的 data字段) 的格式可以如下所示: For example, in an actual application, an opcode (eg, opCode) field, a source device ID (eg, srcAppId) field, and a target device ID (eg, dstAppId) field may be included in the header of the replication progress message. The opcode field is used to indicate that the type of the message is a replication progress message. The source device ID field is used to identify the originator of the replication progress message (in an embodiment) Refers to the first storage device), and the target device ID field is used to identify the recipient of the replication progress message (in the embodiment, the second storage device). Both the source device ID and the target device ID field can be identified by an IP address. The format of the content portion of the replication progress message (for example, the data field in the replication progress message) can be as follows:
Figure imgf000019_0001
Figure imgf000019_0001
送数据的源设备的 LUN标识 , 该 LUN标识为唯一标识。  LUN ID of the source device that sends data. The LUN ID is a unique identifier.
ReplicationObject LUN ID: 可以位于第 4-8个字节, 用于表示当前复 制任务中接收数据的第三存储设备的目标 LUN的标识, 例如可以是第三 存储设备的 LUN ID。 换一种表达方式, 该字段用于表示当前复制任务指 向的目标存储设备中的目标 LUN。  ReplicationObject LUN ID: The ID of the target LUN of the third storage device that can be located in the 4th to 8th bytes. It can be the LUN ID of the third storage device. In other words, this field is used to indicate the target LUN in the target storage device pointed to by the current replication task.
Address: 也就是上面描述的进度地址字段, 该字段可以位于第 8个字 节之后, 用于携带当前的复制进度信息。 其中, 复制进度信息可以是一个 或一段逻辑单元地址(Logical Block Address, LBA )地址, 也可以是更新 后的复制位图。 例如可以是更新后的第一复制子位图。 当复制进度信息为 一个 LBA时, 可以用于表示已经复制的最后一个数据的 LBA。 当复制进 度信息为一段 LBA时, 可以用于表示当前已复制完成的所有数据的地址。 在此不对复制进度信息的具体形式进行限定, 只要能够表示复制进度即 可。  Address: This is the progress address field described above. This field can be located after the 8th byte and is used to carry the current copy progress information. The replication progress information may be one or a logical block address (LBA) address, or may be an updated copy bitmap. For example, it may be the updated first copy sub-bitmap. When the replication progress information is an LBA, it can be used to represent the LBA of the last data that has been copied. When the replication progress information is an LBA, it can be used to indicate the address of all data that has been copied. The specific form of the copy progress information is not limited here, as long as the progress of the copy can be indicated.
例如, 在第一存储设备发送给第二存储设备的复制进度消息中, 在复 制进度消息的头部, "源设备 ID" 字段可以为第一存储设备的 IP地址, "目标设备 ID" 字段可以为第二存储设备的 IP地址。 在复制进度消息的 内容部分, "LUN ID"字段可以为待复制的数据在第一存储设备中所属的 LUN的 ID; "ReplicationObject LUN ID" 字段可以为第三存储设备中的 目标 LUN的 ID; "Address"字段可以为已经复制的最后一个数据的 LBA。 需要说明的是, 在本发明实施例中, 由于预先配置有第一存储设备、 第二 存储设备以及第三存储设备中各个 LUN之间的复制关系。 从而, 第二存 储设备也可以根据复制进度消息中的 LUN ID字段确定当前复制任务对应 的第二存储设备中的 LUN。 可以理解的是, 第一存储设备和第二存储设备 中均会存储有所述 LUN对应关系。 并且第一存储设备和第二存储设备对 应的 LUN的 ID可以相同也可以不同, 只要能够根据所述 LUN对应关系 确定存储有相同的数据的对应的 LUN即可。 For example, in the replication progress message sent by the first storage device to the second storage device, in the head of the replication progress message, the "source device ID" field may be the IP address of the first storage device, and the "target device ID" field may be The IP address of the second storage device. In the content part of the replication progress message, the "LUN ID" field may be the data to be copied belonging to the first storage device. ID of the LUN; the "ReplicationObject LUN ID" field can be the ID of the target LUN in the third storage device; the "Address" field can be the LBA of the last data that has been copied. It should be noted that, in the embodiment of the present invention, the replication relationship between each LUN in the first storage device, the second storage device, and the third storage device is pre-configured. Therefore, the second storage device may also determine the LUN in the second storage device corresponding to the current replication task according to the LUN ID field in the replication progress message. It can be understood that the LUN correspondence relationship is stored in both the first storage device and the second storage device. The IDs of the LUNs corresponding to the first storage device and the second storage device may be the same or different, as long as the corresponding LUNs storing the same data can be determined according to the LUN correspondence relationship.
并且, 在上述实施例中, 所述复制启动消息可以携带复制启动信息字 段, 所述复制启动信息字段包含复制启动信息, 用于通知第二存储设备当 前复制任务触发。 需要说明的是, 只要携带复制启动信息字段的消息都可 以视作本发明实施例中的复制启动消息, 本发明实施例并没有对该消息的 名称做任何限定。  Moreover, in the above embodiment, the copy initiation message may carry a copy start information field, and the copy start information field includes copy start information for notifying the second storage device of the current copy task trigger. It should be noted that, as long as the message carrying the copy start information field can be regarded as the copy start message in the embodiment of the present invention, the name of the message is not limited in the embodiment of the present invention.
可选的, 所述复制启动消息还可以包含复制任务的标识字段, 所述复 制任务的标识字段包含复制任务的标识。 第二存储设备可以根据所述复制 任务的标识确定本次复制任务。  Optionally, the replication initiation message may further include an identifier field of the replication task, where the identifier field of the replication task includes an identifier of the replication task. The second storage device may determine the current replication task according to the identifier of the replication task.
可选的, 所述复制启动消息中还可以包含操作码字段, 所述操作码字 段包含所述复制启动消息的操作码, 用于指示所述消息是用于通知第二存 储设备本次复制任务触发的消息。  Optionally, the copy start message may further include an operation code field, where the operation code field includes an operation code of the copy start message, and is used to indicate that the message is used to notify the second storage device of the current copy task. Triggered message.
此外, 所述复制启动消息中还可以包含其他字段, 在此不做限定。 请参见图 4, 图 4为本发明一种数据复制方法的另一个实施例的方法 流程图, 如图 4所示, 所述方法应用于存储系统中, 所述存储系统包括至 少三个存储设备, 其中第一存储设备和第二存储设备中保存相同的数据, 所述方法包括:  In addition, other fields may be included in the copy start message, which is not limited herein. Referring to FIG. 4, FIG. 4 is a flowchart of a method for another method for data replication according to the present invention. As shown in FIG. 4, the method is applied to a storage system, where the storage system includes at least three storage devices. The first storage device and the second storage device store the same data, and the method includes:
步骤 31 : 第二存储设备接收第一存储设备发送的复制进度信息, 所述 复制进度信息用于指示所述第一存储设备已复制到第三存储设备的数据。 该步骤的具体实施方式可参考上述实施例中步骤 21 的描述, 在此不 再赘述。 Step 31: The second storage device receives the replication progress information sent by the first storage device, where The copy progress information is used to indicate that the first storage device has copied data to the third storage device. For a specific implementation of the step, reference may be made to the description of step 21 in the foregoing embodiment, and details are not described herein again.
步骤 32:根据所述复制进度信息将第一复制数据信息修改为第二复制 数据信息。  Step 32: Modify the first copy data information into the second copy data information according to the copy progress information.
当本次复制任务触发时, 第一存储设备可以向第二存储设备发送复制 启动消息, 所述复制启动消息中包含复制启动信息, 用于通知第二存储设 备复制任务触发, 所述复制启动消息的定义以及包含的各个字段的描述请 参考上述实施例的相关部分, 这里不再贅述。 需要说明的是, 所述第一复 制数据信息可以携带在所述复制启动消息中发送给所述第二存储设备。 可 选的, 第二存储设备也可以在接收所述复制启动信息之后生成所述第一复 制数据信息, 由于所述复制启动消息还携带有复制任务的标识, 因此第二 存储设备可以根据所述复制任务的标识确定当前复制任务, 并生成当前复 制任务对应的第一复制数据信息。 此时的第一复制数据信息用于指示所述 待复制到第三存储设备的所有数据的地址信息。  When the current replication task is triggered, the first storage device may send a replication start message to the second storage device, where the replication startup message includes replication startup information, and is used to notify the second storage device of the replication task triggering, where the replication startup message is generated. For the definition of the various fields and the description of the various fields involved, please refer to the relevant parts of the above embodiments, and details are not described herein again. It should be noted that the first copy data information may be carried in the copy start message and sent to the second storage device. Optionally, the second storage device may also generate the first copy data information after receiving the copy start information, where the copy start message further carries an identifier of the copy task, so the second storage device may be configured according to the The identifier of the replication task determines the current replication task, and generates the first replication data information corresponding to the current replication task. The first copy data information at this time is used to indicate address information of all data to be copied to the third storage device.
在实际应用中, 由于第一存储设备每次向第三存储设备复制完成一部 分数据都会向第二存储设备发送复制进度信息, 而第二存储设备在接收到 复制进度信息之后需要根据所述复制进度信息修改复制数据信息, 因此, 所述第一复制数据信息也可以是指经过修改后的复制数据信息。 具体而 言, 可以是第二存储设备接收上一次复制进度信息时, 根据上一次复制进 度信息修改后的复制数据信息, 或者, 所述第一复制数据信息用于接收本 次复制进度信息之前, 最近一次尚未复制到所述第三存储设备的数据。 例 如, 假设第一存储设备向第二存储设备发送所述复制进度信息之前, 还发 送过两次复制进度信息, 那么当前的复制进度信息是指第三次发送的复制 进度信息, 这里的第一复制数据信息是指第二存储设备根据第二复制进度 信息修改后的复制位图, 用于获得接收第三次复制进度信息之前, 根据第 二次复制进度信息修改后的复制位图对应的尚未复制的数据。 具体的, 将第一复制数据信息修改为第二复制数据信息的方式可以参 考上述实施例步骤 22相关部分的描述, 这里不再贅述。 In an actual application, since the first storage device copies a part of the data to the third storage device, the copy progress information is sent to the second storage device, and the second storage device needs to follow the copy progress after receiving the copy progress information. The information modification copy data information, therefore, the first copy data information may also refer to the modified copy data information. Specifically, the second storage device may be the copy data information modified according to the last copy progress information when the last copy progress information is received, or the first copy data information is used to receive the current copy progress information. The data that has not been copied to the third storage device most recently. For example, assuming that the first storage device sends the copy progress information twice before sending the copy progress information to the second storage device, the current copy progress information refers to the copy progress information sent for the third time, where the first The copy data information refers to a copy bitmap modified by the second storage device according to the second copy progress information, and is used to obtain the third copy progress information before receiving the third copy The unreplicated data corresponding to the copied bitmap after the secondary copy progress information is modified. Specifically, for the manner of modifying the first copy data information to the second copy data information, refer to the description of related parts in step 22 of the foregoing embodiment, and details are not described herein again.
步骤 33 : 当第一存储设备发生故障时,根据所述第二复制数据信息和 所述第二存储设备保存的待复制数据确定所述待复制数据中尚未复制的 数据, 所述待复制数据是所述第一存储设备待复制到第三存储设备的数 据。  Step 33: When the first storage device is faulty, determining, according to the second copy data information and the data to be copied saved by the second storage device, data that has not been copied in the data to be copied, where the data to be copied is The data of the first storage device to be copied to the third storage device.
需要说明的是, 所述待复制数据是指本次复制任务需要复制到第三存 储设备的所有数据, 是第一存储设备已复制到第三存储设备的数据与所述 尚未复制的数据的总和。  It should be noted that the data to be copied refers to all data that needs to be copied to the third storage device in the current replication task, and is the sum of the data that the first storage device has copied to the third storage device and the data that has not been copied. .
所述第二复制数据信息用于指示所述尚未复制的数据的地址信息, 因 此可以根据所述第二复制数据信息以及所述第二存储设备保存的待复制 数据获得所述尚未复制的数据。 举例来说, 可以根据第二复制数据信息确 定所述尚未复制的数据的地址, 根据所述地址从第二存储设备的緩存或者 存储器中获取所述尚未复制的数据。  The second copy data information is used to indicate the address information of the unreplicated data, so the unreplicated data can be obtained according to the second copy data information and the to-be-copied data saved by the second storage device. For example, the address of the unreplicated data may be determined according to the second copy data information, and the unreplicated data is obtained from the cache or the memory of the second storage device according to the address.
此外, 该步骤的具体实施方式可参考上述实施例步骤 22相关部分的 描述, 这里不再贅述。  In addition, for the specific implementation manner of this step, reference may be made to the description of related parts in step 22 of the foregoing embodiment, and details are not described herein again.
步骤 34:将所述待复制到第三存储设备的数据中尚未复制的数据发送 给所述第三存储设备。  Step 34: Send the data that has not been copied in the data to be copied to the third storage device to the third storage device.
该步骤的具体实施方式可参考上述实施例步骤 23 的描述, 这里不再 贅述。 需要说明的是, 在本发明实施例中, 所述已复制的数据和所述尚未 复制的数据在发送给第三存储设备之后, 是存储在第三存储设备的同一个 数据卷中的。  For a specific implementation of this step, refer to the description of step 23 in the foregoing embodiment, and details are not described herein again. It should be noted that, in the embodiment of the present invention, the copied data and the unreplicated data are stored in the same data volume of the third storage device after being sent to the third storage device.
在本发明实施例中,第二存储设备接收第一存储设备发送的复制进度信 息, 所述复制进度信息用于指示所述第一存储设备已复制的数据, 根据复 制进度信息修改复制数据信息; 由于第二存储设备事先保存有第一存储设 备待复制到第三存储设备的数据, 因此当第一存储设备发生故障时, 第二 存储设备可以根据修改后的复制数据信息以及所述第一存储设备待复制 到第三存储设备的数据确定尚未复制的数据, 并将所述尚未复制的数据发 送给所述第三存储设备。 避免了第一存储设备发送故障后重新发送所有的 待复制数据, 提高了复制效率。 In the embodiment of the present invention, the second storage device receives the copy progress information sent by the first storage device, where the copy progress information is used to indicate the data that the first storage device has copied, and the copy data information is modified according to the copy progress information; Since the second storage device stores the first storage device in advance The data to be copied to the third storage device is prepared, so when the first storage device fails, the second storage device may determine, according to the modified copy data information and the data of the first storage device to be copied to the third storage device. Data that has not been copied, and the unreplicated data is sent to the third storage device. The first storage device is prevented from resending all the data to be copied after sending a failure, thereby improving the replication efficiency.
下面以图 5所示的信令交互图为例, 说明第一存储设备、 第二存储设 备和第三存储设备三者完成一次异步远程复制任务的详细过程。 其中, 第 一存储设备是指图 1中的生产阵列 22 ,第二存储设备是指图 1中灾备阵列 33 , 第三存储设备是指图 1中的灾备阵列 44。请参考图 5 , 所述方法包括: 步骤 401 : 定时器触发异步远程复制任务。  The following takes the signaling interaction diagram shown in FIG. 5 as an example to describe the detailed process of completing the asynchronous remote replication task by the first storage device, the second storage device, and the third storage device. The first storage device refers to the production array 22 in FIG. 1 , the second storage device refers to the disaster recovery array 33 in FIG. 1 , and the third storage device refers to the disaster recovery array 44 in FIG. 1 . Referring to FIG. 5, the method includes: Step 401: A timer triggers an asynchronous remote replication task.
可选的, 异步远程复制任务(简称: 复制任务)可以由人为触发, 在 此不做限定。  Optionally, the asynchronous remote replication task (referred to as: replication task) can be triggered manually, and is not limited here.
步骤 402: 第一存储设备阻止接收主机发送的写数据请求。  Step 402: The first storage device blocks receiving a write data request sent by the host.
步骤 403 : 第一存储设备处理阻止之前接收的写数据请求。  Step 403: The first storage device processes the write data request received before blocking.
可选的, 写数据请求可以是一个, 也可以是多个。 处理写数据请求是指, 根据所述写数据请求携带的数据和所述数据的地址, 将所述数据和所述数据 的地址写入緩存, 并在差异位图中记录所述数据; 具体的实施方式可参考图 3以及步骤 21的描述。  Optionally, the write data request may be one or multiple. Processing the write data request means: writing the data and the address of the data to the cache according to the data carried by the write data request and the address of the data, and recording the data in the difference bitmap; For the implementation, reference may be made to the description of FIG. 3 and step 21.
步骤 404: 第一存储设备向第二存储设备发送复制启动消息, 所述复 制启动消息包含复制启动信息, 用于通知第二存储设备本次复制任务触 发。  Step 404: The first storage device sends a copy start message to the second storage device, where the copy start message includes copy start information, and is used to notify the second storage device that the copy task is triggered.
需要说明的是步骤 404和步骤 403之间没有先后顺序之分。  It should be noted that there is no order between step 404 and step 403.
步骤 405 : 第二存储设备阻止接收写数据请求。  Step 405: The second storage device blocks receiving the write data request.
步骤 406: 第二存储设备处理阻止之前接收的写数据请求。  Step 406: The second storage device processes the write data request received before blocking.
可选的, 写数据请求可以是一个, 也可以是多个。 处理写数据请求是指, 根据所述写数据请求携带的数据和所述数据的地址, 将所述数据和所述数据 的地址写入緩存, 并在差异位图中记录所述数据; 具体的实施方式可参考图Optionally, the write data request may be one or multiple. Processing the write data request means, according to the data carried by the write data request and the address of the data, the data and the data Address is written to the cache, and the data is recorded in the difference bitmap; the specific implementation can refer to the figure
3以及步骤 21的描述。 3 and the description of step 21.
步骤 407: 第二存储设备创建数据卷的副本。  Step 407: The second storage device creates a copy of the data volume.
复制任务是指将一段时间内一个数据卷接收到的数据发送给第三存 储设备。 因此, 在复制任务触发时需创建所述数据卷的副本。 所述数据卷 的副本也是指本次复制任务中, 待复制到第三存储设备的数据。 创建所述 数据卷的副本的方式可以是通过快照方式创建, 也可以是在接收的写数据 请求中增加时间片编号的方式创建。具体的实施方式可参考本发明实施例的 系统架构部分的描述, 在此不再贅述。  A replication task is the sending of data received by a data volume over a period of time to a third storage device. Therefore, a copy of the data volume needs to be created when the replication task is triggered. The copy of the data volume is also the data to be copied to the third storage device in the copy task. A copy of the data volume may be created by means of a snapshot or by adding a time slice number to the received write data request. For a specific implementation, refer to the description of the system architecture part of the embodiment of the present invention, and details are not described herein again.
步骤 408: 第二存储设备根据差异位图生成复制位图。  Step 408: The second storage device generates a copy bitmap according to the difference bitmap.
具体的实施方式可参考步骤 21相关部分的描述。  For a specific implementation, refer to the description of the relevant part of step 21.
步骤 409: 第二存储设备向第一存储设备发送所述复制启动消息的响 应消息。  Step 409: The second storage device sends a response message of the copy initiation message to the first storage device.
步骤 410: 第一存储设备创建当前的数据卷的副本。  Step 410: The first storage device creates a copy of the current data volume.
所述数据卷的副本也是指本次复制任务中, 待复制到第三存储设备的 数据。 创建所述数据卷的副本的方式可以是通过快照方式创建, 也可以是 在接收的写数据请求中增加时间片编号的方式创建。 具体的实施方式可参 考本发明实施例的系统架构部分的描述, 在此不再贅述。  The copy of the data volume is also the data to be copied to the third storage device in the current replication task. A copy of the data volume may be created by means of a snapshot or by adding a time slice number to the received write data request. For a specific implementation, refer to the description of the system architecture part of the embodiment of the present invention, and details are not described herein again.
步骤 411 : 第一存储设备根据差异位图生成复制位图。  Step 411: The first storage device generates a copy bitmap according to the difference bitmap.
具体的实施方式可参考步骤 21相关部分的描述。  For a specific implementation, refer to the description of the relevant part of step 21.
需要说明的是, 步骤 410和步骤 411可以在步骤 407和步骤 408之后执 行, 也可以在步骤 407和步骤 408之前执行。  It should be noted that step 410 and step 411 may be performed after step 407 and step 408, or may be performed before step 407 and step 408.
步骤 412: 第一存储设备向第二存储设备发送解除阻止消息。  Step 412: The first storage device sends an unblocking message to the second storage device.
在第一存储设备创建完成数据卷的副本, 并生成复制位图之后, 可以 向第二存储设备发送解除阻止消息。  After the first storage device creates a copy of the completed data volume and generates a duplicate bitmap, the unblocking message can be sent to the second storage device.
步骤 413 : 第一存储设备解除阻止接收主机发送的写数据请求。 第一存储设备解除阻止之后, 可以继续接收并处理主机或第二存储设 备发送的写数据请求, 并修改差异位图。 Step 413: The first storage device releases the write data request sent by the receiving host. After the first storage device is unblocked, the write data request sent by the host or the second storage device may continue to be received and processed, and the difference bitmap may be modified.
步骤 414a: 第二存储设备解除阻止接收写数据请求。  Step 414a: The second storage device unblocks the request to receive the write data.
第二存储设备解除阻止之后, 可以继续接收并处理主机或第一存储设 备发送的写数据请求, 并修改差异位图。  After the second storage device is unblocked, the write data request sent by the host or the first storage device can continue to be received and processed, and the difference bitmap can be modified.
步骤 414b:第一存储设备根据复制位图获得待复制到第三存储设备的 数据。  Step 414b: The first storage device obtains data to be copied to the third storage device according to the copy bitmap.
可选的, 第一存储设备可以根据复制位图中的标志位获得待复制到第 三存储设备的数据的地址, 根据所述待复制到第三存储设备的数据的地址 获得所述待复制到第三存储设备的数据。  Optionally, the first storage device may obtain an address of the data to be copied to the third storage device according to the flag bit in the copy bitmap, and obtain the to-be-copied according to the address of the data to be copied to the third storage device. The data of the third storage device.
步骤 415: 第一存储设备向第三存储设备发送写数据命令, 其中所述 写数据命令包含本次复制任务对应的待写入第三存储设备的数据的一部分。  Step 415: The first storage device sends a write data command to the third storage device, where the write data command includes a part of the data to be written to the third storage device corresponding to the current copy task.
步骤 416:第三存储设备向第一存储设备发送写数据命令的响应消息。 步骤 417: 第一存储设备向第二存储设备发送复制进度消息, 所述复 制进度消息中包含复制进度信息, 所述复制进度信息可以是一个地址或者 一段地址, 用于表示第一存储设备已经复制完成的数据的地址。  Step 416: The third storage device sends a response message to the first storage device to write a data command. Step 417: The first storage device sends a replication progress message to the second storage device, where the replication progress message includes replication progress information, where the replication progress information may be an address or an address, indicating that the first storage device has been copied. The address of the completed data.
步骤 418: 第一存储设备修改其保存的复制位图。 例如, 删除复制位 图中已复制的数据的地址所在的格子, 或者将复制位图中已复制的数据的 地址所在的格子的标志位置为 0。  Step 418: The first storage device modifies its saved copy bitmap. For example, delete the grid where the address of the copied data in the copy bitmap is located, or set the flag position of the grid where the address of the copied data in the bitmap is located to 0.
需要说明的是, 在本发明实施例中, 可以先执行步骤 418 , 再执行步 骤 417 , 此时步骤 417中发送的复制进度信息可以是一个地址或者一段地 址, 也可以是步骤 418中修改后的复制位图。  It should be noted that, in the embodiment of the present invention, step 418 may be performed first, and then step 417 is performed. The copy progress information sent in step 417 may be an address or an address, or may be modified in step 418. Copy the bitmap.
步骤 419: 第二存储设备根据所述复制进度信息修改其保存的复制位 图。 例如, 当所述复制进度信息是一个地址或者一段地址时, 第二存储设 备可以根据该地址, 删除复制位图中已复制的数据的地址所在的格子, 或 者将复制位图中已复制的数据的地址所在的格子的标志位置为 0。 步骤 420: 第三存储设备发现与第一存储设备的复制中断, 向第二存 储设备发送检测消息, 所述检测信息用于指示所述第一存储设备发生故 障。 Step 419: The second storage device modifies the saved copy bitmap according to the copy progress information. For example, when the copy progress information is an address or a piece of address, the second storage device may delete the cell in which the address of the copied data in the copy bitmap is located according to the address, or copy the copied data in the bitmap. The flag of the grid where the address is located is 0. Step 420: The third storage device finds that the replication with the first storage device is interrupted, and sends a detection message to the second storage device, where the detection information is used to indicate that the first storage device is faulty.
步骤 421 : 第二存储设备根据修改后的复制位图获得尚未复制到第三 存储设备的数据。 具体的实施方式可参考步骤 22相关部分的描述, 这里 不再赘述。  Step 421: The second storage device obtains data that has not been copied to the third storage device according to the modified copy bitmap. For a specific implementation, refer to the description of related parts in step 22, and details are not described herein again.
步骤 422: 第二存储设备向第三存储设备发送写数据命令, 所述写数 据命令可以是一个或多个, 用于发送所述尚未复制到所述第三存储设备的 数据。  Step 422: The second storage device sends a write data command to the third storage device, where the write data command may be one or more, for sending the data that has not been copied to the third storage device.
步骤 423 : 第三存储设备向第二存储设备发送所述写数据命令的响应 消息。  Step 423: The third storage device sends a response message of the write data command to the second storage device.
当第三存储设备接收到第二存储设备发送的写数据命令, 可以向第二 存储设备发送所述写数据命令的响应消息。 第二存储设备可以根据所述响 应消息确定本次复制任务已完成。  When the third storage device receives the write data command sent by the second storage device, the response message of the write data command may be sent to the second storage device. The second storage device may determine, according to the response message, that the copy task has been completed.
可选的, 当第三存储设备接收完毕本次复制任务对应的所有数据时, 可以再向第二存储设备发送一个指示消息, 用以指示本次复制任务对应的 所有数据已复制完成。  Optionally, when the third storage device receives all the data corresponding to the current replication task, the device may send an indication message to the second storage device to indicate that all data corresponding to the current replication task has been copied.
步骤 424: 第一存储设备故障恢复。  Step 424: The first storage device fails to recover.
第二存储设备可以通过心跳信号, 或者由第三存储设备告知等方式确 定第一存储设备故障已恢复。  The second storage device may determine that the first storage device failure has been recovered by means of a heartbeat signal or by a third storage device notification.
步骤 425 : 第二存储设备发送复制进度信息给第一存储设备, 以说明 本次复制任务已完成。  Step 425: The second storage device sends the replication progress information to the first storage device, to indicate that the copy task is completed.
所述复制进度信息与步骤 417中的复制进度信息类似。 当本次复制任 务完成时, 所述复制进度信息可以用于指示所述本次复制任务已完成。  The copy progress information is similar to the copy progress information in step 417. When the copy task is completed, the copy progress information may be used to indicate that the current copy task has been completed.
可选的, 在本次复制任务完成之后, 第二存储设备也可以向第一存储 设备再发送一条指示消息, 用于指示所述本次复制任务已完成。 步骤 426: 第一存储设备删除本次复制任务对应的复制位图。 Optionally, after the current replication task is completed, the second storage device may further send an indication message to the first storage device, to indicate that the current replication task is completed. Step 426: The first storage device deletes the copy bitmap corresponding to the current replication task.
可选的, 本次复制任务完成以后, 第一存储设备可以删除本次复制任 务对应的复制位图, 以节省存储空间。  Optionally, after the replication task is completed, the first storage device may delete the replication bitmap corresponding to the replication task to save storage space.
步骤 427 : 第二存储设备删除本次复制任务对应的复制位图。  Step 427: The second storage device deletes the copy bitmap corresponding to the current replication task.
可选的, 本次复制任务完成以后, 第二存储设备可以删除本次复制任 务对应的复制位图, 以节省存储空间。  Optionally, after the replication task is completed, the second storage device may delete the duplicate bitmap corresponding to the replication task to save storage space.
本发明实施例在第一存储设备发生故障时, 第二存储设备可以接替第 一存储设备将本次复制任务对应的尚未复制的数据发送给第三存储设备, 避免了重新发送本次复制任务对应的所有数据, 提高了复制效率。  In the embodiment of the present invention, when the first storage device is faulty, the second storage device may replace the first storage device to send the unreplicated data corresponding to the current replication task to the third storage device, and avoid resending the corresponding copy task. All the data improves replication efficiency.
本发明实施例的装置  Device of embodiment of the invention
请参考图 6 ,图 6是本发明实施例一种数据复制装置 60的结构示意图, 如图 6所示, 所述存储设备 60包括: 接收模块 601、 确定模块 602和发送 模块 603。  Referring to FIG. 6, FIG. 6 is a schematic structural diagram of a data replication apparatus 60 according to an embodiment of the present invention. As shown in FIG. 6, the storage device 60 includes: a receiving module 601, a determining module 602, and a sending module 603.
其中, 接收模块 601 , 用于接收第一存储设备发送的复制进度信息, 所述复制进度信息用于指示所述第一存储设备已复制到第三存储设备的 数据;  The receiving module 601 is configured to receive the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied data to the third storage device.
确定模块 602 , 用于当第一存储设备发生故障时, 根据所述复制进度 信息和所述第二存储设备保存的待复制数据确定所述待复制数据中尚未 复制的数据, 所述待复制数据是所述第一存储设备待复制到第三存储设备 的数据;  a determining module 602, configured to determine, according to the copy progress information and the to-be-copied data saved by the second storage device, data that has not been copied, the data to be copied, when the first storage device is faulty. Is data of the first storage device to be copied to the third storage device;
发送模块 603 ,用于将所述尚未复制的数据发送给所述第三存储设备。 可选的, 所述接收模块 601 , 具体用于接收所述第一存储设备发送的 包含进度地址字段的消息, 所述进度地址字段用于表示所述复制进度信 息。  The sending module 603 is configured to send the unreplicated data to the third storage device. Optionally, the receiving module 601 is configured to receive, by the first storage device, a message that includes a progress address field, where the progress address field is used to indicate the copy progress information.
可选的, 所述第二存储设备中保存有复制数据信息, 所述复制数据信 息用于获得所述待复制的数据。 可选的, 所述数据复制装置 60 , 还可以包括生成模块 604 , 用于当接 收到所述第一存储设备发送的复制启动信息时, 根据所述复制启动信息生 成所述复制数据信息。 Optionally, the second storage device stores the copied data information, where the copied data information is used to obtain the data to be copied. Optionally, the data replication device 60 may further include a generating module 604, configured to generate the replication data information according to the replication startup information when receiving the replication startup information sent by the first storage device.
可选的, 所述接收模块 601 , 还可以用于接收所述第一存储设备发送 的所述复制数据信息。  Optionally, the receiving module 601 is further configured to receive the duplicate data information sent by the first storage device.
可选的, 所述接收模块 601 , 还可以用于接收所述第三存储设备的检 测信息, 所述检测信息用于指示所述第一存储设备发生故障。  Optionally, the receiving module 601 is further configured to receive the detection information of the third storage device, where the detection information is used to indicate that the first storage device is faulty.
本发明实施例所提供的装置, 可以设置于前面实施例所描述的第二存 储设备的控制器中, 用于执行前面实施例所描述的数据复制方法, 各个模 块功能的详细描述可参见方法实施例中的描述, 在此不再贅述。  The device provided by the embodiment of the present invention may be disposed in the controller of the second storage device described in the previous embodiment, and is used to execute the data replication method described in the foregoing embodiments. For a detailed description of each module function, refer to the method implementation. The description in the example will not be repeated here.
在本发明实施例中,第二存储设备接收第一存储设备发送的复制进度信 息, 所述复制进度信息用于指示所述第一存储设备已复制到第三存储设备 的数据; 当第一存储设备发生故障时, 第二存储设备可以根据所述复制进 度信息和所述第二存储设备保存的待复制数据确定所述待复制数据中尚 未复制的数据, 并将所述尚未复制的数据发送给所述第三存储设备。 由于 第二存储设备可以确定出尚未复制的数据, 避免了重新发送所有的待复制 数据, 提高了复制效率。  In the embodiment of the present invention, the second storage device receives the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied data to the third storage device; When the device is faulty, the second storage device may determine, according to the replication progress information and the data to be copied saved by the second storage device, data that has not been copied in the data to be copied, and send the data that has not been copied to the data. The third storage device. Since the second storage device can determine the data that has not been copied, it avoids resending all the data to be copied, which improves the copying efficiency.
请参考图 7 ,图 7是本发明实施例一种数据复制装置 70的结构示意图, 如图 7所示, 所述存储设备 70包括: 接收模块 701、 修改模块 702、 确定 模块 703和发送模块 704。  Please refer to FIG. 7. FIG. 7 is a schematic structural diagram of a data replication apparatus 70 according to an embodiment of the present invention. As shown in FIG. 7, the storage device 70 includes: a receiving module 701, a modifying module 702, a determining module 703, and a sending module 704. .
其中, 接收模块 701 , 用于接收第一存储设备发送的复制进度信息, 所述复制进度信息用于指示所述第一存储设备已复制到第三存储设备的 数据;  The receiving module 701 is configured to receive the replication progress information sent by the first storage device, where the replication progress information is used to indicate that the first storage device has copied the data to the third storage device.
修改模块 702 , 用于根据所述复制进度信息将第一复制数据信息修改 为第二复制数据信息;  The modifying module 702 is configured to modify the first copy data information into the second copy data information according to the copy progress information.
确定模块 703 , 用于当第一存储设备发生故障时, 根据所述第二复制 数据信息和所述第二存储设备保存的待复制数据确定所述待复制数据中 尚未复制的数据, 所述待复制数据是所述第一存储设备待复制到第三存储 设备的数据; a determining module 703, configured to: when the first storage device fails, according to the second copy The data information and the data to be copied saved by the second storage device determine data that has not been copied in the data to be copied, and the data to be copied is data to be copied by the first storage device to the third storage device;
发送模块 704 ,用于将所述尚未复制的数据发送给所述第三存储设备。 可选的, 接收模块 701 , 具体用于接收所述第一存储设备发送的包含 进度地址字段的消息, 所述进度地址字段用于表示所述复制进度信息。  The sending module 704 is configured to send the unreplicated data to the third storage device. Optionally, the receiving module 701 is configured to receive a message that is sent by the first storage device and includes a progress address field, where the progress address field is used to indicate the copy progress information.
可选的, 所述第一复制数据信息用于获得接收所述复制进度信息之 前, 最近一次尚未复制到所述第三存储设备的数据。  Optionally, the first copy data information is used to obtain data that has not been copied to the third storage device last time before receiving the copy progress information.
可选的, 所述数据复制装置 70 , 还可以包括生成模块 705 , 用于当接 收到所述第一存储设备发送的复制启动信息时, 根据所述复制启动信息生 成第一复制数据信息。  Optionally, the data replication device 70 may further include a generating module 705, configured to generate first replication data information according to the replication startup information when receiving the replication startup information sent by the first storage device.
可选的, 所述接收模块 704 , 还可以用于接收所述第一存储设备发送 的所述第一复制数据信息。  Optionally, the receiving module 704 is further configured to receive the first copy data information that is sent by the first storage device.
可选的, 所述接收模块 704 , 还可以用于接收所述第三存储设备的检 测信息, 所述检测信息用于指示所述第一存储设备发生故障。  Optionally, the receiving module 704 is further configured to receive the detection information of the third storage device, where the detection information is used to indicate that the first storage device is faulty.
本发明实施例所提供的装置, 可以设置于前面实施例所描述的第二存 储设备的控制器中, 用于执行前面实施例所描述的数据复制方法, 各个模 块功能的详细描述可参见方法实施例中的描述, 在此不再贅述。  The device provided by the embodiment of the present invention may be disposed in the controller of the second storage device described in the previous embodiment, and is used to execute the data replication method described in the foregoing embodiments. For a detailed description of each module function, refer to the method implementation. The description in the example will not be repeated here.
在本发明实施例中,第二存储设备接收第一存储设备发送的复制进度信 息, 所述复制进度信息用于指示所述第一存储设备已复制的数据, 根据复 制进度信息修改复制数据信息; 由于第二存储设备事先保存有第一存储设 备待复制到第三存储设备的数据, 因此当第一存储设备发生故障时, 第二 存储设备可以根据修改后的复制数据信息以及所述第一存储设备待复制 到第三存储设备的数据确定尚未复制的数据, 并将所述尚未复制的数据发 送给所述第三存储设备。 避免了第一存储设备发送故障后重新发送所有的 待复制数据, 提高了复制效率。 如图 8 , 为本发明实施例提供的存储设备, 包括: In the embodiment of the present invention, the second storage device receives the copy progress information sent by the first storage device, where the copy progress information is used to indicate the data that the first storage device has copied, and the copy data information is modified according to the copy progress information; Since the second storage device saves the data of the first storage device to be copied to the third storage device in advance, when the first storage device fails, the second storage device may according to the modified copy data information and the first storage. The data of the device to be copied to the third storage device determines the data that has not been copied, and transmits the data that has not been copied to the third storage device. The first storage device is prevented from resending all the data to be copied after sending a failure, thereby improving the replication efficiency. As shown in FIG. 8, a storage device according to an embodiment of the present invention includes:
处理器 801、存储器 802、 系统总线(简称总线) 805和通信接口 803。 处理器 801、 存储器 802和通信接口 803之间通过系统总线 805连接并完 成相互间的通信。  A processor 801, a memory 802, a system bus (abbreviated as bus) 805, and a communication interface 803. The processor 801, the memory 802, and the communication interface 803 are connected by a system bus 805 and perform communication with each other.
处理器 801可能为单核或多核中央处理单元, 或者为特定集成电路, 或者为被配置成实施本发明实施例的一个或多个集成电路。  Processor 801 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
存储器 802 可以为高速 RAM 存储器, 也可以为非易失性存储器 ( non-volatile memory ) , 例 ^口至少一个硬盘存 4诸器。  The memory 802 can be a high speed RAM memory or a non-volatile memory, for example, at least one hard disk memory.
通信接口 803用于与存储设备通信。  Communication interface 803 is used to communicate with the storage device.
存储器 802用于存储计算机执行指令 8021。 具体的, 计算机执行指令 Memory 802 is used to store computer execution instructions 8021. Specifically, the computer executes the instructions
8021中可以包括程序代码。 Program code can be included in the 8021.
当计算机运行时, 处理器 801运行计算机执行指令 8021 , 可以执行图 2所述的方法流程。  When the computer is running, the processor 801 runs the computer execution instruction 8021, and the method flow described in FIG. 2 can be performed.
如图 9, 为本发明实施例提供的存储设备, 包括:  FIG. 9 is a storage device according to an embodiment of the present invention, including:
处理器 901、存储器 902、 系统总线 (简称总线 ) 905和通信接口 903。 处理器 901、 存储器 902和通信接口 903之间通过系统总线 905连接并完 成相互间的通信。  A processor 901, a memory 902, a system bus (abbreviated as bus) 905, and a communication interface 903. The processor 901, the memory 902, and the communication interface 903 are connected by a system bus 905 and perform communication with each other.
处理器 901可能为单核或多核中央处理单元, 或者为特定集成电路, 或者为被配置成实施本发明实施例的一个或多个集成电路。  Processor 901 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
存储器 902 可以为高速 RAM 存储器, 也可以为非易失性存储器 The memory 902 can be a high speed RAM memory or a nonvolatile memory.
( non-volatile memory ) , 例 ^口至少一个硬盘存 4诸器。 (non-volatile memory), for example, at least one hard disk is stored in the device.
通信接口 903用于与存储设备通信。  Communication interface 903 is used to communicate with the storage device.
存储器 902用于存储计算机执行指令 9021。 具体的, 计算机执行指令 9021中可以包括程序代码。  Memory 902 is used to store computer execution instructions 9021. Specifically, the program code may be included in the computer execution instruction 9021.
当计算机运行时, 处理器 901运行计算机执行指令 9021 , 可以执行图 When the computer is running, the processor 901 runs the computer execution instruction 9021, which can execute the map.
4所述的方法流程。 所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述描 述的设备和模块的具体工作过程, 可以参考前述方法实施例中的对应过程描 述, 在此不再赘述。 4 method flow described. A person skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the device and the module described above may be referred to the corresponding process description in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的设备和方法, 可以通过其它的方式实现。 例如, 以上所描述的设备实施例仅仅是示意性的, 例如, 所述模块的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另外 的划分方式, 例如多个模块或组件可以结合或者可以集成到另一个设备中, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合 或直接耦合或通信连接可以是通过一些通信接口, 设备或模块的间接耦合或 通信连接, 可以是电性, 机械或其它的形式。  In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. In actual implementation, there may be another division manner, for example, multiple modules or components may be combined or Can be integrated into another device, or some features can be ignored, or not executed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some communication interface, device or module, and may be in electrical, mechanical or other form.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的, 作 为模块显示的部件可以是或者也可以不是物理子模块,即可以位于一个地方, 或者也可以分布到多个网络子模块上。 可以根据实际的需要选择其中的部分 或者全部, 模块来实现本实施例方案的目的。  The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical sub-modules, that is, may be located in one place, or may be distributed to multiple network sub-modules. on. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中, 也可以是各个模块单独物理存在, 也可以两个或两个以上模块集成在一个模 块中。  In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可 以通过硬件来完成, 也可以通过程序来指令相关的硬件完成, 所述的程序 可以存储于一种计算机可读存储介质中, 上述提到的存储介质可以是只读 存储器, 磁盘或光盘等。  A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。  Finally, it should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting thereof; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims

权 利 要 求 书 claims
1、 一种数据复制方法, 其特征在于, 所述方法应用于存储系统中, 所述存储系统包括至少三个存储设备, 其中第一存储设备和第二存储设备 中保存相同的数据, 所述方法包括: 1. A data copying method, characterized in that the method is applied to a storage system, the storage system includes at least three storage devices, wherein the same data is stored in the first storage device and the second storage device, Methods include:
所述第二存储设备接收所述第一存储设备发送的复制进度信息, 所述 复制进度信息用于指示所述第一存储设备已复制到第三存储设备的数据; 当所述第一存储设备发生故障时, 根据所述复制进度信息和所述第二 存储设备保存的待复制数据确定所述待复制数据中尚未复制的数据, 所述 待复制数据是所述第一存储设备待复制到所述第三存储设备的数据; The second storage device receives the copy progress information sent by the first storage device, and the copy progress information is used to indicate that the first storage device has copied the data to the third storage device; when the first storage device When a failure occurs, the data that has not yet been copied among the data to be copied is determined based on the copy progress information and the data to be copied stored in the second storage device, and the data to be copied is the data to be copied to the first storage device. The data of the third storage device;
将所述尚未复制的数据发送给所述第三存储设备。 Send the data that has not been copied to the third storage device.
2、 根据权利要求 1 所述的方法, 其特征在于, 所述第二存储设备接 收第一存储设备发送的复制进度信息包括: 2. The method according to claim 1, wherein the second storage device receiving the copy progress information sent by the first storage device includes:
所述第二存储设备接收所述第一存储设备发送的包含进度地址字段 的消息, 所述进度地址字段用于表示所述复制进度信息。 The second storage device receives a message containing a progress address field sent by the first storage device, where the progress address field is used to represent the copy progress information.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述第二存储设 备中保存有复制数据信息, 所述复制数据信息用于获得所述待复制数据。 3. The method according to claim 1 or 2, characterized in that the second storage device stores copied data information, and the copied data information is used to obtain the data to be copied.
4、 根据权利要求 3所述的方法, 其特征在于, 还包括: 4. The method according to claim 3, further comprising:
当接收到所述第一存储设备发送的复制启动信息时, 根据所述复制启 动信息生成所述复制数据信息。 When receiving the copy start information sent by the first storage device, the copy data information is generated according to the copy start information.
5、 根据权利要求 3所述的方法, 其特征在于, 还包括: 5. The method according to claim 3, further comprising:
接收所述第一存储设备发送的所述复制数据信息。 Receive the copied data information sent by the first storage device.
6、 根据权利要求 1 -5任一权利要求所述的方法, 其特征在于, 当所述 第一存储设备发生故障时, 还包括: 6. The method according to any one of claims 1 to 5, characterized in that when the first storage device fails, it further includes:
接收所述第三存储设备发送的检测信息, 所述检测信息用于指示所述 第一存储设备发生故障。 Receive detection information sent by the third storage device, where the detection information is used to indicate the The first storage device has failed.
7、 一种数据复制方法, 其特征在于, 所述方法应用于存储系统中, 所述存储系统包括至少三个存储设备, 其中第一存储设备和第二存储设备 中保存相同的数据, 所述方法包括: 7. A data copying method, characterized in that the method is applied to a storage system, the storage system includes at least three storage devices, wherein the same data is stored in the first storage device and the second storage device, and the Methods include:
所述第二存储设备接收所述第一存储设备发送的复制进度信息, 所述 复制进度信息用于指示所述第一存储设备已复制到第三存储设备的数据; 根据所述复制进度信息将第一复制数据信息修改为第二复制数据信 息; The second storage device receives the copy progress information sent by the first storage device, and the copy progress information is used to indicate that the first storage device has copied the data to the third storage device; according to the copy progress information, The first copied data information is modified into the second copied data information;
当所述第一存储设备发生故障时, 根据所述第二复制数据信息和所述 第二存储设备保存的待复制数据确定所述待复制数据中尚未复制的数据, 所述待复制数据是所述第一存储设备待复制到所述第三存储设备的数据; 将所述尚未复制的数据发送给所述第三存储设备。 When the first storage device fails, the data that has not yet been copied among the data to be copied is determined based on the second copy data information and the data to be copied stored in the second storage device, and the data to be copied is the data to be copied. The data to be copied from the first storage device to the third storage device; and the data that has not yet been copied is sent to the third storage device.
8、 根据权利要求 7 所述的方法, 其特征在于, 所述第二存储设备接 收第一存储设备发送的复制进度信息包括: 8. The method according to claim 7, wherein the second storage device receiving the copy progress information sent by the first storage device includes:
所述第二存储设备接收所述第一存储设备发送的包含进度地址字段 的消息, 所述进度地址字段用于表示所述复制进度信息。 The second storage device receives a message containing a progress address field sent by the first storage device, where the progress address field is used to represent the copy progress information.
9、 根据权利要求 7 所述的方法, 其特征在于, 所述第一复制数据信 息用于获得接收所述复制进度信息之前, 最近一次尚未复制到所述第三存 储设备的数据。 9. The method according to claim 7, wherein the first copied data information is used to obtain the latest data that has not been copied to the third storage device before receiving the copy progress information.
10、 根据权利要求 9所述的方法, 其特征在于, 还包括: 10. The method according to claim 9, further comprising:
当接收到所述第一存储设备发送的复制启动信息时, 根据所述复制启 动信息生成第一复制数据信息。 When the copy start information sent by the first storage device is received, first copy data information is generated according to the copy start information.
11、 根据权利要求 7所述的方法, 其特征在于, 还包括: 11. The method according to claim 7, further comprising:
接收所述第一存储设备发送的所述第一复制数据信息。 Receive the first copied data information sent by the first storage device.
12、根据权利要求 7-11任一权利要求所述的方法, 其特征在于, 当所 述第一存储设备发生故障时, 还包括: 接收所述第三存储设备发送的检测信息, 所述检测信息用于指示所述 第一存储设备发生故障。 12. The method according to any one of claims 7 to 11, characterized in that when the first storage device fails, it further includes: Receive detection information sent by the third storage device, where the detection information is used to indicate that the first storage device has failed.
13、 一种数据复制装置, 其特征在于, 所述数据复制装置位于第二存 储设备中, 包括: 13. A data copying device, characterized in that the data copying device is located in a second storage device and includes:
接收模块, 用于接收第一存储设备发送的复制进度信息, 所述复制进 度信息用于指示所述第一存储设备已复制到第三存储设备的数据; A receiving module, configured to receive copy progress information sent by the first storage device, where the copy progress information is used to indicate that the first storage device has copied data to a third storage device;
确定模块, 用于当所述第一存储设备发生故障时, 根据所述复制进度 信息和所述第二存储设备保存的待复制数据确定所述待复制数据中尚未 复制的数据, 所述待复制数据是所述第一存储设备待复制到所述第三存储 设备的数据; Determining module, configured to determine, when the first storage device fails, the data that has not yet been copied in the data to be copied based on the copy progress information and the data to be copied stored in the second storage device, the data to be copied The data is data to be copied from the first storage device to the third storage device;
发送模块, 用于将所述尚未复制的数据发送给所述第三存储设备。 A sending module, configured to send the data that has not been copied to the third storage device.
14、 根据权利要求 13所述的装置, 其特征在于, 14. The device according to claim 13, characterized in that,
所述接收模块, 用于接收所述第一存储设备发送的包含进度地址字段 的消息, 所述进度地址字段用于表示所述复制进度信息。 The receiving module is configured to receive a message containing a progress address field sent by the first storage device, where the progress address field is used to represent the copy progress information.
15、 根据权利要求 13或 14所述的装置, 其特征在于, 所述第二存储 设备中保存有复制数据信息, 所述复制数据信息用于获得所述待复制数 据。 15. The device according to claim 13 or 14, characterized in that the second storage device stores copied data information, and the copied data information is used to obtain the data to be copied.
16、 根据权利要求 15所述的装置, 其特征在于, 还包括: 16. The device according to claim 15, further comprising:
生成模块, 用于当接收到所述第一存储设备发送的复制启动信息时, 根据所述复制启动信息生成所述复制数据信息。 A generating module, configured to generate the copy data information according to the copy start information when receiving the copy start information sent by the first storage device.
17、 根据权利要求 15所述的装置, 其特征在于, 17. The device according to claim 15, characterized in that,
所述接收模块, 还用于接收所述第一存储设备发送的所述复制数据信 息。 The receiving module is also configured to receive the copied data information sent by the first storage device.
18、 根据权利要求 13- 17任一权利要求所述的装置, 其特征在于, 所述接收模块, 还用于当所述第一存储设备发生故障时, 接收所述第 三存储设备发送的检测信息, 所述检测信息用于指示所述第一存储设备发 生故障。 18. The device according to any one of claims 13 to 17, characterized in that the receiving module is also configured to receive the detection sent by the third storage device when the first storage device fails. information, the detection information is used to instruct the first storage device to send malfunction occurs.
19、 一种数据复制装置, 其特征在于, 所述数据复制装置位于第二存 储设备中, 包括: 19. A data copying device, characterized in that the data copying device is located in a second storage device and includes:
接收模块, 用于接收第一存储设备发送的复制进度信息, 所述复制进 度信息用于指示所述第一存储设备已复制到第三存储设备的数据; A receiving module, configured to receive copy progress information sent by the first storage device, where the copy progress information is used to indicate that the first storage device has copied data to a third storage device;
修改模块, 用于根据所述复制进度信息将所述第一复制数据信息修改 为第二复制数据信息; A modification module, configured to modify the first copied data information into the second copied data information according to the copy progress information;
确定模块, 用于当第一存储设备发生故障时, 根据所述第二复制数据 信息和所述第二存储设备保存的待复制数据确定所述待复制数据中尚未 复制的数据, 所述待复制数据是所述第一存储设备待复制到所述第三存储 设备的数据; Determining module, configured to determine, when the first storage device fails, the data that has not been copied in the data to be copied based on the second copied data information and the data to be copied stored in the second storage device, and the data to be copied is The data is data to be copied from the first storage device to the third storage device;
发送模块, 用于将所述尚未复制的数据发送给所述第三存储设备。 A sending module, configured to send the data that has not been copied to the third storage device.
20、 根据权利要求 19所述的装置, 其特征在于, 20. The device according to claim 19, characterized in that,
所述接收模块, 用于接收所述第一存储设备发送的包含进度地址字段 的消息, 所述进度地址字段用于表示所述复制进度信息。 The receiving module is configured to receive a message containing a progress address field sent by the first storage device, where the progress address field is used to represent the copy progress information.
21、 根据权利要求 19 所述的装置, 其特征在于, 所述第一复制数据 信息用于获得接收所述复制进度信息之前, 最近一次尚未复制到所述第三 存储设备的数据。 21. The apparatus according to claim 19, wherein the first copied data information is used to obtain the latest data that has not been copied to the third storage device before receiving the copy progress information.
22、 根据权利要求 21所述的装置, 其特征在于, 还包括: 22. The device according to claim 21, further comprising:
生成模块, 用于当接收到所述第一存储设备发送的复制启动信息时, 根据所述复制启动信息生成第一复制数据信息。 A generating module, configured to generate first copy data information according to the copy start information when receiving the copy start information sent by the first storage device.
23、 根据权利要求 19所述的装置, 其特征在于, 23. The device according to claim 19, characterized in that,
所述接收模块, 还用于接收所述第一存储设备发送的所述第一复制数 据信息。 The receiving module is also configured to receive the first copied data information sent by the first storage device.
24、 根据权利要求 19-24任一权利要求所述的装置, 其特征在于, 所述接收模块, 还用于当所述第一存储设备发生故障时, 接收所述第 三存储设备发送的检测信息, 所述检测信息用于指示所述第一存储设备发 生故障。 24. The device according to any one of claims 19 to 24, wherein the receiving module is further configured to receive the first storage device when a fault occurs. Detection information sent by the third storage device, where the detection information is used to indicate that the first storage device has failed.
25、 一种存储设备, 其特征在于, 包括: 处理器、 存储器和通信总线; 其中, 所述处理器和所述存储器通过所述通信总线进行通信; 25. A storage device, characterized in that it includes: a processor, a memory and a communication bus; wherein the processor and the memory communicate through the communication bus;
所述存储器用于保存程序; The memory is used to save programs;
所述处理器用于执行所述程序, 以实现: 权利要求 1-6任一所述的方 法。 The processor is used to execute the program to implement: the method described in any one of claims 1-6.
26、 一种存储设备, 其特征在于, 包括: 处理器、 存储器和通信总线; 其中, 所述处理器和所述存储器通过所述通信总线进行通信; 26. A storage device, characterized in that it includes: a processor, a memory and a communication bus; wherein the processor and the memory communicate through the communication bus;
所述存储器用于保存程序; The memory is used to save programs;
所述处理器用于执行所述程序, 以实现: 权利要求 7-12任一所述的方 The processor is used to execute the program to implement: the method described in any one of claims 7-12
PCT/CN2013/089173 2013-12-12 2013-12-12 Data replication method, data replication device and storage device WO2015085529A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/089173 WO2015085529A1 (en) 2013-12-12 2013-12-12 Data replication method, data replication device and storage device
CN201380002386.3A CN104363977A (en) 2013-12-12 2013-12-12 Data replication method, data replication device and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/089173 WO2015085529A1 (en) 2013-12-12 2013-12-12 Data replication method, data replication device and storage device

Publications (1)

Publication Number Publication Date
WO2015085529A1 true WO2015085529A1 (en) 2015-06-18

Family

ID=52530953

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/089173 WO2015085529A1 (en) 2013-12-12 2013-12-12 Data replication method, data replication device and storage device

Country Status (2)

Country Link
CN (1) CN104363977A (en)
WO (1) WO2015085529A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119329A (en) * 2019-02-27 2019-08-13 咪咕音乐有限公司 Data replicate disaster recovery method and disaster tolerance system

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159794A (en) * 2015-08-18 2015-12-16 浪潮(北京)电子信息产业有限公司 Mirror image implementing system and method
CN106855834B (en) * 2015-12-08 2020-11-10 华为技术有限公司 Data backup method, device and system
EP3427157B1 (en) * 2016-03-09 2023-10-11 Alibaba Group Holding Limited Cross-regional data transmission
CN110019097B (en) * 2017-12-29 2021-09-28 中国移动通信集团四川有限公司 Virtual logic copy management method, device, equipment and medium
CN108733513A (en) * 2018-05-07 2018-11-02 杭州宏杉科技股份有限公司 A kind of data-updating method and device
CN108762984B (en) * 2018-05-23 2021-05-25 杭州宏杉科技股份有限公司 Method and device for continuous data backup
CN109062735B (en) * 2018-08-02 2022-04-26 郑州云海信息技术有限公司 Disaster recovery method of storage system, storage system and related device
CN111143115A (en) * 2018-11-05 2020-05-12 中国移动通信集团云南有限公司 Remote disaster recovery method and device based on backup data
CN109725855B (en) * 2018-12-29 2023-09-01 杭州宏杉科技股份有限公司 Method and device for continuous jump replication

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1642030A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Method for realizing network management duoble computer disaster-tolerance back-up
CN101635638A (en) * 2008-07-25 2010-01-27 中兴通讯股份有限公司 Disaster tolerance system and disaster tolerance method thereof
CN102938778A (en) * 2012-10-19 2013-02-20 浪潮电子信息产业股份有限公司 Method for realizing multi-node disaster tolerance in cloud storage

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100370761C (en) * 2005-10-26 2008-02-20 华为技术有限公司 Intelligent net business control device disaster tolerance system
CN101414946B (en) * 2008-11-21 2011-11-16 上海爱数软件有限公司 Method and medium server for remote data backup
CN101808137B (en) * 2010-03-29 2014-09-03 成都市华为赛门铁克科技有限公司 Data transmission method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1642030A (en) * 2004-01-05 2005-07-20 华为技术有限公司 Method for realizing network management duoble computer disaster-tolerance back-up
CN101635638A (en) * 2008-07-25 2010-01-27 中兴通讯股份有限公司 Disaster tolerance system and disaster tolerance method thereof
CN102938778A (en) * 2012-10-19 2013-02-20 浪潮电子信息产业股份有限公司 Method for realizing multi-node disaster tolerance in cloud storage

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119329A (en) * 2019-02-27 2019-08-13 咪咕音乐有限公司 Data replicate disaster recovery method and disaster tolerance system
CN110119329B (en) * 2019-02-27 2024-02-23 咪咕音乐有限公司 Data replication disaster recovery method and disaster recovery system

Also Published As

Publication number Publication date
CN104363977A (en) 2015-02-18

Similar Documents

Publication Publication Date Title
US11734306B2 (en) Data replication method and storage system
US11829607B2 (en) Enabling data integrity checking and faster application recovery in synchronous replicated datasets
JP6344798B2 (en) Data transmission method, data reception method, and storage device
WO2015085529A1 (en) Data replication method, data replication device and storage device
US20090070528A1 (en) Apparatus, system, and method for incremental resynchronization in a data storage system
WO2015054897A1 (en) Data storage method, data storage apparatus, and storage device
US20190317872A1 (en) Database cluster architecture based on dual port solid state disk
WO2023046042A1 (en) Data backup method and database cluster
US11768624B2 (en) Resilient implementation of client file operations and replication
WO2019080370A1 (en) Data reading and writing method and apparatus, and storage server
JP2017208113A (en) Data storage method, data storage apparatus, and storage device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13899225

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13899225

Country of ref document: EP

Kind code of ref document: A1