A device remote replication method, device and medium

By receiving HTTP requests, establishing device authentication relationships and using algorithms to process remote copy function operation instructions in remote copy technology, the existing technology problems of difficulty in exception handling and inapplicability of heterogeneous storage are solved, and efficient remote copy management is achieved. Applicable to different versions of storage products, improving storage resource utilization.

CN115174596BActive Publication Date: 2024-10-18JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210891255.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2024-10-18
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

Existing remote replication technology is difficult to obtain useful error information when handling exceptions, is not applicable between heterogeneous storage devices, has poor scalability, and cannot meet the needs of high availability and disaster recovery backup.

Method used

By receiving HTTP requests, establishing device authentication relationships, using corresponding algorithms to process remote copy function operation instructions, and completing storage resource management based on resource copy results, it is suitable for different versions of storage products, solves the complexity of heterogeneous storage devices, and achieves Exception handling and scalability improvements.

Benefits of technology

It achieves timely and comprehensive processing of information, expands the scope of application of remote replication methods, improves storage resource utilization, and solves the complexity problems caused by heterogeneous storage devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115174596B_ABST
    Figure CN115174596B_ABST
Patent Text Reader

Abstract

The present application relates to the field of remote replication technology, and discloses a device remote replication method, apparatus, and medium. After receiving an HTTP request for operating a remote replication resource, a device authentication relationship between a local device and a remote device is established. After the device authentication relationship is established, when executing remote replication resource management, operations on storage resources in the local device will be transparently transmitted to the remote device through a corresponding algorithm to achieve management of storage resources of the remote device. In addition, the method establishes an authentication relationship between the local device and the remote device through the IP and login password of the remote device, and can be applied to storage products of different versions, solving the complexity brought by heterogeneous storage devices, and having the advantages of easy expansion, effective handling of exceptions, and improved storage resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of remote replication technology, and in particular to a device remote replication method, apparatus and medium. Background Art

[0002] With the development of digital economy, data has become an important asset of enterprises. The continuous growth of data has put forward higher requirements for the continuity, recoverability and high availability of storage systems. Data protection strategies and disaster recovery backup technologies are particularly important. Remote replication technology is one of the key technologies used in storage systems for disaster recovery and backup, which can effectively solve the single point failure problem of storage systems.

[0003] The current remote replication technology is mainly based on SSH. When the local device processes remote replication-related management operations, the local device logs in to the remote device through SSH and calls the remote device-related commands or scripts to manage the remote device's storage resources, such as creating a logical volume or creating a remote replication relationship. This method is simple to implement, but after the SSH call command fails, it is impossible to effectively obtain useful error information, which increases the difficulty of exception handling. At the same time, due to the great differences in the methods of processing storage resources between heterogeneous storage, this method is not applicable when the local device and the remote device are heterogeneous storage.

[0004] It can be seen that how to improve the processing capability of device remote replication, process information in a timely and comprehensive manner, and expand the scope of application of the device remote replication method are issues that those skilled in the art need to address. Summary of the invention

[0005] The purpose of the present application is to provide a device remote replication method, apparatus and medium for timely and comprehensive information processing and to expand the scope of application of the device remote replication method.

[0006] In order to solve the above technical problems, the present application provides a device remote replication method, which is applied to a local device, including:

[0007] Receive HTTP requests for operating remote replication resources;

[0008] Obtaining the IP and login password of the remote device and sending an authentication request to the remote device to establish an authentication relationship;

[0009] receiving a remote replication function operation instruction, and invoking a corresponding algorithm to send a request corresponding to the remote replication function operation instruction to the remote device so that the remote device performs resource replication;

[0010] Receiving the resource replication result returned by the remote device;

[0011] The management of local storage resources is completed according to the resource replication result.

[0012] Preferably, after establishing the authentication relationship, the following is further included:

[0013] Marking the device authentication relationship between the local device and the remote device as normal;

