Data storage and backup method, device, computer equipment and storage medium

By obtaining and configuring the mapping relationship of data volumes, establishing replication links, and achieving synchronous backup of data, the problem of data loss caused by virtual volume path switching is solved, and the reliability and disaster recovery capabilities of data storage are improved.

CN114936115BActive Publication Date: 2024-10-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210575751.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2024-10-29
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

In the existing technology, the risk of data loss caused by virtual volume path switching may lead to data loss, especially in the event of hardware failure or natural disaster.

Method used

By obtaining the mapping relationship between the volume information of the data volume and the server address, configuring the same channel port identifier, monitoring the working status of the data volume, establishing a replication link, achieving synchronous backup of data, ensuring transparent switching in the event of a failure, and reducing data loss.

Benefits of technology

It effectively avoids data loss caused by virtual volume path switching, ensures business continuity, and improves the reliability and disaster recovery capabilities of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936115B_ABST
    Figure CN114936115B_ABST
Patent Text Reader

Abstract

The present application relates to a data storage backup method, device, computer equipment and storage medium. The method comprises: obtaining volume information corresponding to a first data volume and a second data volume respectively, and obtaining a first mapping relationship between the first data volume and a server address and a second mapping relationship between the second data volume and a server address according to the volume information, wherein the volume information comprises a volume identifier and a channel port identifier; configuring the first data volume and the second data volume with the same channel port identifier, monitoring the working status of the first data volume, obtaining and storing the server data according to the monitoring result and the first mapping relationship and the second mapping relationship; establishing a replication link between the first data volume and the second data volume, and synchronously obtaining and storing the mirrored data according to the replication link, so that the data is backed up, which can improve the problem of data loss caused by fault path switching in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer storage technology, and in particular to a data storage backup method, device, computer equipment and storage medium. Background Art

[0002] With the advent of informatization, data has gradually become one of the important objects to be protected. However, the local disk space has limited storage capacity for massive data. At the same time, considering that once a data storage system fails, for example, a hardware failure or a natural disaster occurs, there will be a risk of data loss. Therefore, it is necessary to back up the data. At present, active-active storage technology is a disaster recovery solution that can share data through virtual volume storage to achieve data mirroring function. However, when performing data backup, the switching of virtual volume paths will cause the business system to interrupt service functions, which may bring the risk of data loss. Summary of the invention

[0003] Based on this, a data storage backup method, device, computer equipment and storage medium are provided to improve the problem of data loss caused by fault path switching in the prior art.

[0004] In one aspect, a data storage and backup method is provided, the method comprising:

[0005] Respectively acquiring volume information corresponding to the first data volume and the second data volume, and obtaining a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0006] The first data volume and the second data volume are configured with the same channel port identifier, the working status of the first data volume is monitored, and the data of the server is acquired and stored according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0007] A replication link between the first data volume and the second data volume is established, and mirror data is synchronously obtained and stored according to the replication link, so that the data is backed up.

[0008] In one embodiment, based on the monitoring result and the mapping relationship, the data of the server is obtained and stored, including: when the monitoring result is normal, stopping the information transmission between the second data volume and the server; based on the first mapping relationship, obtaining the data and storing it in the first data volume.

[0009] In one of the embodiments, the data of the server is obtained and stored according to the monitoring result and the mapping relationship, and the method also includes: when the monitoring result is abnormal, stopping the information transmission between the first data volume and the server; switching the volume identifier according to the volume identifier of the second data volume, and transparently switching the volume path according to the channel port identifier to enable the second data volume to transmit information with the server; obtaining the data of the server according to the second mapping relationship and storing it in the second data volume, wherein the second data volume includes a first sub-data volume and a second sub-data volume.

[0010] In one of the embodiments, establishing a replication link between a first data volume and a second data volume includes: configuring the first data volume and the second data volume with the same volume identifier so that the volume identifiers of the first data volume and the second data volume are transparently switched, and obtaining the mirror data by synchronously replicating the data.

