A method, apparatus and system for data replication between storage devices
Patent Information
- Application Number
- CN202610622260.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-07
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]本申请提供一种存储设备间的数据复制方法、装置和系统;以解决在跨设备远程复制场景中,因无法识别待传输数据中的重复数据而导致实际传输数据量大、同步效率低的技术问题
[0011]由以上技术方案可以看出,本申请本方案通过先传指纹与验证信息进行双重认证、仅在认证失败时再传输完整数据块的机制,降低了跨设备远程复制过程中的实际数据传输量,当目标设备已存在相同数据块时,源设备仅需发送指纹和验证信息来进行验证,在验证通过后无需传输整个数据块,当目标设备不存在相同数据块时由目标设备建立新数据块与逻辑区块地址的关联关系,由此,实现了高效的数据复制。
Smart Images

Figure CN122601680A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of storage technology, and in particular to a method, apparatus and system for data copying between storage devices. Background Technology
[0002] In the field of data storage, remote replication is one of the core technologies for data backup and disaster recovery. Specifically, it involves copying data from a source storage device to a separate target storage device, giving device B a copy of the data from device A. If device A experiences data loss due to a failure, the copy on device B can be used to recover the data, thus ensuring business continuity.
[0003] As an existing technology for transferring data between two storage devices, data block replication technology based on logical unit numbers can only identify whether there is a data write operation on the LBA (Logical Block Address). As long as a data write operation occurs, synchronization is initiated with the target storage device, regardless of whether the written data is duplicated. However, when a file is modified in a file system, it is not overwritten on the original LBA, but the modified file data is written to a new LBA. This causes the source storage device to identify a large amount of data corresponding to the new LBA, which is largely the same as the content in the original LBA, as discrepancies when replicating data to the target storage device, thus triggering a full synchronization. Therefore, when the data transmission link bandwidth between the source and target devices is limited, the large amount of data to be replicated can prevent the replication operation from being completed within the predetermined replication cycle.
[0004] Therefore, how to effectively identify duplicate data and reduce the amount of data transfer between devices when remotely copying data from one storage device to another is a problem that needs to be solved in the current storage field. Summary of the Invention
[0005] This application provides a data replication method, apparatus, and system between storage devices to solve the technical problem of large actual data volume and low synchronization efficiency in cross-device remote replication scenarios due to the inability to identify duplicate data in the data to be transmitted.
[0006] This application provides a method for data replication between storage devices, the method being applied to a source device, the method comprising: For any data block to be copied and transmitted in a LUN, the data fingerprint and verification information of the data block are first sent to the target device in a fingerprint message so that the target device can perform dual authentication based on the data fingerprint and verification information; the fingerprint message also carries the address of the first logical block where the data block is located. Receive the fingerprint response message returned by the target device; If the fingerprint response message carries a first indication, then the transmission of the data block is prohibited; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device. When the fingerprint response message carries the second indication, the data block is transmitted to the target device so that the target device stores the data block at a local second logical block address and adds an association between the data fingerprint of the data block and the second logical block address locally; the first logical block address is associated with the first logical block address, wherein the target device and the source device are configured with the same data fingerprint algorithm; the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0007] This application embodiment also provides a data copying method between storage devices, the method being applied to a target device, the method comprising: The source device sends a fingerprint message; the fingerprint message is sent by the source device for any data block to be copied and transmitted in the LUN, and the fingerprint message carries the data fingerprint and verification information of the data block; the fingerprint message also carries the address of the first logical block where the data block is located; The data block is dual-authenticated based on the data fingerprint and verification information; Send a fingerprint response message to the source device; wherein the fingerprint response message carries a first indication or a second indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device, and the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device; After sending a fingerprint response message carrying a second indication, the receiving source device stores the data block sent based on the fingerprint response message at a local second logical block address, and adds an association between the data fingerprint of the data block and the second logical block address locally; wherein, the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address.
[0008] This application embodiment also provides a data copying apparatus between storage devices, the apparatus comprising: The fingerprint message sending unit is configured to send a fingerprint message to the target device for any data block to be copied and transmitted in the LUN, carrying the data fingerprint and verification information of the data block to be copied and transmitted, so that the target device can perform dual authentication based on the data fingerprint and verification information; the fingerprint message also carries the first logical block address where the data block is located. The message receiving unit is configured to receive the fingerprint response message returned by the target device; A response unit is configured to prohibit the transmission of the data block when the fingerprint response message carries a first indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device; when the fingerprint response message carries a second indication, the data block is transmitted to the target device so that the target device stores the data block at a local second logical block address and adds an association between the data fingerprint of the data block and the second logical block address locally; the first logical block address is associated with the first logical block address, wherein the target device and the source device are configured with the same data fingerprint algorithm; the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0009] This application embodiment also provides a data copying apparatus between storage devices, the apparatus comprising: The fingerprint message receiving unit is configured to receive fingerprint messages sent by the source device; the fingerprint message is sent by the source device for any data block to be copied and transmitted in the LUN, and the fingerprint message carries the data fingerprint and verification information of the data block; the fingerprint message also carries the address of the first logical block where the data block is located. The dual authentication unit is configured to perform dual authentication on the data block to be copied based on the data fingerprint and verification information. The sending unit is configured to send a fingerprint response message to the source device; wherein the fingerprint response message carries a first indication or a second indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device, and the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device; The data block storage unit is configured to receive a data block sent by the source device based on the fingerprint response message after sending a fingerprint response message carrying a second indication, store the data block at a local second logical block address, and add an association relationship between the data fingerprint of the data block and the second logical block address locally; wherein the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address.
[0010] This application embodiment also provides a data replication system between storage devices, the system comprising: A source device is configured to, for any data block to be copied and transmitted in a LUN, first send the data fingerprint and authentication information of the data block to be copied and transmitted in a fingerprint message to a target device, so that the target device can perform dual authentication based on the data fingerprint and authentication information; the fingerprint message also carries the first logical block address where the data block is located; receive a fingerprint response message returned by the target device; if the fingerprint response message carries a first indication, then the transmission of the data block is prohibited; the first indication indicates that the data fingerprint and authentication information have passed the dual authentication of the target device; if the fingerprint response message carries a second indication, then the data block is transmitted to the target device, so that the target device stores the data block at a local second logical block address and adds an association between the data fingerprint of the data block and the second logical block address locally; the first logical block address is associated with the first logical block address, and the second indication indicates that the data fingerprint and authentication information have not passed the dual authentication of the target device; A target device is configured to receive a fingerprint message sent by a source device; perform dual authentication on the data block to be copied based on the data fingerprint and verification information; send a fingerprint response message to the target device; after sending a fingerprint response message carrying a second indication, the target device receives the data block sent by the source device based on the fingerprint response message, stores the data block at a local second logical block address, and adds an association between the data fingerprint of the data block and the second logical block address locally; wherein the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address; The target device and the source device are configured with the same data fingerprint algorithm.
[0011] As can be seen from the above technical solutions, this application's solution reduces the actual data transmission volume during cross-device remote copying by using a mechanism of dual authentication through first transmitting fingerprint and verification information, and only transmitting the complete data block when authentication fails. When the target device already has the same data block, the source device only needs to send fingerprint and verification information for verification. After successful verification, there is no need to transmit the entire data block. When the target device does not have the same data block, the target device establishes the association between the new data block and the logical block address. Thus, efficient data copying is achieved.
[0012] Furthermore, by first determining whether the data fingerprint of the data block to be copied and transmitted exists in the target device, and then further comparing the predetermined length of data in the header and / or tail of the data block when the fingerprint exists, the dual authentication is confirmed only when the fingerprint and the verification information match. This achieves the elimination of the risk of erroneous data reuse that may be caused by fingerprint hash collisions, based on the high efficiency of fingerprint comparison.
[0013] Furthermore, by carrying fingerprint tags in the fingerprint message to instruct the target device to perform fingerprint retrieval operations locally instead of data writing operations, the target device can quickly identify and process the message type, avoiding misjudging the data fingerprint as data to be written and triggering an incorrect writing process.
[0014] Furthermore, after the target device sends a fingerprint response message carrying the first instruction, it adds an association between the data fingerprint and the first logical block address locally on the target device, and directly maps the first logical block address to the storage location corresponding to the second logical block address that the data fingerprint is associated with based on the association. This enables remote copying operations to be completed only through metadata mapping without actually transmitting or writing any data blocks. Attached Figure Description
[0015] Figure 1 This is a schematic diagram of the system provided in the embodiments of this application; Figure 2 This is a flowchart of the system interaction method according to an embodiment of this application; Figure 3 This is a flowchart illustrating the dual verification process in an embodiment of this application; Figure 4 This is a flowchart illustrating the execution of corresponding operations based on the indication type of the fingerprint response message, according to an embodiment of this application. Figure 5 This is a flowchart of the method on the source device side according to an embodiment of this application; Figure 6 This is a flowchart of the method on the target device side according to an embodiment of this application; Figure 7 This is a schematic diagram of the source device according to an embodiment of this application; Figure 8 This is a schematic diagram of the target device according to an embodiment of this application; Figure 9 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0016] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.
[0017] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0018] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0019] The embodiments described in this specification will now be described in detail.
[0020] Figure 1 This is a structural diagram of the system according to an embodiment of this application, as shown below. Figure 1 As shown, the system includes a source device and a target device, wherein the source device and the target device are connected via a network (e.g., an IP network or Fibre Channel) and configured to use the same data fingerprint algorithm. The data fingerprint algorithm refers to a fixed-length string used to uniquely identify a data block by mathematically operating on the content of that data block.
[0021] In this embodiment, a data replication method is performed between the source device and the target device. Specifically, when the data corresponding to a certain LUN (Logical Unit Number) in the source device changes due to rewriting, the change is synchronized to the corresponding LUN in the target device, thereby achieving data synchronization. That is, the target device stores a copy of the data from the source device, and data recovery can be performed through the target device in the event of a failure in the source device.
[0022] In this embodiment, LUN is a number used in the storage system to identify and manage a logical storage unit, which corresponds to a logical storage space that can be accessed by the host.
[0023] As an optional implementation, in this embodiment, the source device monitors the data changes of each LUN by setting a time interval, such as every set time interval. Once a change is detected in the data stored in the LUN, the data replication method between storage devices provided in this application embodiment is executed. Alternatively, the source device can also execute the data replication method between storage devices provided in this application embodiment upon receiving a data replication instruction, such as a data replication instruction sent by external maintenance personnel. This embodiment is not specifically limited.
[0024] The following section introduces the data replication methods. Figure 2 This is a flowchart of the system interaction method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps: Step 101: The source device sends the data fingerprint and verification information of the data block to be copied and transmitted to the target device in a fingerprint message.
[0025] Among them, the data fingerprint is the result of a local data fingerprint algorithm configured by the source device to perform a specified operation, such as a hash calculation, on the data block to be copied and transmitted. The result of this operation can be considered as a unique identifier for the data block.
[0026] The verification information can be data of a predetermined length within the data block. For example, the verification information can be the first 4KB of data and / or the last 4KB of data in the data block.
[0027] In this embodiment, the verification information and the data fingerprint together constitute a dual authentication mechanism. Specifically, when the data fingerprints of a data block conflict, the consistency of the data block is further ensured by comparing verification information, such as additional data content, thereby avoiding the incorrect reuse of data blocks due to data fingerprint conflicts and ensuring the accuracy and consistency of data reuse even in data fingerprint conflict scenarios (extremely low probability scenarios).
[0028] In this embodiment, the fingerprint message also includes the first logical block address (LBA) where the data block is located. By carrying the first LBA in the fingerprint message, the data block can be stored in the first LBA locally when the target device stores the data block, so that the source device and the target device store the same data block in the same LBA.
[0029] In this embodiment, the fingerprint message carries a fingerprint tag, which instructs the target device to perform a fingerprint retrieval operation based on the fingerprint tag after receiving the fingerprint message. The fingerprint tag can be carried by reserving one or more bits in the header or control field of the fingerprint message. Optionally, when the reserved bits are set to a first value (e.g., "1"), it indicates that the fingerprint tag is carried. By setting a fingerprint tag, the target device can quickly perform the corresponding fingerprint retrieval operation based on the fingerprint tag, avoiding direct data writing operations.
[0030] Step 102: The target device performs dual verification based on the data fingerprint and verification information.
[0031] After receiving the fingerprint message, the target device needs to perform dual verification based on the data fingerprint and verification information on the data block to be copied and transmitted. The purpose of dual verification is to determine whether there is another data block in the target device that is the same as the data block to be copied and transmitted.
[0032] The following flowchart illustrates the two-factor authentication method. Figure 3 This is a flowchart of the dual verification process according to an embodiment of this application, such as... Figure 3 As shown, it includes: Step 1021: Determine whether the received data fingerprint exists in the target device. If so, proceed to step 1022.
[0033] Specifically, the target device searches and matches the data fingerprint in a pre-built fingerprint database to determine whether the data fingerprint exists in the database. The pre-built fingerprint database stores multiple entries, each entry recording the data fingerprint of a data block stored by the target device, the PBA (Physical Block Address), LBA, and other descriptive information of the data block.
[0034] Specifically, since the source device and the target device use the same data fingerprint algorithm, for the same data block, the data fingerprints calculated by the source device and the target device for that data block are identical. Therefore, if the data fingerprint does not exist in the fingerprint database pre-built locally on the target device, it means that the target device does not have a data block identical to that data block, and proceeds to step 1025. However, if the data fingerprint exists in the fingerprint database pre-built locally on the target device, it indicates that the target device likely has another data block identical to that data block, requiring further verification through verification information, and proceeds to step 1022.
[0035] Step 1022: Determine the target data block corresponding to the data fingerprint in the target device.
[0036] If the data fingerprint exists in the fingerprint database pre-built locally on the target device, the target data block is obtained by addressing the entry corresponding to the data fingerprint.
[0037] Step 1023: Determine whether the target data block matches the above verification information.
[0038] Taking the verification information specifically as the predetermined length of the header and footer data of the data block as an example, the target data block matches the verification information, that is, the predetermined length of the header and footer data of the target data block matches the predetermined length of the header and footer data of the data block carried in the verification information. Specifically, for example, if the predetermined length is 4K, the header 4K data of the target data block is taken and compared byte by byte with the header 4K data of the data block carried in the verification information, and the footer 4K data of the target data block is compared byte by byte with the footer 4K data of the data block carried in the verification information to determine whether they are consistent. If they are consistent, in this embodiment, the data block to be copied and transmitted and the target data block are considered to be the same. Of course, if they are inconsistent, even if the data fingerprint passes the verification, it will be considered that the data block detected by the source device that needs to be copied and transmitted to the target device is different from the target data block found by the target device based on the data fingerprint of the data block. If yes, proceed to step 1024. If no, proceed to step 1025.
[0039] Step 1024: The above data fingerprint and verification information are dual-authenticated by the target device.
[0040] Step 1025: The above data fingerprint and verification information failed the dual authentication of the target device.
[0041] Through steps 1021-1025, the target device achieves dual authentication based on data fingerprint and verification information. It leverages the efficiency of data fingerprint comparison and further utilizes verification information to eliminate the risk of mismatch caused by data fingerprint conflicts.
[0042] Step 103: The target device sends a fingerprint response message to the source device.
[0043] The fingerprint response message is a control message returned by the target device to the source device after completing dual authentication of the data fingerprint and verification information. This message indicates the authentication result and carries either a first indication or a second indication to determine whether the source device should subsequently transmit the complete data block. Specifically, after completing dual authentication, the target device sends a fingerprint response message to the source device based on the result. The fingerprint response message carries either a first indication or a second indication. The first indication indicates that the data fingerprint and verification information have passed the target device's dual authentication, while the second indication indicates that the data fingerprint and verification information have not passed the target device's dual authentication. By carrying the first or second indication in the fingerprint response message, the source device can determine the further action to be taken upon receiving the fingerprint response message.
[0044] Step 104: The source device performs the corresponding operation according to the indication type of the fingerprint response message.
[0045] After the source device receives the fingerprint response message sent by the target device, it performs the corresponding operation based on the indication carried in the fingerprint response message, which is either the first indication or the second indication.
[0046] The following flowchart illustrates the specific steps a source device takes to perform an operation based on the indication type of a fingerprint response message. Figure 4 This is a flowchart illustrating the execution of corresponding operations based on the indication type of the fingerprint response message, as described in this application embodiment. Figure 4 As shown, it includes: Step 1041: Determine whether the fingerprint response message carries the first indication.
[0047] If so, proceed to step 1042.
[0048] If not, proceed to step 1043.
[0049] Step 1042: Prohibit the transmission of the data block to be copied to the target device.
[0050] The fingerprint response message carries a first indication that the data fingerprint and verification information have passed the dual verification of the target device. This means the target device possesses the same target data block as the one that needs to be copied and transmitted on the source device. At this point, the source device can be prevented from transmitting the data block to the target device, thus avoiding wasted bandwidth resources and prolonged copying time caused by repeatedly transmitting the same data.
[0051] It should be noted that, in this embodiment, after the data fingerprint and verification information pass dual authentication, the association between the data fingerprint and the first LBA can be directly added locally on the target device. Based on this association, the first LBA is mapped to the data storage location to achieve metadata reuse. The storage location is the storage location corresponding to the second LBA already associated with the data fingerprint. The second LBA is the address on the target device where the target data block is stored. Thus, remote copying is achieved by changing the metadata mapping even if no data block is written to the target device. Afterwards, a fingerprint response message carrying the first indication is sent to the source device.
[0052] Alternatively, after sending a fingerprint response message carrying the first indication to the source device, the association between the data fingerprint and the first LBA can be directly added locally on the target device, and the first LBA can be mapped to the data storage location based on the association to realize the reuse of metadata. The storage location is the storage location corresponding to the second LBA that the data fingerprint has been associated with.
[0053] Step 1043: Transmit the data block to the target device.
[0054] If the fingerprint response message does not carry a second indication, it means that the data fingerprint and verification information have not passed the dual verification of the target device. That is, the target device does not have the same target data block as the data block that needs to be copied and transmitted on the source device. In this case, the data block needs to be transmitted to the target device so that the target device can store the data block.
[0055] As an example, after receiving the data block, the target device adds an association between the data fingerprint of the data block and the second LBA locally, and adds an entry corresponding to the data block in the fingerprint database of the target device, thereby realizing the fingerprint storage of the data block on the target device, so as to facilitate subsequent querying and comparison.
[0056] Figure 5 This is a flowchart of the method on the source device side of an embodiment of this application, as shown below. Figure 5 As shown, it includes: Step 201: For any data block to be copied and transmitted in the LUN, first send the data fingerprint and verification information of the data block in a fingerprint message to the target device so that the target device can perform dual authentication based on the data fingerprint and verification information; the fingerprint message also carries the first logical block address (LBA) of the data block.
[0057] Furthermore, by first determining whether the data fingerprint of the data block to be copied and transmitted exists in the target device, and then further comparing the predetermined length of data in the header and / or tail of the data block when the fingerprint exists, the dual authentication is confirmed only when the fingerprint and the verification information match. This achieves the elimination of the risk of erroneous data reuse that may be caused by fingerprint hash collisions, based on the high efficiency of fingerprint comparison.
[0058] Furthermore, by carrying fingerprint tags in the fingerprint message to instruct the target device to perform fingerprint retrieval operations locally instead of data writing operations, the target device can quickly identify and process the message type, avoiding misjudging the data fingerprint as data to be written and triggering an incorrect writing process.
[0059] Step 202: Receive the fingerprint response message returned by the target device.
[0060] Step 203: When the fingerprint response message carries a first indication, the transmission of the data block is prohibited; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device; when the fingerprint response message carries a second indication, the data block is transmitted to the target device so that the target device stores the data block in its local second LBA and adds an association between the data fingerprint of the data block and the second LBA locally; the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0061] The second LBA is associated with the first LBA carried in the fingerprint message.
[0062] Figure 6 This is a flowchart of the method on the target device side of an embodiment of this application, as shown below. Figure 6 As shown, it includes: Step 301: Receive the fingerprint message sent by the source device.
[0063] A fingerprint message is sent by the source device for any data block to be copied and transmitted in the LUN. The fingerprint message carries the data fingerprint and verification information of the data block; the fingerprint message also carries the address of the first logical block in which the data block is located.
[0064] In this embodiment, the fingerprint message also carries a fingerprint marker to instruct the target device to perform a fingerprint retrieval operation locally instead of a data writing operation. This enables the target device to quickly identify and process the message type, avoiding misjudging the data fingerprint as data to be written and triggering an incorrect writing process.
[0065] Step 302: Perform dual authentication on the data block to be copied and transmitted based on the data fingerprint and verification information.
[0066] Furthermore, by first determining whether the data fingerprint of the data block to be copied and transmitted exists in the target device, and then further comparing the predetermined length of data in the header and / or tail of the data block when the fingerprint exists, the dual authentication is confirmed only when the fingerprint and the verification information match. This achieves the elimination of the risk of erroneous data reuse that may be caused by fingerprint hash collisions, based on the high efficiency of fingerprint comparison.
[0067] Step 303: Send a fingerprint response message to the source device; wherein the fingerprint response message carries a first indication or a second indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device, and the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0068] Step 304: After sending a fingerprint response message carrying a second indication, the receiving source device sends a data block based on the fingerprint response message, stores the data block at a local second logical block address, and adds an association between the data fingerprint of the data block and the second logical block address locally; wherein, the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address.
[0069] Furthermore, after the target device sends a fingerprint response message carrying the first instruction, it adds an association between the data fingerprint and the first LBA locally on the target device, and directly maps the first LBA to the storage location corresponding to the second LBA that the data fingerprint is associated with based on the association. This enables remote copying operations to be completed only through address remapping at the metadata level without actually transmitting or writing any data blocks.
[0070] Figure 7 This is a device structure diagram of the source device provided in the embodiments of this application, including: The fingerprint message sending unit is configured to send a fingerprint message containing the data fingerprint and verification information of any data block to be copied and transmitted in the LUN to the target device, so that the target device can perform dual authentication based on the data fingerprint and verification information; the fingerprint message also carries the first LBA where the data block is located. The message receiving unit is configured to receive the fingerprint response message returned by the target device; A response unit is configured to prohibit the transmission of the data block when the fingerprint response message carries a first indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device; when the fingerprint response message carries a second indication, the data block is transmitted to the target device so that the target device stores the data block at a local second logical block address and adds an association between the data fingerprint of the data block and the second logical block address locally; the first logical block address is associated with the first logical block address, wherein the target device and the source device are configured with the same data fingerprint algorithm; the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0071] The target device and the source device are configured with the same data fingerprint algorithm; the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0072] Optionally, the verification information is: The data block has a predetermined length of header data and / or a predetermined length of tail data; The target device performs dual authentication based on the data fingerprint and verification information, which further includes: Determine if the data fingerprint exists in the target device; if not, determine that the data fingerprint and verification information have failed the dual authentication of the target device; if yes, then: Determine whether the header and / or tail length data of the data block corresponding to the data fingerprint in the target device match the data in the verification information; if yes, determine that the data fingerprint and verification information have passed the dual authentication of the target device; if no, determine that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0073] Optionally, the fingerprint message carries a fingerprint identifier; The fingerprint marker is used to instruct the target device to perform a fingerprint retrieval operation locally rather than a data writing operation.
[0074] Figure 8 This is a structural diagram of the target device provided in the embodiments of this application, including: The fingerprint message receiving unit is configured to receive fingerprint messages sent by the source device; the fingerprint message is sent by the source device for any data block to be copied and transmitted in the LUN, and the fingerprint message carries the data fingerprint and verification information of the data block; the fingerprint message also carries the address of the first logical block where the data block is located. The dual authentication unit is configured to perform dual authentication on the data block to be copied based on the data fingerprint and verification information. The sending unit is configured to send a fingerprint response message to the target device; wherein the fingerprint response message carries a first indication or a second indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device, and the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device; The data block storage unit is configured to receive a data block sent by the source device based on the fingerprint response message after sending a fingerprint response message carrying a second indication, store the data block at a local second logical block address, and add an association relationship between the data fingerprint of the data block and the second logical block address locally; wherein the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address.
[0075] Optionally, the verification information is: The data block has a predetermined length of header data and / or a predetermined length of tail data; The dual authentication based on the data fingerprint and verification information further includes: Determine if the data fingerprint exists in the target device; if not, determine that the data fingerprint and verification information have failed the dual authentication of the target device; if yes, then: Determine whether the header and / or tail length data of the data block corresponding to the data fingerprint in the target device match the data in the verification information; if yes, determine that the data fingerprint and verification information have passed the dual authentication of the target device; if no, determine that the data fingerprint and verification information have not passed the dual authentication of the target device.
[0076] Optionally, the fingerprint message carries a fingerprint identifier; The fingerprint marker is used to instruct the target device to perform a fingerprint retrieval operation locally rather than a data writing operation.
[0077] Optionally, when the data fingerprint is found locally, an association relationship between the data fingerprint and the first LBA is added locally, and the first LBA is mapped to the data storage location based on the association relationship to realize the reuse of metadata; the data storage location is the storage location corresponding to the second LBA that the data fingerprint has been associated with.
[0078] This application also provides embodiments that... Figure 7 or Figure 8 Hardware structure description of the illustrated device. This hardware structure is... Figure 9 The structure in the illustrated electronic device. Please refer to [link / reference]. Figure 9 , Figure 9 This is a structural diagram of an electronic device provided in an embodiment of this application. Figure 9As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0079] Based on the same concept as the above method, this application also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the method disclosed in the above examples of this application.
[0080] This application can be implemented by executing several computer program code flows using an electronic device. The electronic device loads the computer program into non-volatile memory and uses its processor to read these computer program instructions into memory for execution. One hardware structure diagram of the electronic device, besides... Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown, electronic devices may also include other hardware depending on their actual functions, which will not be elaborated further.
Claims
1. A method for data copying between storage devices, characterized in that, This method is applied to a source device, and the method includes: For any data block to be copied and transmitted in a LUN, the data fingerprint and verification information of the data block are first sent to the target device in a fingerprint message so that the target device can perform dual authentication based on the data fingerprint and verification information; the fingerprint message also carries the address of the first logical block where the data block is located. Receive the fingerprint response message returned by the target device; If the fingerprint response message carries a first indication, then the transmission of the data block is prohibited; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device. When the fingerprint response message carries the second indication, the data block is transmitted to the target device so that the target device stores the data block at a local second logical block address and adds an association between the data fingerprint of the data block and the second logical block address locally; the first logical block address is associated with the first logical block address, wherein the target device and the source device are configured with the same data fingerprint algorithm; the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
2. The method according to claim 1, characterized in that, The verification information is as follows: The data block contains a predetermined length of data at the beginning and / or end; The target device performs dual authentication based on the data fingerprint and verification information, which further includes: Determine if the data fingerprint exists in the target device; if not, determine that the data fingerprint and verification information have failed the dual authentication of the target device; if yes, then: Determine whether the predetermined length of the header and / or tail of the data block corresponding to the data fingerprint in the target device matches the data in the verification information; if yes, determine that the data fingerprint and verification information have passed the dual authentication of the target device; if no, determine that the data fingerprint and verification information have not passed the dual authentication of the target device.
3. The method according to claim 1, characterized in that, The fingerprint message carries a fingerprint marker; The fingerprint marker is used to instruct the target device to perform a fingerprint retrieval operation locally rather than directly performing a data writing operation.
4. A method for data copying between storage devices, characterized in that, This method is applied to a target device, and the method includes: The source device sends a fingerprint message; the fingerprint message is sent by the source device for any data block to be copied and transmitted in the LUN, and the fingerprint message carries the data fingerprint and verification information of the data block; the fingerprint message also carries the address of the first logical block where the data block is located; The data block is dual-authenticated based on the data fingerprint and verification information; Send a fingerprint response message to the source device; wherein the fingerprint response message carries a first indication or a second indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device, and the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device; After sending a fingerprint response message carrying a second indication, the receiving source device stores the data block sent based on the fingerprint response message at a local second logical block address, and adds an association between the data fingerprint of the data block and the second logical block address locally; wherein, the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address.
5. The method according to claim 4, characterized in that, The verification information is as follows: The data block has a predetermined length of header data and / or a predetermined length of tail data; The dual authentication based on the data fingerprint and verification information further includes: Determine if the data fingerprint exists in the target device; if not, determine that the data fingerprint and verification information have failed the dual authentication of the target device; if yes, then: Determine whether the header and / or tail length data of the data block corresponding to the data fingerprint in the target device match the data in the verification information; if yes, determine that the data fingerprint and verification information have passed the dual authentication of the target device; if no, determine that the data fingerprint and verification information have not passed the dual authentication of the target device.
6. The method according to claim 4, characterized in that, The fingerprint message carries a fingerprint marker; The fingerprint marker is used to instruct the target device to perform a fingerprint retrieval operation locally rather than directly performing a data writing operation.
7. The method according to claim 4, characterized in that, The method further includes: A new association is established locally between the data fingerprint and the first logical block address. Based on this association, the first logical block address is mapped to a data storage location to achieve metadata reuse. The data storage location is the storage location corresponding to the second logical block address that the data fingerprint has been associated with.
8. A data copying apparatus between storage devices, characterized in that, The device includes: The fingerprint message sending unit is configured to send a fingerprint message to the target device for any data block to be copied and transmitted in the LUN, carrying the data fingerprint and verification information of the data block to be copied and transmitted, so that the target device can perform dual authentication based on the data fingerprint and verification information; the fingerprint message also carries the first logical block address where the data block is located. The message receiving unit is configured to receive the fingerprint response message returned by the target device; A response unit is configured to prohibit the transmission of the data block when the fingerprint response message carries a first indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device; when the fingerprint response message carries a second indication, the data block is transmitted to the target device so that the target device stores the data block at a local second logical block address and adds an association between the data fingerprint of the data block and the second logical block address locally; the first logical block address is associated with the first logical block address, wherein the target device and the source device are configured with the same data fingerprint algorithm; the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device.
9. A data replication apparatus between storage devices, characterized in that, The device includes: The fingerprint message receiving unit is configured to receive fingerprint messages sent by the source device; the fingerprint message is sent by the source device for any data block to be copied and transmitted in the LUN, and the fingerprint message carries the data fingerprint and verification information of the data block; the fingerprint message also carries the address of the first logical block where the data block is located. The dual authentication unit is configured to perform dual authentication on the data block to be copied based on the data fingerprint and verification information. The sending unit is configured to send a fingerprint response message to the source device; wherein the fingerprint response message carries a first indication or a second indication; the first indication indicates that the data fingerprint and verification information have passed the dual authentication of the target device, and the second indication indicates that the data fingerprint and verification information have not passed the dual authentication of the target device; The data block storage unit is configured to receive a data block sent by the source device based on the fingerprint response message after sending a fingerprint response message carrying a second indication, store the data block at a local second logical block address, and add an association relationship between the data fingerprint of the data block and the second logical block address locally; wherein the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address.
10. A data replication system between storage devices, characterized in that, The system includes: A source device is configured to, for any data block to be copied and transmitted in a LUN, first send the data fingerprint and authentication information of the data block to be copied and transmitted in a fingerprint message to a target device, so that the target device can perform dual authentication based on the data fingerprint and authentication information; the fingerprint message also carries the first logical block address where the data block is located; receive a fingerprint response message returned by the target device; if the fingerprint response message carries a first indication, then the transmission of the data block is prohibited; the first indication indicates that the data fingerprint and authentication information have passed the dual authentication of the target device; if the fingerprint response message carries a second indication, then the data block is transmitted to the target device, so that the target device stores the data block at a local second logical block address and adds an association between the data fingerprint of the data block and the second logical block address locally; the first logical block address is associated with the first logical block address, and the second indication indicates that the data fingerprint and authentication information have not passed the dual authentication of the target device; A target device is configured to receive a fingerprint message sent by a source device; perform dual authentication on the data block to be copied based on the data fingerprint and verification information; send a fingerprint response message to the target device; after sending a fingerprint response message carrying a second indication, the target device receives the data block sent by the source device based on the fingerprint response message, stores the data block at a local second logical block address, and adds an association between the data fingerprint of the data block and the second logical block address locally; wherein the target device and the source device are configured with the same data fingerprint algorithm, and the first logical block address is associated with the first logical block address; The target device and the source device are configured with the same data fingerprint algorithm.