[0014] Writing the device authentication relationship and the status information of each device into a database for storage;

[0015] Furthermore, if it is detected that the status of the local device or the remote device has changed, the status change information is stored in a database, and it is determined whether to continue to execute the device remote replication method based on the status change information.

[0016] Preferably, after receiving the request to delete the device authentication relationship, the method further includes:

[0017] Determining whether the replication relationship of the remote replication resource exists;

[0018] If it exists, a prompt message is sent to remind the user that the remote replication resource still exists;

[0019] If not, the device authentication relationship between the local device and the remote device is released.

[0020] Preferably, after sending the authentication request to the remote device, the method further includes:

[0021] When the remote device receives the authentication request, it parses and verifies whether the authentication request is correct;

[0022] If incorrect, returning information of refusing to establish device authentication relationship to the local device;

[0023] If correct, information indicating that the device authentication relationship is agreed to be established and the device information of the remote device are returned to the local device.

[0024] Preferably, the resource copy result includes a return code and operation result data;

[0025] Further, completing the management of local storage resources according to the resource replication includes:

[0026] Determine whether the return code is abnormal;

[0027] If there is an exception, the exception information is recorded and the operation result is returned abnormally;

[0028] If normal, the operation result data is parsed and recorded to complete the management of the local storage resources, and the management result is returned.

[0029] In order to solve the above technical problems, the present application also provides another device remote replication method, which is applied to a remote device, comprising:

[0030] The receiving local device receives the HTTP request for operating the remote replication resource, obtains the IP and login password of the remote device, and then sends an authentication request to establish an authentication relationship;

[0031] receiving a request sent by the local device corresponding to a remote replication function operation instruction according to a corresponding algorithm to perform resource replication;

[0032] The resource replication result is returned to the local device so that the local device completes the management of the local storage resource according to the resource replication result.

[0033] In order to solve the above technical problems, the present application also provides a device remote replication apparatus, which is applied to a local device, including:

[0034] A first receiving module, used for receiving an HTTP request for operating a remote replication resource;

[0035] A first authentication module, used to obtain the IP and login password of a remote device and send an authentication request to the remote device to establish an authentication relationship;

[0036] A sending module, used for receiving a remote replication function operation instruction, and calling a corresponding algorithm to send a request corresponding to the remote replication function operation instruction to the remote device so that the remote device performs resource replication;

[0037] A second receiving module, used for receiving the resource replication result returned by the remote device;

[0038] The management module is used to complete the management of local storage resources according to the resource replication result.

[0039] In order to solve the above technical problems, the present application also provides another device remote replication apparatus, which is applied to a remote device, including:

[0040] The second authentication module is used to receive the HTTP request of the local device for operating the remote replication resource, obtain the IP and login password of the remote device, and then send an authentication request to establish an authentication relationship;

[0041] A third receiving module is used to receive a request sent by the local device corresponding to the remote replication function operation instruction according to the corresponding algorithm to perform resource replication;

[0042] The returning module is used to return the resource replication result to the local device so that the local device can complete the management of the local storage resources according to the resource replication result.

[0043] To solve the above technical problems, the present application also provides another device remote copying apparatus, comprising a memory for storing a computer program;

[0044] The processor is used to implement the steps of the above-mentioned device remote replication method when executing the computer program.

[0045] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the device remote replication method as described above are implemented.

[0046] The device remote replication method provided in the present application establishes a device authentication relationship between the local device and the remote device after receiving an HTTP request for operating a remote replication resource. After the device authentication relationship is established, when executing remote replication resource management, operations on storage resources in the local device will be transmitted to the remote device through the corresponding algorithm to achieve management of the storage resources of the remote device. In addition, the method establishes an authentication relationship between the local device and the remote device through the IP and login password of the remote device, which can be applied to storage products of different versions, solves the complexity brought by heterogeneous storage devices, and has the advantages of easy expansion, effective handling of exceptions, and improved storage resource utilization.

