

技术领域technical field
本发明实施例涉及信息技术领域,并且更具体地,涉及数据同步方法和数据同步系统。Embodiments of the present invention relate to the field of information technology, and more specifically, relate to a data synchronization method and a data synchronization system.
背景技术Background technique
为了避免因灾难等因素而造成数据丢失,容灾系统的建设尤为重要。在容灾系统的建设中,最关键的是将现有生产中心的数据传输到远程的灾备数据中心。这种远程数据传输的方法通常采用基于存储的复制方式。该基于存储的数据复制技术通过存储系统中的数据复制软件来实现数据的远程复制和同步,即存储系统将本地的存储更新数据复制到灾备端的存储系统中并执行,来保证数据的一致性。在这种方式下,数据复制软件运行在存储系统内,因此较容易实现生产端和灾备端操作系统、数据库和文件的实时复制能力,不会影响生产端主机系统的性能,是一种被广泛采用的方案。In order to avoid data loss caused by disasters and other factors, the construction of a disaster recovery system is particularly important. In the construction of the disaster recovery system, the most critical thing is to transfer the data of the existing production center to the remote disaster recovery data center. This method of remote data transfer typically uses storage-based replication. This storage-based data replication technology realizes remote replication and synchronization of data through data replication software in the storage system, that is, the storage system copies the local storage update data to the storage system at the disaster recovery end and executes it to ensure data consistency . In this way, the data replication software runs in the storage system, so it is easier to realize the real-time replication capability of the operating system, database and files on the production end and the disaster recovery end without affecting the performance of the host system on the production end. widely adopted scheme.
基于存储的远程数据复制需要进行首次的数据同步,就是将原有存储设备上的数据通过远程链路(通常为IP链路)传输到远端的存储设备中。由于长距离链路租用费用高的限制,IP链路的带宽通常比较低,其数值一般为Mbps的数量级,而原有存储设备上的数据量通常为兆兆字节(terabyte,TB)的数量级,在此链路上传输TB数量级的数据通常需要耗费数月的时间,耗时太长。一种解决方法是将灾备存储设备搬迁至生产数据中心,利用本地的高带宽网络完成首次数据同步,然后再将灾备存储设备搬迁至远端灾备数据中心。然而,由于存储系统体积庞大,拆卸、运输和安装存储设备可能会有损坏存储设备并且丢失数据的风险。此外,在发生灾难或者进行演练时,灾备中心的存储设备上保留的是最新的数据,需要反向同步到生产中心的存储设备上。由于此时存储设备已经部署到了数据中心,搬迁更为复杂,同时由于此时用户的最新数据只有一份,搬迁存储设备的风险更大。本发明提供了一种数据同步方法及系统,通过利用可移动存储介质实现生产中心的存储设备与灾备中心的存储设备上的数据同步,能够解决现有技术中生产中心的存储设备与灾备中心的存储设备在进行数据同步时耗时太长或者由于搬迁存储设备带来的不便和丢失数据的风险。Storage-based remote data replication requires the first data synchronization, which is to transfer the data on the original storage device to the remote storage device through a remote link (usually an IP link). Due to the high cost of long-distance link leases, the bandwidth of IP links is usually relatively low, and its value is generally on the order of Mbps, while the amount of data on the original storage device is usually on the order of terabytes (TB). , It usually takes several months to transmit terabytes of data on this link, which is too long. One solution is to relocate the disaster recovery storage device to the production data center, use the local high-bandwidth network to complete the first data synchronization, and then relocate the disaster recovery storage device to the remote disaster recovery data center. However, due to the large size of the storage system, disassembling, transporting, and installing the storage device may cause the risk of damaging the storage device and losing data. In addition, when a disaster occurs or a drill is performed, the latest data is kept on the storage device in the disaster recovery center, which needs to be reversely synchronized to the storage device in the production center. Since the storage device has already been deployed in the data center at this time, the relocation is more complicated. At the same time, since there is only one copy of the user's latest data at this time, the risk of relocating the storage device is greater. The present invention provides a data synchronization method and system. By using removable storage media to realize the data synchronization between the storage device of the production center and the storage device of the disaster recovery center, it can solve the problem of the storage device and disaster recovery of the production center in the prior art. The central storage device takes too long to synchronize data or the inconvenience and risk of data loss caused by relocation of the storage device.
发明内容Contents of the invention
本发明实施例提供一种数据同步方法和数据同步系统,能够实现第一存储设备与位于该第一存储设备的远端且为该第一存储设备的灾备存储的第二存储设备的数据同步。Embodiments of the present invention provide a data synchronization method and a data synchronization system, capable of realizing data synchronization between a first storage device and a second storage device located at the remote end of the first storage device and used for disaster recovery storage of the first storage device .
第一方面,提供了一种数据同步方法,包括:第一存储设备生成目标逻辑单元号LUN中存储的数据的快照,该目标LUN中存储的数据利用网络传输时所需的传输时长超出传输时长门限;该第一存储设备将该快照中的数据写入可移动存储介质;第二存储设备读取并存储该可移动存储介质中的数据;其中,该第二存储设备位于该第一存储设备的远端且该第二存储设备为该第一存储设备的灾备存储。In the first aspect, a data synchronization method is provided, including: a first storage device generates a snapshot of the data stored in the target logical unit number LUN, and the transmission time required for the data stored in the target LUN to be transmitted by the network exceeds the transmission time Threshold; the first storage device writes the data in the snapshot to the removable storage medium; the second storage device reads and stores the data in the removable storage medium; wherein the second storage device is located in the first storage device and the second storage device is the disaster recovery storage of the first storage device.
结合第一方面,在第一种可能的实现方式中,该第一存储设备将该快照中的数据写入可移动存储介质,包括:该第一存储设备将该快照中的数据和该快照中的数据在该第一存储设备中的存储位置信息写入该可移动存储介质。With reference to the first aspect, in a first possible implementation manner, the first storage device writing the data in the snapshot to a removable storage medium includes: the first storage device combining the data in the snapshot with the The storage location information of the data in the first storage device is written into the removable storage medium.
结合第一方面的第一种可能的实现方式,在第二种可能的实现方式中,该第二存储设备读取并存储该可移动存储介质中的数据,包括:该第二存储设备读取该可移动存储介质中的数据以及该数据的存储位置信息;该第二存储设备根据该数据的存储位置信息,将该数据存储至该第二存储设备的本地存储区域。With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the second storage device reading and storing data in the removable storage medium includes: the second storage device reading The data in the removable storage medium and the storage location information of the data; the second storage device stores the data in a local storage area of the second storage device according to the storage location information of the data.
结合第一方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,该数据的存储位置信息包括:该数据所属的LUN的世界通用名称WWN和该数据在该归属的LUN中的逻辑块位置LBA。In combination with the first or second possible implementation of the first aspect, in a third possible implementation, the storage location information of the data includes: the world wide name WWN of the LUN to which the data belongs and the Logical block location LBA in the assigned LUN.
结合第一方面的第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,该方法还包括:若该第一存储设备中存储的数据更新且更新的数据利用网络传输时所需的传输时长未超出该传输时长门限,该第一存储设备通过网络向该第二存储设备传输该更新的数据。With reference to the first or second or third possible implementation of the first aspect, in a fourth possible implementation, the method further includes: if the data stored in the first storage device is updated and the updated The transmission time required for data transmission through the network does not exceed the transmission time threshold, and the first storage device transmits the updated data to the second storage device through the network.
第二方面,提供了一种数据同步系统,包括:第一存储设备和第二存储设备,该第二存储设备位于该第一存储设备的远端且该第二存储设备为该第一存储设备的灾备存储;该第一存储设备用于生成目标逻辑单元号LUN中存储的数据的快照,该目标LUN中存储的数据利用网络传输时所需的传输时长超出传输时长门限;该第一存储设备还用于将该快照中的数据写入可移动存储介质;第二存储设备用于读取并存储该可移动存储介质中的数据。In a second aspect, a data synchronization system is provided, including: a first storage device and a second storage device, the second storage device is located at the far end of the first storage device and the second storage device is the first storage device disaster recovery storage; the first storage device is used to generate a snapshot of the data stored in the target logical unit number LUN, and the transmission time required for the data stored in the target LUN to be transmitted through the network exceeds the transmission time threshold; the first storage device The device is also used to write the data in the snapshot into a removable storage medium; the second storage device is used to read and store the data in the removable storage medium.
结合第二方面,在第一种可能的实现方式中,该第一存储设备具体用于将该快照中的数据和该快照中的数据在该第一存储设备中的存储位置信息写入该可移动存储介质。With reference to the second aspect, in a first possible implementation manner, the first storage device is specifically configured to write the data in the snapshot and the storage location information of the data in the snapshot in the first storage device into the available Removable storage media.
结合第二方面的第一种可能的实现方式,在第二种可能的实现方式中,该第二存储设备具体用于:读取该可移动存储介质中的数据以及该数据的存储位置信息;根据该数据的存储位置信息,将该数据存储至该第二存储设备的本地存储区域。With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the second storage device is specifically configured to: read the data in the removable storage medium and the storage location information of the data; According to the storage location information of the data, the data is stored in the local storage area of the second storage device.
结合第二方面的第一种或第二种可能的实现方式,在第三种可能的实现方式中,该数据的存储位置信息包括:该数据所属的LUN的世界通用名称WWN和该数据在该归属的LUN中的逻辑块位置LBA。With reference to the first or second possible implementation of the second aspect, in a third possible implementation, the storage location information of the data includes: the world wide name WWN of the LUN to which the data belongs and the Logical block location LBA in the assigned LUN.
结合第二方面的第一种或第二种或第三种可能的实现方式,在第四种可能的实现方式中,若该第一存储设备中存储的数据更新且更新的数据利用网络传输时所需的传输时长未超出该传输时长门限,该第一存储设备还用于通过网络向该第二存储设备传输该更新的数据。With reference to the first or second or third possible implementation of the second aspect, in a fourth possible implementation, if the data stored in the first storage device is updated and the updated data is transmitted over the network The required transmission duration does not exceed the transmission duration threshold, and the first storage device is also used to transmit the updated data to the second storage device through the network.
基于上述技术方案,本发明实施例提供的数据同步方法,通过第一存储设备将数据写入可移动存储介质且第二存储设备读取并存储该移动存储介质上的数据,其中,该第二存储设备位于该第一存储设备的远端且该第二存储设备为该第一存储设备的灾备存储,能够实现该第一存储设备和该第二存储设备的数据同步。并且与现有的网络传输方式相比,本发明实施例的数据同步方法能够缩短数据传输时间,而与现有的搬迁存储设备的方式相比,本发明实施例的数据同步方法操作方便,并且能够降低数据丢失或损坏的风险。Based on the above technical solution, the data synchronization method provided by the embodiment of the present invention uses the first storage device to write data into the removable storage medium and the second storage device to read and store the data on the removable storage medium, wherein the second The storage device is located at the remote end of the first storage device and the second storage device is a disaster recovery storage of the first storage device, which can realize data synchronization between the first storage device and the second storage device. And compared with the existing network transmission method, the data synchronization method of the embodiment of the present invention can shorten the data transmission time, and compared with the existing method of relocating storage devices, the data synchronization method of the embodiment of the present invention is easy to operate, and The risk of data loss or corruption can be reduced.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the embodiments of the present invention or in the description of the prior art. Obviously, the accompanying drawings described below are only illustrations of the present invention For some embodiments, those skilled in the art can also obtain other drawings according to these drawings.
图1是本发明实施例的数据同步方法的示意性流程图。Fig. 1 is a schematic flowchart of a data synchronization method according to an embodiment of the present invention.
图2是本发明实施例的数据同步方法的另一示意性流程图。Fig. 2 is another schematic flowchart of a data synchronization method according to an embodiment of the present invention.
图3是本发明实施例的数据同步系统的示意性流程图。Fig. 3 is a schematic flowchart of a data synchronization system according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them.
应理解,本发明实施例的技术方案主要应用于生产中心的存储设备与其灾备中心的存储设备的首次数据同步,也可以应用于生产中心的存储设备与灾备中心的存储设备需要同步的数据量较大的其它场景,但本发明实施例不限于此。It should be understood that the technical solution of the embodiment of the present invention is mainly applied to the first data synchronization between the storage device of the production center and the storage device of the disaster recovery center, and can also be applied to the data that needs to be synchronized between the storage device of the production center and the storage device of the disaster recovery center Other scenarios with a large amount, but this embodiment of the present invention is not limited thereto.
图1是本发明实施例的数据同步方法100的示意性流程图,该方法100可以由数据同步系统执行。该方法100可以用于将第一存储设备上的数据同步存储到第二存储设备上,其中,该第二存储设备位于该第一存储设备的远端且该第二存储设备为该第一存储设备的灾备存储。可选地,该第一存储设备可以为生产中心的存储设备,该生产中心可以包括交换机、路由器等网络设备、服务器和该第一存储设备等设备,以对外提供服务。相应地,该第二存储设备可以为该生产中心的灾备中心的存储设备,且该灾备中心与该生产中心距离较远,但本发明实施例对此不做限定。可选地,作为另一实施例,当该第一存储设备和第二存储设备互为对方的灾备存储设备时,该方法也可以用于在该第一存储设备上的数据发生损坏或丢失时,将该第二存储设备上的数据同步存储到该第一存储设备上,本发明实施例对此不做限定。如图1所示,该方法100包括:Fig. 1 is a schematic flowchart of a
S110,第一存储设备生成目标逻辑单元号(Logic Unit Number,LUN)中存储的数据的快照,该目标LUN中存储的数据利用网络传输时所需的传输时长超出传输时长门限。S110. The first storage device generates a snapshot of the data stored in the target Logical Unit Number (Logic Unit Number, LUN), and the transmission time required for the data stored in the target LUN to be transmitted through the network exceeds the transmission time threshold.
该传输时长门限可以由用户根据需求设置,具体可以为一个数值,也可以为一个数值范围或表达式,本发明实施例不限于此。The transmission duration threshold can be set by the user according to requirements, and can be specifically a numerical value, a numerical range or an expression, to which the embodiment of the present invention is not limited.
当该第一存储设备进行正常工作时,该第一存储设备的光纤通道(FiberChannel,FC)端口的工作模式为目标(Target)模式,而为了识别可移动存储介质,例如,磁带库,该第一存储设备的至少一个FC端口的工作模式可以处于初始器(Initiator)模式。此外,该可移动存储介质可以与该第一存储设备处于相同的存储区域网(Storage Area Network,SAN)中,且该可移动存储设备的FC端口与该第一存储设备的该至少一个FC端口位于该SAN的同一个区域(Zoning)中,使得该第一存储设备可以检测并识别该可移动存储介质。When the first storage device is working normally, the working mode of the fiber channel (FiberChannel, FC) port of the first storage device is the target (Target) mode, and in order to identify the removable storage medium, for example, a tape library, the first storage device The working mode of at least one FC port of a storage device may be an initiator (Initiator) mode. In addition, the removable storage medium may be in the same storage area network (Storage Area Network, SAN) as the first storage device, and the FC port of the removable storage device is connected to the at least one FC port of the first storage device Located in the same zone (Zoning) of the SAN, so that the first storage device can detect and identify the removable storage medium.
在该第一存储设备检测到该可移动存储介质之后,或在该第一存储设备检测到该可移动存储介质之前,该第一存储设备可以确定至少一个目标LUN,并生成该至少一个目标LUN中存储的所有数据在某一时刻的快照。可选地,该第一存储设备可以根据用户指令确定该至少一个目标LUN,但本发明实施例不限于此。After the first storage device detects the removable storage medium, or before the first storage device detects the removable storage medium, the first storage device may determine at least one target LUN, and generate the at least one target LUN A snapshot of all the data stored in the database at a certain moment. Optionally, the first storage device may determine the at least one target LUN according to a user instruction, but this embodiment of the present invention is not limited thereto.
S120,该第一存储设备将该快照中的数据写入可移动存储介质。S120, the first storage device writes the data in the snapshot to a removable storage medium.
该可移动存储介质相比于该第一存储设备和该第二存储设备而言,易于搬迁。可选地,该可移动存储介质可以是磁带库,也可以是移动磁盘,本发明实施例对此不做限制。Compared with the first storage device and the second storage device, the removable storage medium is easier to move. Optionally, the removable storage medium may be a tape library or a removable disk, which is not limited in this embodiment of the present invention.
S130,第二存储设备读取并存储该可移动存储介质中的数据。S130. The second storage device reads and stores data in the removable storage medium.
当该第一存储设备将该快照中的数据写入该可移动存储介质之后,该可移动存储介质可以被搬迁至该第二存储设备端。可选地,该可移动存储介质可以被接入到与该第二存储设备相同的SAN,并且该可移动存储介质的FC端口与该第二存储设备的至少一个工作模式被设置为初始器的FC端口处于该SAN的同一个Zoning区,以使得该第二存储设备可以检测并识别该可移动存储介质。After the first storage device writes the data in the snapshot to the removable storage medium, the removable storage medium may be relocated to the second storage device. Optionally, the removable storage medium may be connected to the same SAN as the second storage device, and at least one of the working modes of the FC port of the removable storage medium and the second storage device is set to that of the initiator The FC port is in the same Zoning area of the SAN, so that the second storage device can detect and identify the removable storage medium.
在该第二存储设备检测到该可移动存储介质之后,该第二存储设备可以读取该可移动存储介质中的数据,并将读取的该数据存储至该第二存储设备的本地存储区域,但本发明实施例不限于此。After the second storage device detects the removable storage medium, the second storage device can read the data in the removable storage medium, and store the read data in the local storage area of the second storage device , but the embodiment of the present invention is not limited thereto.
因此,本发明实施例的数据同步方法,通过第一存储设备将数据写入可移动存储介质且第二存储设备读取并存储该移动存储介质上的数据。其中,该第二存储设备位于该第一存储设备的远端且该第二存储设备为该第一存储设备的灾备存储,能够实现该第一存储设备和该第二存储设备的数据同步。并且与现有的网络传输方式相比,本发明实施例的数据同步方法能够缩短数据传输时间;而与现有的搬迁存储设备的方式相比,本发明实施例的数据同步方法操作方便,并且能够降低数据丢失或损坏的风险。Therefore, in the data synchronization method of the embodiment of the present invention, the first storage device writes data into the removable storage medium, and the second storage device reads and stores the data on the removable storage medium. Wherein, the second storage device is located at the remote end of the first storage device and the second storage device is a disaster recovery storage of the first storage device, which can realize data synchronization between the first storage device and the second storage device. And compared with the existing network transmission method, the data synchronization method of the embodiment of the present invention can shorten the data transmission time; and compared with the existing method of relocating storage devices, the data synchronization method of the embodiment of the present invention is easy to operate, and The risk of data loss or corruption can be reduced.
可选地,作为另一实施例,如图2所示,S120,第一存储设备将该快照中的数据写入可移动存储介质,包括:Optionally, as another embodiment, as shown in FIG. 2, S120, the first storage device writes the data in the snapshot to a removable storage medium, including:
S121,该第一存储设备将该快照中的数据和该快照中的数据在该第一存储设备中的存储位置信息写入该可移动存储介质。S121. The first storage device writes the data in the snapshot and storage location information of the data in the snapshot in the first storage device to the removable storage medium.
该数据的存储位置信息可以用于标记该数据,以使得该数据被第二存储设备读取并存储时,该第二存储设备可以按照该存储位置信息存储该数据,但本发明实施例不限于此。The storage location information of the data can be used to mark the data, so that when the data is read and stored by the second storage device, the second storage device can store the data according to the storage location information, but the embodiment of the present invention is not limited to this.
如图2所示,S130,该第二存储设备读取并存储该可移动存储介质中的数据,包括:As shown in Figure 2, S130, the second storage device reads and stores the data in the removable storage medium, including:
S131,该第二存储设备读取该可移动存储介质中的数据以及该数据的存储位置信息;S131. The second storage device reads data in the removable storage medium and storage location information of the data;
S132,该第二存储设备根据该数据的存储位置信息,将该数据存储至该第二存储设备的本地存储区域。S132. The second storage device stores the data in a local storage area of the second storage device according to the storage location information of the data.
该第二存储设备可以根据该数据的存储位置信息存储该数据,以使得该数据在该第二存储设备上的存储位置与该数据在该第一存储设备上的存储位置相对应,但本发明实施例不限于此。The second storage device may store the data according to the storage location information of the data, so that the storage location of the data on the second storage device corresponds to the storage location of the data on the first storage device, but the present invention Embodiments are not limited thereto.
可选地,该数据的存储位置信息包括:该数据所属的LUN的世界通用名称WWN和该数据在该归属的LUN中的逻辑块位置LBA。Optionally, the storage location information of the data includes: the world wide name WWN of the LUN to which the data belongs and the logical block location LBA of the data in the LUN to which the data belongs.
可选地,作为另一实施例,该数据的存储位置信息也可以为能够确定该数据的存储位置的其它信息,本发明实施例不限于此。Optionally, as another embodiment, the storage location information of the data may also be other information capable of determining the storage location of the data, to which this embodiment of the present invention is not limited.
可选地,作为另一实施例,该第一存储设备在将该快照中的数据写入该可移动存储介质之前,该第一存储设备也可以对该快照中的数据进行编码,例如,循环冗余码校验(Cyclic Redundancy Check,CRC)编码,并将编码后的数据写入该可移动存储介质。相应地,该第二存储设备在读取该可移动存储介质中的数据之后,可以对读取的数据进行解码,并将解码后的数据存储至该第二存储设备的本地存储区域,但本发明实施例不限于此。Optionally, as another embodiment, before the first storage device writes the data in the snapshot to the removable storage medium, the first storage device may also encode the data in the snapshot, for example, loop Cyclic Redundancy Check (CRC) encoding, and write the encoded data to the removable storage medium. Correspondingly, after the second storage device reads the data in the removable storage medium, it can decode the read data and store the decoded data in the local storage area of the second storage device, but this Embodiments of the invention are not limited thereto.
可选地,作为另一实施例,当该第一存储设备与该第二存储设备上的数据首次同步后,可以以一定周期为间隔将该第一存储设备与该第二存储设备上的数据进行增量同步,即将该第一存储设备和该第二存储设备中的一个存储设备上更新的数据同步到另一个存储设备上。此时,如果更新数据的数据量较少时,可以采用网络传输的方式进行增量同步,相应地,该方法100还包括:Optionally, as another embodiment, when the data on the first storage device and the second storage device are synchronized for the first time, the data on the first storage device and the second storage device may be synchronized at regular intervals. Incremental synchronization is performed, that is, the data updated on one of the first storage device and the second storage device is synchronized to the other storage device. At this time, if the data volume of the updated data is small, incremental synchronization may be performed in the form of network transmission. Correspondingly, the
S140,若该第一存储设备中存储的数据更新且更新的数据量利用网络传输时所需的传输时长未超出该传输时长门限,该第一存储设备通过网络向该第二存储设备传输该更新的数据。S140, if the data stored in the first storage device is updated and the transmission time required for the updated data amount to be transmitted through the network does not exceed the transmission time threshold, the first storage device transmits the update to the second storage device through the network The data.
在该S140之前,该第一存储设备还可以与该第二存储设备建立数据复制对应关系。具体地,该第一存储设备与该第二存储设备上均可以安装数据复制软件,并且设置该数据复制软件使得该第一存储设备和第二存储设备的其中一个设备为另一个设备的数据复制对端设备。这样,该第一存储设备或该第二存储设备中有数据更新时,就可以通过网络向对方传输该更新的数据,但本发明实施例不限于此。Before the S140, the first storage device may also establish a data replication correspondence relationship with the second storage device. Specifically, data replication software can be installed on both the first storage device and the second storage device, and the data replication software is set so that one of the first storage device and the second storage device is the data replication of the other device. Peer device. In this way, when there is data update in the first storage device or the second storage device, the updated data can be transmitted to the other party through the network, but the embodiment of the present invention is not limited thereto.
因此,本发明实施例的数据同步方法,通过第一存储设备将数据写入可移动存储介质且第二存储设备读取并存储该移动存储介质上的数据,其中,该第二存储设备位于该第一存储设备的远端且该第二存储设备为该第一存储设备的灾备存储,能够实现该第一存储设备和该第二存储设备的数据同步,并且与现有的网络传输方式相比,本发明实施例的数据同步方法能够缩短数据传输时间,而与现有的搬迁存储设备的方式相比,本发明实施例的数据同步方法操作方便,并且能够降低数据丢失或损坏的风险。Therefore, in the data synchronization method of the embodiment of the present invention, the first storage device writes data into the removable storage medium and the second storage device reads and stores the data on the removable storage medium, wherein the second storage device is located in the The remote end of the first storage device and the second storage device is the disaster recovery storage of the first storage device, which can realize the data synchronization between the first storage device and the second storage device, and is similar to the existing network transmission method Compared with the data synchronization method of the embodiment of the present invention, the data transmission time can be shortened, and compared with the existing method of relocating storage devices, the data synchronization method of the embodiment of the present invention is easy to operate, and can reduce the risk of data loss or damage.
应理解,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
上文中结合图1和图2,详细描述了根据本发明实施例的数据同步方法,下面将结合图3,描述根据本发明实施例的数据同步系统。The data synchronization method according to the embodiment of the present invention is described in detail above with reference to FIG. 1 and FIG. 2 , and the data synchronization system according to the embodiment of the present invention will be described below in conjunction with FIG. 3 .
图3示出了根据本发明实施例的数据同步系统200的示意性框图,如图3所示,该数据同步系统200包括:第一存储设备210和第二存储设备220,该第二存储设备220位于该第一存储设备210的远端且该第二存储设备220为该第一存储设备210的灾备存储;Fig. 3 shows a schematic block diagram of a
该第一存储设备210用于生成目标逻辑单元号LUN中存储的数据的快照,该目标LUN中存储的数据利用网络传输时所需的传输时长超出传输时长门限;The first storage device 210 is configured to generate a snapshot of the data stored in the target logical unit number LUN, where the data stored in the target LUN is transmitted over the network and the required transmission time exceeds the transmission time threshold;
该第一存储设备210还用于将该快照中的数据写入可移动存储介质;The first storage device 210 is also used to write the data in the snapshot into a removable storage medium;
第二存储设备220用于读取并存储该可移动存储介质中的数据。The second storage device 220 is used to read and store data in the removable storage medium.
因此,本发明实施例的数据同步系统,通过第一存储设备将数据写入可移动存储介质且第二存储设备读取并存储该移动存储介质上的数据。其中,该第二存储设备位于该第一存储设备的远端且该第二存储设备为该第一存储设备的灾备存储,能够实现该第一存储设备和该第二存储设备的数据同步。并且与现有的网络传输方式相比,本发明实施例的数据同步方法能够缩短数据传输时间;而与现有的搬迁存储设备的方式相比,本发明实施例的数据同步方法操作方便,并且能够降低数据丢失或损坏的风险。Therefore, in the data synchronization system of the embodiment of the present invention, the first storage device writes data into the removable storage medium, and the second storage device reads and stores the data on the removable storage medium. Wherein, the second storage device is located at the remote end of the first storage device and the second storage device is a disaster recovery storage of the first storage device, which can realize data synchronization between the first storage device and the second storage device. And compared with the existing network transmission method, the data synchronization method of the embodiment of the present invention can shorten the data transmission time; and compared with the existing method of relocating storage devices, the data synchronization method of the embodiment of the present invention is easy to operate, and The risk of data loss or corruption can be reduced.
可选地,该第一存储设备210具体用于将该快照中的数据和该快照中的数据在该第一存储设备中的存储位置信息写入该可移动存储介质。Optionally, the first storage device 210 is specifically configured to write the data in the snapshot and the storage location information of the data in the snapshot in the first storage device into the removable storage medium.
可选地,作为另一实施例,该第二存储设备220具体用于:Optionally, as another embodiment, the second storage device 220 is specifically used for:
读取该可移动存储介质中的数据以及该数据的存储位置信息;Read the data in the removable storage medium and the storage location information of the data;
根据该数据的存储位置信息,将该数据存储至该第二存储设备的本地存储区域。According to the storage location information of the data, the data is stored in the local storage area of the second storage device.
可选地,作为另一实施例,该数据的存储位置信息包括:该数据所属的LUN的世界通用名称WWN和该数据在该归属的LUN中的逻辑块位置LBA。Optionally, as another embodiment, the storage location information of the data includes: the world wide name WWN of the LUN to which the data belongs and the logical block location LBA of the data in the LUN to which the data belongs.
可选地,作为另一实施例,若该第一存储设备210中存储的数据更新且更新的数据利用网络传输时所需的传输时长未超出该传输时长门限,该第一存储设备210还用于通过网络向该第二存储设备220传输该更新的数据。Optionally, as another embodiment, if the data stored in the first storage device 210 is updated and the transmission time required for the updated data to be transmitted through the network does not exceed the transmission time threshold, the first storage device 210 also uses to transmit the updated data to the second storage device 220 through the network.
可选地,作为另一实施例,该第一存储设备210通过网络向该第二存储设备220传输该更新的数据之前,该第一存储设备210和该第二存储设备220还用于与对方建立数据复制对应关系。Optionally, as another embodiment, before the first storage device 210 transmits the updated data to the second storage device 220 through the network, the first storage device 210 and the second storage device 220 are also used to communicate with each other Establish data replication correspondence.
根据本发明实施例的数据同步系统200中的第一存储设备可对应于根据本发明实施例的数据同步方法中的第一存储设备,该数据同步系统200中的第二存储设备可对应于根据本发明实施例的数据同步方法中的第二存储设备,并且该数据同步系统200中的各个模块的上述和其它操作和/或功能分别为了实现图1和图2中的各个方法的相应流程,为了简洁,在此不再赘述。The first storage device in the
应理解,在本发明实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。It should be understood that in the embodiments of the present invention, the term "and/or" is only an association relationship describing associated objects, indicating that there may be three relationships. For example, A and/or B may mean that A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和单元,能够以电子硬件、计算机软件或者二者的结合来实现。为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the method steps and units described in the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of functions in the above description. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each particular application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may also be electrical, mechanical or other forms of connection.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-OnlyMemory,简称为“ROM”)、随机存取存储器(Random Access Memory,简称为“RAM”)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a storage medium Among them, several instructions are included to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as "ROM"), random access memory (Random Access Memory, referred to as "RAM"), magnetic disk or optical disc, etc. A medium on which program code can be stored.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可想到的各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can think of various equivalents within the technical scope disclosed in the present invention. Modifications or replacements shall all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2013/087721WO2015074260A1 (en) | 2013-11-22 | 2013-11-22 | Data synchronization method and data synchronization system |
| Publication Number | Publication Date |
|---|---|
| CN103843309Atrue CN103843309A (en) | 2014-06-04 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201380002761.4APendingCN103843309A (en) | 2013-11-22 | 2013-11-22 | Data synchronizing method and data synchronizing system |
| Country | Link |
|---|---|
| CN (1) | CN103843309A (en) |
| WO (1) | WO2015074260A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015074260A1 (en)* | 2013-11-22 | 2015-05-28 | 华为技术有限公司 | Data synchronization method and data synchronization system |
| WO2016107443A1 (en)* | 2014-12-31 | 2016-07-07 | 华为技术有限公司 | Snapshot processing method and related device |
| CN106529261A (en)* | 2016-10-25 | 2017-03-22 | 公安部第三研究所 | UKey and method used for synchronization of offline business data |
| CN109614047A (en)* | 2018-12-10 | 2019-04-12 | 浪潮(北京)电子信息产业有限公司 | A kind of IO transmission method between hosts, storage system and readable storage medium |
| CN113553005A (en)* | 2021-07-06 | 2021-10-26 | 杭州宏杉科技股份有限公司 | A data read and write method, device and device for reducing LUN |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1291779A2 (en)* | 2001-09-04 | 2003-03-12 | Hitachi, Ltd. | Control method for a data storage system |
| CN1581105A (en)* | 2003-08-04 | 2005-02-16 | 株式会社日立制作所 | Remote copy system |
| CN101146285A (en)* | 2007-08-30 | 2008-03-19 | Tcl天一移动通信(深圳)有限公司 | A data backup method for mobile terminal |
| CN101359301A (en)* | 2008-08-19 | 2009-02-04 | 成都市华为赛门铁克科技有限公司 | Auto snapshot method and device |
| CN101635638A (en)* | 2008-07-25 | 2010-01-27 | 中兴通讯股份有限公司 | Disaster tolerance system and disaster tolerance method thereof |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101751393B (en)* | 2008-12-01 | 2012-07-04 | 宏碁股份有限公司 | Data Synchronization System and Method |
| US20130061335A1 (en)* | 2011-09-07 | 2013-03-07 | CloudPointe, LLC | Method, Apparatus, Computer Readable Media for a Storage Virtualization Middleware System |
| CN102662991A (en)* | 2012-03-14 | 2012-09-12 | 北京邮电大学 | File-level synchronization method based on mobile storage devices |
| WO2015074260A1 (en)* | 2013-11-22 | 2015-05-28 | 华为技术有限公司 | Data synchronization method and data synchronization system |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1291779A2 (en)* | 2001-09-04 | 2003-03-12 | Hitachi, Ltd. | Control method for a data storage system |
| CN1581105A (en)* | 2003-08-04 | 2005-02-16 | 株式会社日立制作所 | Remote copy system |
| CN101146285A (en)* | 2007-08-30 | 2008-03-19 | Tcl天一移动通信(深圳)有限公司 | A data backup method for mobile terminal |
| CN101635638A (en)* | 2008-07-25 | 2010-01-27 | 中兴通讯股份有限公司 | Disaster tolerance system and disaster tolerance method thereof |
| CN101359301A (en)* | 2008-08-19 | 2009-02-04 | 成都市华为赛门铁克科技有限公司 | Auto snapshot method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015074260A1 (en)* | 2013-11-22 | 2015-05-28 | 华为技术有限公司 | Data synchronization method and data synchronization system |
| WO2016107443A1 (en)* | 2014-12-31 | 2016-07-07 | 华为技术有限公司 | Snapshot processing method and related device |
| CN105808374A (en)* | 2014-12-31 | 2016-07-27 | 华为技术有限公司 | Snapshot processing method and associated equipment |
| CN105808374B (en)* | 2014-12-31 | 2019-02-05 | 华为技术有限公司 | A snapshot processing method and related equipment |
| US10503415B2 (en) | 2014-12-31 | 2019-12-10 | Huawei Technologies Co., Ltd. | Snapshot processing method and related device |
| CN106529261A (en)* | 2016-10-25 | 2017-03-22 | 公安部第三研究所 | UKey and method used for synchronization of offline business data |
| CN109614047A (en)* | 2018-12-10 | 2019-04-12 | 浪潮(北京)电子信息产业有限公司 | A kind of IO transmission method between hosts, storage system and readable storage medium |
| CN109614047B (en)* | 2018-12-10 | 2022-03-08 | 浪潮(北京)电子信息产业有限公司 | IO transmission method between hosts, storage system and readable storage medium |
| CN113553005A (en)* | 2021-07-06 | 2021-10-26 | 杭州宏杉科技股份有限公司 | A data read and write method, device and device for reducing LUN |
| CN113553005B (en)* | 2021-07-06 | 2023-12-22 | 杭州宏杉科技股份有限公司 | Data read-write method, device and equipment for simplifying LUN |
| Publication number | Publication date |
|---|---|
| WO2015074260A1 (en) | 2015-05-28 |
| Publication | Publication Date | Title |
|---|---|---|
| US11734306B2 (en) | Data replication method and storage system | |
| JP6344798B2 (en) | Data transmission method, data reception method, and storage device | |
| US7134044B2 (en) | Method, system, and program for providing a mirror copy of data | |
| CN105938457B (en) | Filter method, device and the data reading system of data | |
| US8521691B1 (en) | Seamless migration between replication technologies | |
| US8924668B1 (en) | Method and apparatus for an application- and object-level I/O splitter | |
| WO2016107220A1 (en) | Remote replication method and apparatus based on duplicated data deletion | |
| US10896199B2 (en) | Apparatus and method for managing storage copy services systems | |
| US7111004B2 (en) | Method, system, and program for mirroring data between sites | |
| CN102014152A (en) | Long-distance duplicating system and method | |
| US8438353B1 (en) | Method, system, and computer readable medium for asynchronously processing write operations for a data storage volume having a copy-on-write snapshot | |
| JP2007507030A (en) | Method, system and program for synchronizing data | |
| CN105988901A (en) | Data copying method and storage system | |
| CN103843309A (en) | Data synchronizing method and data synchronizing system | |
| US10846012B2 (en) | Storage system for minimizing required storage capacity during remote volume replication pair duplication | |
| US20240329870A1 (en) | Techniques for optimized data resynchronization between replication sites | |
| CN105404564A (en) | Data remote disaster tolerance method and apparatus | |
| CN108733513A (en) | A kind of data-updating method and device | |
| US9378160B1 (en) | Unified SCSI target management for shutting down and de-configuring a service daemon in a deduplication appliance | |
| US9916371B1 (en) | Methods computer readable media, and systems for copying data between mirrored systems | |
| JP2012230489A (en) | Disk array device, synchronization method and program |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20140604 | |
| RJ01 | Rejection of invention patent application after publication |