[0011] In one of the embodiments, according to the second mapping relationship, the data of the server is obtained and stored in the corresponding second data volume, wherein, before the second data volume includes the first sub-data volume and the second sub-data volume, it also includes: determining whether the transmission distance of the first sub-data volume is less than or equal to a transmission distance threshold, and if so, obtaining the data of the server according to the second mapping relationship and storing it in the first sub-data volume; and stopping the information transmission between the server and the second sub-data volume.

[0012] In one of the embodiments, it also includes: if the transmission distance of the first sub-data volume is greater than the transmission distance threshold, obtaining the data of the server according to the second mapping relationship and storing it in the second sub-data volume; stopping the information transmission between the server and the first sub-data volume.

[0013] In one of the embodiments, the first data volume, the first sub-data volume, and the second sub-data volume maintain information transmission so that the first data volume, the first sub-data volume, and the second sub-data volume perform the synchronous replication.

[0014] In another aspect, a data storage backup device is provided, the device comprising:

[0015] a mapping module, configured to respectively obtain volume information corresponding to the first data volume and the second data volume, and obtain a first mapping relationship between the first data volume and the server address, and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0016] a data acquisition module, configured to configure the first data volume and the second data volume with the same channel port identifier, monitor the working status of the first data volume, and acquire and store the data of the server according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0017] The synchronous replication module is used to establish a replication link between the first data volume and the second data volume, and synchronously obtain and store mirror data according to the replication link to back up the data.

[0018] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0019] Respectively acquiring volume information corresponding to the first data volume and the second data volume, and obtaining a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0020] The first data volume and the second data volume are configured with the same channel port identifier, the working status of the first data volume is monitored, and the data of the server is acquired and stored according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0021] A replication link between the first data volume and the second data volume is established, and mirror data is synchronously obtained and stored according to the replication link, so that the data is backed up.

[0022] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0023] Respectively acquiring volume information corresponding to the first data volume and the second data volume, and obtaining a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0024] The first data volume and the second data volume are configured with the same channel port identifier, the working status of the first data volume is monitored, and the data of the server is acquired and stored according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0025] A replication link between the first data volume and the second data volume is established, and mirror data is synchronously obtained and stored according to the replication link, so that the data is backed up.

[0026] The data storage backup method, device, computer equipment and storage medium respectively obtain volume information corresponding to the first data volume and the second data volume, and obtain a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier; configure the first data volume and the second data volume with the same channel port identifier, monitor the working status of the first data volume, and obtain and store the server data according to the monitoring result and the first mapping relationship and the second mapping relationship; establish a replication link between the first data volume and the second data volume, and synchronously obtain and store the mirror data according to the replication link, so that the data is backed up, thereby improving the problem of data loss caused by fault path switching in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 An application environment diagram of a data storage and backup method in one embodiment;

[0028] Figure 2 A schematic diagram of a flow chart of a data storage and backup method in one embodiment;

[0029] Figure 3 A schematic diagram of a flow chart of a method for backing up a second data volume in one embodiment;

[0030] Figure 4 A schematic diagram of a flow chart of a method for backing up a first data volume in one embodiment;

[0031] Figure 5 A schematic diagram of a synchronous replication method in one embodiment;

[0032] Figure 6 It is a flowchart of a method for backing up a second sub-data volume in one embodiment;

[0033] Figure 7 It is a flowchart of a method for backing up a first sub-data volume in one embodiment;

[0034] Figure 8 It is a structural block diagram of a data storage backup device in one embodiment;

[0035] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. In the various embodiments of the present application, "first", "second", "third", "fourth", etc. are only intended to refer to different objects and do not represent other limitations on the objects referred to.

[0037] Since the embodiments of the present application involve a large number of professional terms, in order to facilitate understanding, the relevant terms and concepts that may be involved in the embodiments of the present application are first introduced below.

[0038] 1. Data Volume

[0039] A data volume is a special directory in a container that enables data persistence and data sharing.