[0047] In addition, the device remote replication apparatus and medium provided in the present application correspond to the above-mentioned device remote replication method, and the effects are the same as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0049] Figure 1 A flowchart of a device remote replication method provided in an embodiment of the present application;

[0050] Figure 2 A flowchart of another device remote replication method provided in an embodiment of the present application;

[0051] Figure 3 A structural diagram of a device remote replication apparatus provided in an embodiment of the present application;

[0052] Figure 4 A structural diagram of another device remote replication apparatus provided in an embodiment of the present application;

[0053] Figure 5 A structural diagram of another device remote replication apparatus provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] With the development of digital economy, data has become an important asset of enterprises. The continuous growth of data has put forward higher requirements for the continuity, recoverability and high availability of storage systems. Data protection strategies and disaster recovery backup technologies are particularly important. Remote replication technology is one of the key technologies used in storage systems for disaster recovery and backup, which can effectively solve the single point failure problem of storage systems.

[0056] In the existing remote replication technology, the remote device management solution is mainly based on SSH. When the local device processes remote replication related management operations, the local device logs in to the remote device through the SSH remote device IP address and calls the remote device related commands or scripts to manage the remote device storage resources, such as creating logical volumes or creating remote replication relationships. This method is simple to implement, but it cannot be effectively expanded after the remote replication function is added, and after the SSH call command fails, it is impossible to effectively obtain useful error information, which increases the difficulty of exception handling. At the same time, due to the great differences in the methods of processing storage resources between heterogeneous storage, this method is not applicable when the local device and the remote device are heterogeneous storage. Therefore, the remote replication device management solution based on SSH has problems such as poor scalability, incomplete exception handling, and limited application scenarios.

[0057] The core of this application is to provide a device remote replication method, apparatus and medium for timely and comprehensive information processing and to expand the scope of application of the device remote replication method.

[0058] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0059] Figure 1 A flowchart of a device remote replication method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method is applied to a local device and includes:

[0060] S10: receiving an HTTP request for operating a remote replication resource;

[0061] S11: Obtain the IP and login password of the remote device and send an authentication request to the remote device to establish an authentication relationship;

[0062] S12: receiving a remote replication function operation instruction, and calling a corresponding algorithm to send a request corresponding to the remote replication function operation instruction to a remote device so that the remote device performs resource replication;

[0063] S13: receiving the resource replication result returned by the remote device;

[0064] S14: Complete the management of local storage resources according to the resource replication result.

[0065] First of all, it should be noted that the remote replication resources and corresponding algorithms in this embodiment should be pre-deployed in the local device and the remote device. The corresponding algorithms are specifically the REST methods required to create remote replication resource classes in both the local device and the remote device, such as the GET / DELETE / PUT / POST methods of the storage system remote replication resources. When deploying remote replication resources, the remote replication resource entity is registered in the local device and the remote device, and a URI is assigned to it for subsequent access to the remote replication resource.

[0066] The device remote replication method in this embodiment is applied to a local device, and its execution subject can be a device remote replication device deployed in the local device to implement device remote replication. In this application, the execution subject is taken as an example of a remote device management service, which is deployed not only in the local device but also in the remote device.

[0067] In step S10, after the local device and the remote device start the remote device management service, the service monitors the port of the device and waits to receive the HTTP request for operating the remote replication resource. Specifically, the port monitored by the service is port 6060 of the device, which is usually the default agreed access port and can be adjusted according to the actual situation. In the specific implementation, the port is only used for the HTTP request operation of the remote replication resource between the local device and the remote device, and cannot be accessed from the outside, thereby improving the processing efficiency and the security of the remote replication of the device.

[0068] After receiving the HTTP request, the user can select the remote device to which resources need to be copied on the local device. Specifically, the user selects the remote device authentication module on the management interface of the local device and fills in the IP and login password of the remote device, and sends a request to the remote device to establish device authentication. After the local device parses the IP and login password of the remote device, it sends a request to establish device authentication information to the 6060 port of the remote device. The local device can request to establish a device authentication relationship with multiple remote devices, and the remote device can be a storage product of the same series but different versions as the local device. After the user sends a request to establish an authentication relationship between the local device and the remote device, the user request is received through other ports of the local device.

