CN113687784A - A method, device and electronic device for dual-control switching storage - Google Patents

A method, device and electronic device for dual-control switching storage Download PDF

Info

Publication number
CN113687784A
CN113687784A CN202110959620.8A CN202110959620A CN113687784A CN 113687784 A CN113687784 A CN 113687784A CN 202110959620 A CN202110959620 A CN 202110959620A CN 113687784 A CN113687784 A CN 113687784A
Authority
CN
China
Prior art keywords
controller
storage resource
ready state
storage
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110959620.8A
Other languages
Chinese (zh)
Other versions
CN113687784B (en
Inventor
王林锋
马东星
魏齐良
林森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110959620.8A priority Critical patent/CN113687784B/en
Publication of CN113687784A publication Critical patent/CN113687784A/en
Application granted granted Critical
Publication of CN113687784B publication Critical patent/CN113687784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Hardware Redundancy (AREA)

Abstract

本申请公开一种双控切换存储的方法、装置及电子设备,该方法包括当第一控制器发生异常时,确定由第二控制器接管所述第一控制器的第一存储资源是否处于就绪状态,其中,所述第一存储资源用于保存业务数据;当所述第一存储资源处于第一未就绪状态时,将未就绪状态期间产生的业务数据写入到第二控制器的第二存储器中;当所述第一存储资源处于第一就绪状态时,将就绪状态期间产生的业务数据写入到所述第一存储资源中。基于上述方法,可以解决现有技术存在在双控切换过程中发生数据丢失的问题,有效保证在不消耗内存资源的情况下,双控切换过程中数据的可靠、持续、安全存储,增强数据安全存储的可用性,避免因数据丢失而造成的重大损失。

Figure 202110959620

The present application discloses a dual-controller switching storage method, device, and electronic device. The method includes determining whether the first storage resource of the first controller is ready to be taken over by the second controller when an abnormality occurs in the first controller. state, wherein the first storage resource is used to save business data; when the first storage resource is in the first unready state, the business data generated during the unready state is written to the second controller of the second controller. in the memory; when the first storage resource is in the first ready state, the service data generated during the ready state is written into the first storage resource. Based on the above method, the problem of data loss in the dual-control switching process in the prior art can be solved, effectively ensuring reliable, continuous and safe storage of data during the dual-control switching process without consuming memory resources, and enhancing data security Availability of storage to avoid major losses due to data loss.

Figure 202110959620

Description

Double-control switching storage method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for dual-control switching storage, and an electronic device.
Background
In the big data era, mass data has higher and higher value in the industries of finance, medical treatment, telecommunication, internet and the like, and meanwhile, data stored by a storage system is more and more. If the storage system is unexpectedly down and the stored data is lost, a great loss is caused, so that the problem of managing the data under the condition that the storage system is unexpectedly down becomes the current challenge.
The current technology for solving the above challenges mainly has a control scheme of dual-control storage switching: when one controller is abnormal, the other normal controller takes over the storage resources of the abnormal controller, takes over the storage service of the abnormal controller, writes the storage service into the storage resources and completes double-control storage switching. However, a series of processes are required during the period when the storage service switched from the storage resource to the takeover can be normally written into the storage resource, and the processing consumes much time, and the storage service in the processing process cannot be normally written into the storage resource, so the storage service in this period is easy to cause data loss.
In view of this, the above scheme has a problem of risk of data loss in the dual-control handover process.
Disclosure of Invention
The application provides a method and a device for double-control switching storage and electronic equipment, which are used for solving the problem of data loss in the double-control switching process.
In a first aspect, the present application provides a method for dual-control handover storage, where the method includes:
when a first controller is abnormal, determining whether a first storage resource of the first controller is taken over by a second controller to be in a ready state or not, wherein the first storage resource is used for storing service data;
writing traffic data generated during a not ready state into a second memory of a second controller when the first storage resource is in a first not ready state;
writing traffic data generated during a ready state to the first storage resource when the first storage resource is in a first ready state.
By the method, in the double-control switching process, the business data which should be stored in the first storage resource during the first non-ready state is stored in the second storage, so that the memory resource is not consumed, the reliable, continuous and safe storage of the data in the switching process is further ensured, and after the switching is finished, the business data during the first ready state is normally written into the first storage resource, so that the safety and the usability of data storage are enhanced.
In one possible design, the determining whether a first storage resource that is taken over by a second controller for the first controller is in a ready state when an abnormality occurs in the first controller includes:
when a first controller is abnormal, determining that a second controller takes over a first storage resource of the first controller;
determining whether data of the first storage resource taken over by the second controller is synchronized into the second controller;
if not, the first storage resource of the first controller is in an un-ready state;
if so, the first storage resource of the first controller is in a ready state.
By the method, whether the first storage resource is in the ready state or not is confirmed, and the time of the data which is possibly lost can be calculated more accurately, so that reliable, continuous and safe storage of the double-control switching whole-process data is guaranteed.
In one possible design, after writing the service data generated during the ready state into the first storage resource when the first storage resource is in the first ready state, the method further includes:
when the second controller is idle, writing the service data in the second memory into the first memory resource.
By the method, the business data temporarily stored in the second memory is written back to the first storage resource which should be stored, so that the integrity of the stored data is ensured, and the availability of safe data storage is enhanced.
In one possible design, the writing the traffic data in the second memory to the first memory resource when the second controller is idle includes:
acquiring a load pressure value of the second controller;
judging whether the load pressure value exceeds a preset threshold value or not;
if so, acquiring the load pressure value again;
and if not, writing the service data in the second memory into the first memory resource.
By the method, whether the business data in the second memory is continuously written back is judged by acquiring the load pressure value of the second controller, so that the integrity, safety and usability of the data in the process of writing back the data are ensured.
In one possible design, after the writing the traffic data in the second memory into the first memory resource when the second controller is idle, the method further includes:
when the first controller returns to normal, determining whether the first storage resource is taken over by the first controller in an not-ready state;
writing traffic data generated during a not-ready state into a first memory of a first controller when the first storage resource is in a second not-ready state;
writing traffic data generated during the ready state to the first storage resource when the first storage resource is in a second ready state.
By the method, in the double-control switching process, the business data which should be stored in the first storage resource during the second non-ready state is stored in the first storage, so that the memory resource is not consumed, the reliable, continuous and safe storage of the data in the switching process is further ensured, and after the switching is finished, the business data during the second ready state is normally written into the first storage resource, so that the safety and the usability of data storage are enhanced.
In one possible design, after writing the service data generated during the ready state into the first storage resource when the first storage resource is in the second ready state, the method further includes:
when the first controller is idle, writing the service data in the first memory into the first memory resource.
By the method, the business data temporarily stored in the first memory is written back to the first storage resource which should be stored, so that the integrity of the stored data is ensured, and the availability of safe data storage is enhanced.
In a second aspect, the present application provides an apparatus for dual-steering handover storage, the apparatus comprising:
the system comprises a confirmation module, a first storage module and a second storage module, wherein the confirmation module is used for determining whether a first storage resource of a first controller is taken over by a second controller to be in a ready state or not when the first controller is abnormal, and the first storage resource is used for storing service data;
a write module that writes, when the first storage resource is in a first not-ready state, traffic data generated during the not-ready state into a second memory of a second controller; writing traffic data generated during a ready state to the first storage resource when the first storage resource is in a first ready state.
In one possible design, the confirmation module is specifically configured to determine that the second controller takes over the first storage resource of the first controller when the first controller is abnormal; determining whether data of the first storage resource taken over by the second controller is synchronized into the second controller; if not, the first storage resource of the first controller is in an un-ready state; if so, the first storage resource of the first controller is in a ready state.
In one possible design, after the writing module, writing the service data in the second memory to the first memory resource when the second controller is idle.
In a possible design, when the second controller is idle, writing the service data in the second memory into the first memory resource, specifically, to obtain a load pressure value of the second controller; judging whether the load pressure value exceeds a preset threshold value or not; if so, acquiring the load pressure value again; and if not, writing the service data in the second memory into the first memory resource.
In a possible design, after writing the service data in the second memory into the first storage resource when the second controller is idle, determining whether the first storage resource is taken over by the first controller in an not-ready state when the first controller returns to normal; writing traffic data generated during a not-ready state into a first memory of a first controller when the first storage resource is in a second not-ready state; writing traffic data generated during the ready state to the first storage resource when the first storage resource is in a second ready state.
In one possible design, after writing the traffic data generated during the ready state into the first storage resource when the first storage resource is in the second ready state, the method further includes writing the traffic data in the first memory into the first storage resource when the first controller is idle.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the above-mentioned method steps for detecting an object with abnormal motion state when executing the computer program stored in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the above-mentioned method steps of detecting an object with abnormal motion state.
For each of the second to fourth aspects and possible technical effects of each aspect, please refer to the above description of the first aspect or the possible technical effects of each of the possible solutions in the first aspect, and no repeated description is given here.
Drawings
Fig. 1 is a possible application scenario provided by the present application;
FIG. 2 is a flow chart of a method for dual-steering memory switching according to the present application;
FIG. 3 is a schematic diagram of an apparatus for dual-control storage switching according to the present application;
fig. 4 is a schematic diagram of a structure of an electronic device provided in the present application.
Detailed Description
Referring to fig. 1, the embodiment of the present application provides a possible application scenario in which a dual-control storage device is disposed.
The dual-Control storage device includes a first controller 110 and a second controller 120, and heartbeat detection is performed between the first controller 110 and the second controller 120 through a TCP/IP (Transmission Control Protocol/Internet Protocol). The first controller 110 manages the first storage resource 111 through PCIE/SATA/SAS (peripheral component interconnect express/Serial Advanced Technology Attachment/Serial Attached SCSI, high speed Serial computer expansion bus standard/Serial hard disk/Serial SCSI Technology); the second controller 120 manages the second storage resources 121 through PCIE/SATA/SAS. Also, the first memory 112 is provided for the first controller 110 for temporarily storing resources, and the second controller 120 is provided with the second memory 122 for temporarily storing resources.
In addition, the first Memory 112 and the second Memory 122 may be a built-in storage device, such as a built-in SSD (Solid State Disk), an external storage device, or other storage Media, such as a DOM Disk (DOM Disk), an eMMC (Embedded Multi Media Card), a hard Disk, a Flash (Flash EEPROM Memory), and the like.
Based on the application scenario of the dual-control storage device, the dual-control storage device comprises a dual-control active mode and a dual-control active-standby mode.
In dual active mode, the first controller 110 and the second controller 120 respectively operate storage services, wherein the storage services represent services to which data is stored on some medium and which can be guaranteed efficient access. For example, the first controller 110 processes storage services of 128 channels of IPC (Inter-Process Communication) audio/video pull streams, and at the same time, the second controller 120 processes storage services of another 128 channels of IPC audio/video pull streams, and if an abnormality occurs in the first controller 110, the second controller 120 may manage the storage services of the 128 channels of IPC audio/video pull streams originally processed by the first controller 110, that is, at this time, the second controller 120 processes storage services of 256 channels of IPC audio/video pull streams in total. The audio/video pull stream represents a process of pulling audio or video content by using a specified address.
In the dual-control active/standby mode, if the first controller 110 is a main controller and the second controller 120 is a standby controller, the first controller 110 is used to process storage services of 256 IPC audio/video pull streams, and the second controller 120 does not need to process any storage services. When the first controller 110 is abnormal, the second controller 120 will process the storage service of 256 IPC audio/video pull streams originally processed by the first controller 110, and will take over all the storage resources managed by the first controller 110.
Based on the application scenario, the embodiment of the application provides a method and a device for dual-control storage switching and an electronic device, which solve the problem of risk of data loss in the dual-control switching process in the prior art.
The method provided by the embodiment of the application is further described in detail with reference to the attached drawings.
Referring to fig. 2, an embodiment of the present application provides a method for dual-control storage switching, which includes the following specific processes:
step 201: when a first controller is abnormal, determining whether a first storage resource of the first controller is taken over by a second controller to be in a ready state;
when the first controller is abnormal, determining 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 a non-ready state; if so, the first memory of the first controller is in a ready state.
Specifically, when the dual-control storage device finds that the first controller is abnormal, the first service data and the first storage resource of the first controller are all taken over by the second controller, where the first storage resource may represent a storage capacity and may also be used to store the first service data, where the first service data is data representing a storage service.
After confirming that the second controller takes over the first storage resource, there is a process of dual-control switching: the first storage resource is first correctly identified by the second controller, and then data and the like stored in the first storage resource before the first controller is abnormal need to be synchronously written into the second controller. Here, the synchronization data is to obtain information related to the first storage resource, for example, if the first controller writes a part of the first storage resource before the abnormal state, the second controller takes over and then should continue writing the first storage resource from which position, and the second controller needs to specify the file system structure, the remaining storage capacity, and the like in the first storage resource.
And finally, determining whether the first storage resource is in a ready state according to the judgment of whether the double-control switching process is finished: if the operation is finished, the operation is in a ready state; if not, the state is not ready.
Step 202: writing traffic data generated during a not ready state into a second memory of a second controller when the first storage resource is in a first not ready state;
in order to ensure that the first service data generated during the first non-ready state of the first storage resource can be timely and completely stored, in the embodiment of the present application, a second memory of the second controller is used for temporarily storing the first service data generated during the first non-ready state.
Specifically, if it is determined that the first storage resource is in the first not-ready state, all the first traffic data generated during this period is written into the second memory for temporary storage, for example, the first traffic data is written into the second controller built-in SSD for temporary storage.
Step 203: writing traffic data generated during a ready state to the first storage resource when the first storage resource is in a first ready state.
After the dual-control switching operation is completed, it can be confirmed that the first storage resource is in a ready state, that is, the first storage resource can resume saving the first storage service. Then the first service data can be restored to be written into the first storage resource for saving from the time the first storage resource enters the ready state, and is not temporarily saved by being written into the second storage resource.
Specifically, if it is determined that the first storage resource is in the ready state, all the first service data regenerated from entering the ready state will be written into the first storage resource.
Further, in order to ensure that the first service data is not lost in the first storage resource that is taken over again after the first controller returns to normal, the first service data temporarily stored in the second memory during the above dual-control handover needs to be written back to the first storage resource.
In other words, in the embodiment of the present application, it is determined whether the second controller is idle, and when the second controller is idle, for example, a Central Processing Unit (CPU) of the second controller is idle or an Input/Output (Input/Output) is idle, the first service data in the second memory is written into the first storage resource.
Specifically, a load pressure value of a second controller is determined currently, and if the load pressure value of the second controller does not exceed a preset threshold value, first service data in a second memory is written into a first memory resource; and if the load pressure value of the second controller exceeds the preset threshold, stopping writing the data and acquiring the load pressure value again.
In addition, in the process of switching the storage of the second controller when the first controller is abnormal, the second service data and the second storage resource belonging to the second controller are not affected by the switching and are kept in stable storage.
By the method, the risk of data loss does not exist in the process that the second controller takes over the first storage resource and the first service data when the first controller is abnormal.
If the first controller recovers from the abnormal state, a dual-control handover management process is also required, and the principle thereof is the same.
Specifically, when the first controller returns to normal, it is determined whether the first storage resource taken over back by the first controller is in an not-ready state: writing the traffic data generated during the not-ready state into a first memory of the first controller when the first storage resource is in a second not-ready state; when the first storage resource is in the second ready state, writing the business data generated during the ready state into the first storage resource.
Further, it may also be determined whether the first controller is idle, and when the first controller is idle, such as a CPU of the first controller is idle or an I/O is idle, the first service data in the first memory is written into the first storage resource.
By the method, under the condition of not consuming memory resources, reliable, continuous and safe storage of data in the double-control switching process is effectively guaranteed, the availability of safe storage of actual data is enhanced, and great loss caused by data loss is avoided.
Based on the same inventive concept, the present application further provides a dual-control switching storage device, which is used to continuously and safely store data, solve the problem of risk of data loss in the dual-control switching process in the prior art, effectively ensure reliable, continuous and safe storage of data in the dual-control switching process under the condition of not consuming memory resources, enhance availability of data safe storage, and avoid major loss caused by data loss, and the device includes:
a confirming module 301, configured to determine, when a first controller is abnormal, whether a first storage resource that a second controller takes over the first controller is in a ready state, where the first storage resource is used to store service data;
a writing module 302, for writing the service data generated during the non-ready state into the second memory of the second controller when the first storage resource is in the first non-ready state; writing traffic data generated during a ready state to the first storage resource when the first storage resource is in a first ready state.
In one possible design, the confirmation module 301 is specifically configured to determine that the second controller takes over the first storage resource of the first controller when the first controller is abnormal; determining whether data of the first storage resource taken over by the second controller is synchronized into the second controller; if not, the first storage resource of the first controller is in an un-ready state; if so, the first storage resource of the first controller is in a ready state.
In one possible design, after the writing module 302, writing the service data in the second memory to the first memory resource is further included when the second controller is idle.
In a possible design, when the second controller is idle, writing the service data in the second memory into the first memory resource, specifically, to obtain a load pressure value of the second controller; judging whether the load pressure value exceeds a preset threshold value or not; if so, acquiring the load pressure value again; and if not, writing the service data in the second memory into the first memory resource.
In a possible design, after writing the service data in the second memory into the first storage resource when the second controller is idle, determining whether the first storage resource is taken over by the first controller in an not-ready state when the first controller returns to normal; writing traffic data generated during a not-ready state into a first memory of a first controller when the first storage resource is in a second not-ready state; writing traffic data generated during the ready state to the first storage resource when the first storage resource is in a second ready state.
In one possible design, after writing the traffic data generated during the ready state into the first storage resource when the first storage resource is in the second ready state, the method further includes writing the traffic data in the first memory into the first storage resource when the first controller is idle.
Based on the device, the reliable, continuous and safe storage of data in the double-control switching process is effectively realized under the condition of not consuming memory resources, the problem of data loss in the double-control switching process in the prior art is solved, the usability of safe data storage is enhanced, and the major loss caused by data loss is avoided.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, where the electronic device may implement the function of the foregoing dual-control storage switching apparatus, and with reference to fig. 4, the electronic device includes:
at least one processor 401 and a memory 402 connected to the at least one processor 401, in this embodiment, a specific connection medium between the processor 401 and the memory 402 is not limited in this application, and fig. 4 illustrates an example in which the processor 401 and the memory 402 are connected by a bus 400. The bus 400 is shown in fig. 4 by a thick line, and the connection manner between other components is merely illustrative and not limited thereto. The bus 400 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 4 for ease of illustration, but does not represent only one bus or type of bus. Alternatively, processor 401 may also be referred to as a controller, without limitation to name a few.
In the embodiment of the present application, the memory 402 stores instructions executable by the at least one processor 401, and the at least one processor 401 may execute the above-discussed dual-control memory switching method by executing the instructions stored in the memory 402. The processor 401 may implement the functions of the various modules in the apparatus shown in fig. 3.
The processor 401 is a control center of the apparatus, and may connect various parts of the entire control device by using various interfaces and lines, and perform various functions and process data of the apparatus by operating or executing instructions stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the apparatus.
In one possible design, processor 401 may include one or more processing units and processor 401 may integrate an application processor that handles primarily operating systems, user interfaces, application programs, and the like, and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401. In some embodiments, processor 401 and memory 402 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 401 may be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the dual-control storage switching method disclosed in the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
Memory 402, which is a non-volatile computer-readable storage medium, may 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, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 402 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 402 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
By programming the processor 401, the code corresponding to the dual-control storage switching method described in the foregoing embodiment may be solidified into a chip, so that the chip can execute the steps of the dual-control storage switching method in the embodiment shown in fig. 2 when running. How to program the processor 401 is well known to those skilled in the art and will not be described in detail herein.
Based on the same inventive concept, embodiments of the present application further provide a storage medium storing computer instructions, which when executed on a computer, cause the computer to perform the above-discussed dual-control storage switching method.
In some possible embodiments, the aspects of the dual-control storage switching method provided in this application may also be implemented in the form of a program product, which includes program code for causing the control device to perform the steps of the dual-control storage switching method according to various exemplary embodiments of this application described above in this specification, when the program product is run on an apparatus.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such 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 intended to include such modifications and variations as well.

Claims (10)

1. A method for dual-steering handover storage, the method comprising:
when a first controller is abnormal, determining whether a first storage resource of the first controller is taken over by a second controller to be in a ready state or not, wherein the first storage resource is used for storing service data;
writing traffic data generated during a not ready state into a second memory of a second controller when the first storage resource is in a first not ready state;
writing traffic data generated during a ready state to the first storage resource when the first storage resource is in a first ready state.
2. The method of claim 1, wherein determining whether a first storage resource taken over by a second controller for a first controller is in a ready state when an exception occurs at the first controller comprises:
when a first controller is abnormal, determining that a second controller takes over a first storage resource of the first controller;
determining whether data of the first storage resource taken over by the second controller is synchronized into the second controller;
if not, the first storage resource of the first controller is in an un-ready state;
if so, the first storage resource of the first controller is in a ready state.
3. The method as recited in claim 1, wherein after said writing traffic data generated during a ready state to said first storage resource while said first storage resource is in a first ready state, further comprising:
when the second controller is idle, writing the service data in the second memory into the first memory resource.
4. The method of claim 3, wherein writing the traffic data in the second memory to the first memory resource when the second controller is idle comprises:
acquiring a load pressure value of the second controller;
judging whether the load pressure value exceeds a preset threshold value or not;
if so, acquiring the load pressure value again;
and if not, writing the service data in the second memory into the first memory resource.
5. The method of claim 3, wherein after said writing traffic data in said second memory into said first memory resource while said second controller is idle, further comprising:
when the first controller returns to normal, determining whether the first storage resource is taken over by the first controller in an not-ready state;
writing traffic data generated during a not-ready state into a first memory of a first controller when the first storage resource is in a second not-ready state;
writing traffic data generated during the ready state to the first storage resource when the first storage resource is in a second ready state.
6. The method as recited in claim 5, wherein after said writing traffic data generated during a ready state to said first storage resource while said first storage resource is in a second ready state, further comprising:
when the first controller is idle, writing the service data in the first memory into the first memory resource.
7. An apparatus for dual-steering switch storage, the apparatus comprising:
the system comprises a confirmation module, a first storage module and a second storage module, wherein the confirmation module is used for determining whether a first storage resource of a first controller is taken over by a second controller to be in a ready state or not when the first controller is abnormal, and the first storage resource is used for storing service data;
a write module that writes, when the first storage resource is in a first not-ready state, traffic data generated during the not-ready state into a second memory of a second controller; writing traffic data generated during a ready state to the first storage resource when the first storage resource is in a first ready state.
8. The apparatus of claim 7, wherein the confirmation module is specifically configured to determine that a first storage resource of a first controller is taken over by a second controller when the first controller is abnormal; determining whether data of the first storage resource taken over by a second controller is synchronized into the second controller; if not, the first storage resource of the first controller is in an un-ready state; if so, the first storage resource of the first controller is in a ready state.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-6 when executing the computer program stored on the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-6.
CN202110959620.8A 2021-08-20 2021-08-20 A method, device and electronic device for dual-control switching storage Active CN113687784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110959620.8A CN113687784B (en) 2021-08-20 2021-08-20 A method, device and electronic device for dual-control switching storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110959620.8A CN113687784B (en) 2021-08-20 2021-08-20 A method, device and electronic device for dual-control switching storage

Publications (2)

Publication Number Publication Date
CN113687784A true CN113687784A (en) 2021-11-23
CN113687784B CN113687784B (en) 2025-02-18

Family

ID=78580998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110959620.8A Active CN113687784B (en) 2021-08-20 2021-08-20 A method, device and electronic device for dual-control switching storage

Country Status (1)

Country Link
CN (1) CN113687784B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115757056A (en) * 2022-10-21 2023-03-07 苏州浪潮智能科技有限公司 Switching early warning method and device of controller, electronic equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092786A (en) * 2013-02-25 2013-05-08 浪潮(北京)电子信息产业有限公司 Double-control double-active storage control system and method
CN109376039A (en) * 2018-12-17 2019-02-22 郑州云海信息技术有限公司 Method, device, device and medium for data synchronization of storage device based on dual control
CN109471759A (en) * 2018-11-21 2019-03-15 北京谷数科技有限公司 A kind of database failure switching method and equipment based on SAS dual control equipment
CN109672544A (en) * 2017-10-13 2019-04-23 杭州海康威视系统技术有限公司 A kind of data processing method, device and distributed memory system
CN109683815A (en) * 2018-12-13 2019-04-26 北京计算机技术及应用研究所 A kind of double control disk array bedding storage method
CN110618785A (en) * 2018-12-24 2019-12-27 深圳创新科软件技术有限公司 Dual-control storage system
US10671302B1 (en) * 2018-10-26 2020-06-02 Pure Storage, Inc. Applying a rate limit across a plurality of storage systems
CN112181705A (en) * 2020-10-12 2021-01-05 上海前瞻创新研究院有限公司 Management storage control method based on multiple controllers and storage equipment
CN112835519A (en) * 2021-01-29 2021-05-25 杭州海康威视数字技术股份有限公司 A data reading method, device, electronic device and storage medium
CN112911185A (en) * 2021-01-18 2021-06-04 浙江大华技术股份有限公司 Fault processing method and device for double-control equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103092786A (en) * 2013-02-25 2013-05-08 浪潮(北京)电子信息产业有限公司 Double-control double-active storage control system and method
CN109672544A (en) * 2017-10-13 2019-04-23 杭州海康威视系统技术有限公司 A kind of data processing method, device and distributed memory system
US10671302B1 (en) * 2018-10-26 2020-06-02 Pure Storage, Inc. Applying a rate limit across a plurality of storage systems
CN109471759A (en) * 2018-11-21 2019-03-15 北京谷数科技有限公司 A kind of database failure switching method and equipment based on SAS dual control equipment
CN109683815A (en) * 2018-12-13 2019-04-26 北京计算机技术及应用研究所 A kind of double control disk array bedding storage method
CN109376039A (en) * 2018-12-17 2019-02-22 郑州云海信息技术有限公司 Method, device, device and medium for data synchronization of storage device based on dual control
CN110618785A (en) * 2018-12-24 2019-12-27 深圳创新科软件技术有限公司 Dual-control storage system
CN112181705A (en) * 2020-10-12 2021-01-05 上海前瞻创新研究院有限公司 Management storage control method based on multiple controllers and storage equipment
CN112911185A (en) * 2021-01-18 2021-06-04 浙江大华技术股份有限公司 Fault processing method and device for double-control equipment
CN112835519A (en) * 2021-01-29 2021-05-25 杭州海康威视数字技术股份有限公司 A data reading method, device, electronic device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115757056A (en) * 2022-10-21 2023-03-07 苏州浪潮智能科技有限公司 Switching early warning method and device of controller, electronic equipment and readable storage medium
CN115757056B (en) * 2022-10-21 2025-08-29 苏州浪潮智能科技有限公司 Controller switching warning method, device, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN113687784B (en) 2025-02-18

Similar Documents

Publication Publication Date Title
CN110073333B (en) Method and system for recovering logic in FPGA chip and FPGA device
US8990617B2 (en) Fault-tolerant computer system, fault-tolerant computer system control method and recording medium storing control program for fault-tolerant computer system
JP5911892B2 (en) Multistage resume from hibernate
CN105224391B (en) A kind of online backup method and system of virtual machine
CN100359481C (en) Abnormality monitoring device and method for multi-task system
WO2018040494A1 (en) Method and device for extending processor instruction set
WO2017014913A1 (en) Systems and methods for scheduling tasks in a heterogeneous processor cluster architecture using cache demand monitoring
US20240256263A1 (en) Application Upgrade Method and Apparatus, Computing Device, and Chip System
CN101937376A (en) Data management method and data storage device
CN110413432B (en) Information processing method, electronic equipment and storage medium
CN114546634B (en) Management of synchronous restart of system
KR20180066073A (en) System and method for providing operating system independent error control in a computing device
WO2021174698A1 (en) Virtual machine snapshot creation method and apparatus, and storage medium and computer device
CN111475335B (en) Method, system, terminal and storage medium for rapid database recovery
CN113687784A (en) A method, device and electronic device for dual-control switching storage
CN114756355B (en) A method and device for automatic and rapid recovery of a computer operating system process
WO2017078707A1 (en) Method and apparatus for recovering in-memory data processing system
CN114064236B (en) Task execution method, device, equipment and storage medium
CN103778002A (en) Method and device for recycling critical resources in multi-core system
CN113220495B (en) Method and device for processing process abnormal event, electronic equipment and storage medium
CN118939433A (en) A method, device and electronic device for adjusting cluster nodes
WO2025077363A1 (en) Information acquisition method and apparatus, electronic device, and computer-readable storage medium
CN107315624B (en) Information processing method and virtualization manager
CN115576734B (en) A multi-core heterogeneous log storage method and system
CN112463335B (en) Application program running method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant