CN113687784B - 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
CN113687784B
CN113687784B CN202110959620.8A CN202110959620A CN113687784B CN 113687784 B CN113687784 B CN 113687784B CN 202110959620 A CN202110959620 A CN 202110959620A CN 113687784 B CN113687784 B CN 113687784B
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.)
Active
Application number
CN202110959620.8A
Other languages
Chinese (zh)
Other versions
CN113687784A (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

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

The application discloses a method, a device and electronic equipment for double-control switching storage, wherein the method comprises the steps of determining whether a first storage resource of a first controller is in a ready state or not taken over by a second controller when the first controller is abnormal, wherein the first storage resource is used for storing business data, writing the business data generated during the non-ready state into a second memory of the second controller when the first storage resource is in a first non-ready state, and writing the business data generated during a ready state into the first storage resource when the first storage resource is in a first ready state. Based on the method, the problem that data is lost in the double-control switching process in the prior art can be solved, the reliable, continuous and safe storage of the data in the double-control switching process is effectively ensured under the condition that memory resources are not consumed, the availability of the safe storage of the data is enhanced, and the serious loss caused by the data loss is avoided.

Description

Dual-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 apparatus for dual-control switching storage, and an electronic device.
Background
In the big data age, massive data has higher and higher value in industries such as finance, medical treatment, telecommunication, internet and the like, and meanwhile, the data stored in a storage system also becomes more and more. If the storage system is accidentally down, and the stored data is lost, a significant loss is caused, so that the management of the data under the condition that the storage system is accidentally down is a current challenge.
The prior art for solving the challenges mainly comprises a control scheme of double-control storage switching, wherein when one of the controllers is abnormal, the other normal controller takes over the storage resources of the abnormal controller, takes over the storage business of the abnormal controller, and writes the storage business into the storage resources to complete the double-control storage switching. However, a series of processes are required to be performed during the period from the start of the storage resource to the start of the taking over of the storage service, and the storage service during the process cannot be normally written into the storage resource because the processes consume more time, so that the storage service during the period is easy to cause data loss.
In view of this, the above solution has a problem of data loss risk during the double 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 switching storage, the method comprising:
when the 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, wherein the first storage resource is used for storing service data;
Writing traffic data generated during the non-ready state into a second memory of a second controller when the first storage resource is in a first non-ready state;
And when the first storage resource is in a first ready state, writing business data generated during a ready state into the first storage resource.
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, after the switching is finished, the business data during the first ready state is normally written into the first storage resource, the safety and usability of the data storage are enhanced, and the huge loss caused by the data loss due to the double-control switching can be effectively avoided by the method.
In one possible design, the determining, when an exception occurs to the first controller, whether the first storage resource of the first controller is taken over by the second controller is in a ready state includes:
when an abnormality occurs in a first controller, determining that a first storage resource of the first controller is taken over by a second 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 unready state;
If yes, 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 is confirmed, so that the time of the lost data can be calculated more accurately, and the reliable, continuous and safe storage of the data in the whole double-control switching process is ensured.
In one possible design, after the writing of the traffic 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:
and when the second controller is idle, writing the business 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 memory resource to be stored, so that the integrity of the stored data is ensured, and meanwhile, the usability of the data safe storage is enhanced.
In one possible design, the writing the service data in the second memory to the first storage 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 yes, the load pressure value is obtained again;
And if not, writing the business data in the second memory into the first memory resource.
By the method, whether to continue writing back the service data in the second memory is judged by acquiring the load pressure value of the second controller, so that the integrity, the safety and the usability of the data in the data writing back process are ensured.
In one possible design, after the writing of the service data in the second memory into the first memory resource when the second controller is idle, the method further includes:
Determining, when a first controller resumes normal, whether the first storage resource is taken over by the first controller in an unready state;
writing traffic data generated during the non-ready state into a first memory of a first controller when the first storage resource is in a second non-ready state;
and when the first storage resource is in the second ready state, writing business data generated during the ready state into the first storage resource.
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, after the switching is finished, the business data during the second ready state is normally written into the first storage resource, the safety and the usability of the data storage are enhanced, and the huge loss caused by the data loss due to the double-control switching can be effectively avoided by the method.
In one possible design, after the writing of 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:
And when the first controller is idle, writing the business 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 memory resource to be stored, so that the integrity of the stored data is ensured, and meanwhile, the usability of the data safe storage is enhanced.
In a second aspect, the present application provides a device for dual control switching storage, the device comprising:
The system comprises a confirmation module, a first control module and a second control module, wherein the confirmation module is used for determining whether a first storage resource of a first controller is in a ready state or not, and the first storage resource is used for storing service data;
And the writing module is used for writing the business 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, and writing the business data generated during the ready state into the first storage resource when the first storage resource is in the first ready state.
In one possible design, the confirmation module is specifically configured to determine that a second controller takes over the first storage resource of the first 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 a not ready state, and 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 storage resource when the second controller is idle is further included.
In one possible design, when the second controller is idle, the service data in the second memory is written into the first storage resource, specifically, the service data is used for obtaining a load pressure value of the second controller, judging whether the load pressure value exceeds a preset threshold, if yes, the load pressure value is obtained again, and if not, the service data in the second memory is written into the first storage resource.
In one possible design, after writing the service data in the second memory to the first memory resource when the second controller is idle, determining whether the first memory resource is in an unready state by the first controller when the first controller is restored, writing the service data generated during the unready state to the first memory of the first controller when the first memory resource is in the second unready state, and writing the service data generated during the ready state to the first memory resource when the first memory resource is in the second ready state.
In one possible design, after writing the traffic data generated during the ready state to the first storage resource when the first storage resource is in the second ready state, writing the traffic data in the first memory to the first storage resource when the first controller is idle is further included.
In a third aspect, the present application provides an electronic device, including:
A memory for storing a computer program;
and the processor is used for realizing the method steps of detecting the 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 therein a computer program which, when executed by a processor, implements the above-described method steps of detecting an object with abnormal motion state.
The technical effects of each of the second to fourth aspects and the technical effects that may be achieved by each aspect are referred to above for the technical effects that may be achieved by the first aspect or each possible aspect in the first aspect, and the detailed description is not repeated here.
Drawings
Fig. 1 is a schematic diagram of a possible application scenario provided by the present application;
FIG. 2 is a flow chart of a method for dual control memory switching provided by the present application;
FIG. 3 is a schematic diagram of a dual control memory switching device according to the present application;
fig. 4 is a schematic diagram of a structure of an electronic device according to the present application.
Detailed Description
Referring to fig. 1, an embodiment of the present application provides a possible application scenario in which a dual-control storage device is provided.
The so-called dual control storage device comprises 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 resources 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), and the second controller 120 manages the second storage resources 121 through PCIE/SATA/SAS. And, the first controller 110 is provided with a first memory 112 for temporarily storing resources, and the second controller 120 is provided with a second memory 122 for temporarily storing resources.
In addition, the first memory 112 and the second memory 122 may be internal storage devices, for example, an internal SSD (Solid STATE DISK or Solid STATE DRIVE, solid state Disk), external storage devices, or other storage media, for example, a DOM disc (electronic disc), eMMC (Embedded Multi MEDIA CARD), a hard Disk, flash (Flash EEPROM Memory, flash memory), and the like.
Based on the application scene of the double-control storage device, the double-control storage device comprises a double-control double-active mode and a double-control active-standby mode.
In the dual-control dual-active mode, the first controller 110 and the second controller 120 operate separately for storing services, wherein the stored services represent services where data is stored on certain media and where efficient access is guaranteed. For example, the first controller 110 processes 128 channels of IPC (Inter-Process Communication ) audio/video streaming storage traffic, and at the same time, the second controller 120 processes another 128 channels of IPC audio/video streaming storage traffic, and if the first controller 110 is abnormal, the second controller 120 will take over the 128 channels of IPC audio/video streaming storage traffic originally processed by the first controller 110, that is, at this time, the second controller 120 processes a total of 256 channels of IPC audio/video streaming storage traffic. Wherein, the audio and video streaming represents a process of pulling audio or video content by using a designated 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 the storage service of 256 IPC audio/video streams, and the second controller 120 does not need to process any storage service. When an abnormality occurs in the first controller 110, the second controller 120 will process the 256 paths of IPC audio/video streaming storage traffic originally processed by the first controller 110, and will also 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, a device and electronic equipment for double-control storage switching, which solve the problem of data loss risk in the double-control switching process in the prior art.
The method provided by the embodiment of the application is further described in detail below with reference to the accompanying drawings.
Referring to fig. 2, the embodiment of the application provides a method for switching double-control storage, which specifically comprises the following steps:
step 201, when an abnormality occurs in a first controller, 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 are synchronized into the second controller, if not, the first memory of the first controller is in an unready state, and if so, the first memory of the first controller is in a readiness state.
In particular, when the dual-control storage device finds that the first controller is abnormal, then the first service data of the first controller and the first storage resource are all taken over by the second controller, wherein the first storage resource can be used for representing the storage capacity and also can be used for storing the first service data, and the first service data is the data representing the storage service.
After confirming that the second controller takes over the first storage resource, there is a process of double control switching in which 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 abnormality of the first controller need to be synchronously written into the second controller. The synchronization data is used to acquire information about the first storage resource, for example, if the first controller writes a part of the first storage resource before the abnormal state, then the second controller takes over and then should write the first storage resource from which location, and the second controller needs to determine 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 whether the double-control switching process is ended or not, wherein the first storage resource is in the ready state if the double-control switching process is ended, and the first storage resource is in the non-ready state if the double-control switching process is not ended.
Step 202, when the first storage resource is in a first non-ready state, writing business data generated during the non-ready state into a second memory of a second controller;
If the first memory resource is in the dual-control switching process, it can be confirmed that the first memory resource is in the first non-ready state, that is, the first memory resource in the process cannot store the first service data.
Specifically, if it is determined that the first storage resource is in the first non-ready state, all of the first service data generated during this period is written into the second memory for temporary storage, for example, the first service data is written into the second controller-built-in SSD for temporary storage.
And 203, writing business data generated during the ready state into the first storage resource when the first storage resource is in the first ready state.
After the operation of the double-control switching is completed, the first storage resource can be confirmed to be in a ready state, that is, the first storage resource can restore and store the first storage service. Then the first transaction data may be restored to be written to the first storage resource for saving without being written to the second memory for temporary saving, beginning with the first storage resource entering the ready state.
Specifically, if it is determined that the first storage resource is in the ready state, all the first service data regenerated from the start of entering the ready state will be written into the first storage resource.
Further, in order to ensure that there is no loss of the first service data in the first storage resource that is re-taken over after the first controller returns to normal, the first service data temporarily stored in the second memory during the above-mentioned dual control switching needs to be written back into the first storage resource.
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 service data in the second memory is written into the first storage resource.
Specifically, the load pressure value of the second controller 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 into the first memory resource, and if the load pressure value of the second controller exceeds the preset threshold, the writing of the data is stopped, and the load pressure value is obtained again.
In addition, in the process of switching the second controller storage when the first controller is abnormal, the second service data and the second storage resource belonging to the second controller are not affected by switching, and stable storage is maintained.
By the method, the fact that the risk of data loss in the process of taking over the first storage resource and the first service data by the second controller when the first controller is abnormal is guaranteed.
If the first controller recovers from an abnormal state, a process of two-control switching management is also required, and the principle is the same.
Specifically, when the first controller is restored to normal, it is determined whether the first storage resource taken over by the first controller is in an unready state, traffic 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 unready state, and traffic data generated during the ready state is written into the first storage resource when the first storage resource is in the second ready state.
Further, it may be determined whether the first controller is idle, and when the first controller is idle, for example, a CPU of the first controller is idle or 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, the reliable, continuous and safe storage of data in the double-control switching process is effectively ensured, the availability of the safe storage of actual data is enhanced, and the serious loss caused by data loss is avoided.
Based on the same inventive concept, the application also provides a device for double-control switching storage, which is used for continuously and safely storing data, solving the problem that the prior art has the risk of data loss in the double-control switching process, effectively ensuring the reliable, continuous and safe storage of the data in the double-control switching process under the condition of not consuming memory resources, enhancing the usability of the data safe storage, and avoiding the serious loss caused by data loss, and referring to fig. 3, the device comprises:
a confirmation module 301, configured to determine, when an abnormality occurs in a first controller, whether a first storage resource that is taken over by a second controller for storing service data is in a ready state;
the writing module 302 writes the traffic data generated during the non-ready state into the second memory of the second controller when the first memory resource is in the first non-ready state, and writes the traffic data generated during the ready state into the first memory resource when the first memory resource is in the first ready state.
In one possible design, the confirmation module 301 is specifically configured to determine that a second controller takes over the first storage resource of the first controller when the first controller is abnormal, 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, and 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 storage resource when the second controller is idle is further included.
In one possible design, when the second controller is idle, the service data in the second memory is written into the first storage resource, specifically, the service data is used for obtaining a load pressure value of the second controller, judging whether the load pressure value exceeds a preset threshold, if yes, the load pressure value is obtained again, and if not, the service data in the second memory is written into the first storage resource.
In one possible design, after writing the service data in the second memory to the first memory resource when the second controller is idle, determining whether the first memory resource is in an unready state by the first controller when the first controller is restored, writing the service data generated during the unready state to the first memory of the first controller when the first memory resource is in the second unready state, and writing the service data generated during the ready state to the first memory resource when the first memory resource is in the second ready state.
In one possible design, after writing the traffic data generated during the ready state to the first storage resource when the first storage resource is in the second ready state, writing the traffic data in the first memory to the first storage resource when the first controller is idle is further included.
Based on the device, the reliable, continuous and safe storage of the data in the double-control switching process is effectively realized under the condition that memory resources are not consumed, the problem of data loss in the double-control switching process in the prior art is solved, the usability of the safe storage of the data is enhanced, and the serious loss caused by the data loss is avoided.
Based on the same inventive concept, the 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 device, and referring 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 which the specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application, and in fig. 4, the connection between the processor 401 and the memory 402 through the bus 400 is taken as an example. The bus 400 is shown in bold lines in fig. 4, and the manner in which the other components are connected is illustrated schematically and not by way of limitation. The bus 400 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 4 for ease of illustration, but does not represent only one bus or one type of bus. Or processor 401 may also be referred to as a controller, without limitation of the name.
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 dual control storage switching method as described above by executing the instructions stored in the memory 402. 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 various interfaces and lines can be used to connect various parts of the entire control device, and by executing or executing instructions stored in the memory 402 and invoking data stored in the memory 402, various functions of the apparatus and processing data can be performed, so that the apparatus is monitored as a whole.
In one possible design, processor 401 may include one or more processing units, and processor 401 may integrate an application processor and a modem processor, wherein the application processor primarily processes operating systems, user interfaces, application programs, and the like, and the modem processor primarily processes 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, and 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 device, discrete hardware components, which may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. The 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 embodiment of the application can be directly embodied as the execution completion of a hardware processor or the execution completion of the combination execution of hardware and software modules in the processor.
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, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. 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 embodiments of the present application may also be circuitry or any other device capable of performing memory functions for storing program instructions and/or data.
By programming the processor 401, the code corresponding to the dual control memory switching method described in the foregoing embodiment may be cured into the chip, so that the chip can execute the steps of the dual control memory switching method of the embodiment shown in fig. 2 during operation. 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.
Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the dual control storage switching method as discussed above.
In some possible embodiments, aspects of the dual control storage switching method provided by the present application may also be implemented in the form of a program product comprising program code for causing the control apparatus to carry out the steps of the dual control storage switching method according to the various exemplary embodiments of the present application as described in the present specification when the program product is run on a device.
It will be apparent to those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1.一种双控切换存储的方法,其特征在于,所述方法包括: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.如权利要求1所述的方法,其特征在于,在所述当所述第一存储资源处于第一就绪状态时,将就绪状态期间产生的业务数据写入到所述第一存储资源中后,还包括: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, it further comprises: 当所述第二控制器空闲时,将所述第二存储器中的业务数据写入到所述第一存储资源中。When the second controller is idle, the service data in the second memory is written into the first storage resource. 3.如权利要求2所述的方法,其特征在于,所述当所述第二控制器空闲时,将所述第二存储器中的业务数据写入到所述第一存储资源中,包括:3. The method according to claim 2, wherein 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.如权利要求2所述的方法,其特征在于,在所述当所述第二控制器空闲时,将所述第二存储器中的业务数据写入到所述第一存储资源中后,还包括:4. The method according to claim 2, characterized in that, after writing the service data in the second memory to the first storage resource when the second controller is idle, it further comprises: 当所述第一控制器恢复正常时,确定由所述第一控制器接管所述第一存储资源是否处于未就绪状态;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.如权利要求4所述的方法,其特征在于,在所述当所述第一存储资源处于第二就绪状态时,将就绪状态期间产生的业务数据写入到所述第一存储资源中后,还包括: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, it further comprises: 当所述第一控制器空闲时,将所述第一存储器中的业务数据写入到所述第一存储资源中。When the first controller is idle, the service data in the first memory is written into the first storage resource. 6.一种双控切换存储的装置,其特征在于,所述装置包括: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.如权利要求6所述的装置,其特征在于,所述确认模块,具体用于当第一控制器发生异常时,确定由第二控制器接管所述第一控制器的第一存储资源;判断由第二控制器接管的所述第一存储资源的数据是否同步到所述第二控制器中;若否,则所述第一控制器的第一存储资源处于未就绪状态;若是,则所述第一控制器的第一存储资源处于就绪状态。7. The device as described in claim 6 is 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.一种电子设备,其特征在于,包括:8. An electronic device, comprising: 存储器,用于存放计算机程序;Memory, used to store computer programs; 处理器,用于执行所述存储器上所存放的计算机程序时,实现权利要求1-5中任一项所述的方法。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.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-5任一项所述的方法。9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
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 CN113687784A (en) 2021-11-23
CN113687784B true 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)