[0069] When the remote device receives the request to establish a device authentication relationship, it parses and verifies whether the authentication information is correct. If it is incorrect, it returns information that refuses to establish the device authentication relationship; if it is correct, it returns information that agrees to establish the device authentication relationship, as well as detailed information about the remote device, such as the location of the equipment room where the device is located.

[0070] After the device authentication relationship between the local device and the remote device is established, the device authentication relationship between the local device and the remote device is marked as a normal state;

[0071] The device authentication relationship and the status information of each device are written into the database for storage.

[0072] After the device authentication relationship between the local device and the remote device is established, the user issues remote replication resource-related operations on the local device, such as creating / deleting / editing / querying remote replication relationships; the local device calls the REST method of the remote replication resource class and sends the relevant request to port 6060 of the remote device. After receiving the REST request related to the local device, the remote device parses the request content and executes the remote replication-related process, such as marking the local storage resource as the corresponding role according to the master / slave role information. The return code and operation result data of the relevant operation are returned to the local device.

[0073] After receiving the return code and operation result data, the local device determines whether the return code is abnormal; if it is abnormal, it records the abnormal information and returns the abnormal operation result; if the return code is normal, it parses and records the operation result data; at the same time, the local device executes the remote replication related processes, completes the management of local storage resources, and returns the final result to the user.

[0074] When the local device receives a request to delete a device authentication relationship, the remote replication device management service determines whether a remote replication resource, such as a logical volume remote replication relationship, exists; if so, the deletion fails, and the user is prompted that the remote replication resource still exists; if not, the device authentication relationship between the specified local device and the remote device is terminated, and the device authentication relationship between the local device and other remote devices is not affected.

[0075] In a specific implementation, when the local device or remote device is in an abnormal state, such as a device failure, the remote device management service writes the abnormal state of the device authentication relationship into the database, and the remote replication resource operation of the local device cannot be sent to the remote device. After the local device or remote device recovers from the abnormal state, the remote device management service updates the device authentication relationship from the abnormal state to the normal state and continues to provide remote replication resource management services.

[0076] The device remote replication method provided in the present application is applied to a local device, including receiving an HTTP request for operating a remote replication resource, obtaining the IP and login password of the remote device and sending an authentication request to the remote device to establish an authentication relationship; receiving a remote replication function operation instruction, and calling a corresponding algorithm to send a request corresponding to the remote replication function operation instruction to the remote device so that the remote device can perform resource replication; receiving the resource replication result returned by the remote device; and completing the management of local storage resources according to the resource replication result. With this technical solution, after receiving an HTTP request for operating a remote replication resource, a device authentication relationship between the local device and the remote device is established. After the device authentication relationship is established, when executing remote replication resource management, operations on storage resources in the local device will be transparently transmitted to the remote device through the corresponding algorithm to realize the management of storage resources of the remote device. In addition, the method realizes the establishment of an authentication relationship between the local device and the remote device through the IP and login password of the remote device, can be applied to storage products of different versions, solves the complexity brought by heterogeneous storage devices, and has the advantages of easy expansion, effective handling of exceptions, and improved storage resource utilization.

[0077] The above embodiment describes in detail the device remote replication method applied to a local device. The present application also provides another device remote replication method. Figure 2 A flowchart of another device remote replication method provided in an embodiment of the present application, such as Figure 2 As shown, the method is applied to a remote device, comprising:

[0078] S20: receiving the HTTP request for operating the remote replication resource, the local device obtains the IP and login password of the remote device and then sends an authentication request to establish an authentication relationship;

[0079] S21: receiving a request sent by a local device corresponding to a remote replication function operation instruction according to a corresponding algorithm to perform resource replication;

