A method, device and electronic device for dual-control switching storage
By judging the ready state of the storage resource during the dual-control switching process and temporarily storing the service data in the second controller, the risk of data loss during the dual-control switching process is solved, and the reliable, continuous and secure storage of data is achieved.
Patent Information
- Application Number
- CN202110959620.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-20
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-08-20
AI Technical Summary
During the dual-control switching process, the storage service cannot write to the storage resources normally, resulting in the risk of data loss.
By determining whether the storage resources of the first controller are in the ready state, if not ready, the service data is written to the memory of the second controller, and then the original storage resources are written back to the original storage resources after the switching is completed; if ready, it is written directly Original storage resources.
Ensure reliable, continuous and secure storage of data during dual-control switching, avoid data loss, and enhance the security and availability of data storage.
Smart Images

Figure CN113687784B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and electronic device for dual-control switching storage. Background Art
[0002] In the era of big data, massive data has become increasingly valuable in industries such as finance, medical care, telecommunications, and the Internet. At the same time, the amount of data stored in storage systems is also increasing. If the storage system crashes unexpectedly and the stored data is lost, it will cause significant losses. Therefore, solving the data management problem in the event of an unexpected crash in the storage system has become a current challenge.
[0003] The current technology to solve the above challenges mainly includes the control scheme of dual-control storage switching: when an abnormality occurs in one of the controllers, the other normal controller takes over the storage resources of the abnormal controller, and at the same time takes over the storage business of the abnormal controller, writes the storage business into the storage resources, and completes the dual-control storage switching. However, from the time when the storage resources are switched to the time when the storage business that is taken over can be written into the storage resources normally, a series of processing is required. Because the processing takes a long time, the storage business during the processing cannot be written into the storage resources normally, so the storage business during this period is prone to data loss.
[0004] In view of this, the above solution has the problem of data loss risk during the dual-control switching process. Summary of the invention
[0005] The present application provides a dual-control switching storage method, device and electronic device to solve the problem of data loss during the dual-control switching process.
[0006] In a first aspect, the present application provides a dual-control switching storage method, the method comprising:
[0007] When an exception occurs in the first controller, determining whether a first storage resource of the first controller taken over by the second controller is in a ready state, wherein the first storage resource is used to store business data;
[0008] When the first storage resource is in a first not-ready state, writing the service data generated during the not-ready state into a second memory of the second controller;
[0009] When the first storage resource is in a first ready state, the service data generated during the ready state is written into the first storage resource.
[0010] Through the above method, during the dual-control switching process, the business data that should be saved in the first storage resource during the first not ready state is stored in the second storage, which not only does not consume memory resources, but also further ensures the reliable, continuous and secure storage of data during the switching process. After the switching is completed, the business data during the first ready state is normally written to the first storage resource, which enhances the security and availability of data storage. Through such a method, huge losses caused by data loss due to dual-control switching can be effectively avoided.
[0011] In a possible design, when an exception occurs in the first controller, determining whether the first storage resource of the first controller taken over by the second controller is in a ready state includes:
[0012] When an abnormality occurs in the first controller, determining that the second controller takes over the first storage resource of the first controller;
[0013] Determining whether the data of the first storage resource taken over by the second controller is synchronized to the second controller;
[0014] If not, the first storage resource of the first controller is in a not-ready state;
[0015] If so, the first storage resource of the first controller is in a ready state.
[0016] Through the above method, it is confirmed whether the first storage resource is in a ready state, and the time when data loss may occur can be calculated more accurately to ensure reliable, continuous and secure storage of data throughout the dual-control switching process.
[0017] In a possible design, when the first storage resource is in the first ready state, after writing the service data generated during the ready state into the first storage resource, the method further includes:
[0018] When the second controller is idle, the service data in the second memory is written into the first storage resource.
[0019] Through the above method, the business data temporarily stored in the second storage is written back to the first storage resource where it should be stored, so as to ensure the integrity of the stored data and enhance the availability of data security storage.
[0020] In a possible design, when the second controller is idle, writing the service data in the second memory to the first storage resource includes:
[0021] Obtaining a load pressure value of the second controller;
[0022] Determining whether the load pressure value exceeds a preset threshold;
[0023] If yes, re-obtain the load pressure value;
[0024] If not, the business data in the second memory is written into the first storage resource.
[0025] Through the above method, by obtaining the load pressure value of the second controller to determine whether to continue writing back the business data in the second memory, the integrity, security and availability of the data during the data write-back process are guaranteed.
[0026] In a possible design, after the second controller writes the service data in the second memory to the first storage resource when the second controller is idle, the method further includes:
[0027] When the first controller returns to normal, determining whether the first storage resource taken over by the first controller is in an unready state;
[0028] When the first storage resource is in a second not-ready state, writing the service data generated during the not-ready state into the first memory of the first controller;
[0029] When the first storage resource is in a second ready state, the service data generated during the ready state is written into the first storage resource.
[0030] Through the above method, during the dual-control switching process, the business data that should be saved in the first storage resource during the second not ready state is stored in the first storage resource. This not only does not consume memory resources, but also further ensures the reliable, continuous and secure storage of data during the switching process. After the switching is completed, the business data during the second ready state is normally written to the first storage resource, thereby enhancing the security and availability of data storage. Through such a method, huge losses caused by data loss due to dual-control switching can be effectively avoided.
[0031] In a possible design, when the first storage resource is in the second ready state, after writing the service data generated during the ready state into the first storage resource, the method further includes:
[0032] When the first controller is idle, the service data in the first memory is written into the first storage resource.
[0033] Through the above method, the business data temporarily stored in the first memory is written back to the first storage resource where it should be stored, so as to ensure the integrity of the stored data and enhance the availability of data security storage.
[0034] In a second aspect, the present application provides a dual-control switching storage device, the device comprising:
[0035] a confirmation module, which, when an abnormality occurs in the first controller, determines whether a first storage resource of the first controller taken over by the second controller is in a ready state, wherein the first storage resource is used to store business data;
[0036] A writing module, when the first storage resource is in a first not ready state, writes the business data generated during the not ready state into the second memory of the second controller; when the first storage resource is in a first ready state, writes the business data generated during the ready state into the first storage resource.
[0037] In a possible design, the confirmation module is specifically used to determine that the first storage resource of the first controller is taken over by the second controller when an abnormality occurs in the first controller; determine whether the data of the first storage resource taken over by the second controller is synchronized to the second controller; if not, the first storage resource of the first controller is in an unready state; if yes, the first storage resource of the first controller is in a ready state.
[0038] In a possible design, after the writing module, the method further includes writing the business data in the second memory into the first storage resource when the second controller is idle.
[0039] In one possible design, when the second controller is idle, the business data in the second memory is written into the first storage resource, specifically for obtaining the load pressure value of the second controller; determining whether the load pressure value exceeds a preset threshold; if so, reacquiring the load pressure value; if not, writing the business data in the second memory into the first storage resource.
[0040] In a possible design, after writing the business data in the second memory to the first storage resource when the second controller is idle, the process also includes, when the first controller returns to normal, determining whether the first storage resource taken over by the first controller is in an unready state; when the first storage resource is in a second unready state, writing the business data generated during the unready state to the first memory of the first controller; and when the first storage resource is in the second ready state, writing the business data generated during the ready state to the first storage resource.
[0041] In one possible design, when the first storage resource is in a second ready state, after writing the business data generated during the ready state into the first storage resource, it also includes writing the business data in the first memory into the first storage resource when the first controller is idle.
[0042] In a third aspect, the present application provides an electronic device, the electronic device comprising:
[0043] Memory, used to store computer programs;
[0044] The processor is used to implement the above-mentioned method steps for detecting an object with abnormal motion state when executing the computer program stored in the memory.
[0045] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method steps for detecting an object with an abnormal motion state are implemented.
[0046] For each aspect from the second to the fourth aspect and the technical effects that may be achieved by each aspect, please refer to the above description of the technical effects that can be achieved by the first aspect or various possible schemes in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A possible application scenario provided for this application;
[0048] Figure 2 A flowchart of a dual-control storage switching method provided in this application;
[0049] Figure 3 A schematic diagram of a dual-control storage switching device provided in the present application;
[0050] Figure 4 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION
[0051] See also Figure 1 As shown, an embodiment of the present application provides a possible application scenario, in which a dual-control storage device is set.
[0052] The so-called dual-control storage device includes a first controller 110 and a second controller 120, and the first controller 110 and the second controller 120 perform heartbeat detection through TCP / IP (Transmission Control Protocol / Internet Protocol). The first controller 110 manages the first storage resource 111 through PCIE / SATA / SAS (peripheralcomponent interconnect express / Serial Advanced Technology Attachment / SerialAttached SCSI, high-speed serial computer expansion bus standard / serial hard disk / serial SCSI technology); the second controller 120 manages the second storage resource 121 through PCIE / SATA / SAS. In addition, a first memory 112 is set for the first controller 110 for temporary storage resources, and a second memory 122 is set for the second controller 120 for temporary storage resources.
[0053] In addition, the first memory 112 and the second memory 122 can be built-in storage devices, such as a built-in SSD (Solid State Disk or Solid State Drive), can be external storage devices, and can also be other storage media, such as a DOM disk (Disk On Module, electronic disk), eMMC (Embedded Multi Media Card, embedded memory), hard disk, Flash (Flash EEPROM Memory, flash memory), etc.
[0054] Based on the application scenario of the dual-control storage device described above, the dual-control storage device includes a dual-control dual-active mode and a dual-control active-standby mode.
[0055] In the dual-control dual-active mode, the first controller 110 and the second controller 120 work on storage services respectively, wherein the storage service refers to the service in which data is saved on certain media and can ensure effective access. For example, the first controller 110 processes the storage service of 128-channel IPC (Inter-Process Communication) audio and video streaming. At the same time, the second controller 120 processes the storage service of another 128-channel IPC audio and video streaming. If an abnormality occurs in the first controller 110, the second controller 120 will take over the storage service of the 128-channel IPC audio and video streaming originally processed by the first controller 110. That is to say, at this time, the second controller 120 processes a total of 256-channel IPC audio and video streaming storage services. Among them, the above-mentioned audio and video streaming refers to the process of pulling audio or video content using a specified address.
[0056] In the dual-control active-standby mode, if the first controller 110 is the active controller and the second controller 120 is the standby controller, the first controller 110 is used to process the storage business of 256-channel IPC audio and video streaming, and the second controller 120 does not need to process any storage business. When an abnormality occurs in the first controller 110, the second controller 120 will process the storage business of 256-channel IPC audio and video streaming originally processed by the first controller 110, and will also take over all storage resources managed by the first controller 110.
[0057] Based on the above application scenarios, the embodiments of the present application provide a method, device and electronic device for dual-control storage switching to solve the problem of data loss risk during dual-control switching in the prior art.
[0058] The method provided in the embodiments of the present application is further described in detail below in conjunction with the accompanying drawings.
[0059] See also Figure 2 As shown, the embodiment of the present application provides a method for dual-control storage switching, and the specific process is as follows:
[0060] Step 201: When an exception occurs in a first controller, determine whether a first storage resource of the first controller taken over by a second controller is in a ready state;
[0061] When an exception occurs in the first controller, it is determined whether the data of the first storage resource is synchronized to the second controller: if not, the first memory of the first controller is in an unready state; if yes, the first memory of the first controller is in a ready state.
[0062] Specifically, when the dual-control storage device finds that the first controller is abnormal, the first business data and the first storage resource of the first controller will all be taken over by the second controller. Among them, the first storage resource can represent the storage capacity and can also be used to save the first business data. The first business data represents the data of the storage business.
[0063] After confirming that the second controller takes over the first storage resource, there is a dual-control switching process: the first storage resource is first correctly identified by the second controller, and then the data stored in the first storage resource before the first controller is abnormal needs to be synchronously written to the second controller. The purpose of synchronizing data here is to obtain relevant information about the first storage resource. For example, if the first controller has written part of the first storage resource before the abnormal state, then at this time, after the second controller takes over, from which position should it continue to write the first storage resource, and the second controller also needs to clarify the file system structure and remaining storage capacity in the first storage resource.
[0064] Finally, based on whether the dual-control switching process is finished, it is determined whether the first storage resource is in a ready state: if finished, it is in a ready state; if not finished, it is in a not ready state.
[0065] Step 202: When the first storage resource is in a first not-ready state, write the service data generated during the not-ready state into a second memory of the second controller;
[0066] If it is in the dual-control switching process, it can be confirmed that the first storage resource is in the first not ready state, that is, the first storage resource in this process cannot save the first business data. In order to ensure that the first business data generated during the first not ready state of the first storage resource can be saved in a timely and complete manner, the second memory of the second controller in the embodiment of the present application is used to temporarily save the first business data generated during the above-mentioned first not ready state.
[0067] Specifically, if it is determined that the first storage resource is in the first unready state, all first business data generated during this period are written into the second memory for temporary storage, for example, the first business data are written into the built-in SSD of the second controller for temporary storage.
[0068] Step 203: When the first storage resource is in a first ready state, the service data generated during the ready state is written into the first storage resource.
[0069] After the dual control switching operation is completed, it can be confirmed that the first storage resource is in the ready state, that is, the first storage resource can restore and save the first storage service. Then, from the time the first storage resource enters the ready state, the first service data can be restored to be written into the first storage resource for storage, without being written into the second storage for temporary storage.
[0070] Specifically, if it is determined that the first storage resource is in the ready state, then all first service data generated after entering the ready state will be written into the first storage resource.
[0071] Furthermore, in order to ensure that there is no loss of the first business data in the first storage resource that is taken over again after the first controller returns to normal, the first business data temporarily stored in the second storage during the dual-control switching needs to be written back to the first storage resource.
[0072] In other words, in the embodiment of the present application, by determining whether the second controller is idle, when the second controller is idle, for example, the CPU (Central Processing Unit) of the second controller is idle or the I / O (Input / Output) is idle, the first business data in the second memory is written to the first storage resource.
[0073] Specifically, the load pressure value of the second controller currently determined is obtained. If the load pressure value of the second controller does not exceed the preset threshold, the first business data in the second memory is written to the first storage resource; if the load pressure value of the second controller exceeds the preset threshold, writing data is stopped and the load pressure value is obtained again.
[0074] In addition, when the first controller is abnormal and the storage is switched to the second controller, the second business data and the second storage resources belonging to the second controller are not affected by the switching and remain stably stored.
[0075] The above method ensures that when the first controller is abnormal, there is no risk of data loss in the process where the second controller takes over the first storage resource and the first service data.
[0076] If the first controller recovers from an abnormal state, a dual-control switching management process is also required, and the principle is the same.
[0077] Specifically, when the first controller returns to normal, it is determined whether the first storage resource taken over by the first controller is in an unready state: when the first storage resource is in a second unready state, the business data generated during the unready state is written into the first memory of the first controller; when the first storage resource is in a second ready state, the business data generated during the ready state is written into the first storage resource.
[0078] Furthermore, it may be determined whether the first controller is idle. When the first controller is idle, for example, the CPU or I / O of the first controller is idle, the first service data in the first memory is written into the first storage resource.
[0079] Through the above method, without consuming memory resources, the reliable, continuous and secure storage of data during the dual-control switching process is effectively guaranteed, the availability of actual data security storage is enhanced, and significant losses caused by data loss are avoided.
[0080] Based on the same inventive concept, the present application also provides a dual-control switching storage device for continuously and securely storing data, solving the problem of data loss risk in the dual-control switching process in the prior art, effectively ensuring reliable, continuous and secure storage of data in the dual-control switching process without consuming memory resources, enhancing the availability of data security storage, and avoiding significant losses caused by data loss, see Figure 3 , the device comprises:
[0081] Confirmation module 301, when an exception occurs in the first controller, determines whether a first storage resource of the first controller taken over by the second controller is in a ready state, wherein the first storage resource is used to store business data;
[0082] The writing module 302 writes the business data generated during the not-ready state into the second memory of the second controller when the first storage resource is in the first not-ready state; and writes the business data generated during the ready state into the first storage resource when the first storage resource is in the first ready state.
[0083] In a possible design, the confirmation module 301 is specifically used to determine that the first storage resource of the first controller is taken over by the second controller when an abnormality occurs in the first controller; determine whether the data of the first storage resource taken over by the second controller is synchronized to the second controller; if not, the first storage resource of the first controller is in an unready state; if yes, the first storage resource of the first controller is in a ready state.
[0084] In a possible design, after the writing module 302, the process also includes writing the business data in the second memory into the first storage resource when the second controller is idle.
[0085] In one possible design, when the second controller is idle, the business data in the second memory is written into the first storage resource, specifically for obtaining the load pressure value of the second controller; determining whether the load pressure value exceeds a preset threshold; if so, reacquiring the load pressure value; if not, writing the business data in the second memory into the first storage resource.
[0086] In a possible design, after writing the business data in the second memory to the first storage resource when the second controller is idle, the process also includes, when the first controller returns to normal, determining whether the first storage resource taken over by the first controller is in an unready state; when the first storage resource is in a second unready state, writing the business data generated during the unready state to the first memory of the first controller; and when the first storage resource is in the second ready state, writing the business data generated during the ready state to the first storage resource.
[0087] In one possible design, when the first storage resource is in a second ready state, after writing the business data generated during the ready state into the first storage resource, it also includes writing the business data in the first memory into the first storage resource when the first controller is idle.
[0088] Based on the above device, reliable, continuous and secure storage of data in the dual-control switching process is effectively achieved without consuming memory resources, solving the problem of data loss in the dual-control switching process in the prior art, enhancing the availability of data security storage, and avoiding significant losses caused by data loss.
[0089] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the electronic device can realize the functions of the aforementioned dual-control storage switching device, referring to Figure 4 , the electronic device comprises:
[0090] At least one processor 401, and a memory 402 connected to the at least one processor 401. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 In the example, the processor 401 and the memory 402 are connected via the bus 400. The bus 400 is Figure 4 The connection between other components is shown by bold lines, and is not intended to be limiting. The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 401 can also be called a controller, and there is no limitation on the name.
[0091] In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401. The at least one processor 401 can execute the dual-control storage switching method discussed above by executing the instructions stored in the memory 402. The processor 401 can implement Figure 3 The functions of each module in the device shown.
[0092] Among them, the processor 401 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 402 and calling the data stored in the memory 402, the various functions of the device and process data, the device can be monitored as a whole.
[0093] In one possible design, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.
[0094] Processor 401 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the dual-control storage switching method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0095] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0096] By designing and programming the processor 401, the code corresponding to the dual-control storage switching method described in the above embodiment can be fixed into the chip, so that the chip can execute the dual-control storage switching method when running. Figure 2 The steps of the dual-control storage switching method of the embodiment shown are as follows: How to design and program the processor 401 is a technology well known to those skilled in the art and will not be described in detail here.
[0097] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the dual-control storage switching method discussed above.
[0098] In some possible implementations, various aspects of the dual-control storage switching method provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on the device, the program code is used to enable the control device to execute the steps of the dual-control storage switching method according to various exemplary embodiments of the present application described above in this specification.
[0099] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0100] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0101] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0103] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A dual-control switching storage method, characterized in that: The method comprises: When an exception occurs in the first controller, determining that the second controller takes over the first storage resource of the first controller, wherein the first storage resource is used to store business data; Determining whether the data of the first storage resource taken over by the second controller is synchronized to the second controller; If not, the first storage resource of the first controller is in a not-ready state; If so, the first storage resource of the first controller is in a ready state; When the first storage resource is in a first not-ready state, writing the service data generated during the not-ready state into a second memory of the second controller; When the first storage resource is in a first ready state, the service data generated during the ready state is written into the first storage resource.
2. The method according to claim 1, characterized in that When the first storage resource is in the first ready state, after writing the service data generated during the ready state into the first storage resource, the method further includes: When the second controller is idle, the service data in the second memory is written into the first storage resource.
3. The method according to claim 2, characterized in that When the second controller is idle, writing the service data in the second memory into the first storage resource comprises: Obtaining a load pressure value of the second controller; Determining whether the load pressure value exceeds a preset threshold; If yes, re-obtain the load pressure value; If not, the business data in the second memory is written into the first storage resource.
4. The method according to claim 2, characterized in that After the second controller is idle, writing the service data in the second memory into the first storage resource, the method further includes: When the first controller returns to normal, determining whether the first storage resource taken over by the first controller is in an unready state; When the first storage resource is in a second not-ready state, writing the service data generated during the not-ready state into the first memory of the first controller; When the first storage resource is in a second ready state, the service data generated during the ready state is written into the first storage resource.
5. The method according to claim 4, characterized in that When the first storage resource is in the second ready state, after writing the service data generated during the ready state into the first storage resource, the method further includes: When the first controller is idle, the service data in the first memory is written into the first storage resource.
6. A dual-control switching storage device, characterized in that: The device comprises: a confirmation module, which determines that a second controller takes over a first storage resource of the first controller when an abnormality occurs in the first controller, wherein the first storage resource is used to store business data; Determining whether the data of the first storage resource taken over by the second controller is synchronized to the second controller; If not, the first storage resource of the first controller is in a not-ready state; If so, the first storage resource of the first controller is in a ready state; A writing module, when the first storage resource is in a first not ready state, writes the business data generated during the not ready state into the second memory of the second controller; when the first storage resource is in a first ready state, writes the business data generated during the ready state into the first storage resource.
7. The device according to claim 6, characterized in that The confirmation module is specifically used to determine that the first storage resource of the first controller is taken over by the second controller when an abnormality occurs in the first controller; determine whether the data of the first storage resource taken over by the second controller is synchronized to the second controller; if not, the first storage resource of the first controller is in an unready state; if yes, the first storage resource of the first controller is in a ready state.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 5 when executing a computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Double-control double-active storage control system and method
CN103092786A
Storage device data synchronization method based on dual control, a device, a device and a medium
CN109376039A