A secure storage method, system, and electronic device and storage medium
By introducing shadow volume technology and data redirection using multiple replication methods into the database disaster recovery solution, the high storage cost problem caused by snapshot volume technology is solved, and a safe storage method that saves storage resources and ensures data continuity is achieved.
Patent Information
- Application Number
- CN202411373703.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-09-29
AI Technical Summary
In existing database disaster recovery solutions, snapshot volume technology leads to excessively high costs for storage disks and data center space resources, which puts enormous pressure on customers, especially in the case of large data volumes.
Shadow volume technology is used to create shadow volumes in disaster recovery centers in different geographical locations, and multiple replication methods are used to redirect data, saving storage pool capacity and reducing storage costs.
A secure storage method in three locations and four centers has been implemented, which saves storage pool capacity, reduces storage cost pressure, and ensures data continuity and consistency.
Smart Images

Figure CN119356939B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data storage, in particular to a secure storage method and system, electronic equipment and storage medium. BACKGROUND
[0002] With the continuous development of enterprise informatization and digitization, the data of an enterprise has become an important asset. Ensuring the security of the data of an enterprise plays a crucial role in ensuring the sustained success of the enterprise. In order to ensure data security, the security of a database responsible for storing data must be ensured first.
[0003] Database disaster recovery construction is an important means to ensure database security. Through multiple copies, it is ensured that data will not be lost as long as not all copies are damaged. Common database disaster recovery solutions mainly include: dual-center in the same city, three-center in two sites, four-center in three sites, and four-center in different sites, etc. Figure 1 As shown in FIG. 1, taking 3DC (Three data center in two sites) as an example, the second copy to the third copy in series in 3DC and the first copy to the third copy in parallel in 3DC both need to use snapshot volume technology, i.e. local replication snapshot volume. Using a snapshot volume requires creating a new snapshot volume with the same capacity, which involves double capacity consumption from the intermediate site to the third site. If the customer's data volume is large, the physical resource cost and data center space resource cost caused by the capacity of the newly created volume will bring great pressure to the customer.
[0004] Therefore, it is urgent to provide a secure storage method and system capable of saving storage pool capacity and reducing storage cost pressure, electronic equipment and storage medium. SUMMARY
[0005] Therefore, it is urgent to provide a secure storage method and system capable of saving storage pool capacity and reducing storage cost pressure, electronic equipment and storage medium.
[0006] In a first aspect, a secure storage method is provided, applied to a secure storage system, the system including a production center, a same-city disaster recovery center, a first off-site disaster recovery center, and a second off-site disaster recovery center. The production center and the same-city disaster recovery center are located in a first geographic location of the system, the first off-site disaster recovery center is located in a second geographic location of the system, and the second off-site disaster recovery center is located in a third geographic location of the system. The method includes:
[0007] creating a first host volume in the production center, a second host volume in the same-city disaster recovery center, a third host volume in the first off-site disaster recovery center, and a fourth host volume in the second off-site disaster recovery center;
[0008] based on a generation rule of the shadow volume, creating a first shadow volume corresponding to the second host volume in the same-city disaster recovery center, and creating a second shadow volume corresponding to the third host volume in the first off-site disaster recovery center;
[0009] in response to the first host volume receiving storage data, performing primary-side processing of the first host volume in a first replication mode, and synchronizing the storage data to the second host volume according to the first replication mode;
[0010] performing secondary-side processing of the second host volume in the first replication mode, and redirecting the storage data to the first shadow volume to obtain first redirected storage data;
[0011] performing primary-side processing of the first shadow volume in a second replication mode, and synchronizing the first redirected storage data to the third host volume according to the second replication mode;
[0012] performing secondary-side processing of the third host volume in the second replication mode, and redirecting the first redirected storage data to the second shadow volume to obtain second redirected storage data;
[0013] performing primary-side processing of the second shadow volume in a third replication mode, and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode;
[0014] wherein the primary-side processing and the secondary-side processing include data read-write operations corresponding to the storage data.
[0015] In one embodiment, the generation rule of the shadow volume includes:
[0016] obtaining a storage data protocol stack, and identifying a position of a volume mirroring module in the storage data protocol stack;
[0017] based on the position of the volume mirroring module, regarding modules above the volume mirroring module in the storage data protocol stack as a shadow volume, and regarding modules below the volume mirroring module in the storage data protocol stack as a host volume;
[0018] allocating a storage space of a preset size to the shadow volume and the host volume, wherein the storage space size of the shadow volume is the same as the storage space size of the host volume.
[0019] In one embodiment, the storage data protocol stack further includes an upper-layer cache module and a local replication module, and the method further includes:
[0020] in response to the third copy mode being in a periodic synchronization state and the second shadow volume having completed the primary processing of the third copy mode, issuing the second redirected storage data to the upper cache module;
[0021] recording a differential bitmap of the second redirected storage data by the local copy module, and discarding the second redirected storage data by the volume mirror module;
[0022] in response to the third copy mode being in a periodic waiting state, recording a differential bitmap of the second redirected storage data in the second shadow volume.
[0023] In one embodiment, the method further comprises:
[0024] in response to the second redirected storage data having been discarded by the volume mirror module, notifying the third host volume and issuing the storage data to the upper cache module by the third host volume, and ending the secondary processing flow of the second copy mode;
[0025] in response to the differential bitmap of the first redirected storage data having been recorded in the first shadow volume, notifying the second host volume and issuing the storage data to the upper cache module by the second host volume, and ending the secondary processing flow of the first copy mode;
[0026] in response to the secondary processing flow of the first copy mode having been ended, notifying the first host volume and ending the secure storage of the storage data.
[0027] In one embodiment, the method further comprises:
[0028] monitoring the first host volume to obtain running state information of the first host volume;
[0029] determining whether the first host volume has failed according to the running state information of the first host volume;
[0030] in response to the first host volume having failed, taking the second host volume as the primary of the first copy mode and replacing the service of the first host volume;
[0031] in response to the second host volume having received the storage data, performing the primary processing of the first copy mode on the second host volume, and redirecting the storage data to the first shadow volume to obtain the first redirected storage data;
[0032] performing the primary processing of the second copy mode on the first shadow volume, and synchronizing the first redirected storage data to the third host volume according to the second copy mode;
[0033] performing auxiliary-end processing of the third copy mode on the third host volume, and redirecting the first redirected storage data to the second shadow volume to obtain second redirected storage data;
[0034] performing primary-end processing of the third copy mode on the second shadow volume, and synchronizing the second redirected storage data to the fourth host volume according to the third copy mode;
[0035] performing auxiliary-end processing of the third copy mode on the fourth host volume, and ending the secure storage of the storage data.
[0036] In one of the embodiments, the method further comprises:
[0037] monitoring the first host volume to obtain running state information of the first host volume;
[0038] determining whether the first host volume resumes normal according to the running state information of the first host volume;
[0039] in response to the first host volume resuming normal, taking the second host volume as the primary end of the first copy mode, and taking over the service of the first host volume;
[0040] in response to the second host volume receiving the storage data, performing primary-end processing of the first copy mode on the second host volume, and synchronizing the storage data to the first host volume according to the first copy mode;
[0041] performing auxiliary-end processing of the first copy mode on the first host volume;
[0042] in response to having performed the auxiliary-end processing of the first copy mode on the first host volume, redirecting the storage data to the first shadow volume through the second host volume to obtain first redirected storage data;
[0043] performing primary-end processing of the second copy mode on the first shadow volume, and synchronizing the first redirected storage data to the third host volume according to the second copy mode;
[0044] performing auxiliary-end processing of the second copy mode on the third host volume, and redirecting the first redirected storage data to the second shadow volume to obtain second redirected storage data;
[0045] performing primary-end processing of the third copy mode on the second shadow volume, and synchronizing the second redirected storage data to the fourth host volume according to the third copy mode;
[0046] The auxiliary end processing of the third replication mode is performed on the fourth host volume to complete the secure storage of the stored data.
[0047] In one embodiment, the method further comprises:
[0048] monitoring the running status of the first replication mode;
[0049] In response to the first host volume receiving the storage data sent by the second host volume and having performed secondary-end processing of the first replication mode on the first host volume, determining that the first host volume and the second host volume are in a consistent synchronization state;
[0050] The first host volume is used as the master end of the first replication mode and takes over the services of the second host volume.
[0051] In a second aspect, a secure storage system is provided, the system comprising a production center, a local disaster recovery center, a first remote disaster recovery center, and a second remote disaster recovery center, wherein the production center and the local disaster recovery center are located in a first geographical location of the system, the first remote disaster recovery center is located in a second geographical location of the system, and the second remote disaster recovery center is located in a third geographical location of the system.
[0052] The first host volume in the production center is connected to the second host volume in the disaster recovery center in the same city via a fiber optic network, wherein the first host volume and the second host volume have an active-active topology relationship;
[0053] The third host volume in the first off-site disaster recovery center is connected to the second host volume in the same-city disaster recovery center and the fourth host volume in the second off-site disaster recovery center through a wide area network, wherein a synchronous remote replication relationship exists between the third host volume and the second host volume, and a periodic asynchronous remote replication relationship exists between the third host volume and the fourth host volume.
[0054] In a third aspect, an electronic device is provided, comprising one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, execute the steps of the method described in any one of the first aspects above.
[0055] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any one of the above-mentioned first aspects are performed.
[0056] In a fifth aspect, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method according to any one of the first aspect.
[0057] The safe storage method, system, electronic device and storage medium described above realize a three-site four-center safe storage method by creating a shadow volume, data redirection between a host volume and the shadow volume, and the first, second and third replication modes, thereby saving storage pool capacity and reducing storage cost pressure. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 A flow framework diagram of the safe storage method in the background art;
[0059] Figure 2 A flow diagram of the safe storage method in the present application;
[0060] Figure 3 A brief diagram of the safe storage method in the present application, wherein A is a first host volume, B is a second host volume, B' is a first shadow volume, C is a third host volume, C' is a second shadow volume, D is a fourth host volume, RCx / AA represents the first replication mode, RCy represents the second replication mode, RCz represents the third replication mode, and IO jump represents storage data redirection;
[0061] Figure 4 A flow interaction diagram of the safe storage method in an embodiment;
[0062] Figure 5 A module diagram of a storage data protocol stack in an embodiment;
[0063] Figure 6 A flow diagram of the safe storage method when the first host volume fails in an embodiment;
[0064] Figure 7 A flow diagram of the safe storage method when the first host volume recovers in an embodiment;
[0065] Figure 8 A flow diagram of the safe storage method when the first and second host volumes both fail in an embodiment;
[0066] Figure 9 A flow diagram of the safe storage method when the first and second host volumes both recover in an embodiment;
[0067] Figure 10 An architecture diagram of a safe storage system in an embodiment;
[0068] Figure 11 Figure 1 is a schematic diagram of an internal structure of an electronic device according to an embodiment. DETAILED DESCRIPTION
[0069] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0070] Embodiment One
[0071] In one embodiment, as shown in Figure 2 、 Figure 3 、 Figure 4 A secure storage method is provided, applied to a secure storage system, the system including a production center, a same-city disaster recovery center, a first off-site disaster recovery center, and a second off-site disaster recovery center. The production center and the same-city disaster recovery center are located in a first geographic location of the system, the first off-site disaster recovery center is located in a second geographic location of the system, and the second off-site disaster recovery center is located in a third geographic location of the system. The method includes:
[0072] creating a first host volume at the production center, creating a second host volume at the same-city disaster recovery center, creating a third host volume at the first off-site disaster recovery center, and creating a fourth host volume at the second off-site disaster recovery center;
[0073] based on a generation rule of a shadow volume, creating a first shadow volume corresponding to the second host volume at the same-city disaster recovery center, and creating a second shadow volume corresponding to the third host volume at the first off-site disaster recovery center;
[0074] in response to the first host volume receiving storage data, performing primary-end processing of the first host volume in a first replication mode, and synchronizing the storage data to the second host volume according to the first replication mode;
[0075] performing secondary-end processing of the second host volume in the first replication mode, and redirecting the storage data to the first shadow volume to obtain first redirected storage data;
[0076] performing primary-end processing of the first shadow volume in a second replication mode, and synchronizing the first redirected storage data to the third host volume according to the second replication mode;
[0077] performing secondary-end processing of the third host volume in the second replication mode, and redirecting the first redirected storage data to the second shadow volume to obtain second redirected storage data;
[0078] performing a master end processing of a third replication mode on the second shadow volume, and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode;
[0079] The master end processing and the secondary end processing include data read-write operations corresponding to the storage data.
[0080] Specifically, the master end represents a site for processing more read-write requests in each replication mode, and the secondary end represents another site for disaster recovery in each replication mode. By creating a shadow volume, data redirection between the host volume and the shadow volume, and the first replication mode, the second replication mode, and the third replication mode, a three-site four-center safe storage method is realized, which saves the storage pool capacity and reduces the storage cost pressure.
[0081] In one embodiment, as shown in Figure 5 The generation rule of the shadow volume includes:
[0082] Obtaining a storage data protocol stack, and identifying a position of a volume image module in the storage data protocol stack;
[0083] Based on the position of the volume image module, the modules above the volume image module in the storage data protocol stack are taken as the shadow volume, and the modules below the volume image module in the storage data protocol stack are taken as the host volume;
[0084] Allocating a storage space with a preset size to the shadow volume and the host volume, wherein the storage space size of the shadow volume is the same as the storage space size of the host volume.
[0085] Specifically, the preset size can be set according to the business situation, and by redefining the storage data protocol stack, the shadow volume and the host volume occupy one storage space, saving the storage resources.
[0086] In one embodiment, the storage data protocol stack further includes an upper cache module and a local replication module, and the method further includes:
[0087] In response to the third replication mode being in a periodic synchronization state and the second shadow volume having completed the master end processing of the third replication mode, the second redirected storage data is issued to the upper cache module;
[0088] The difference bitmap of the second redirected storage data is recorded through the local replication module, and the second redirected storage data is discarded through the volume image module;
[0089] In response to the third replication mode being in a periodic waiting state, the difference bitmap of the second redirected storage data is recorded in the second shadow volume.
[0090] In one embodiment, the method further comprises:
[0091] In response to having discarded the second redirected storage data by the volume mirror module, notifying the third host volume and issuing the storage data to the upper cache module by the third host volume, ending the secondary processing flow of the second replication mode;
[0092] In response to having recorded the differential bitmap of the first redirected storage data in the first shadow volume, notifying the second host volume and issuing the storage data to the upper cache module by the second host volume, ending the secondary processing flow of the first replication mode;
[0093] In response to having ended the secondary processing flow of the first replication mode, notifying the first host volume and ending the secure storage of the storage data.
[0094] In one embodiment, as shown in Figure 6 the method further comprises:
[0095] Monitoring the first host volume to obtain running state information of the first host volume;
[0096] According to the running state information of the first host volume, determining whether the first host volume has failed;
[0097] In response to the first host volume having failed, taking the second host volume as the primary of the first replication mode and replacing the service of the first host volume;
[0098] In response to the second host volume receiving the storage data, performing the primary processing of the first replication mode on the second host volume and redirecting the storage data to the first shadow volume to obtain the first redirected storage data;
[0099] Performing the primary processing of the second replication mode on the first shadow volume and synchronizing the first redirected storage data to the third host volume according to the second replication mode;
[0100] Performing the secondary processing of the second replication mode on the third host volume and redirecting the first redirected storage data to the second shadow volume to obtain the second redirected storage data;
[0101] Performing the primary processing of the third replication mode on the second shadow volume and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode;
[0102] The fourth host volume is subjected to the auxiliary end processing of the third replication mode, and the safe storage of the stored data is ended.
[0103] Specifically, the first replication mode is dual-active replication, when the first host volume fails, the second host volume takes over the service of the first host volume, realizes service uninterrupted, and guarantees data continuity.
[0104] In one embodiment, as shown in the method further comprises: Figure 7
[0105] The first host volume is monitored to obtain running state information of the first host volume;
[0106] According to the running state information of the first host volume, it is determined whether the first host volume resumes normal;
[0107] In response to the first host volume resuming normal, the second host volume is taken as the master end of the first replication mode, and takes over the service of the first host volume;
[0108] In response to the second host volume receiving the stored data, the second host volume is subjected to the master end processing of the first replication mode, and the stored data is synchronized to the first host volume according to the first replication mode;
[0109] The first host volume is subjected to the auxiliary end processing of the first replication mode;
[0110] In response to the first host volume having been subjected to the auxiliary end processing of the first replication mode, the stored data is redirected to the first shadow volume through the second host volume to obtain the first redirected stored data;
[0111] The first shadow volume is subjected to the master end processing of the second replication mode, and the first redirected stored data is synchronized to the third host volume according to the second replication mode;
[0112] The third host volume is subjected to the auxiliary end processing of the second replication mode, and the first redirected stored data is redirected to the second shadow volume to obtain the second redirected stored data;
[0113] The second shadow volume is subjected to the master end processing of the third replication mode, and the second redirected stored data is synchronized to the fourth host volume according to the third replication mode;
[0114] The fourth host volume is subjected to the auxiliary end processing of the third replication mode, and the safe storage of the stored data is ended.
[0115] Specifically, when the first host volume recovers from the fault state, the storage data is copied into the first host volume by the second host volume, and after the copying is completed, the service processing is performed by the first host volume again, so that the storage resource is fully utilized.
[0116] In one embodiment, the method further comprises:
[0117] monitoring the running state of the first replication mode;
[0118] in response to the first host volume receiving the storage data sent by the second host volume and the first host volume having been subjected to the secondary processing of the first replication mode, determining that the first host volume and the second host volume are in consistent synchronization state;
[0119] taking the first host volume as the primary end of the first replication mode and taking over the service of the second host volume.
[0120] In one embodiment, as shown in Figure 8 、 Figure 9 the method further comprises:
[0121] in response to both the first host volume and the second host volume being faulty, changing the third host volume into a readable and writable state and taking over the service of the first host volume or the second host volume;
[0122] in response to the third host volume receiving the storage data, performing the primary end processing of the second replication mode on the third host volume and redirecting the storage data to the second shadow volume to obtain the second redirected storage data;
[0123] performing the primary end processing of the third replication mode on the second shadow volume and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode;
[0124] in response to both the first host volume and the second host volume recovering normally, taking the second host volume as the primary end of the first replication mode and taking the third host volume as the primary end of the second replication mode;
[0125] in response to the third host volume receiving the storage data, synchronizing the storage data to the first shadow volume according to the second replication mode and performing the secondary processing of the second replication mode on the first shadow volume;
[0126] downloading the storage data to the upper layer cache module, recording the difference bitmap by the local replication module, and discarding the storage data by the volume mirroring module;
[0127] redirecting the storage data to the second host volume, and performing primary processing of the first replication mode on the second host volume;
[0128] synchronizing the storage data to the first host volume according to the first replication mode, performing secondary processing of the first replication mode on the first host volume, and ending the secure storage of the storage data.
[0129] Specifically, when the first host volume and the second host volume both fail, the third host volume takes over the service, and when the first host volume and the second host volume recover, the storage data is copied to the first host volume, and the first host volume takes over the service, thereby ensuring data consistency and service continuity.
[0130] It should be understood that, although Figure 2 、 Figure 3 、 Figure 4 、 Figure 6 、 Figure 7 、 Figure 8 、 Figure 9 the steps in the flowcharts are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, Figure 2 、 Figure 3 、 Figure 4 、 Figure 6 、 Figure 7 、 Figure 8 、 Figure 9 at least part of the steps in the flowcharts can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0131] Embodiment Two
[0132] In one embodiment, as shown in Figure 10 , a secure storage system is provided, which includes a production center, a same-city disaster recovery center, a first off-site disaster recovery center, and a second off-site disaster recovery center, the production center and the same-city disaster recovery center are in a first geographic location of the system, the first off-site disaster recovery center is in a second geographic location of the system, and the second off-site disaster recovery center is in a third geographic location of the system,
[0133] The first host volume in the production center is connected with the second host volume in the local disaster recovery center through a fiber network, wherein the first host volume and the second host volume have a dual-active topology relationship;
[0134] The third host volume in the first remote disaster recovery center is connected with the second host volume in the local disaster recovery center and the fourth host volume in the second remote disaster recovery center through a wide area network, wherein the third host volume and the second host volume have a synchronous remote replication relationship, and the third host volume and the fourth host volume have a periodic asynchronous remote replication relationship.
[0135] The specific definition of the secure storage system can refer to the definition of the secure storage method in the foregoing, which will not be repeated here. Each module in the secure storage system described above can be implemented by software, hardware, or a combination thereof, in whole or in part. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in hardware form, or can be stored in the memory in the electronic device in software form, so as to be called and executed by the processor to perform the operations corresponding to each of the above-mentioned modules.
[0136] Embodiment three
[0137] In one embodiment, an electronic device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0138] A first host volume is created in the production center, a second host volume is created in the local disaster recovery center, a third host volume is created in the first remote disaster recovery center, and a fourth host volume is created in the second remote disaster recovery center;
[0139] Based on a generation rule of a shadow volume, a first shadow volume corresponding to the second host volume is created in the local disaster recovery center, and a second shadow volume corresponding to the third host volume is created in the first remote disaster recovery center;
[0140] In response to the first host volume receiving storage data, the first host volume is subjected to primary processing in a first replication mode, and the storage data is synchronized to the second host volume according to the first replication mode;
[0141] The second host volume is subjected to secondary processing in the first replication mode, and the storage data is redirected to the first shadow volume to obtain first redirected storage data;
[0142] The first shadow volume is subjected to primary processing in a second replication mode, and the first redirected storage data is synchronized to the third host volume according to the second replication mode;
[0143] The second redirection storage data is obtained by performing auxiliary processing of the second replication mode on the third host volume and redirecting the first redirection storage data to the second shadow volume;
[0144] The second redirection storage data is synchronized to the fourth host volume according to the third replication mode by performing primary processing of the third replication mode on the second shadow volume;
[0145] The primary processing and the auxiliary processing include data read / write operations corresponding to the storage data.
[0146] The program instructions, when read and executed by the one or more processors, can further perform operations corresponding to each step in the above method embodiments, which can be referred to the description above, and will not be described here again. Figure 11 An exemplary architecture of the electronic device is shown, which can specifically include a processor 1110, a video display adapter 1111, a disk drive 1112, an input / output interface 1113, a network interface 1114, and a memory 1120. The processor 1110, the video display adapter 1111, the disk drive 1112, the input / output interface 1113, the network interface 1114, and the memory 1120 can be connected by a communication bus 1130.
[0147] The processor 1110 can be implemented by a general central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the present application.
[0148] The memory 1120 can be implemented by a read only memory (ROM), a random access memory (RAM), a static storage device, a dynamic storage device, etc. The memory 1120 can store an operating system 1121 for controlling the operation of the electronic device 1100, a basic input / output system (BIOS) 1122 for controlling the low-level operation of the electronic device 1100. In addition, a web browser 1123, a data storage management 1124, and an icon font processing system 1125, etc. can also be stored. The icon font processing system 1125 can be an application program for implementing the above steps. In summary, when the technical solutions provided in the present application are implemented by software or firmware, the related program codes are stored in the memory 1120 and executed by the processor 1110.
[0149] The input / output interface 1113 is configured to connect an input / output module to realize information input and output. The input / output module can be configured in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.
[0150] The network interface 1114 is configured to connect a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0151] The bus 1130 includes a channel for transmitting information between various components (such as the processor 1110, the video display adapter 1111, the disk drive 1112, the input / output interface 1113, the network interface 1114, and the memory 1120) of the device.
[0152] In addition, the electronic device 1100 can also obtain information of the specific obtaining condition from the virtual resource object obtaining condition information database 1141 to be used for condition judgment, etc.
[0153] It should be noted that although the above electronic device 1100 only shows the processor 1110, the video display adapter 1111, the disk drive 1112, the input / output interface 1113, the network interface 1114, the memory 1120, the bus 1130, etc., in the specific implementation process, the electronic device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only contain the components necessary to implement the scheme of the present application, and does not have to contain all the components shown in the figure.
[0154] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and a general hardware platform. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make an electronic device (which can be a personal computer, a cloud server, or a network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the present application.
[0155] Embodiment Four
[0156] In one embodiment, a computer readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the following steps:
[0157] creating a first host volume at the production center, a second host volume at the local disaster recovery center, a third host volume at the first offsite disaster recovery center, and a fourth host volume at the second offsite disaster recovery center;
[0158] based on a generation rule of the shadow volume, creating a first shadow volume corresponding to the second host volume at the local disaster recovery center, and creating a second shadow volume corresponding to the third host volume at the first offsite disaster recovery center;
[0159] in response to the first host volume receiving storage data, performing a primary processing of the first host volume in a first replication mode, and synchronizing the storage data to the second host volume according to the first replication mode;
[0160] performing a secondary processing of the second host volume in the first replication mode, and redirecting the storage data to the first shadow volume to obtain first redirected storage data;
[0161] performing a primary processing of the first shadow volume in a second replication mode, and synchronizing the first redirected storage data to the third host volume according to the second replication mode;
[0162] performing a secondary processing of the third host volume in the second replication mode, and redirecting the first redirected storage data to the second shadow volume to obtain second redirected storage data;
[0163] performing a primary processing of the second shadow volume in a third replication mode, and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode;
[0164] wherein the primary processing and the secondary processing include data read-write operations corresponding to the storage data.
[0165] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. 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 can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various 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).
[0166] The technical features of the above embodiments can 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.
[0167] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
[0168] Example 5
[0169] In one embodiment, a computer program product is provided, wherein a computer program is stored on the product, and when the computer program is executed by a processor, the following steps are performed:
[0170] Creating a first host volume in the production center, creating a second host volume in the local disaster recovery center, creating a third host volume in the first remote disaster recovery center, and creating a fourth host volume in the second remote disaster recovery center;
[0171] based on a generation rule of the shadow volume, creating a first shadow volume corresponding to the second host volume in the same-city disaster recovery center, and creating a second shadow volume corresponding to the third host volume in the first off-site disaster recovery center;
[0172] in response to the first host volume receiving storage data, performing primary-end processing of the first host volume in the first replication mode, and synchronizing the storage data to the second host volume according to the first replication mode;
[0173] performing secondary-end processing of the second host volume in the first replication mode, and redirecting the storage data to the first shadow volume to obtain first redirected storage data;
[0174] performing primary-end processing of the first shadow volume in a second replication mode, and synchronizing the first redirected storage data to the third host volume according to the second replication mode;
[0175] performing secondary-end processing of the third host volume in the second replication mode, and redirecting the first redirected storage data to the second shadow volume to obtain second redirected storage data;
[0176] performing primary-end processing of the second shadow volume in a third replication mode, and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode;
[0177] wherein the primary-end processing and the secondary-end processing include data read-write operations corresponding to the storage data.
[0178] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a computer program product. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method.
[0179] Each technical feature of the above embodiments can be combined arbitrarily. To make the description concise, each technical feature of the above embodiments is not described in all possible combinations, however, as long as the combination of technical features does not exist, it should be considered as the scope of the present disclosure.
[0180] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of the patent of the present application should be subject to the appended claims.
Claims
1. A secure storage method, applied to a secure storage system, wherein the system comprises a production center, a local disaster recovery center, a first remote disaster recovery center, and a second remote disaster recovery center, wherein the production center and the local disaster recovery center are located in a first geographical location of the system, the first remote disaster recovery center is located in a second geographical location of the system, and the second remote disaster recovery center is located in a third geographical location of the system, wherein: The method comprises: Creating a first host volume in the production center, creating a second host volume in the local disaster recovery center, creating a third host volume in the first remote disaster recovery center, and creating a fourth host volume in the second remote disaster recovery center; Based on the shadow volume generation rule, creating a first shadow volume corresponding to the second host volume in the same-city disaster recovery center, and creating a second shadow volume corresponding to the third host volume in the first remote disaster recovery center; In response to the first host volume receiving the storage data, performing master-side processing of the first replication mode on the first host volume, and synchronizing the storage data to the second host volume according to the first replication mode; performing auxiliary-end processing of the first replication mode on the second host volume, and redirecting the storage data to the first shadow volume to obtain first redirected storage data; Performing master-side processing of a second replication mode on the first shadow volume, and synchronizing the first redirected storage data to the third host volume according to the second replication mode; performing auxiliary-end processing of the second replication mode on the third host volume, and redirecting the first redirected storage data to the second shadow volume to obtain second redirected storage data; performing master-side processing of a third replication mode on the second shadow volume, and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode; Wherein, the master-end processing and the slave-end processing include data reading and writing operations corresponding to the stored data; The method further comprises: monitoring the first host volume to obtain operating status information of the first host volume; determining, based on the operating status information of the first host volume, whether a failure occurs in the first host volume; In response to a failure of the first host volume, using the second host volume as a master end of the first replication mode and taking over services of the first host volume; In response to the second host volume receiving the storage data, performing master-side processing of the first replication mode on the second host volume, and redirecting the storage data to the first shadow volume to obtain the first redirected storage data; performing master-side processing of the second replication mode on the first shadow volume, and synchronizing the first redirected storage data to the third host volume according to the second replication mode; The auxiliary end processing of the second replication mode of the third host volume, and redirecting the first redirected storage data to the second shadow volume, to obtain the second redirected storage data; Performing master-side processing of the third replication mode on the second shadow volume, and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode; The auxiliary end processing of the third replication mode is performed on the fourth host volume to complete the secure storage of the stored data.
2. The method according to claim 1, characterized in that The shadow volume generation rules include: Obtaining a storage data protocol stack and identifying a location of a volume mirror module in the storage data protocol stack; Based on the position of the volume mirror module, modules above the volume mirror module in the storage data protocol stack are used as shadow volumes, and modules below the volume mirror module in the storage data protocol stack are used as host volumes; A storage space of a preset size is jointly allocated to the shadow volume and the host volume, wherein the storage space size of the shadow volume is the same as the storage space size of the host volume.
3. The method according to claim 2, characterized in that The storage data protocol stack further includes an upper layer cache module and a local replication module, and the method further includes: In response to the third replication mode being in a periodic synchronization state and the second shadow volume having completed master-side processing of the third replication mode, sending the second redirected storage data to the upper-layer cache module; recording a difference bitmap of the second redirected storage data by the local copy module, and discarding the second redirected storage data by the volume mirror module; In response to the third replication mode being in a periodic waiting state, a difference bitmap of the second redirected storage data is recorded in the second shadow volume.
4. The method according to claim 3, characterized in that The method further comprises: In response to discarding the second redirected storage data through the volume mirror module, notifying the third host volume, and sending the storage data to the upper-layer cache module through the third host volume, thereby ending the secondary-end processing flow of the second replication mode; In response to recording the difference bitmap of the first redirected storage data in the first shadow volume, notifying the second host volume, and sending the storage data to the upper-layer cache module through the second host volume, thereby ending the secondary-end processing flow of the first replication mode; In response to the completion of the secondary-end processing flow of the first replication mode, the first host volume is notified, and the secure storage of the stored data is terminated.
5. The method according to claim 1, characterized in that: The method further comprises: monitoring the first host volume to obtain operating status information of the first host volume; determining whether the first host volume has returned to normal according to the operating status information of the first host volume; In response to the first host volume returning to normal, using the second host volume as the master end of the first replication mode and taking over services of the first host volume; In response to the second host volume receiving the storage data, performing master-side processing of the first replication mode on the second host volume, and synchronizing the storage data to the first host volume according to the first replication mode; performing auxiliary-end processing of the first replication mode on the first host volume; In response to the secondary-end processing of the first replication mode being performed on the first host volume, redirecting the storage data to the first shadow volume through the second host volume to obtain the first redirected storage data; Performing master-side processing of the second replication mode on the first shadow volume, and synchronizing the first redirected storage data to the third host volume according to the second replication mode; performing auxiliary-end processing of the second replication mode on the third host volume, and redirecting the first redirected storage data to the second shadow volume to obtain the second redirected storage data; Performing master-side processing of the third replication mode on the second shadow volume, and synchronizing the second redirected storage data to the fourth host volume according to the third replication mode; The auxiliary end processing of the third replication mode is performed on the fourth host volume to complete the secure storage of the stored data.
6. The method according to claim 5, characterized in that The method further comprises: monitoring the running status of the first replication mode; In response to the first host volume receiving the storage data sent by the second host volume and having performed secondary-end processing of the first replication mode on the first host volume, determining that the first host volume and the second host volume are in a consistent synchronization state; The first host volume is used as the master end of the first replication mode and takes over the services of the second host volume.
7. A secure storage system for implementing the method of claim 1, characterized in that: The system includes a production center, a disaster recovery center in the same city, a first disaster recovery center in a different location, and a second disaster recovery center in a different location. The production center and the disaster recovery center in the same city are located in a first geographical location of the system, the first disaster recovery center in a different location is located in a second geographical location of the system, and the second disaster recovery center in a different location is located in a third geographical location of the system. The first host volume in the production center is connected to the second host volume in the disaster recovery center in the same city via a fiber optic network, wherein the first host volume and the second host volume have an active-active topology relationship; The third host volume in the first off-site disaster recovery center is connected to the second host volume in the same-city disaster recovery center and the fourth host volume in the second off-site disaster recovery center through a wide area network, wherein a synchronous remote replication relationship exists between the third host volume and the second host volume, and a periodic asynchronous remote replication relationship exists between the third host volume and the fourth host volume.
8. An electronic device 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 steps of the method according to any one of claims 1 to 6 are implemented.
9. 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 6 are implemented.
Citation Information
Patent Citations
Data monitoring method, device and equipment and storage medium
CN110445663A
Method, system and device for incrementally synchronizing two places and three centers of ring, and medium
CN112363868A