[0080] S22: Return the resource replication result to the local device so that the local device can complete the management of the local storage resources according to the resource replication result.

[0081] Since the device remote replication method applied to a remote device provided in this embodiment corresponds to the device remote replication method applied to a local device described above, and the device remote replication method applied to a local device is described in detail in the above embodiment, it will not be repeated in this embodiment.

[0082] The device remote replication method provided in the present application is applied to a remote device, including receiving a local device after receiving an HTTP request for operating a remote replication resource, obtaining the IP and login password of the remote device, and then sending an authentication request to establish an authentication relationship; receiving a request sent by the local device corresponding to the remote replication function operation instruction according to the corresponding algorithm to perform resource replication; returning the resource replication result to the local device so that the local device completes the management of local storage resources according to the resource replication result. With this technical solution, after receiving an HTTP request for operating a remote replication resource, a device authentication relationship between the local device and the remote device is established. After the device authentication relationship is established, when executing remote replication resource management, the operation of the storage resources in the local device will be transmitted to the remote device through the corresponding algorithm to realize the management of the storage resources of the remote device. In addition, the method realizes the establishment of the authentication relationship between the local device and the remote device through the IP and login password of the remote device, can be applied to storage products of different versions, solves the complexity brought by heterogeneous storage devices, and has the advantages of easy expansion, effective handling of exceptions, and improved storage resource utilization.

[0083] In the above embodiments, the device remote replication method is described in detail, and the present application also provides an embodiment corresponding to the device remote replication apparatus. It should be noted that the present application describes the embodiment of the apparatus part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.

[0084] Figure 3 A structural diagram of a device remote replication apparatus provided in an embodiment of the present application, such as Figure 3 As shown, the device is applied to a local device, including:

[0085] The first receiving module 01 is used to receive an HTTP request for operating a remote replication resource;

[0086] The first authentication module 02 is used to obtain the IP and login password of the remote device and send an authentication request to the remote device to establish an authentication relationship;

[0087] The sending module 03 is used to receive the remote replication function operation instruction, and call the corresponding algorithm to send the request corresponding to the remote replication function operation instruction to the remote device so that the remote device can perform resource replication;

[0088] The second receiving module 04 is used to receive the resource replication result returned by the remote device;

[0089] The management module 05 is used to complete the management of local storage resources according to the resource replication result.

[0090] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0091] The device remote replication device provided in the present application is applied to a local device, including receiving an HTTP request for operating a remote replication resource, obtaining the IP and login password of the remote device, and sending an authentication request to the remote device to establish an authentication relationship; receiving a remote replication function operation instruction, and calling a corresponding algorithm to send a request corresponding to the remote replication function operation instruction to the remote device so that the remote device can perform resource replication; receiving the resource replication result returned by the remote device; and completing the management of local storage resources according to the resource replication result. With this technical solution, after receiving an HTTP request for operating a remote replication resource, a device authentication relationship between the local device and the remote device is established. After the device authentication relationship is established, when executing remote replication resource management, operations on storage resources in the local device will be transparently transmitted to the remote device through the corresponding algorithm to realize the management of storage resources of the remote device. In addition, the method realizes the establishment of an authentication relationship between the local device and the remote device through the IP and login password of the remote device, can be applied to storage products of different versions, solves the complexity brought by heterogeneous storage devices, and has the advantages of easy expansion, effective handling of exceptions, and improved storage resource utilization.

[0092] Figure 4 A structural diagram of another device remote replication apparatus provided in an embodiment of the present application, such as Figure 4 As shown, the device is applied to a remote device, comprising:

[0093] The second authentication module 10 is used to receive the HTTP request for operating the remote replication resource, and then send the authentication request after obtaining the IP and login password of the remote device to establish the authentication relationship;

[0094] The third receiving module 11 is used to receive a request sent by a local device corresponding to a remote replication function operation instruction according to a corresponding algorithm to perform resource replication;