[0040] 2. Container

[0041] Containers are tools for storing data and objects.

[0042] 3. Transparent switching

[0043] Transparent switching can make the switching process transparent to the business server, thereby ensuring that the write / read services of the business server are not interrupted.

[0044] The data storage backup method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The server 104 obtains the volume identifier and the channel port identifier corresponding to the first data volume and the second data volume respectively, and maps the first data volume and the second data volume to the business server through the volume identifier and the channel port identifier, so that the first data volume and the second data volume provide services for the business server, and at the same time, the channel port appears in pairs through the server 104, and the channel port identifiers corresponding to the first data volume and the second data volume have the same identifier, so as to achieve transparent switching when the fault path is switched, and then monitor the working status of the first data volume through the storage cluster controller, determine whether to switch the fault path, and establish a replication link between the first data volume and the second data volume, so as to achieve the synchronous replication of the data of the first data volume and the second data volume to the business server, thereby solving the problem of data loss caused by fault path switching in the prior art. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by a server cluster composed of multiple servers.

[0045] In one embodiment, Figure 2 As shown, a data storage backup method is provided, which is applied to Figure 1The server in the example is used to illustrate the following steps:

[0046] Step 201, respectively obtaining volume information corresponding to a first data volume and a second data volume, and obtaining a first mapping relationship between the first data volume and a server address, and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0047] Step 202: configure the same channel port identifier for the first data volume and the second data volume, monitor the working status of the first data volume, and obtain and store the data of the server according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0048] Step 203: establish a replication link between the first data volume and the second data volume, and synchronously obtain and store mirror data based on the replication link to back up the data.

[0049] In the above data storage backup method, the volume identifier and the channel port identifier corresponding to the first data volume and the second data volume are obtained respectively, and the first data volume and the second data volume are mapped to the business server through the volume identifier and the channel port identifier, so that the first data volume and the second data volume can provide services for the business server. At the same time, the channel ports are made to appear in pairs through the storage cluster server, and the channel port identifiers corresponding to the first data volume and the second data volume have the same identifier, so as to achieve transparent switching when the fault path switching is performed, and then the working status of the first data volume is monitored through the storage cluster controller to determine whether to perform the fault path switching, and establish a replication link between the first data volume and the second data volume, so as to achieve the synchronous replication of the data of the business server by the first data volume and the second data volume, thereby solving the problem of data loss caused by the fault path switching in the prior art.

[0050] In step 201, it is exemplarily explained that volume information corresponding to the first data volume and the second data volume is obtained respectively, and a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address are obtained according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier. For example, the second data volume may be a data volume. With the advent of the information age, the amount of stored data is huge, and physical storage devices are difficult to meet storage requirements. Therefore, a virtual storage cluster may be constructed to store data, that is, the first data volume and the second data volume may provide write and / or read services for the business server. At the same time, in order to improve the efficiency of data transmission, network communication may be performed through two fiber switches. Then, the channel port identifiers of the first data volume and the second data volume respectively correspond to the fiber channel port identifiers of the two fiber switches, that is, the world wide name (WWN) and / or world wide port name (WWPN) of the fiber switches. Through the WWN, WWPN and volume identifier, the first data volume and the second data volume are mapped to the address of the business server, so that the first data volume and the second data volume provide write and / or read services for the business server.

[0051] In step 202, it is exemplarily explained that the first data volume and the second data volume are configured with the same channel port identifier, the working status of the first data volume is monitored, and the data of the server is obtained and stored according to the monitoring result and the first mapping relationship and the second mapping relationship. For example, the working status of the first data volume can be monitored to ensure the service continuity requirement in the disaster recovery solution. When the first data volume fails, it is necessary to enable the second data volume to provide write and / or read services for the business server by performing fault path switching. However, since the WWN and WWPN of the first data volume and the second data volume are different, the business server may be interrupted for about half a minute to three minutes when the first data volume and the second data volume perform fault path switching, thereby causing data transmission interruption and data loss. In order to solve this problem, the storage cluster server can make the channel ports of the first data volume and the second data volume appear in pairs, and let the channel ports have the same WWN and / or WWPN identifiers, so that transparent switching is achieved when the volume path of the first data volume is switched to the volume path of the second data volume, thereby reducing the probability of data loss.

