WO2016061958A1 - 多控制器系统的资源处理方法及装置 - Google Patents

多控制器系统的资源处理方法及装置 Download PDF

Info

Publication number
WO2016061958A1
WO2016061958A1 PCT/CN2015/072799 CN2015072799W WO2016061958A1 WO 2016061958 A1 WO2016061958 A1 WO 2016061958A1 CN 2015072799 W CN2015072799 W CN 2015072799W WO 2016061958 A1 WO2016061958 A1 WO 2016061958A1
Authority
WO
WIPO (PCT)
Prior art keywords
controller
resource pool
usage flag
loads
counterpart
Prior art date
Application number
PCT/CN2015/072799
Other languages
English (en)
French (fr)
Inventor
刘煌
许奇
杨长江
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to US15/521,383 priority Critical patent/US20170308469A1/en
Publication of WO2016061958A1 publication Critical patent/WO2016061958A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0721Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU]
    • G06F11/0724Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment within a central processing unit [CPU] in a multiprocessor or a multi-core unit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • G06F11/1425Reconfiguring to eliminate the error by reconfiguration of node membership
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2028Failover techniques eliminating a faulty processor or activating a spare
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2089Redundant storage control functionality
    • G06F11/2092Techniques of failing over between control units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/0645Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis by additionally acting on or stimulating the network after receiving notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Definitions

  • the present invention relates to the field of communications, and in particular to a resource processing method and apparatus for a multi-controller system.
  • FIG. 1 is a schematic diagram of a brain splitting situation in a dual controller system according to the related art. As shown in FIG. 1 , both controllers consider that the opposite end has been normally shut down or left.
  • Trigger a dual controller to take over the same backend storage object such as a storage pool resource.
  • a backend storage object such as a storage pool resource.
  • the use of general storage objects needs to be mutually exclusive, and in a brain-split scenario, the storage objects may be destroyed by being taken over by the dual controllers at the same time.
  • the method of adding a third-party node or a quorum disk is usually used to assist in determining whether a brain split occurs, and the dual controller is prevented from competing for the storage pool resource at the same time.
  • FIG. 2 is a schematic diagram of determining whether a brain splitting condition occurs in a dual controller system by a third party node according to the related art.
  • the dual controller may query a third party node.
  • the third-party node tells its peer node whether it is abnormal.
  • the practice of adding third-party nodes does not guarantee the accuracy of the judgment. For example, the abnormality of the channel between the third-party node and the device may also be misjudged, and the cost of adding the third-party node is large.
  • FIG. 3 is a schematic diagram of determining whether a brain crack occurs in a dual controller system by using an arbitration disk according to the related art, but the method of arbitrating the disk is to waste the hard disk, and the second is that the hard disk has no redundant backup.
  • the arbitration disk is faulty, the detection is performed. The mechanism will fail.
  • the invention provides a resource processing method and device for a multi-controller system, so as to solve the problem that the brain crack detection mechanism in a multi-controller system has high cost and may be invalid.
  • a resource processing method for a multi-controller system includes: a controller in the multi-controller system cannot sense the presence of a counterpart controller; and the controller is configured according to the counterpart controller Determining whether the counterpart controller loads the first resource pool by using a first usage flag stored in the previously loaded first resource pool, where the first usage flag is used to identify whether the counterpart controller loads the The first resource pool.
  • the method further includes: each controller in the multi-controller system The first usage flag is periodically written to the respective loaded resource pool, wherein the first usage flag is used to identify whether the controller loads the resource pool of the controller.
  • the method further includes: the controller is at the first resource Writing a second usage flag for instructing the controller to load the first resource pool and loading the first resource pool is written in the pool.
  • the method further includes: the controller is configured according to The first usage flag in the first resource pool determines whether the peer controller loads the first resource pool, and if the determination result is yes, the controller does not load the first resource pool. And clearing the second usage flag.
  • the controller determines whether the counterpart controller loads the first resource pool, includes: the first usage flag includes: In the case of the identifier information of the resource pool, the controller determines whether the counterpart controller loads the first resource pool according to the value of the identifier information; and/or, the first usage flag includes: In the case of indicating whether the controller loads the identification information of the resource pool and the time stamp for writing the identification information, the controller determines whether the time stamp changes within a predetermined duration, and if a change occurs, determines the location The other controller loads the first resource pool; otherwise, determines that the other controller does not load the first resource pool.
  • each of the controllers periodically writing the first usage flag to the respective loaded resource pool includes: each controller writing the first usage to a corresponding logical region in a respective loaded resource pool a flag, wherein the resource pool is logically divided into n regions, each region corresponding to one controller, and the first usage flag written in each region indicates loading of the resource pool by a controller corresponding to the region happening.
  • a resource processing apparatus for a multi-controller system, located in a controller, the apparatus comprising: a sensing module configured to sense whether a counterpart controller exists; and a determining module configured to If the sensing module cannot perceive the existence of the counterpart controller, according to the counterpart controller The first usage flag stored in the previously loaded first resource pool is used to determine whether the counterpart controller loads the first resource pool.
  • the device further includes: a first writing module, configured to periodically write a first usage flag to a resource pool loaded by the controller, wherein the first usage flag is used to identify whether the controller is loaded The resource pool for this controller.
  • a first writing module configured to periodically write a first usage flag to a resource pool loaded by the controller, wherein the first usage flag is used to identify whether the controller is loaded The resource pool for this controller.
  • the device further includes: a second writing module, configured to write in the first resource pool if the determining module determines that the other controller does not load the first resource pool And entering a second usage flag for instructing the controller to load the first resource pool, and loading the first resource pool.
  • a second writing module configured to write in the first resource pool if the determining module determines that the other controller does not load the first resource pool And entering a second usage flag for instructing the controller to load the first resource pool, and loading the first resource pool.
  • the second writing module is further configured to: after the writing the second usage flag, determine, according to the first usage flag in the first resource pool, whether the counterpart controller loads the In the case of the first resource pool, if the determination result is yes, the first resource pool is not loaded, and the second usage flag is cleared.
  • the determining module includes: a first determining unit, configured to determine, according to the value of the identifier information, that the first usage flag includes: identifier information indicating whether the controller loads the resource pool Whether the other controller loads the first resource pool; and/or the second determining unit includes: the identifier information set to indicate whether the controller loads the resource pool and the identifier information is written in the first usage flag
  • a timestamp it is set to determine whether the timestamp changes within a predetermined duration, and if a change occurs, determining that the counterpart controller loads the first resource pool; otherwise, determining that the counterpart controller is not loaded The first resource pool.
  • the first write module includes: a logic module configured to write the first use flag to a corresponding logical region in a resource pool loaded by the controller, wherein the resource pool is logically divided into n areas, each area corresponding to a controller, and the first usage flag written in each area indicates the loading of the resource pool by the controller corresponding to the area.
  • the controller in the multi-controller system cannot sense the existence of the counterpart controller; the controller determines the counterpart controller according to the first usage flag stored in the first resource pool previously loaded by the counterpart controller. Whether the first resource pool is loaded, wherein the first usage flag is used to identify whether the counterpart controller loads the first resource pool.
  • FIG. 1 is a schematic diagram showing a situation of brain splitting in a dual controller system according to the related art
  • FIG. 2 is a schematic diagram of determining whether a brain splitting condition occurs in a dual controller system by a third party node according to the related art
  • FIG. 3 is a schematic diagram of determining whether a brain splitting condition occurs in a dual controller system by an arbitration disc according to the related art
  • FIG. 4 is a flowchart of a resource processing method of a multi-controller system according to an embodiment of the present invention
  • FIG. 5 is a structural block diagram of a resource processing apparatus of a multi-controller system according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of normal operation of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • FIG. 7a is a diagram showing a raid of a marked area of a storage pool of a resource processing method of a dual controller system according to an alternative embodiment of the present invention
  • 7b is still another schematic diagram of a raid of a marked area of a storage pool of a resource processing method of a dual controller system according to an alternative embodiment of the present invention
  • FIG. 8 is a schematic diagram of a brain splitting state of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • FIG. 9a is a schematic diagram of a storage pool marking area in a brain splitting state of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • FIG. 9b is still another schematic diagram of a storage pool marking area in a brain splitting state of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • FIG. 10 is a flowchart 1 of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • FIG. 11 is a second flowchart of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • FIG. 12 is a block diagram showing the use of a module for performing brainslip detection according to a structural block diagram of a resource processing apparatus of a dual controller system according to an alternative embodiment of the present invention.
  • the multi-controller system in the following embodiments contains two or more controllers, and the counterpart controller may represent some or all of other controllers in all multi-controller systems except the controller itself, for example,
  • the counterpart controller can be either a controller or multiple controllers.
  • FIG. 4 is a flowchart of a resource processing method for a multi-controller system according to an embodiment of the present invention. As shown in FIG. 4, the process includes the following steps:
  • Step S402 The controller in the multi-controller system cannot sense the existence of the counterpart controller
  • Step S404 The controller determines, according to the first usage flag stored in the resource pool that is loaded by the controller, whether the controller uses the first resource pool, where the first usage flag is used to identify whether the controller is loaded.
  • a resource pool. The "before” in this step refers to the resource pool loaded by the other controller before the controller can not perceive the controller of the other party.
  • the first resource pool is used for description in this embodiment, where A "is just a mark, not a limitation on the resource pool.
  • the usage flag is stored in the resource pool, so that no additional nodes and arbitration disks need to be added, thereby solving the problem that the brain crack detection mechanism in the multi-controller system is high in cost and possible to fail, saving cost and increasing detection. reliability.
  • each controller may periodically write a first usage flag to a respective loaded resource pool at a certain time. For example, the writing may be performed before step S404.
  • the first usage flag written by each controller to the respective loaded resource pool is used to identify whether the controller loads the resource pool of the controller.
  • step S404 the controller determines whether the other controller loads the first resource pool according to the first usage flag stored in the resource pool loaded by the counterpart controller, and the controller has two determination results. In an alternative embodiment, If the controller determines that the first resource pool is not loaded by the controller, the controller writes a second usage flag for instructing the controller to load the first resource pool in the first resource pool, and loads the first resource pool. . Of course, the controller can also notify other controllers or devices to load the first resource pool.
  • the controller determines, according to the first usage flag stored in the first resource pool, that the second resource identifier is written in the first resource pool after the other controller does not load the first resource pool, and simultaneously Load the first resource pool.
  • the second usage flag indicates that the resource pool has been loaded, and the other controller can be prevented from loading the first resource pool again.
  • the controller after the controller writes a second usage flag for instructing the controller to load the first resource pool in the first resource pool, further determining whether the other controller can be Load the first resource pool. For example, the controller may determine, according to the first usage flag in the first resource pool, whether the other controller is loaded with the first resource pool. If the determination result is yes, the controller does not load the first resource pool, and clears the first Two use the logo.
  • the first resource pool is loaded or not loaded, and the false detection of the brain splitting state can be avoided to some extent, and the reliability of the detection is increased.
  • the first usage flag includes identifier information for indicating whether the controller loads the resource pool, and the controller determines, according to the value of the identifier information, whether the counterpart controller loads the first resource pool.
  • the identifier information used to indicate whether the controller loads the resource pool is a Boolean value.
  • the identifier information stored in the first resource pool is 1, it indicates that the other controller loads the first resource. Pool.
  • the identifier information stored in the first resource pool is 0, it indicates that the first resource pool is not loaded by the counterpart controller.
  • the first usage flag includes identifier information for indicating whether the controller loads the resource pool and a time stamp for writing the identifier information, and the controller determines whether the timestamp changes within a predetermined duration, if the occurrence occurs. If the change is made, it is determined that the other controller loads the first resource pool; otherwise, it is determined that the other controller does not load the first resource pool.
  • the first usage flag includes identifier information for indicating whether the controller loads the resource pool and a time stamp for writing the identifier information, and the controller determines, according to the value of the identifier information, whether the counterpart controller is loaded.
  • the first resource pool if the controller determines, according to the value of the identifier information, the other controller loads the first resource
  • the source pool the controller further determines whether the timestamp changes within a predetermined duration, and if the change occurs, determining that the other controller loads the first resource pool; otherwise, determining that the other controller does not load the first resource pool.
  • the controller determines, according to the value of the identifier information, that the other controller does not load the first resource pool, the controller further determines whether the timestamp changes within a predetermined duration, and if a change occurs, determines that the counterpart controller loads the The first resource pool; otherwise, it is determined that the first resource pool is not loaded by the counterpart controller.
  • the above determination method is a method of judging the first usage flag, and the above several methods may also be used when determining the second usage flag.
  • each controller periodically writing the first usage flag to the respective loaded resource pool includes: each controller corresponding to the respective loaded resource pool The logical area is written into the first usage flag, wherein the resource pool is logically divided into n areas, each area corresponding to one controller, and the first usage flag written in each area indicates the controller pair corresponding to the area The loading of the resource pool.
  • each controller writes a first usage flag to a corresponding logical region in a respective loaded resource pool, and n regions are logically divided on the resource pool, the n regions inherit the characteristics of the resource pool, so that The n controllers can determine whether the current state has a brain split by judging the first use flag in the n regions, and avoiding data corruption caused by multiple controllers simultaneously loading a certain region.
  • modules or units in the device may be code stored in the controller and executable by the processor, or may be implemented in other manners, and will not be exemplified herein.
  • FIG. 5 is a structural block diagram of a resource processing apparatus of a multi-controller system according to an embodiment of the present invention.
  • the device includes:
  • the sensing module 52 is configured to sense whether the other controller exists
  • the determining module 54 is configured to determine, according to the first usage flag stored in the first resource pool that is previously loaded by the counterpart controller, whether the controller is loaded by the sensing module 52, if the sensing module 52 is unable to sense the existence of the counterpart controller.
  • a resource pool is configured to determine, according to the first usage flag stored in the first resource pool that is previously loaded by the counterpart controller, whether the controller is loaded by the sensing module 52, if the sensing module 52 is unable to sense the existence of the counterpart controller.
  • the above modules it is possible to determine whether the other party is still loading the resource pool by reading the usage flag in the resource pool.
  • the usage flag is stored in the resource pool, so that no additional nodes and arbitration disks need to be added, thereby solving the problem that the brain crack detection mechanism in the multi-controller system has high cost and possible failure, saving cost and increasing detection. Reliability.
  • each controller may periodically write a first usage flag to a respective loaded resource pool at a certain timing.
  • the device may further include: a first writing module, configured to The resource pool loaded by the controller is periodically written to the first usage flag, wherein the first usage flag is used to identify whether the controller loads the resource pool of the controller.
  • the result of the judgment by the judgment module 54 includes two types.
  • the apparatus further includes:
  • the second writing module is configured to, in the case that the determining module 54 determines that the other controller does not load the first resource pool, to write a second in the first resource pool for instructing the controller to load the first resource pool. Use the flag and load the first resource pool.
  • the device can also take the form of notifying other controllers or devices to load the first resource pool.
  • the determining module 54 determines, according to the first usage flag stored in the first resource pool, that the second write module is written in the first resource pool after the other controller is not loaded with the first resource pool.
  • the second use flag simultaneously loads the first resource pool.
  • the second usage flag indicates that the resource pool has been loaded, and the other controller can be prevented from loading the first resource pool again.
  • the second write module is further configured to determine, according to the first use flag in the first resource pool, whether the other controller loads the first resource pool, and if the determination result is yes, The first resource pool is not loaded and the second usage flag is cleared.
  • the second write module loads or does not load the first resource pool, which can avoid false detection of the brain split state to a certain extent, and increases the reliability of the detection.
  • the determining module 54 includes a first determining unit, where the first determining unit includes the identifier information for indicating whether the controller loads the resource pool, the first determining unit is configured to be configured according to the identifier information. The value determines whether the other controller loads the first resource pool.
  • the first determining unit is configured to indicate whether the controller loads the identification information of the resource pool as a Boolean value, and the first determining unit reads that the identifier information stored in the first resource pool is 1, Indicates that the other controller is loaded with the first resource pool. When the identifier information stored in the resource pool of the first controller is 0, the first controller does not load the first resource pool.
  • the detection of brain splitting is made easier by using the first determination unit described above.
  • the determining module 54 includes a second determining unit, where the first usage flag includes the identifier information set to indicate whether the controller loads the resource pool and the time stamp in which the identifier information is written,
  • the determining unit is configured to determine whether the timestamp changes within a predetermined duration, and if a change occurs, determine that the counterpart controller loads the first resource pool; otherwise, determine that the other controller does not load the first resource pool.
  • the determining module 54 includes a first determining unit and a second determining unit, where the first usage flag includes identifier information for indicating whether the controller loads the resource pool and a time stamp for writing the identifier information.
  • the first determining unit is configured to determine, according to the value of the identifier information, whether the other controller loads the first resource pool, and if the first determining unit determines, according to the value of the identifier information, the other controller loads the first resource.
  • the pool, then the second determining unit further determines whether the timestamp changes within a predetermined duration, and if a change occurs, determines that the counterpart controller loads the first resource pool; otherwise, determines that the other controller does not load the first resource pool.
  • the second determining unit determines whether the timestamp changes within a predetermined duration, and if the change occurs, determines the other party. The controller loads the first resource pool; otherwise, it determines that the first resource pool is not loaded by the counterpart controller.
  • the double judgment of the identification information and the second judging unit on the time stamp by the first judging unit saves the detection cost of whether or not the brain split occurs in the multi-controller system, and further increases the reliability of the detection.
  • the above determination method is a method of judging the first usage flag, and the above several methods may also be used when determining the second usage flag.
  • the first write module includes: a logic module, configured to write each controller to the corresponding logical region in the respective loaded resource pool The flag is used, wherein the resource pool is logically divided into n regions, each region corresponding to one controller, and the first usage flag written in each region indicates the loading condition of the controller corresponding to the region to the resource pool.
  • each controller uses the logic module to determine whether the current state has a brain split by judging the first use flag in the n regions, and avoiding data corruption caused by multiple controllers simultaneously loading a certain region.
  • a controller is a node, and the following uses node instead of the controller for explanation. Because the minimum unit of controller competition in a multi-controller system is the storage pool vd, the following uses vd instead of the resource pool for description.
  • 6 is a schematic diagram of normal operation of a resource processing method of a dual controller system according to an alternative embodiment of the present invention. As shown in FIG. 6, two controllers in a dual controller are node1 and node2, respectively, and storage is run on node1. Run the storage pool vd2 on the pool vd1 and node2.
  • 7a and 7b are schematic diagrams showing the raid of the marked area of the storage pool of the resource processing method of the dual controller system according to an alternative embodiment of the present invention. As shown in FIGS.
  • both vd1 and vd2 are storage pools of raid5.
  • Each storage pool is logically divided into two areas: use(me) and use(peer) to determine whether a brain split is currently occurring to prevent the storage pool from being double-ended, because the two areas are logically divided on the storage pool. , so it is born with raid features.
  • node1 is used as the first perspective to illustrate that when the brain split occurs, the nodes node1 and node2 compete for the resources of the storage pool vd2.
  • the use(me) is 1 for node1 to load the storage pool vd2, that is, node1 is alive, use(peer)
  • a value of 1 indicates that node2 loads the storage pool vd2, which means that node2 is alive.
  • FIG. 8 is a schematic diagram of a brain splitting state of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • node1 and node2 are powered on.
  • Node1 cannot sense the existence of node2.
  • Nodes node1 and node2 periodically write the use flag 1 to the use(me) area of the storage pool running on it, and write the timestamp using flag 1 to ensure the next write. Before the flag 1, the storage pool running on the node is not loaded by the other node, the node is alive, and the time interval between the two writes using the flag 1 is called keep-alive time.
  • FIG. 9a and FIG. 9b are schematic diagrams showing a storage pool marking area when the brain processing state of the resource processing method of the dual controller system according to an alternative embodiment of the present invention is shown in FIG. 9a and FIG. 9b, with node1 as a first perspective.
  • the use(me) and use(peer) values corresponding to the storage pool vd1 are: (1, 0), indicating that node1 is loading the storage pool vd1; the use(me) and use(peer) values corresponding to vd2 are respectively It is: (0,1), indicating that node2 is loading storage pool vd2; at this time, node1 will take over the storage pool running on node2, that is, node1 will take over storage pool vd2.
  • FIG. 10 is a flowchart 1 of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • node1 when node1 loads the storage pool vd2, it first reads the use of vd2 ( Peer) flag, found value is 1, the flag is 1 indicates that node2 may have been powered down or may have loaded vd2, this time will be delayed for a period of time (time should be greater than the keep alive time), then read the use (peer) mark, If the usage (peer) is 1, and the protection timestamp is changed, it indicates that the storage pool vd2 is loaded on the node node2. If the brain split occurs, the node node1 does not need to load vd2, which prevents the storage pool vd2 from being double-ended and causes storage. The pool data is incorrect.
  • Case 1 If node1 is powered on, storage pool vd1 is successfully loaded by node1, node2 is not powered, node1 does not feel the existence of node2, node1 needs to take over storage pool vd2 running on node2, node2 is powered on, and node2 needs to be powered. Load the storage pool vd2 running on node2, and the brain split occurs.
  • Case 2 Dual control two nodes are powered on or powered on at the same time. If node1 is powered on, storage pool vd1 is successfully loaded by node1, node2 is not powered, node1 does not feel the existence of node2, and node1 needs to run on node2. The storage pool vd2 takes over. At this time, node2 is powered on, and node2 needs to load the storage pool vd2 running on node2. When the brain split occurs or node1 and node2 are powered on at the same time, brain splitting occurs.
  • FIG. 11 is a second flowchart of a resource processing method of a dual controller system according to an alternative embodiment of the present invention.
  • the specific implementation is as follows: when the node node1 loads the storage pool vd2, first reads the use (peer) flag and finds 0, indicating that node2 is not alive, writes use(me) to 1, and checks whether the use(me) is successfully written.
  • peer Also read use (peer), if use (peer) is 1, it means that the brain split occurs, node2 needs to load this storage pool vd2, node node1 clears the use (me) mark, does not load this storage pool vd2. If the use(me) and use(peer) combination of vd2 is (0,1), (0,1) indicates that the storage pool is running on the node node2, and the node2 is abnormally powered off without clearing the use(peer) flag. When the node node1 When the storage pool vd2 is loaded, the use of the use (peer) flag is first detected, and the use of the peer (peer) is delayed.
  • node2 If the protection timestamp is not changed and the use(peer) is 1, the node2 is not Survival, write use(me) to 1, check if use(me) is written successfully, and read use(peer). If use(peer) is 1, and the keepalive timestamp changes, it means that the brain split occurs. Node2 needs to load this storage pool vd2, node node1 clears the use(me) flag, and does not load this storage pool vd2.
  • an optional implementation device diagram is also provided. Taking a dual controller system as an example, the optional device includes: a reading module, a determining module, a writing module, and a loading module.
  • the reading module includes a first reading unit and a second reading unit, the first reading unit is configured to read a use (me) value, and the second reading unit is configured to read a use (peer) value. ;
  • Write module including write unit, set to write use(me) value
  • the judging module including the judging unit, is configured to determine whether a brain split has occurred according to the read use(me) and use(peer) values.
  • the judging module and the reading module may exist as one module.
  • the loading module including the loading unit, determines whether to load the resource according to the result of the determining unit.
  • the load module and the write module can exist as one module.
  • FIG. 12 is a block diagram of a block diagram of a resource processing apparatus of a dual controller system according to an alternative embodiment of the present invention.
  • FIG. 12 is a block diagram of a module for performing brain split detection. As shown in FIG. 12, in a specific implementation process, the The second reading unit reads the indication flag (use) indicating whether the node 2 loads vd2, and the determination unit in the determination module determines that the use(peer) value read by the second reading unit is 1, and the node 2 is not loaded with vd2.
  • the write unit in the write module writes use(me) in vd2 to 1, and the first read unit in the read module reads whether use(me) is successfully written, and the second read unit reads If the value of use(peer) has not changed and the timestamp has not changed, the judging unit in the judging module judges that node2 does not load vd2, and the load unit in the loading module loads vd2.
  • the controller in the multi-controller system cannot sense the existence of the counterpart controller; the controller is configured according to the first usage flag stored in the first resource pool previously loaded by the counterpart controller. Determining whether the peer controller loads the first resource pool, wherein the first usage flag is used to identify whether the counterpart controller loads the first resource pool.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Hardware Redundancy (AREA)