[0095] The return module 12 is used to return the resource replication result to the local device so that the local device can complete the management of the local storage resources according to the resource replication result.

[0096] The device remote replication device provided in the present application is applied to a remote device, including receiving a local device after receiving an HTTP request for operating a remote replication resource, obtaining the IP and login password of the remote device, and then sending an authentication request to establish an authentication relationship; receiving a request sent by the local device corresponding to the remote replication function operation instruction according to the corresponding algorithm to perform resource replication; returning the resource replication result to the local device so that the local device can complete the management of local storage resources according to the resource replication result. With this technical solution, after receiving an HTTP request for operating a remote replication resource, a device authentication relationship between the local device and the remote device is established. After the device authentication relationship is established, when executing remote replication resource management, the operation of the storage resources in the local device will be transmitted to the remote device through the corresponding algorithm to realize the management of the storage resources of the remote device. In addition, the method realizes the establishment of the authentication relationship between the local device and the remote device through the IP and login password of the remote device, can be applied to storage products of different versions, solves the complexity brought by heterogeneous storage devices, and has the advantages of easy expansion, effective handling of exceptions, and improved storage resource utilization.

[0097] Figure 5 A structural diagram of another device remote replication apparatus provided in an embodiment of the present application, such as Figure 5 As shown, the device comprises: a memory 20 for storing a computer program;

[0098] The processor 21 is used to implement the steps of the device remote replication method in the above embodiment when executing the computer program.

[0099] The device remote replication apparatus provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0100] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0101] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the device remote replication method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to authentication requests, remote replication function operation instructions, etc.

[0102] In some embodiments, the device remote copy apparatus may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0103] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation on the device remote replication apparatus, and may include more or fewer components than those shown in the figure.

[0104] The device remote replication apparatus provided in the embodiment of the present application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a device remote replication method.

[0105] The device remote replication apparatus provided in the present application establishes a device authentication relationship between the local device and the remote device after receiving an HTTP request for operating a remote replication resource. After the device authentication relationship is established, when executing remote replication resource management, operations on storage resources in the local device will be transmitted to the remote device through the corresponding algorithm to achieve management of the storage resources of the remote device. In addition, the method establishes an authentication relationship between the local device and the remote device through the IP and login password of the remote device, which can be applied to storage products of different versions, solves the complexity brought by heterogeneous storage devices, and has the advantages of easy expansion, effective handling of exceptions, and improved storage resource utilization.

[0106] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps recorded in the above method embodiment (which may be a method corresponding to the local device side, or a method corresponding to the remote device side, or a method corresponding to both the local device side and the remote device side) are implemented.

[0107] It is understandable that if the method in the above embodiment is implemented in the form of a software functional 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 application 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 a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0108] The above is a detailed introduction to the device remote replication method, apparatus and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0109] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A device remote replication method, characterized in that: Applied to local devices, including: Listening to port 6060 of the local device to receive HTTP requests for operating remote replication resources; wherein, port 6060 is only used for HTTP request operations for remote replication resources between the local device and the remote device, and external access is prohibited; the local device and the remote device are storage products of the same series but different versions; Obtaining the IP and login password of the remote device and sending an authentication request to the remote device to establish an authentication relationship; Receive a remote replication function operation instruction issued locally by a user, and call a corresponding algorithm to send a request corresponding to the remote replication function operation instruction to the remote device so that the remote device performs resource replication, and mark the local storage resources as corresponding roles according to the master / slave role information; wherein the corresponding algorithm creates the REST method required for the remote replication resource class for both the local device and the remote device, and the REST method includes: GET / DELETE / PUT / POST methods; the remote replication resource used for resource replication is: a storage resource that is pre-registered with the local device and the remote device by an entity and has been assigned a URI; Receiving a resource replication result returned by the remote device; wherein the resource replication result includes a return code and operation result data; The management of the local storage resources is completed according to the resource replication result; wherein the management of the local storage resources is completed according to the resource replication result, including: determining whether the return code is abnormal; if abnormal, recording abnormal information and returning the abnormal operation result; if normal, parsing and recording the operation result data to complete the management of the local storage resources and returning the management result; After the certification relationship is established, it also includes: Marking the device authentication relationship between the local device and the remote device as normal; Writing the device authentication relationship and the status information of each device into a database for storage; Furthermore, if it is detected that the status of the local device or the remote device changes, the status change information is stored in a database, and it is determined whether to continue to execute the device remote replication method according to the status change information; After receiving the request to delete the device authentication relationship, the method further includes: Determining whether a replication relationship of the remote replication resource exists; If it exists, a prompt message is sent to remind the user that the remote replication resource still exists; If not, canceling the device authentication relationship between the local device and the remote device; After sending the authentication request to the remote device, the method further includes: When the remote device receives the authentication request, it parses and verifies whether the authentication request is correct; If incorrect, returning information of refusing to establish device authentication relationship to the local device; If correct, information indicating that the device authentication relationship is agreed to be established and the device information of the remote device are returned to the local device.