[0052] In step 203, it is exemplarily explained that a replication link between the first data volume and the second data volume is established, and mirror data is synchronously obtained and stored according to the replication link to back up the data. For example, when the first data volume and the second data volume are mapped to the address of the business server to provide corresponding services, it is necessary to consider the situation where the business server writes data to the first data volume and the second data volume at the same time. For example, if data A and data B are written by the business server at the same time, the business server cannot determine whether the write operation is performed on the first data volume or the second data volume. Therefore, when the first data volume provides services to the business server, the channel port of the second data volume should be disconnected. When the business server writes to the first data volume, the second data volume synchronously replicates and stores the data cache in the first data volume. In some implementation processes, when the first data volume fails, the channel port of the first data volume is disconnected. When the business server writes to the second data volume, the first data volume synchronously replicates and stores the data cache in the second data volume.

[0053] In another embodiment, the second data volume may be a plurality of sub-data volumes, each of which can synchronously replicate the data of the business server through the above method, so that when multiple data volume failures occur, there are multiple storage containers in the disaster recovery solution to back up the data and ensure data security.

[0054] In one embodiment, Figure 3 As shown, according to the monitoring results and mapping relationships, the server data is obtained and stored, including:

[0055] Step 301, when the monitoring result is normal, stop the information transmission between the second data volume and the server;

[0056] Step 302: Acquire data according to the first mapping relationship and store it in the first data volume.

[0057] In step 301, it is exemplified that when the monitoring result is normal, the information transmission between the second data volume and the server is stopped. For example, when the monitoring result is normal, the first data volume can provide services for the business server, but when mapping the first data volume and the second data volume to the address of the business server to provide corresponding services, it is necessary to consider the situation where the business server writes data to the first data volume and the second data volume at the same time. For example, if data A and data B are written by the business server at the same time, the business server cannot determine whether the write operation is performed on the first data volume or the second data volume. Therefore, when the first data volume provides services for the business server, the channel port of the second data volume should be disconnected. When the business server writes to the first data volume, the second data volume synchronously copies and stores the data cache in the first data volume.

[0058] In step 302, it is exemplarily explained that data is obtained according to the first mapping relationship and stored in the first data volume. For example, when the channel port of the second data volume is in a disconnected state, the business server cannot write and / or read the second data volume. The write and / or read of the business server is transmitted to the first data volume for processing through the optical fiber switch corresponding to the first data volume, and the second data volume synchronously replicates the data obtained by the first data volume and stores the replicated mirror data in the second data volume.

[0059] In one embodiment, Figure 4 As shown, according to the monitoring results and the mapping relationship, the server data is obtained and stored, and the following is also included:

[0060] Step 401, when the monitoring result is abnormal, stop the information transmission between the first data volume and the server;

[0061] Step 402: switching the volume identifier according to the volume identifier of the second data volume, and transparently switching the volume path according to the channel port identifier, so that the second data volume transmits information with the server;

[0062] Step 403: Acquire the data of the server according to the second mapping relationship, and store the data in a second data volume, wherein the second data volume includes a first sub-data volume and a second sub-data volume.

[0063] In step 401, it is exemplified that when the monitoring result is abnormal, the information transmission between the first data volume and the server is stopped. For example, when the monitoring result is abnormal, it is considered that the first data volume has a fault, including natural disasters, power outages, etc., resulting in the first data volume being unable to provide write and / or read services to the business server. Therefore, it is necessary to enable the second data volume to continue to provide write and / or read services to the business server, and stop the information transmission between the first data volume and the server to ensure that data is not lost.