Abstract

本发明提供了一种多控制器系统的资源处理方法及装置,该方法包括:多控制器系统中的控制器无法感知对方控制器存在;控制器根据对方控制器之前加载的第一资源池中存储的第一使用标志来判断对方控制器是否加载第一资源池。通过本发明解决了多控制器系统中脑裂检测机制成本高、存在可能失效的问题,在无需增加任何第三方设备也不增加专门仲裁盘的情况下,对多控制器系统中是否发生脑裂状态进行检测,节省了成本,增加了检测的可靠性和稳定性。

Description

多控制器系统的资源处理方法及装置 技术领域
本发明涉及通信领域,具体而言,涉及一种多控制器系统的资源处理方法及装置。
背景技术
共享后端存储的多控制器系统,包含多个控制器。正常的情况下控制器之间通过一种检测机制(例如,心跳信号)来判断对方状态,当某个或某些控制器关机或离开,另外的控制器会接管其上运行的存储池资源,以保证系统正常运行。如果控制器之间通信中断或者异常,控制器就会无法感知对端存在而发生脑裂。下面以双控制器系统为例进行说明,图1是根据相关技术中双控制器系统中出现脑裂情况的示意图,如图1所示,双控制器都认为对端已正常关机或离开,进而触发双控制器对同一个后端存储对象(如存储池资源)的接管。一般存储对象的使用需要互斥,而在脑裂场景下,存储对象就有可能因为被双控制器同时接管使用而遭到破坏。
在目前的多控制器系统中,通常是通过增加第三方节点或者仲裁盘的方法来辅助判断脑裂是否发生,避免双控制器同时争抢存储池资源。
图2是根据相关技术中通过第三方节点判断双控制器系统中是否出现脑裂情况的示意图,如图2所示,当双控制器间通信中断时,双控制器可以通过询问第三方节点,由第三方节点告诉其对端节点是否异常。但是增加第三方节点的做法并不能绝对保证判断准确,比如第三方节点和设备之间通道出现异常同样可能出现误判,且增加第三方节点的成本较大。
图3是根据相关技术中通过仲裁盘判断双控制器系统中是否出现脑裂情况的示意图,但是通过仲裁盘的方式一是浪费硬盘,二是硬盘没有冗余备份,当仲裁盘故障时,检测机制就会失效。
针对多控制器系统中脑裂检测机制成本高、存在可能失效的问题,目前尚未提出有效的解决方案。
发明内容
本发明提供了一种多控制器系统的资源处理方法及装置,以解决多控制器系统中脑裂检测机制成本高、存在可能失效的问题。
根据本发明的一个实施例,提供了一种多控制器系统的资源处理方法,包括:所述多控制器系统中的控制器无法感知对方控制器存在;所述控制器根据所述对方控制器之前加载的第一资源池中存储的第一使用标志来判断所述对方控制器是否加载所述第一资源池,其中,所述第一使用标志用于标识所述对方控制器是否加载所述第一资源池。
优选地,在所述控制器根据所述第一使用标志来判断所述对方控制器是否加载所述第一资源池之前,所述方法还包括:所述多控制器系统中的每个控制器向各自加载的资源池定时写入第一使用标志,其中,所述第一使用标志用于标识该控制器是否加载该控制器的资源池。
优选地,在所述控制器根据所述第一使用标志判断出所述对方控制器未加载所述第一资源池的情况下,所述方法还包括:所述控制器在所述第一资源池中写入用于指示所述控制器加载所述第一资源池的第二使用标志,并加载所述第一资源池。
优选地,在所述控制器在所述第一资源池中写入用于指示所述控制器加载所述第一资源池的第二使用标志之后,所述方法还包括:所述控制器根据所述第一资源池中的所述第一使用标志判断所述对方控制器是否加载所述第一资源池,在判断结果为是的情况下,所述控制器不加载所述第一资源池,并清除所述第二使用标志。
优选地,所述控制器根据所述第一资源池中存储的第一使用标志判断所述对方控制器是否加载所述第一资源池包括:在所述第一使用标志包括:用于指示控制器是否加载资源池的标识信息情况下,所述控制器根据所述标识信息的值确定所述对方控制器是否加载所述第一资源池;和/或,在所述第一使用标志包括:用于指示控制器是否加载资源池的标识信息和写入所述标识信息的时间戳的情况下,所述控制器判断在预定时长内所述时间戳是否发生变化,如果发生变化,则确定所述对方控制器加载所述第一资源池;否则,确定所述对方控制器未加载所述第一资源池。
优选地,所述每个控制器向各自加载的资源池定时写入所述第一使用标志包括:所述每个控制器向各自加载的资源池中对应的逻辑区域写入所述第一使用标志,其中,所述资源池在逻辑上均划分为n个区域,每个区域对应一个控制器,每个区域写入的第一使用标志表示该区域对应的控制器对所述资源池的加载情况。
根据本发明的另一个实施例,还提供了一种多控制器系统的资源处理装置,位于控制器中,所述装置包括:感知模块,设置为感知对方控制器是否存在;判断模块,设置为在所述感知模块无法感知所述对方控制器存在的情况下,根据所述对方控制器 之前加载的第一资源池中存储的第一使用标志来判断所述对方控制器是否加载所述第一资源池。
优选地,所述装置还包括:第一写入模块,设置为向所述控制器加载的资源池定时写入第一使用标志,其中,所述第一使用标志用于标识该控制器是否加载该控制器的资源池。
优选地,所述装置还包括:第二写入模块,设置为在所述判断模块判断出所述对方控制器未加载所述第一资源池的情况下,在所述第一资源池中写入用于指示所述控制器加载所述第一资源池的第二使用标志,并加载所述第一资源池。
优选地,所述第二写入模块,还设置为在写入所述第二使用标志之后,根据所述第一资源池中的所述第一使用标志判断所述对方控制器是否加载所述第一资源池,在判断结果为是的情况下,不加载所述第一资源池,并清除所述第二使用标志。
优选地,所述判断模块包括:第一判断单元,设置为在所述第一使用标志包括:用于指示控制器是否加载资源池的标识信息情况下,根据所述标识信息的值确定所述对方控制器是否加载所述第一资源池;和/或,第二判断单元,在所述第一使用标志包括:设置为指示控制器是否加载资源池的标识信息和写入所述标识信息的时间戳的情况下,设置为判断在预定时长内所述时间戳是否发生变化,如果发生变化,则确定所述对方控制器加载所述第一资源池;否则,确定所述对方控制器未加载所述第一资源池。
优选地,第一写入模块包括:逻辑模块,设置为向所述控制器加载的资源池中对应的逻辑区域写入所述第一使用标志,其中,所述资源池在逻辑上均划分为n个区域,每个区域对应一个控制器,每个区域写入的第一使用标志表示该区域对应的控制器对所述资源池的加载情况。
通过本发明,采用多控制器系统中的控制器无法感知对方控制器存在;该控制器根据所述对方控制器之前加载的第一资源池中存储的第一使用标志来判断所述对方控制器是否加载所述第一资源池,其中,所述第一使用标志用于标识所述对方控制器是否加载所述第一资源池。解决了多控制器系统中脑裂检测机制成本高、存在可能失效的问题,在无需增加任何第三方设备也不增加专门仲裁盘的情况下,对多控制器系统中是否发生脑裂状态进行检测,节省了成本,增加了检测的可靠性和稳定性。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据相关技术中双控制器系统中出现脑裂情况的示意图;
图2是根据相关技术中通过第三方节点判断双控制器系统中是否出现脑裂情况的示意图;
图3是根据相关技术中通过仲裁盘判断双控制器系统中是否出现脑裂情况的示意图;
图4是根据本发明实施例的多控制器系统的资源处理方法的流程图;
图5是根据本发明实施例的多控制器系统的资源处理装置的结构框图;
图6是根据本发明可选实施例的双控制器系统的资源处理方法的正常运行示意图;
图7a是根据本发明可选实施例的双控制器系统的资源处理方法的存储池的标记区域的raid示意图;
图7b是根据本发明可选实施例的双控制器系统的资源处理方法的存储池的标记区域的raid的又一示意图;
图8是根据本发明可选实施例的双控制器系统的资源处理方法的脑裂状态的示意图;
图9a是根据本发明可选实施例的双控制器系统的资源处理方法的脑裂状态时,存储池标记区域示意图;
图9b是根据本发明可选实施例的双控制器系统的资源处理方法的脑裂状态时,存储池标记区域的又一示意图;
图10是根据本发明可选实施例的双控制器系统的资源处理方法的流程图一;
图11是根据本发明可选实施例的双控制器系统的资源处理方法的流程图二;
图12是根据本发明可选实施例的双控制器系统的资源处理装置的结构框图进行脑裂检测的模块使用流程图。
具体实施方式
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本发明。
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
以下实施例中的多控制器系统中含有两个或两个以上的控制器,对方控制器可以表示除该控制器自身外所有多控制器系统中的其他控制器中的部分或全部,例如,对方控制器可以是一个控制器,也可以是多个控制器。
本实施例提供了一种多控制器系统的资源处理方法,图4是根据本发明实施例的多控制器系统的资源处理方法的流程图,如图4所示,该流程包括如下步骤:
步骤S402:多控制器系统中的控制器无法感知对方控制器存在;
步骤S404:该控制器根据对方控制器之前加载的资源池中存储的第一使用标志,判断对方控制器是否加载该第一资源池,其中,第一使用标志用于标识对方控制器是否加载第一资源池。该步骤中的“之前”是指在控制器无法感知对方控制器之前,对方控制器加载的资源池,为了描述方便,在本实施例中均使用第一资源池来进行描述,其中的“第一”仅仅是一种标记,并不是对资源池的限定。
通过上述各个步骤,可以通过读取资源池中的使用标志来确定对方是否仍然在加载资源池。该使用标志保存在资源池中,这样就不需要增加额外的节点和仲裁盘,从而解决了多控制器系统中脑裂检测机制成本高、存在可能失效的问题,节省了成本,增加了检测的可靠性。
在一个可选的实施例中,每个控制器均可以在某个时机向各自加载的资源池定时写入第一使用标志,例如,可以在步骤S404之前进行写入。各个控制器写入各自加载的资源池的第一使用标志是用来标识该控制器是否加载该控制器的资源池的。
在步骤S404中,控制器根据对方控制器加载的资源池中存储的第一使用标志判断对方控制器是否加载第一资源池,控制器的判断结果有两种。在一个可选的实施例中, 如果控制器判断出对方控制器未加载第一资源池,控制器就在该第一资源池中写入用于指示控制器加载该第一资源池的第二使用标志,并加载第一资源池。当然,该控制器也可以通知其他控制器或设备来加载第一资源池。
在上述可选的实施例中,控制器根据第一资源池中存储的第一使用标志判断出对方控制器未加载第一资源池后,在第一资源池中写入第二使用标志,同时对第一资源池进行加载。通过该第二使用标志可以表明该资源池已经被加载,可以防止其他控制器再次加载该第一资源池。
在一个可选的实施例中,在控制器在该第一资源池中写入用于指示控制器加载该第一资源池的第二使用标志之后,还可以进行进一步地判断对方控制器是否可以加载第一资源池了。例如,控制器可以根据第一资源池中的第一使用标志判断对方控制器是否加载了第一资源池,在判断结果为是的情况下,控制器不加载该第一资源池,并清除第二使用标志。
通过再次进行判断后,对第一资源池进行加载或者不加载的方式,可以在一定程度上避免脑裂状态的误检,增加了检测的可靠性。
对于控制器是如何根据第一资源池中存储的第一使用标志对对方控制器是否加载该第一资源池进行判断,有多种实现方式。下面以三种可选的实施方式进行说明:
在可选实施方式一中,第一使用标志包括用于指示控制器是否加载资源池的标识信息,控制器根据该标识信息的值确定对方控制器是否加载该第一资源池。
例如,在一个双控制器系统中,用于指示控制器是否加载资源池的标识信息为布尔值,当第一资源池存储的该标识信息为1时,表示对方控制器加载了该第一资源池。当第一资源池存储的该标识信息为0时,表示对方控制器未加载该第一资源池。
通过采用上述方法,使脑裂的检测更加容易。
在可选实施方式二中,第一使用标志包括用于指示控制器是否加载资源池的标识信息和写入该标识信息的时间戳,控制器判断在预定时长内时间戳是否发生变化,如果发生变化,则确定对方控制器加载该第一资源池;否则,确定对方控制器未加载该第一资源池。
在可选实施方式三中,第一使用标志包括用于指示控制器是否加载资源池的标识信息和写入该标识信息的时间戳,控制器根据该标识信息的值,确定对方控制器是否加载该第一资源池,如果控制器根据该标识信息的值,确定对方控制器加载该第一资 源池,控制器进一步判断在预定时长内,时间戳是否发生变化,如果发生变化,则确定对方控制器加载该第一资源池;否则,确定对方控制器未加载该第一资源池。或者,如果控制器根据该标识信息的值,确定对方控制器未加载该第一资源池,控制器进一步判断在预定时长内,时间戳是否发生变化,如果发生变化,则确定对方控制器加载该第一资源池;否则,确定对方控制器未加载该第一资源池。
通过采取上述方法,通过对标识信息和时间戳的双重判断,节省了多控制器系统中对是否发生脑裂的检测成本,进一步增加了检测的可靠性。
上述判断方式是对第一使用标志进行判断的方式,上述几种方式也可以在判断第二使用标志时使用。
对于第一使用标志的写入方式,在一个可选的实施例中,每个控制器向各自加载的资源池定时写入第一使用标志包括:每个控制器向各自加载的资源池中对应的逻辑区域写入第一使用标志,其中,资源池在逻辑上均划分为n个区域,每个区域对应一个控制器,每个区域写入的第一使用标志表示该区域对应的控制器对资源池的加载情况。
通过采取每个控制器向各自加载的资源池中对应的逻辑区域写入第一使用标志的方法,且n个区域是在资源池上逻辑划分的,这n个区域继承了资源池的特性,使得n个控制器通过对n个区域中第一使用标志的判断,可以得出当前状态是否发生脑裂,避免了多个控制器同时对某一区域进行加载而造成数据破坏。
在实施例中还提供了一种装置,该装置与上述实施例中的方法相对应,已经进行过说明的在此不再赘述。该装置中的模块或单元可以是存储在控制器中并可以被处理器运行的代码,也可以用其他方式实现,在此不再一一举例。
根据本发明的一个实施例,还提供了一种多控制器系统的资源处理装置,图5是根据本发明实施例的多控制器系统的资源处理装置的结构框图,如图5所示,该装置包括:
感知模块52,设置为感知对方控制器是否存在;
判断模块54,设置为在感知模块52无法感知该对方控制器存在的情况下,根据该对方控制器之前加载的第一资源池中存储的第一使用标志来判断该对方控制器是否加载该第一资源池。
通过上述各个模块,可以通过读取资源池中的使用标志来确定对方是否仍然在加载资源池。该使用标志保存在资源池中,这样就不需要增加额外的节点和仲裁盘,从而解决了多控制器系统中脑裂检测机制成本高、存在可能失效中的问题,节省了成本,增加了检测的可靠性。
在一个可选的实施例中,每个控制器均可以在某个时机向各自加载的资源池定时写入第一使用标志,例如,该装置还可以包括:第一写入模块,设置为向控制器加载的资源池定时写入第一使用标志,其中,第一使用标志用于标识该控制器是否加载该控制器的资源池。
判断模块54进行判断后的结果包括两种。在一个可选的实施例中,该装置还包括:
第二写入模块,在判断模块54判断出对方控制器未加载该第一资源池的情况下,设置为在第一资源池中写入用于指示该控制器加载第一资源池的第二使用标志,并加载第一资源池。当然,该装置也可以采取通知其他控制器或设备来加载第一资源池的方式。
在上述可选的实施例中,判断模块54根据第一资源池中存储的第一使用标志判断出对方控制器未加载第一资源池后,第二写入模块在第一资源池中写入第二使用标志,同时对第一资源池进行加载。通过该第二使用标志可以表明该资源池已经被加载,可以防止其他控制器再次加载该第一资源池。
在一个可选的实施例中,还可以进行进一步地判断:
第二写入模块,在写入第二使用标志之后,还设置为根据第一资源池中的第一使用标志判断对方控制器是否加载该第一资源池,在判断结果为是的情况下,不加载该第一资源池,并清除第二使用标志。
通过再次进行判断后,第二写入模块对第一资源池进行加载或者不加载的方式,可以在一定程度上避免脑裂状态的误检,增加了检测的可靠性。
对于判断模块54是如何根据第一资源池中存储的第一使用标志对对方控制器是否加载该第一资源池进行判断,有多种实现方式。下面我们对其中三种可选的实施方式进行说明:
在可选实施方式一中,判断模块54包括第一判断单元,在第一使用标志包括用于指示控制器是否加载资源池的标识信息的情况下,第一判断单元,设置为根据该标识信息的值确定对方控制器是否加载该第一资源池。
例如,在一个双控制器系统中,第一判断单元设置为指示控制器是否加载资源池的标识信息为布尔值,第一判断单元读取到第一资源池存储的该标识信息为1时,表示对方控制器加载了该第一资源池。第一判断单元读取到方控制器的资源池存储的该标识信息为0时,表示对方控制器未加载该第一资源池。
通过利用上述第一判断单元,使脑裂的检测更加容易。
在可选实施方式二中,判断模块54包括第二判断单元,在第一使用标志包括设置为指示控制器是否加载资源池的标识信息和写入该标识信息的时间戳的情况下,第二判断单元,设置为判断在预定时长内时间戳是否发生变化,如果发生变化,则确定对方控制器加载该第一资源池;否则,确定对方控制器未加载该第一资源池。
在可选实施方式三中,判断模块54包括第一判断单元和第二判断单元,在第一使用标志包括用于指示控制器是否加载资源池的标识信息和写入该标识信息的时间戳的情况下,第一判断单元,设置为根据该标识信息的值,确定对方控制器是否加载该第一资源池,如果第一判断单元根据该标识信息的值,确定对方控制器加载该第一资源池,那么第二判断单元进一步判断在预定时长内,时间戳是否发生变化,如果发生变化,则确定对方控制器加载该第一资源池;否则,确定对方控制器未加载该第一资源池。或者,如果第一判断单元根据该标识信息的值,确定对方控制器未加载该第一资源池,第二判断单元进一步判断在预定时长内,时间戳是否发生变化,如果发生变化,则确定对方控制器加载该第一资源池;否则,确定对方控制器未加载该第一资源池。
通过第一判断单元对标识信息和第二判断单元对时间戳的双重判断,节省了多控制器系统中对是否发生脑裂的检测成本,进一步增加了检测的可靠性。
上述判断方式是对第一使用标志进行判断的方式,上述几种方式也可以在判断第二使用标志时使用。
对于第一使用标志的写入方式,在一个可选的实施例中,第一写入模块包括:逻辑模块,设置为每个控制器向各自加载的资源池中对应的逻辑区域写入第一使用标志,其中,资源池在逻辑上均划分为n个区域,每个区域对应一个控制器,每个区域写入的第一使用标志表示该区域对应的控制器对资源池的加载情况。
利用逻辑模块,每个控制器向各自加载的资源池中对应的逻辑区域写入第一使用标志,且n个区域是在资源池上逻辑划分的,这n个区域继承了资源池的特性,使得n个控制器通过对n个区域中第一使用标志的判断,可以得出当前状态是否发生脑裂,避免了多个控制器同时对某一区域进行加载而造成数据破坏。
下面以双控制器系统为例,结合一个可选的实施例进行举例说明。
一个控制器即一个节点(node),以下均使用node来代替控制器进行说明。因为多控制器系统中控制器争夺的最小单位为存储池vd,以下均使用vd来代替资源池进行说明。图6是根据本发明可选实施例的双控制器系统的资源处理方法的正常运行示意图,如图6所示,双控制器中的两个控制器分别为node1,node2,其中node1上运行存储池vd1,node2上运行存储池vd2。图7a和图7b示出了本发明可选实施例的双控制器系统的资源处理方法的存储池的标记区域的raid示意图,如图7a和7b所示,vd1与vd2都是raid5的存储池,每个存储池上逻辑划分了2个区域:use(me)与use(peer),来判断当前是否发生脑裂,以防止存储池双端加载,由于这2个区域是在存储池上逻辑划分的,所以其天生就具有了raid特性。
下面以node1为第一视角来说明脑裂发生时,节点node1、node2对存储池vd2的资源进行争抢,其中use(me)为1表示node1加载存储池vd2,即node1存活,use(peer)为1表示node2加载存储池vd2,即表示node2存活。
在可选实施例一中,图8是根据本发明可选实施例的双控制器系统的资源处理方法的脑裂状态的示意图,如图8所示,此时node1、node2都已上电,node1无法感知node2的存在,节点node1、node2都对运行在其上的存储池的use(me)区域定时置写入使用标志1,且写入使用标志1的时间戳,保证在下一次写入使用标志1之前,运行在该节点上的存储池没有被对方节点加载,该节点是存活的,两次写入使用标志1的时间间隔称为保活时间。
图9a和图9b示出了本发明可选实施例的双控制器系统的资源处理方法的脑裂状态时,存储池标记区域示意图,如图9a和9b所示,以node1为第一视角来看,这时存储池vd1对应的use(me)、use(peer)值分别为:(1,0),表示node1正在加载存储池vd1;vd2对应的use(me)、use(peer)值分别为:(0,1),表示node2正在加载存储池vd2;这个时候node1会接管运行于node2上的存储池,即node1会去接管存储池vd2。
具体来说,图10是根据本发明可选实施例的双控制器系统的资源处理方法的流程图一,如图10所示,当node1在加载存储池vd2的时候首先读取vd2的use(peer)标志,发现值为1,标志为1表示node2可能已掉电也可能已加载vd2,这时候会延迟一段时间(时间应大于保活时间)后,再去读取use(peer)标记,发现use(peer)为1,且保护时间戳在变化,则表示存储池vd2已在节点node2加载,脑裂发生,则节点node1无需加载vd2,成功防止了存储池vd2被双端加载,导致存储池数据错误。
在可选实施例二中,有如下两种情况,这两种情况处理方式相似。情况一:假如node1已上电,存储池vd1被node1成功加载,node2未上电,node1感觉不到node2的存在,node1需对运行在node2上的存储池vd2进行接管,node2上电,node2需加载运行于node2的存储池vd2,脑裂发生。
情况二:双控两个节点相继上电或同时上电,如node1已上电,存储池vd1被node1成功加载,node2未上电,node1感觉不到node2的存在,node1需对运行在node2上的存储池vd2进行接管,这时候node2上电,node2需加载运行于node2的存储池vd2,脑裂发生或node1与node2同时上电时,脑裂发生。
图11是根据本发明可选实施例的双控制器系统的资源处理方法的流程图二,如图11所示,对于vd2的use(me)、use(peer)标记可能存在两种组合(0,1)或者(0,0),首先考虑(0,0)这种组合,(0,0)表示存储池运行在node2上,且node2正常下电,其use(peer)标记已经清零。具体实施为:当节点node1加载存储池vd2时,先读取use(peer)标记发现为0,则表示node2未存活,写入use(me)为1,检验use(me)是否写入成功,同时读use(peer),如果use(peer)为1,则表示脑裂发生,node2需要加载此存储池vd2,则节点node1清除use(me)标记,不加载此存储池vd2。如果vd2的use(me),use(peer)的组合为(0,1),(0,1)表示存储池运行在节点node2上,node2异常掉电没有清除use(peer)标记,当节点node1加载存储池vd2时,先读取use(peer)标记发现为1,则延迟一段时间再读取use(peer),如果发现保护时间戳未变化,且use(peer)还是1,则表示node2未存活,写入use(me)为1,检验use(me)是否写入成功,同时读use(peer),如果use(peer)为1,且保活时间戳有变化,则表示脑裂发生,node2需要加载此存储池vd2,则节点node1清除use(me)标记,不加载此存储池vd2。
在本实施例中,通过对use(peer)的多次读取,可以实现对是否发生脑裂状态的准确判断,节省了脑裂状态检测成本,增加了检测的可靠性。
在可选实施例中,还提供了一种可选实施装置图,以双控制器系统为例,该可选装置图中包括:读取模块、判断模块、写入模块和加载模块。
其中,读取模块,包括第一读取单元和第二读取单元,第一读取单元,设置为读取use(me)值;第二读取单元,设置为读取use(peer)值;
写入模块,包括写入单元,设置为写入use(me)值;
判断模块,包括判断单元,设置为根据读取的use(me),use(peer)值,判断当前是否发生脑裂。其中,判断模块和读取模块可以作为一个模块存在。
加载模块,包括加载单元,根据判断单元的结果确定是否加载此资源。其中,加载模块和写入模块可以作为一个模块存在。
图12是根据本发明可选实施例的双控制器系统的资源处理装置的结构框图进行脑裂检测的模块使用流程图,如图12所示,在具体实施过程中,读取模块中的第二读取单元读取指示node2是否加载vd2的指示标志use(peer),判断模块中的判断单元根据第二读取单元读取到的use(peer)值为1,判读node2未加载vd2。接着,写入模块中的写入单元将vd2中的use(me)写为1,读取模块中的第一读取单元读取use(me)是否写入成功,第二读取单元读取use(peer)的值未发生变化,且时间戳也未发生变化,则判断模块中的判断单元判断出node2确实未加载vd2,于是,加载模块中的加载单元加载vd2。
通过利用以上各个装置,结合双控制器系统的资源处理方法,可以实现对是否发生脑裂状态的判断,节省了脑裂检测成本,增加了检测的可靠性。
以上仅为本发明的可选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
工业实用性
基于本发明实施例提供的上述技术方案,采用多控制器系统中的控制器无法感知对方控制器存在;该控制器根据所述对方控制器之前加载的第一资源池中存储的第一使用标志来判断所述对方控制器是否加载所述第一资源池,其中,所述第一使用标志用于标识所述对方控制器是否加载所述第一资源池。解决了多控制器系统中脑裂检测机制成本高、存在可能失效的问题,在无需增加任何第三方设备也不增加专门仲裁盘的情况下,对多控制器系统中是否发生脑裂状态进行检测,节省了成本,增加了检测的可靠性和稳定性。