2. A device remote replication method, characterized in that: Applied to remote devices, including: Listen to port 6060 of the remote device to receive the authentication request sent by the local device after receiving the HTTP request for operating the remote replication resource and obtaining the IP and login password of the remote device to establish an authentication relationship; wherein, port 6060 is only used for HTTP request operation of remote replication resources between the local device and the remote device, and external access is prohibited; the local device and the remote device are storage products of the same series but different versions; Listen to the 6060 port of the remote device to receive the request sent by the local device corresponding to the remote replication function operation instruction according to the corresponding algorithm to perform resource replication, and mark the local storage resources as corresponding roles according to the master-slave role information; wherein the corresponding algorithm is the REST method required for both the local device and the remote device to create a remote replication resource class, and the REST method includes: GET / DELETE / PUT / POST methods; the remote replication resource used for resource replication is: the storage resource that is pre-registered in the local device and the remote device and has been assigned a URI; Return the resource replication result to the local device so that the local device completes the management of the local storage resources according to the resource replication result; wherein the resource replication result includes a return code and operation result data; the completion of the management of the local storage resources according to the resource replication result includes: determining whether the return code is abnormal; if abnormal, recording the abnormal information and returning the abnormal operation result; if normal, parsing and recording the operation result data to complete the management of the local storage resources and return the management result; After the authentication relationship is established, the local device is further used to: Marking the device authentication relationship between the local device and the remote device as normal; Writing the device authentication relationship and the status information of each device into a database for storage; Furthermore, if it is detected that the status of the local device or the remote device changes, the status change information is stored in a database, and it is determined whether to continue to execute the device remote replication method according to the status change information; After receiving the request to delete the device authentication relationship, the local device is further configured to: Determining whether a replication relationship of the remote replication resource exists; If it exists, a prompt message is sent to remind the user that the remote replication resource still exists; If not, canceling the device authentication relationship between the local device and the remote device; After the local device sends the authentication request, the method further includes: After receiving the authentication request, parsing and verifying whether the authentication request is correct; If incorrect, returning information of refusing to establish device authentication relationship to the local device; If correct, information indicating that the device authentication relationship is agreed to be established and the device information of the remote device are returned to the local device.

3. A device remote replication apparatus, characterized in that: Applied to a local device, used to execute the device remote replication method as claimed in claim 1.

4. A device remote replication apparatus, characterized in that: Applied to a remote device, used to execute the device remote replication method as claimed in claim 2.

5. A device remote replication apparatus, characterized in that: comprising a memory for storing a computer program; A processor is used to implement the steps of the device remote replication method as claimed in claim 1 or 2 when executing the computer program.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the device remote replication method according to claim 1 or 2 are implemented.

Citation Information

Patent Citations

  • Automatic operation method, device and equipment of monitoring tool and storage medium

    CN110532151A