[0064] In step 402, it is exemplified that the volume identifier is switched according to the volume identifier of the second data volume, and the volume path is transparently switched according to the channel port identifier, so that the second data volume and the server can transmit information. For example, to switch the first data volume to the second data volume so as to continue to provide write and / or read services to the business server, the volume identifier and the volume path need to be switched. The volume path is switched according to the channel port identifiers of the first data volume and the second data volume. If the channel port identifiers of the two are different, the business server may be interrupted for about half a minute to three minutes, thereby causing data transmission interruption and data loss. To solve this problem, the storage cluster server can make the channel ports of the first data volume and the second data volume appear in pairs, and let the channel ports have the same WWN and / or WWPN identifiers. When the volume path of the first data volume is switched to the volume path of the second data volume, transparent switching is achieved to reduce the probability of data loss.

[0065] In step 403, it is exemplarily explained that according to the second mapping relationship, the data of the server is obtained and stored in the second data volume, wherein the second data volume includes the first sub-data volume and the second sub-data volume. For example, the second data volume can be one data volume or multiple sub-data volumes. When the second data volume is one data volume, the data is stored and backed up once. When the second data volume is multiple sub-data volumes, the data can be stored and backed up multiple times, thereby ensuring that when multiple data volumes fail, they can still continue to provide write and / or read services to the business server, reducing the probability of data loss. The method for failover and synchronous replication of sub-data volumes is the same as the method for synchronous replication and failover of the second data volume to the first data volume. At the same time, it should be noted that in order to synchronize the sub-data volumes, the sub-data volumes and the sub-data volumes and the first data volume are connected through replication links.

[0066] In one embodiment, Figure 5 As shown, establishing a replication link between a first data volume and a second data volume includes:

[0067] Step 501: configure the same volume identifier for a first data volume and a second data volume, so that the volume identifiers of the first data volume and the second data volume are transparently switched, and mirror data is obtained by synchronously replicating data.

[0068] In step 501, it is exemplarily explained that the first data volume and the second data volume are configured with the same volume identifier so that the volume identifiers of the first data volume and the second data volume are switched transparently, and mirror data is obtained by synchronously replicating data. For example, the failover includes volume identifier switching and volume path switching. The volume path can be transparently switched by making the channel ports of the first data volume and the second data volume have the same WWN and / or WWPN identifier. However, since the volume identifiers of the first data volume and the second data volume are different, when the volume identifiers are switched, the business server perceives the change of the drive letters of the first data volume and the second data volume mapped by the storage cluster on the business server, which will still cause an interruption to the business server, thereby causing data loss. Therefore, the first data volume and the second data volume can be configured with the same volume identifier, so that the switching of the volume identifier can also be transparently switched, and the first data volume and the second data volume can also be synchronously replicated according to the same volume identifier.

[0069] In one embodiment, Figure 6 As shown, according to the second mapping relationship, the data of the server is obtained and stored in the corresponding second data volume, wherein the second data volume includes the first sub-data volume and before the second sub-data volume, it also includes;

[0070] Step 601, determining whether the transmission distance of the first sub-data volume is less than or equal to the transmission distance threshold, if so, obtaining the data of the server according to the second mapping relationship and storing it in the first sub-data volume;

[0071] Step 602: Stop the information transmission between the server and the second sub-data volume.

[0072] In step 601 to step 602, it is exemplarily explained that it is determined whether the transmission distance of the first sub-data volume is less than or equal to the transmission distance threshold. If so, the data of the server is obtained according to the second mapping relationship and stored in the first sub-data volume, and the information transmission between the server and the second sub-data volume is stopped. For example, the second data volume may be multiple sub-data volumes. Then, when it is monitored that the first data volume fails, it is necessary to determine a sub-data volume from the multiple sub-data volumes to continue to provide write and / or read services to the business server. Considering the cost and efficiency issues brought by the transmission distance to data transmission, the sub-data volume can be determined by setting a transmission distance threshold, and the sub-data volume with a shorter transmission distance is preferentially selected as the standby data volume for data writing and / or reading services. That is, the transmission distance threshold can be set according to the actual distance of the data center. When the transmission distance of the first sub-data volume is less than or equal to the transmission distance threshold, the first sub-data volume provides write and / or read services to the business server, the second sub-data volume and the first data volume obtain mirror data from the first sub-data volume for backup, and the second sub-data volume and the first data volume stop information transmission with the server.