Claims (12)

  1. 一种多控制器系统的资源处理方法,包括:
    所述多控制器系统中的控制器无法感知对方控制器存在;
    所述控制器根据所述对方控制器之前加载的第一资源池中存储的第一使用标志来判断所述对方控制器是否加载所述第一资源池,其中,所述第一使用标志用于标识所述对方控制器是否加载所述第一资源池。
  2. 根据权利要求1所述的方法,在所述控制器根据所述第一使用标志来判断所述对方控制器是否加载所述第一资源池之前,所述方法还包括:
    所述多控制器系统中的每个控制器向各自加载的资源池定时写入所述第一使用标志,其中,所述第一使用标志用于标识该控制器是否加载该控制器的资源池。
  3. 根据权利要求1所述的方法,其中,在所述控制器根据所述第一使用标志判断出所述对方控制器未加载所述第一资源池的情况下,所述方法还包括:
    所述控制器在所述第一资源池中写入用于指示所述控制器加载所述第一资源池的第二使用标志,并加载所述第一资源池。
  4. 根据权利要求3所述的方法,其中,在所述控制器在所述第一资源池中写入用于指示所述控制器加载所述第一资源池的第二使用标志之后,所述方法还包括:
    所述控制器根据所述第一资源池中的所述第一使用标志判断所述对方控制器是否加载所述第一资源池,在判断结果为是的情况下,所述控制器不加载所述第一资源池,并清除所述第二使用标志。
  5. 根据权利要求1至4中任一项所述的方法,其中,所述控制器根据所述第一资源池中存储的第一使用标志判断所述对方控制器是否加载所述第一资源池包括:
    在所述第一使用标志包括:用于指示控制器是否加载资源池的标识信息情况下,所述控制器根据所述标识信息的值确定所述对方控制器是否加载所述第一资源池;和/或,
    在所述第一使用标志包括:用于指示控制器是否加载资源池的标识信息和写入所述标识信息的时间戳的情况下,所述控制器判断在预定时长内所述时间 戳是否发生变化,如果发生变化,则确定所述对方控制器加载所述第一资源池;否则,确定所述对方控制器未加载所述第一资源池。
  6. 根据权利要求1至4中任一项所述的方法,其中,所述每个控制器向各自加载的资源池定时写入所述第一使用标志包括:
    所述每个控制器向各自加载的资源池中对应的逻辑区域写入所述第一使用标志,其中,所述资源池在逻辑上均划分为n个区域,每个区域对应一个控制器,每个区域写入的第一使用标志表示该区域对应的控制器对所述资源池的加载情况。
  7. 一种多控制器系统的资源处理装置,位于控制器中,所述装置包括:
    感知模块,设置为感知对方控制器是否存在;
    判断模块,设置为在所述感知模块无法感知所述对方控制器存在的情况下,根据所述对方控制器之前加载的第一资源池中存储的第一使用标志来判断所述对方控制器是否加载所述第一资源池。
  8. 根据权利要求7所述的装置,其中,所述装置还包括:
    第一写入模块,设置为向所述控制器加载的资源池定时写入第一使用标志,其中,所述第一使用标志用于标识该控制器是否加载该控制器的资源池。
  9. 根据权利要求7所述的装置,其中,所述装置还包括:
    第二写入模块,设置为在所述判断模块判断出所述对方控制器未加载所述第一资源池的情况下,在所述第一资源池中写入用于指示所述控制器加载所述第一资源池的第二使用标志,并加载所述第一资源池。
  10. 根据权利要求9所述的装置,其中,
    所述第二写入模块,还设置为在写入所述第二使用标志之后,根据所述第一资源池中的所述第一使用标志判断所述对方控制器是否加载所述第一资源池,在判断结果为是的情况下,不加载所述第一资源池,并清除所述第二使用标志。
  11. 根据权利要求7至10中任一项所述的装置,其中,所述判断模块包括:
    第一判断单元,设置为在所述第一使用标志包括:用于指示控制器是否加载资源池的标识信息情况下,根据所述标识信息的值确定所述对方控制器是否加载所述第一资源池;和/或,
    第二判断单元,设置为在所述第一使用标志包括:用于指示控制器是否加载资源池的标识信息和写入所述标识信息的时间戳的情况下,判断在预定时长内所述时间戳是否发生变化,如果发生变化,则确定所述对方控制器加载所述第一资源池;否则,确定所述对方控制器未加载所述第一资源池。
  12. 根据权利要求8至10中任一项所述的装置,其中,所述第一写入模块包括:
    逻辑模块,设置为向所述控制器加载的资源池中对应的逻辑区域写入所述第一使用标志,其中,所述资源池在逻辑上均划分为n个区域,每个区域对应一个控制器,每个区域写入的第一使用标志表示该区域对应的控制器对所述资源池的加载情况。