Families Citing this family (1)

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

Citations (2)

* 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

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672544B (en) * 2017-10-13 2020-12-11 杭州海康威视系统技术有限公司 A data processing method, device and distributed storage system
US10671302B1 (en) * 2018-10-26 2020-06-02 Pure Storage, Inc. Applying a rate limit across a plurality of storage systems
CN109471759B (en) * 2018-11-21 2019-08-02 北京谷数科技有限公司 A kind of database failure switching method and equipment based on SAS dual control equipment
CN109683815B (en) * 2018-12-13 2021-03-23 北京计算机技术及应用研究所 Double-control disk array layered storage method
CN110618785A (en) * 2018-12-24 2019-12-27 深圳创新科软件技术有限公司 Dual-control storage system
CN112181705B (en) * 2020-10-12 2023-02-03 上海前瞻创新研究院有限公司 Management storage control method based on multiple controllers and storage equipment
CN112911185B (en) * 2021-01-18 2022-10-18 浙江大华技术股份有限公司 Fault processing method and device for double-control equipment
CN112835519B (en) * 2021-01-29 2023-03-14 杭州海康威视数字技术股份有限公司 A data reading method, device, electronic equipment and storage medium

Patent Citations (2)

* 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

Also Published As

Publication number Publication date
CN113687784A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN110073333B (en) Method and system for recovering logic in FPGA chip and FPGA device
WO2018040494A1 (en) Method and device for extending processor instruction set
US20240256263A1 (en) Application Upgrade Method and Apparatus, Computing Device, and Chip System
CN112948169B (en) Data backup method, device, equipment and storage medium
CN110413432B (en) Information processing method, electronic equipment and storage medium
US20220253252A1 (en) Data processing method and apparatus
CN110737453A (en) Security chip upgrade method, device and security chip
US10379949B2 (en) Techniques for managing parity information for data stored on a storage device
CN111858077A (en) Recording method, device and equipment for IO request log in storage system
WO2017062131A1 (en) System and method for providing operating system independent error control in a computing device
CN111198832B (en) Processing method and electronic equipment
WO2024259890A1 (en) Data backup method, electronic device, and computer-readable storage medium
CN113687784B (en) A method, device and electronic device for dual-control switching storage
CN119621394A (en) Fault recovery method, device, equipment and storage medium for hard disk in server
CN111475335B (en) Method, system, terminal and storage medium for rapid database recovery
US20180335963A1 (en) Method and system for hardware accelerated copyback
CN113220495B (en) Method and device for processing process abnormal event, electronic equipment and storage medium
CN111400087B (en) Control method of operating system, terminal and storage medium
US9430338B2 (en) Method and computing device for recording log entries
CN107315624B (en) Information processing method and virtualization manager
WO2025077363A1 (en) Information acquisition method and apparatus, electronic device, and computer-readable storage medium
CN108509154B (en) Method and device for dynamically recombining raid according to bad block distribution
CN111522598A (en) Method and device for recording restart information of embedded equipment
CN118626123A (en) A method and device for upgrading firmware of baseboard management controller
CN117493222A (en) Memory recycling method and device and electronic equipment

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