[0073] In one embodiment, Figure 7 As shown, it also includes;

[0074] Step 701: if the transmission distance of the first sub-data volume is greater than the transmission distance threshold, then according to the second mapping relationship, obtain the data of the server and store it in the second sub-data volume;

[0075] Step 702: Stop the information transmission between the server and the first sub-data volume.

[0076] In step 701 to step 702, it is exemplarily explained that if the transmission distance of the first sub-data volume is greater than the transmission distance threshold, the data of the server is obtained according to the second mapping relationship and stored in the second sub-data volume, and the information transmission between the server and the first sub-data volume is stopped. For example, when it is monitored that the first data volume fails, it is necessary to determine a sub-data volume from multiple sub-data volumes to continue to provide write and / or read services to the business server. Considering the cost and efficiency issues brought by the transmission distance to data transmission, the sub-data volume can be determined by setting a transmission distance threshold, and the sub-data volume with a shorter transmission distance is preferentially selected as the backup data volume for data writing and / or reading services, that is, the transmission distance threshold can be set according to the actual distance of the data center. When the transmission distance of the first sub-data volume is greater than the transmission distance threshold, the second sub-data volume provides write and / or read services to the business server, the first sub-data volume and the first data volume obtain mirror data from the first sub-data volume for backup, and the first sub-data volume and the first data volume stop information transmission with the server.

[0077] It should be understood that although Figure 2-7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-7 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0078] In one embodiment, Figure 8 As shown, a data storage and backup device is provided, including: a mapping module, a data acquisition module and a synchronous replication module, wherein:

[0079] A mapping module, used to respectively obtain volume information corresponding to the first data volume and the second data volume, and obtain a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0080] A data acquisition module, configured to configure the first data volume and the second data volume with the same channel port identifier, monitor the working status of the first data volume, and acquire and store the data of the server according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0081] The synchronous replication module is used to establish a replication link between the first data volume and the second data volume, and synchronously obtain and store mirror data according to the replication link to back up the data.

[0082] Optionally, the data acquisition module is further used to stop the information transmission between the second data volume and the server when the monitoring result is normal; acquire data according to the first mapping relationship, and store the data in the first data volume.

[0083] Optionally, the data acquisition module is also used to stop the information transmission between the first data volume and the server when the monitoring result is abnormal; switch the volume identifier according to the volume identifier of the second data volume, and transparently switch the volume path according to the channel port identifier to enable the second data volume to transmit information with the server; obtain the server data according to the second mapping relationship and store it in the second data volume, wherein the second data volume includes a first sub-data volume and a second sub-data volume.

[0084] Optionally, the synchronous replication module is further used to configure the first data volume and the second data volume with the same volume identifier, so that the volume identifiers of the first data volume and the second data volume are transparently switched, and mirror data is obtained by synchronously replicating data.

[0085] Optionally, the data acquisition module is further used to determine whether the transmission distance of the first sub-data volume is less than or equal to the transmission distance threshold. If so, the server data is acquired according to the second mapping relationship and stored in the first sub-data volume; and information transmission between the server and the second sub-data volume is stopped.

[0086] Optionally, the data acquisition module is further configured to acquire the server data according to the second mapping relationship and store the data in the second sub-data volume if the transmission distance of the first sub-data volume is greater than the transmission distance threshold; and stop information transmission between the server and the first sub-data volume.

[0087] Optionally, the synchronous replication module is further used for the first data volume, the first sub-data volume, and the second sub-data volume to maintain information transmission, so that the first data volume, the first sub-data volume, and the second sub-data volume are synchronously replicated.

[0088] For the specific definition of the data storage backup device, please refer to the definition of the data storage backup method above, which will not be repeated here. Each module in the above-mentioned data storage backup device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0089] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data for data storage and backup. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data storage backup method is implemented.

[0090] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0091] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0092] Respectively obtain volume information corresponding to the first data volume and the second data volume, and obtain a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0093] The first data volume and the second data volume are configured with the same channel port identifier, the working status of the first data volume is monitored, and the data of the server is obtained and stored according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0094] A replication link between the first data volume and the second data volume is established, and mirror data is synchronously obtained and stored according to the replication link to back up the data.

[0095] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0096] When the monitoring result is normal, the information transmission between the second data volume and the server is stopped; and data is obtained according to the first mapping relationship and stored in the first data volume.

[0097] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0098] When the monitoring result is abnormal, stop the information transmission between the first data volume and the server; switch the volume identifier according to the volume identifier of the second data volume, and transparently switch the volume path according to the channel port identifier to enable the second data volume to transmit information with the server; obtain the server data according to the second mapping relationship and store it in the second data volume, wherein the second data volume includes a first sub-data volume and a second sub-data volume.

[0099] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0100] The first data volume and the second data volume are configured with the same volume identifier, so that the volume identifiers of the first data volume and the second data volume are transparently switched, and mirror data is obtained by synchronously replicating data.

[0101] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0102] Determine whether the transmission distance of the first sub-data volume is less than or equal to the transmission distance threshold; if so, obtain the server data according to the second mapping relationship and store it in the first sub-data volume; stop the information transmission between the server and the second sub-data volume.

[0103] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0104] If the transmission distance of the first sub-data volume is greater than the transmission distance threshold, the data of the server is acquired according to the second mapping relationship and stored in the second sub-data volume; and the information transmission between the server and the first sub-data volume is stopped.

[0105] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0106] The first data volume, the first sub-data volume, and the second sub-data volume maintain information transmission, so that the first data volume, the first sub-data volume, and the second sub-data volume are synchronously replicated.

[0107] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0108] Respectively obtain volume information corresponding to the first data volume and the second data volume, and obtain a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier;

[0109] The first data volume and the second data volume are configured with the same channel port identifier, the working status of the first data volume is monitored, and the data of the server is obtained and stored according to the monitoring result and the first mapping relationship and the second mapping relationship;

[0110] A replication link between the first data volume and the second data volume is established, and mirror data is synchronously obtained and stored according to the replication link to back up the data.

[0111] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0112] When the monitoring result is normal, the information transmission between the second data volume and the server is stopped; and data is obtained according to the first mapping relationship and stored in the first data volume.

[0113] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0114] When the monitoring result is abnormal, stop the information transmission between the first data volume and the server; switch the volume identifier according to the volume identifier of the second data volume, and transparently switch the volume path according to the channel port identifier to enable the second data volume to transmit information with the server; obtain the server data according to the second mapping relationship and store it in the second data volume, wherein the second data volume includes a first sub-data volume and a second sub-data volume.

[0115] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0116] The first data volume and the second data volume are configured with the same volume identifier, so that the volume identifiers of the first data volume and the second data volume are transparently switched, and mirror data is obtained by synchronously replicating data.

[0117] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0118] Determine whether the transmission distance of the first sub-data volume is less than or equal to the transmission distance threshold; if so, obtain the server data according to the second mapping relationship and store it in the first sub-data volume; stop the information transmission between the server and the second sub-data volume.

[0119] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0120] If the transmission distance of the first sub-data volume is greater than the transmission distance threshold, the data of the server is acquired according to the second mapping relationship and stored in the second sub-data volume; and the information transmission between the server and the first sub-data volume is stopped.

[0121] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0122] The first data volume, the first sub-data volume, and the second sub-data volume maintain information transmission, so that the first data volume, the first sub-data volume, and the second sub-data volume are synchronously replicated.