PCT/CN2015/072799 2014-10-22 2015-02-11 多控制器系统的资源处理方法及装置 WO2016061958A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/521,383 US20170308469A1 (en) 2014-10-22 2015-02-11 Resource Processing Method and Device for Multi-controller System

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410568338.7A CN105528202B (zh) 2014-10-22 2014-10-22 多控制器系统的资源处理方法及装置
CN201410568338.7 2014-10-22

Publications (1)

Publication Number Publication Date
WO2016061958A1 true WO2016061958A1 (zh) 2016-04-28

Family

ID=55760142

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072799 WO2016061958A1 (zh) 2014-10-22 2015-02-11 多控制器系统的资源处理方法及装置

Country Status (3)

Country Link
US (1) US20170308469A1 (zh)
CN (1) CN105528202B (zh)
WO (1) WO2016061958A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599316B (zh) * 2022-12-15 2023-03-21 南京鹏云网络科技有限公司 分布式数据处理方法、装置、设备、介质和计算机程序产品

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674331A (zh) * 2009-10-21 2010-03-17 成都市华为赛门铁克科技有限公司 集群存储系统及其脑裂处理方法
US20100088440A1 (en) * 2008-10-03 2010-04-08 Donald E Banks Detecting and preventing the split-brain condition in redundant processing units
CN102742214A (zh) * 2011-07-13 2012-10-17 青岛海信传媒网络技术有限公司 改善高可用性系统可靠性的方法和装置
CN103051470A (zh) * 2012-11-29 2013-04-17 中标软件有限公司 一种集群及其磁盘心跳的控制方法
CN103209095A (zh) * 2013-03-13 2013-07-17 广东新支点技术服务有限公司 一种基于磁盘服务锁的裂脑预防的方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3447347B2 (ja) * 1993-12-24 2003-09-16 三菱電機株式会社 障害検出方法
US7231543B2 (en) * 2004-01-14 2007-06-12 Hewlett-Packard Development Company, L.P. Systems and methods for fault-tolerant processing with processor regrouping based on connectivity conditions
US8336079B2 (en) * 2008-12-31 2012-12-18 Hytrust, Inc. Intelligent security control system for virtualized ecosystems
US8806264B2 (en) * 2010-08-30 2014-08-12 Oracle International Corporation Methods for detecting split brain in a distributed system
US8909274B2 (en) * 2012-03-12 2014-12-09 Nokia Corporation Method, apparatus, and computer program product for resource allocation conflict handling in RF frequency bands
CN103257908A (zh) * 2013-05-24 2013-08-21 浪潮电子信息产业股份有限公司 一种软硬件协同的多控制器磁盘阵列设计方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100088440A1 (en) * 2008-10-03 2010-04-08 Donald E Banks Detecting and preventing the split-brain condition in redundant processing units
CN101674331A (zh) * 2009-10-21 2010-03-17 成都市华为赛门铁克科技有限公司 集群存储系统及其脑裂处理方法
CN102742214A (zh) * 2011-07-13 2012-10-17 青岛海信传媒网络技术有限公司 改善高可用性系统可靠性的方法和装置
CN103051470A (zh) * 2012-11-29 2013-04-17 中标软件有限公司 一种集群及其磁盘心跳的控制方法
CN103209095A (zh) * 2013-03-13 2013-07-17 广东新支点技术服务有限公司 一种基于磁盘服务锁的裂脑预防的方法和装置