[0123] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0124] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0125] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A data storage and backup method, characterized in that: include: Respectively acquiring volume information corresponding to the first data volume and the second data volume, and obtaining a first mapping relationship between the first data volume and the server address and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier; The first data volume and the second data volume are configured with the same channel port identifier, the working status of the first data volume is monitored, and the data of the server is acquired and stored according to the monitoring result and the first mapping relationship and the second mapping relationship; Establishing a replication link between the first data volume and the second data volume, and synchronously obtaining and storing mirrored data according to the replication link to back up the data; Wherein, obtaining the data of the server and storing it includes: when the monitoring result is abnormal, stopping the information transmission between the first data volume and the server; switching the volume identifier according to the volume identifier of the second data volume, and transparently switching the volume path according to the channel port identifier, so that the second data volume and the server can transmit information; according to the second mapping relationship, obtaining the data of the server and storing it in the second data volume, wherein the second data volume includes a first sub-data volume and a second sub-data volume; The establishing of the replication link between the first data volume and the second data volume includes: configuring the first data volume and the second data volume with the same volume identifier so that the volume identifiers of the first data volume and the second data volume are transparently switched, and obtaining the mirror data by synchronously replicating the data.

2. The data storage and backup method according to claim 1, characterized in that: According to the monitoring result and the mapping relationship, the data of the server is obtained and stored, including: When the monitoring result is normal, stopping the information transmission between the second data volume and the server; The data is acquired according to the first mapping relationship and stored in the first data volume.

3. The data storage and backup method according to claim 1, characterized in that: According to the second mapping relationship, the data of the server is acquired and stored in the corresponding second data volume, wherein the second data volume includes the first sub-data volume and the second sub-data volume, and further includes: determining whether the transmission distance of the first sub-data volume is less than or equal to a transmission distance threshold, and if so, acquiring the data of the server according to the second mapping relationship and storing the data in the first sub-data volume; Stop the information transmission between the server and the second sub-data volume.

4. The data storage and backup method according to claim 1, characterized in that: Also includes; If the transmission distance of the first sub-data volume is greater than the transmission distance threshold, acquiring the data of the server according to the second mapping relationship and storing the data in the second sub-data volume; Stop the information transmission between the server and the first sub-data volume.

5. The data storage and backup method according to any one of claims 1 to 4, characterized in that: The first data volume, the first sub-data volume, and the second sub-data volume maintain information transmission, so that the first data volume, the first sub-data volume, and the second sub-data volume perform the synchronous replication.

6. A data storage backup device, characterized in that: include: a mapping module, configured to respectively obtain volume information corresponding to the first data volume and the second data volume, and obtain a first mapping relationship between the first data volume and the server address, and a second mapping relationship between the second data volume and the server address according to the volume information, wherein the volume information includes a volume identifier and a channel port identifier; a data acquisition module, configured to configure the first data volume and the second data volume with the same channel port identifier, monitor the working status of the first data volume, and acquire and store the data of the server according to the monitoring result and the first mapping relationship and the second mapping relationship; A synchronous replication module, used for establishing a replication link between the first data volume and the second data volume, and synchronously obtaining and storing mirrored data according to the replication link, so as to back up the data; Wherein, obtaining the data of the server and storing it includes: when the monitoring result is abnormal, stopping the information transmission between the first data volume and the server; switching the volume identifier according to the volume identifier of the second data volume, and transparently switching the volume path according to the channel port identifier, so that the second data volume and the server can transmit information; according to the second mapping relationship, obtaining the data of the server and storing it in the second data volume, wherein the second data volume includes a first sub-data volume and a second sub-data volume; The establishing of the replication link between the first data volume and the second data volume includes: configuring the first data volume and the second data volume with the same volume identifier so that the volume identifiers of the first data volume and the second data volume are transparently switched, and obtaining the mirror data by synchronously replicating the data.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Transparent input / output switching between synchronously mirrored storage volumes

    CN103493020A

  • Data copying method and storage system

    CN105988901A