Also Published As

Publication number Publication date
CN105528202A (zh) 2016-04-27
CN105528202B (zh) 2021-01-26
US20170308469A1 (en) 2017-10-26

Similar Documents

Publication Publication Date Title
US10346238B2 (en) Determining failure location in a storage system
CN109783262B (zh) 故障数据处理方法、装置、服务器及计算机可读存储介质
US9143416B2 (en) Expander device
US9026865B2 (en) Software handling of hardware error handling in hypervisor-based systems
US9298567B2 (en) System availability in PPRC failover environments
JP5541368B2 (ja) アクセス方法、およびマルチコアプロセッサシステム
CN104704478A (zh) 输入/输出错误遏制事件后的恢复
US9996414B2 (en) Auto-disabling DRAM error checking on threshold
WO2017107110A1 (zh) 一种业务接管方法、存储设备和业务接管装置
CN106909307B (zh) 一种管理双活存储阵列的方法及装置
US20150006978A1 (en) Processor system
US8819483B2 (en) Computing device with redundant, dissimilar operating systems
US9405715B2 (en) Host computer and method for managing SAS expanders of SAS expander storage system
US20170039118A1 (en) Cluster system, server device, cluster system management method, and computer-readable recording medium
US20150286513A1 (en) Implementing tiered predictive failure analysis at domain intersections
CN102521086B (zh) 基于锁步同步的双模冗余系统及其实现方法
US10318466B2 (en) Method and apparatus for handling outstanding interconnect transactions
WO2016061958A1 (zh) 多控制器系统的资源处理方法及装置
KR102213676B1 (ko) 산술 연산 감시 기능을 구비하는 오토사 시스템용 단말 장치 및 오토사 시스템의 산술 연산 감시 방법
US9459943B2 (en) Fault isolation by counting abnormalities
US20120311133A1 (en) Facilitating processing in a communications environment using stop signaling
CN108664361B (zh) Pcie非透明通道修复方法及装置
US10055272B2 (en) Storage system and method for controlling same
US11403001B2 (en) System and method for storage system node fencing
JP2011095837A (ja) フェールセーフシステム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15853402

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 15521383

Country of ref document: US

122 Ep: pct application non-entry in european phase

Ref document number: 15853402

Country of ref document: EP

Kind code of ref document: A1