Method for determining master and slave management boards and dual-computer backup device

By allowing the management board to interactively determine the slot information set in the dual-machine backup device, the problem of possible election of the fault management board as the main management board in the prior art is solved, and the reliability of the equipment is improved.

CN119576658APending Publication Date: 2025-03-07RUIJIE NETWORKS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311152396.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-07
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In the prior art, when the dual-machine backup device elects the master-slave management board, it may elect the fault management board as the main management board, resulting in equipment failure.

Method used

The first management board and the second management board respectively determine the slot information set corresponding to the respective manageable hardware units, and interact with the election message and reset information, and compare the slot information set to determine the master-slave relationship.

Benefits of technology

Reduces the probability of electing the management board with abnormal management functions as the main management board, and improves the reliability of dual-machine backup devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576658A_ABST
    Figure CN119576658A_ABST
Patent Text Reader

Abstract

The invention discloses a method for determining master and slave management boards and a dual-computer backup device, a first management board determines a first slot position information set corresponding to a manageable hardware unit, and a second management board determines a second slot position information set corresponding to a manageable hardware unit; the first management board compares the first slot position information set with the second slot position information set, if the first management board serves as a master management board according to a comparison result, first reset information is sent to the second management board, and the second management board is determined as a slave management board; and the second management board compares the first slot position information set with the second slot position information set, if the second management board is used as a master management board according to a comparison result, second reset information is sent to the first management board, and the first management board is determined as a slave management board. Because the two management boards respectively carry out information interaction on the respective manageable hardware units and the other management board, the probability of electing the management board with an abnormal management function as the main management board can be reduced, and the reliability of the dual-machine backup equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method for determining a master and slave management board and a dual-machine backup device. Background Art

[0002] In the field of data communication, dual management boards are generally used to improve the reliability of equipment and shorten the host startup time. When the equipment is working, the management board that plays a leading role is called the main management board, and the other management board in the backup state is called the slave management board.

[0003] The two management boards in the dual-machine backup device are inserted into two fixed slots. The main management board is responsible for managing the service line cards and other hardware units in the device, such as the power supply unit and the fan tray unit. The slave management board is responsible for taking over the management work of the main management board when the main management board fails.

[0004] In the prior art, hardware signals are usually used to select the main management board and the slave management board. The management board inserted into slot CM1 is selected as the main management board by the hardware circuit, and the other management board is selected as the slave management board. If the management board inserted into slot CM1 is a faulty management board, the management board inserted into slot CM1 will still be used as the main management board, which will cause equipment failure. Summary of the invention

[0005] The present invention provides a method for determining a master and slave management board and a dual-machine backup device, which are used to solve the problem of how to reduce the probability of using a faulty management board as a master management board.

[0006] In a first aspect, the present application provides a method for determining a master and slave management board, which is applied to a dual-machine backup device, and the method includes:

[0007] Determine, by the first management board, a first slot information set corresponding to a hardware unit manageable by the first management board, and receive a first election message carrying a second slot information set sent by the second management board; and determine, by the second management board, a second slot information set corresponding to a hardware unit manageable by the second management board, and receive a second election message carrying the first slot information set sent by the first management board;

[0008] Comparing the first slot information set with the second slot information set by the first management board, and comparing the first slot information set with the second slot information set by the second management board;

[0009] The first management board is used as the master management board according to the comparison result, and first reset information is sent to the second management board, and the first reset information is received by the second management board to determine the second management board as a slave management board; or the second management board is used as the master management board according to the comparison result, and second reset information is sent to the first management board, and the second reset information sent by the second management board is received by the first management board to determine the first management board as a slave management board.

[0010] In a possible implementation, the hardware unit includes a service line card;

[0011] The determining, by the first management board, a first slot information set corresponding to a hardware unit manageable by the first management board includes:

[0012] Sending a first request message to the service line card through the first management board;

[0013] receiving, through the first management board, a first reply message returned by the service line card;

[0014] The slot information corresponding to the first reply message received within the first preset time period is used as the first slot information set by the first management board.

[0015] In a possible implementation, the hardware unit further includes other hardware units, and the method further includes:

[0016] Accessing the other hardware units through the first management board;

[0017] The first management board uses the slot information corresponding to other hardware units in place and the slot information corresponding to the first reply message as the first slot information set.

[0018] In a possible implementation manner, determining, by the second management board, the second slot information set corresponding to the hardware unit manageable by the second management board includes:

[0019] Sending a second request message to the service line card through the second management board;

[0020] receiving, by the second management board, a second reply message returned by the service line card;

[0021] The slot information corresponding to the second reply message received within the second preset time period is used as the second slot information set by the second management board.

[0022] In a possible implementation, the method further includes:

[0023] Accessing the other hardware units through the second management board;

[0024] The second management board uses the slot information corresponding to other in-place hardware units and the slot information corresponding to the second reply message as the second slot information set.

[0025] In a possible implementation, the sending, by the first management board, first reset information to the second management board using the first management board as a master management board according to a comparison result, includes:

[0026] Determine through the first management board that the first slot information set is the same as the second slot information set, or determine that the second slot information set is a subset of the first slot information set, or determine that there is at least one first slot information in the first slot information set that is not in the second slot information set, and there is at least one second slot information in the second slot information set that is not in the first slot information set, use the first management board as the main management board, and send the first reset information to the second management board.

[0027] In a possible implementation, the sending the second reset information to the first management board by the second management board as the main management board according to the comparison result includes:

[0028] The second management board determines that the first slot information set is a subset of the second slot information set, uses the second management board as the main management board, and sends the second reset information to the first management board.

[0029] In a possible implementation, the method further includes:

[0030] Determining, by the first management board, that the first election message is not received within a third preset time period, determining a first time period according to a first preset value, a second preset value, and the number of hardware units manageable by the first management board; and determining, by the second management board, if determining, by the second management board, that the second election message is not received within the third preset time period, determining a second time period according to the first preset value, the second preset value, the third preset value, and the number of hardware units manageable by the second management board;

[0031] If the first duration is less than the second duration, when the first duration is reached, the first management board is used as the main management board, and the first reset information is sent to the second management board;

[0032] If the first time period is greater than the second time period, when the second time period is reached, the second management board is used as the main management board and the second reset information is sent to the first management board.

[0033] In a possible implementation, determining the first duration by the first management board according to the first preset value, the second preset value, and the number of hardware units manageable by the first management board includes:

[0034] Calculating, by the first management board, a first product of the second preset value and the number of hardware units manageable by the first management board, and using a difference between the first preset value and the first product as the first duration;

[0035] The determining the second duration according to the first preset value, the second preset value, the third preset value and the number of hardware units manageable by the second management board through the second management board includes:

[0036] The second management board calculates the second product of the second preset value and the number of hardware units manageable by the second management board, and takes the difference between the first preset value and the second product and the sum of the third preset value as the second duration.

[0037] In a possible implementation manner, before determining, by the first management board, a first slot information set corresponding to a hardware unit manageable by the first management board, the method further includes:

[0038] The first management board determines that the second management board is not determined as the main management board according to a master-never-determined signal output by the second management board, and the second management board determines that the first management board is not determined as the main management board according to a master-never-determined signal output by the first management board.

[0039] In a second aspect, the present application provides a dual-machine backup device, including: a first management board, a second management board and a hardware unit;

[0040] The first management board is used to determine a first slot information set corresponding to a hardware unit manageable by the first management board, receive a first election message carrying a second slot information set sent by the second management board; compare the first slot information set with the second slot information set; determine the first management board as a master management board according to the comparison result, and send a first reset message to the second management board; or receive the second reset message sent by the second management board through the first management board to determine the first management board as a slave management board;

[0041] The second management board is used to determine the second slot information set corresponding to the hardware unit manageable by the second management board, receive the second election message carrying the first slot information set sent by the first management board; compare the first slot information set and the second slot information set; receive the first reset information to determine the second management board as a slave management board; or determine the second management board as a master management board according to the comparison result, and send a second reset information to the first management board.

[0042] In a possible implementation, the hardware unit includes a service line card; and the first management board is specifically configured to:

[0043] Sending a first request message to a service line card; receiving a first reply message returned by the service line card; and using the slot information corresponding to the first reply message received within a first preset time period as the first slot information set.

[0044] In a possible implementation manner, the hardware unit further includes other hardware units, and the first management board is further used for:

[0045] Access the other hardware units; and use the slot information corresponding to the other hardware units in place and the slot information corresponding to the first reply message as the first slot information set.

[0046] In a possible implementation manner, the second management board is specifically used to:

[0047] Send a second request message to the service line card; receive a second reply message returned by the service line card; and use the slot information corresponding to the second reply message received within a second preset time as the second slot information set.

[0048] In a possible implementation manner, the second management board is further used for:

[0049] Access the other hardware units; and use the slot information corresponding to the other determined hardware units in place and the slot information corresponding to the second reply message as the second slot information set.

[0050] In a possible implementation manner, the first management board is specifically used to:

[0051] Determine that the first slot information set is the same as the second slot information set, or determine that the second slot information set is a subset of the first slot information set, or determine that there is at least one first slot information in the first slot information set that is not in the second slot information set, and there is at least one second slot information in the second slot information set that is not in the first slot information set, use the first management board as the main management board, and send the first reset information to the second management board.

[0052] In a possible implementation manner, the second management board is specifically used to:

[0053] Determine that the first slot information set is a subset of the second slot information set, use the second management board as the main management board, and send the second reset information to the first management board.

[0054] In a possible implementation manner, the first management board is further used for:

[0055] Determine that the first election message is not received within a third preset time period, determine the first time period according to the first preset value, the second preset value and the number of hardware units manageable by the first management board, and if it is determined by the second management board that the second election message is not received within the third preset time period, determine the second time period according to the first preset value, the second preset value, the third preset value and the number of hardware units manageable by the second management board; if the first time period is less than the second time period, then when the first time period is reached, use the first management board as the main management board and send the first reset information to the second management board; if the first time period is greater than the second time period, then when the second time period is reached, use the second management board as the main management board and send the second reset information to the first management board.

[0056] In a possible implementation, the first management board determines the first duration according to the first preset value, the second preset value, and the number of hardware units manageable by the first management board, including:

[0057] Calculate a first product of the second preset value and the number of hardware units manageable by the first management board, and use the difference between the first preset value and the first product as the first duration;

[0058] The second management board is specifically used for:

[0059] Calculate the second product of the second preset value and the number of hardware units manageable by the second management board, and use the difference between the first preset value and the second product and the sum of the third preset value as the second duration.

[0060] In a possible implementation manner, before determining the first slot information set corresponding to the hardware unit manageable by the first management board, the first management board is further configured to:

[0061] determining, according to a master-never determined signal output by the second management board, that the second management board is not determined as the master management board;

[0062] The second management board is also used for:

[0063] According to the master-undetermined signal output by the first management board, it is determined that the first management board is not determined as the master management board.

[0064] The beneficial effects of the present invention are as follows:

[0065] The present application provides a method for determining the master and slave management boards and a dual-machine backup device, wherein the first management board determines the first slot information set corresponding to the hardware unit manageable by the first management board, and the second management board determines the second slot information set corresponding to the hardware unit manageable by the second management board; the first management board receives the first election message carrying the second slot information set sent by the second management board, compares the first slot information set with the second slot information set, and if the first management board is used as the master management board according to the comparison result, sends the first reset information to the second management board, and the second management board receives the first reset information, and determines the second management board as the slave management board; the second management board compares the first slot information set with the second slot information set, and if the second management board is used as the master management board according to the comparison result, sends the second reset information to the first management board, and the first management board receives the second reset information, and determines the first management board as the slave management board. In the embodiment of the present application, the two management boards respectively exchange information with each other for the hardware units manageable by them, thereby reducing the probability of electing a management board with abnormal management function as the master management board, and improving the reliability of the dual-machine backup device. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0067] Figure 1 A schematic diagram of the structure of a master-slave management board provided in an embodiment of the present application;

[0068] Figure 2 A flowchart of a method for determining a master and slave management board provided by an embodiment of the present invention;

[0069] Figure 3 A flowchart of another method for determining a master and slave management board provided in an embodiment of the present application;

[0070] Figure 4 A flowchart of another method for determining a master and slave management board provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] In the following, the terms "first", "second", "third" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third" may explicitly or implicitly include one or more of the features.

[0073] In a high-availability dual-machine backup device, there are generally two management boards and multiple service line cards. The two management boards are identical in hardware and are inserted in two fixed slots, such as slot CM1 and slot CM2. When the device is working, the management board inserted into slot CM1 is used as the main management board, responsible for the management of the service line cards in the chassis and the forwarding of service data packets. The management board inserted into slot CM2 is used as the slave management board, which can also be called the standby management board. It is not responsible for any service line cards and takes over the work of the main management board when the main management board is abnormal. The design of dual management boards improves the reliability of the device and shortens the host startup time.

[0074] In the related art, the master management board and the slave management board can be elected through hardware signals. However, due to the lack of information exchange between the two management boards, a management board with abnormal management function may be elected as the master management board, causing equipment failure.

[0075] Based on the above problems, the embodiment of the present application provides a method for determining the master and slave management boards, which is applied to a dual-machine backup device, such as Figure 1 , which is a schematic diagram of the structure of a master-slave management board provided in an embodiment of the present application, the master-slave management board includes a first management board 201, a second management board 202 and a service line card 203;

[0076] like Figure 2 FIG. 1 is a flow chart of a method for determining a master and slave management board provided by an embodiment of the present invention, the method comprising the following steps:

[0077] S201, determining, by the first management board, a first slot information set corresponding to a hardware unit manageable by the first management board, receiving a first election message carrying a second slot information set sent by the second management board, and determining, by the second management board, a second slot information set corresponding to a hardware unit manageable by the second management board, receiving a second election message carrying the first slot information set sent by the first management board;

[0078] S202: comparing the first slot information set and the second slot information set through the first management board, and comparing the first slot information set and the second slot information set through the second management board;

[0079] S203, according to the comparison result, the first management board is used as the master management board, and the first reset information is sent to the second management board, and the first reset information is received by the second management board to determine the second management board as the slave management board; or according to the comparison result, the second management board is used as the master management board, and the second reset information is sent to the first management board, and the second reset information sent by the second management board is received by the first management board to determine the first management board as the slave management board.

[0080] In this embodiment, the first management board determines the first slot information set corresponding to the hardware unit manageable by the first management board, and the second management board determines the second slot information set corresponding to the hardware unit manageable by the second management board; the first management board receives the first election message carrying the second slot information set sent by the second management board, compares the first slot information set with the second slot information set, and if the first management board is used as the master management board according to the comparison result, sends the first reset information to the second management board, and the second management board receives the first reset information, and determines the second management board as the slave management board; the second management board compares the first slot information set with the second slot information set, and if the second management board is used as the master management board according to the comparison result, sends the second reset information to the first management board, and the first management board receives the second reset information, and determines the first management board as the slave management board. In the embodiment of the present application, the two management boards respectively exchange information with the other management board for the hardware units that they can manage, thereby reducing the probability of electing a management board with abnormal management functions as the master management board, and improving the reliability of the dual-machine backup device.

[0081] The hardware unit in the embodiment of the present application may include a service line card, or may include a service line card and other hardware units except the service line card, such as a power supply unit and a fan tray unit.

[0082] from Figure 1 It can be seen that the first management board 201 and the second management board 202 are connected through an out-of-band channel communication, the first management board 201 and each service line card 203 are connected through an out-of-band channel communication, and the second management board 202 and each service line card are also connected through an out-of-band channel communication.

[0083] In one embodiment, when the hardware unit only includes a business line card, the first slot information set may be the slot information carried in a first reply message received from the business line card within a first preset time period when the first management board 201 interacts with the business line card 203 through an out-of-band channel. For example, 1 minute. Specifically, the first management board 201 sends a first request message to the business line card 203. After receiving the first request message, the business line card 203 returns a first reply message to the first management board 201. The first reply message may carry the slot information or the slot information and the identifier of the corresponding business line card. The first management board uses the set of information carried in the received first request message as the first slot information set.

[0084] For example, the first management board 201 sends a first request message to business line card LC1, business line card LC2 and business line card LC3. The slot information carried in the first reply message returned by business line card LC1 is A, and the slot information carried in the first reply message returned by business line card LC2 is B. Business line card LC3 cannot return the first reply message, so the first slot information set is {A, B}.

[0085] For another example, the first management board 201 sends a first request message to the business line card LC1, the business line card LC2 and the business line card LC3. The slot information carried in the first reply message returned by the business line card LC1 is LC1 and A. The slot information carried in the first reply message returned by the business line card LC2 is LC2 and B. The business line card LC3 cannot return the first reply message, then the first slot information set is {(LC1, A), (LC2, B)}.

[0086] When the hardware unit only includes business line cards, the second slot information set can be the slot information corresponding to the second reply message received from the business line card within a preset time period when the second management board 202 interacts with the business line card 203 through an out-of-band channel. Specifically, the second management board 202 sends a second request message to the business line card 203. After receiving the second request message, the business line card 203 returns a second reply message to the second management board 202. The second reply message can carry the slot information, and can also carry the slot information and the identifier of the corresponding business line card. The first management board uses the set of information carried in the received first request message as the first slot information set.

[0087] For example, the second management board 202 sends a second request message to business line card LC1, business line card LC2 and business line card LC3. Business line card LC1 cannot return a second reply message. The slot information carried in the second reply message returned by business line card LC2 is B. The slot information carried in the second reply message returned by business line card LC3 is C. Then the second slot information set is {B, C}.

[0088] For another example, the second management board 202 sends a second request message to the business line card LC1, the business line card LC2 and the business line card LC3. The business line card LC1 cannot return a second reply message. The slot information carried in the second reply message returned by the business line card LC2 is LC2 and B. The slot information carried in the second reply message returned by the business line card LC3 is LC3 and C. Then the second slot information set is {(LC2, B), (LC3, C)}.

[0089] It should be noted that in the embodiment of the present application, the first management board 201 sends the first request message and receives the first reply message through the out-of-band channel connecting the first management board 201 and the business line card 203, and the second management board 202 sends the second request message and receives the second reply message through the out-of-band channel connecting the second management board 202 and the business network card 203.

[0090] In another embodiment, when the hardware unit includes a business line card and other hardware units, the other hardware units in the embodiment of the present application are hardware units other than the business line card, such as a power supply unit and a fan disk unit. The first slot information set is the slot information carried in the first reply message received by the first management board 201 within the first preset time period and the slot information of other hardware units that can be normally accessed. Specifically, the first management board 201 sends a first request message to the business line card 203 through an out-of-band channel. After the business line card 203 receives the first request message, it returns a first reply message to the first management board 201 through the out-of-band channel. The first reply message can carry the slot information, or it can carry the slot information and the corresponding business line card identifier, and the first management board 201 can access other hardware units through the I2C bus. The first management board 201 uses the information carried in the received first reply message and the set of slot information of other hardware units accessed as the first slot information set.

[0091] For example, the first management board 201 sends a first request message to the business line card LC1, the business line card LC2 and the business line card LC3. The slot information carried in the first reply message returned by the business line card LC1 is A, and the slot information carried in the first reply message returned by the business line card LC2 is B. The business line card LC3 cannot return the first reply message; the first management board 201 accesses the power supply unit 1, the power supply unit 2, the fan disk unit 1 and the fan disk unit 2, and the accessed information is that the power supply unit 1 is located in slot a and the fan disk unit 1 is located in slot c, then the first slot information set is {A, B, a, c}.

[0092] For another example, the first management board 201 sends a first request message to the business line card LC1, the business line card LC2, and the business line card LC3. The slot information carried in the first reply message returned by the business line card LC1 is LC1 and A, and the slot information carried in the first reply message returned by the business line card LC2 is LC2 and B. The business line card LC3 cannot return the first reply message; the first management board 201 accesses the power supply unit 1, the power supply unit 2, the fan disk unit 1, and the fan disk unit 2, and the accessed information is that the power supply unit 1 is located in slot a and the fan disk unit 1 is located in slot c, wherein the power supply unit 1 is identified as a' and the fan disk unit 1 is identified as c', then the first slot information set is {(LC1, A), (LC2, B), (a', a), (c', c)}.

[0093] When the hardware unit includes a business line card and other hardware units, the second slot information set is the slot information carried in the second reply message received by the second management board 202 within the first preset time period and the slot information of other hardware units that can be normally accessed. Specifically, the second management board 202 sends a second request message to the business line card 203 through an out-of-band channel. After the business line card 203 receives the second request message, it returns a second reply message to the second management board 202 through the out-of-band channel. The second reply message can carry the slot information, or the slot information and the corresponding business line card identifier, and the second management board 202 can access other hardware units through the I2C bus. The second management board 202 uses the information carried in the received second reply message and the set of slot information of other hardware units accessed as the second slot information set.

[0094] For example, the second management board 202 sends a second request message to the business line card LC1, the business line card LC2 and the business line card LC3. The business line card LC1 cannot return the second reply message. The slot information carried in the second reply message returned by the business line card LC2 is B, and the slot information carried in the second reply message returned by the business line card LC3 is C; the first management board 201 accesses the power supply unit 1, the power supply unit 2, the fan disk unit 1 and the fan disk unit 2, and the accessed information is that the power supply unit 1 is located in slot a and the fan disk unit 1 is located in slot c, then the first slot information set is {B, C, a, c}.

[0095] For another example, the second management board 202 sends a second request message to the business line card LC1, the business line card LC2 and the business line card LC3. The business line card LC1 cannot return a second reply message. The slot information carried in the second reply message returned by the business line card LC2 is B, and the slot information carried in the second reply message returned by the business line card LC3 is C. The first management board 201 accesses the power supply unit 1, the power supply unit 2, the fan disk unit 1 and the fan disk unit 2, and the accessed information is that the power supply unit 1 is located in slot a and the fan disk unit 1 is located in slot c. Among them, the power supply unit 1 is identified as a', and the fan disk unit 1 is identified as c', then the first slot information set is {(LC2, B), (LC3, C), (a', a), (c', c)}.

[0096] After the first management board 201 determines the first slot information set, it sends the first slot information set to the second management board 202 through the out-of-band channel connecting the first management board 201 and the second management board 202. After the second management board 202 determines the second slot information, it sends the second slot information to the first management board 201 through the out-of-band channel connecting the first management board 201 and the second management board 202.

[0097] The first management board 201 compares the elements in the first slot information set and the second slot information set, and according to the comparison result, the first management board 201 is used as the master management board, and sends the first reset information to the second management board 202 through the out-of-band channel. After receiving the first reset information, the second management board 202 is determined to be the slave management board.

[0098] Specifically, the first management board 201 determines that the first slot information set is the same as the second slot information set, or determines that the second slot information set is a subset of the first slot information set, or determines that there is at least one first slot information in the first slot information set that is not in the second slot information set, and there is at least one second slot information in the second slot information set that is not in the first slot information set, then the first management board 201 uses the first management board 201 as the main management board and sends the first reset information to the second management board 202.

[0099] For example, the first slot information set is {A, B, C}, and the second slot information set is {A, B, C}. The first management board 201 determines that the first slot information set is the same as the second slot information set. Then the first management board 201 uses the first management board 201 as the main management board and sends the first reset information to the second management board 202.

[0100] For another example, the first slot information set is {A, B, C}, the second slot information set is {A, B}, and the first management board 201 determines that the second slot information set is a subset of the first slot information set. Then the first management board 201 uses the first management board 201 as the main management board and sends the first reset information to the second management board 202.

[0101] For another example, the first slot information set is {A, B, C}, and the second slot information set is {B, C, D}. The first management board 201 determines that there is first slot information A in the first slot information set but not in the second slot information set, and there is second slot information D in the second slot information set but not in the first slot information set. Then the first management board 201 uses the first management board 201 as the main management board and sends the first reset information to the second management board 202.

[0102] The second management board 202 compares the elements in the first slot information set and the second slot information set, and according to the comparison result, the second management board 202 is used as the master management board, and sends the second reset information to the first management board 201 through the out-of-band channel. After receiving the second reset information, the first management board 201 is determined to be the slave management board.

[0103] Specifically, the second management board 202 determines that the first slot information set is a subset of the second slot information set, and then the second management board 202 uses the second management board 202 as the master management board and sends the second reset information to the first management board 201 .

[0104] For example, the first slot information set is {A, B, C}, the second slot information set is {A, B, C, D}, and the second management board 202 determines that the first slot information set is a subset of the second slot information set. Then the second management board 202 uses the second management board 202 as the main management board and sends the second reset information to the first management board 201.

[0105] In one embodiment, the first management board 201 determines that the second management board 202 is not determined as the master management board according to the master-never-determined signal output by the second management board 202, and the second management board 202 determines that the first management board 201 is not determined as the master management board according to the master-never-determined signal output by the first management board 201, and then the first management board 201 sends a second election signal to the second management board 202, and the second management board 202 sends a first election signal to the first management board 201.

[0106] In the embodiment of the present application, when the management board finds that the other end is in place through the in-place signal, it checks the signal output of the other end. First, it determines whether the first management board 201 and the second management board 202 have been determined as the master management board and the slave management board through the ready signal and the Master signal between the management boards. When the device is just started, the ready signals of the first management board 201 and the second management board 202 are both low. If the two management boards have determined the master management board and the slave management board, the ready signals of the two management boards are both high. The master management board sets its own Master signal to a high level, and the slave management board sets its own Master signal to a low level. For example, the first management board 201 determines that the ready signal output by the second management board 202 is a high level and the Master signal is a high level, and determines that the second management board has served as the master management board; the second management board 202 determines that the first management board is a slave management board based on the ready signal output by the first management board 201 being a high level and the Master signal being a low level.

[0107] In one embodiment, if the out-of-band channel connecting the first management board 201 and the second management board 202 fails, that is, the first management board 201 cannot receive the first election message sent by the second management board 202 within the third preset time, and the second management board 202 cannot receive the second election message sent by the first management board 201 within the third preset time, then the first management board 201 determines the first time according to the first preset value, the second preset value and the number of hardware units manageable by the first management board 201, and the second management board 202 determines the second time according to the first preset value, the second preset value, the third preset value and the number of hardware units manageable by the second management board 202;

[0108] If the first time length is less than the second time length, the first management board 201 will act as the main management board when the first time length is reached, and send a first reset message to the second management board 202; if the first time length is greater than the second time length, the second management board 202 will act as the main management board when the second time length is reached, and send a second reset message to the first management board 201.

[0109] It should be noted that the messages sent between the first management board 201 and the second management board 202 are sent through an out-of-band channel, and the reset information sent between the first management board 201 and the second management board 202 can be sent through other data lines. Therefore, when the out-of-band channel between the first management board 201 and the second management board 202 fails, it does not affect the sending of reset information between the first management board 201 and the second management board 202.

[0110] In a specific embodiment, the first management board 201 calculates the second preset value b and the number N1 of hardware units manageable by the first management board 201 to obtain a first product, and subtracts the first preset value a from the obtained first product, and the difference is the first duration T1. The number of hardware units manageable by the first management board 201 is the sum of the number of line cards in the first reply message, the number of power supply units that can be accessed normally, and the number of fan disk units that can be accessed normally;

[0111] T1=a-N1×b.

[0112] The second management board 202 calculates the second preset value b and the number of hardware units manageable by the second management board N2 to obtain a second product, subtracts the first preset value a from the obtained second product, and adds the result to the third preset value c to obtain a second duration T2. ​​The number of hardware units manageable by the second management board is the sum of the number of line cards in the second reply message, the number of power supply units that can be accessed normally, and the number of fan disk units that can be accessed normally;

[0113] T2=a-N2×b+c.

[0114] For example, for a dual-machine backup device with 10 card slots, the first preset value a may be 10 minutes, the second preset value b may be 10 seconds, and the third preset value c may be 20 seconds, that is,

[0115] T1=10min-N1×10s

[0116] T2=10min-N2×10s+20s

[0117] If both management boards manage the service line cards, power supply units and fan tray units in the device normally, that is, N1 is 10 and N2 is 10, the above formula can be used to calculate the first duration to be 500s and the second duration to be 520s. The first duration is less than the second duration, and when the first duration of 500s is reached, the first management board 201 automatically acts as the main management board and sends the first reset information to the second management board 202.

[0118] If one management board fails, another management board will be elected as the main management board. For example, if the first management board fails and cannot properly manage the service line cards, power supply units, and fan tray units in the device, if N1 is 6 and N2 is 10, the above formula can be used to calculate the first duration of 540s and the second duration of 520s. The first duration is greater than the second duration. When the second duration of 520s is reached, the second management board 202 serves as the main management board and sends the second reset information to the first management board 201.

[0119] like Figure 3 FIG. 1 is a schematic diagram of another process for determining a master and slave management board provided in an embodiment of the present application, comprising the following steps:

[0120] S301, the first management board determines that the second management board is in place through an in-place signal, and the second management board determines that the first management board is in place through an in-place signal;

[0121] S302, the first management board determines that the second management board is not determined as the main management board according to the ready signal output by the second management board being at a low level, and the second management board determines that the first management board is not determined as the main management board according to the ready signal output by the first management board being at a low level;

[0122] S303, the first management board determines that the first election message sent by the second management board is not received within the third preset time length, and the second management board determines that the second election message sent by the first management board is not received within the third preset time length;

[0123] S304, the first management board calculates the first duration, and the second management board calculates the second duration;

[0124] S305: If the first duration is less than the second duration, the first management board uses the first management board as the main management board when the first duration is reached, and sends a first reset message to the second management board;

[0125] S306: After receiving the first reset information, the second management board determines the second management board as a slave management board;

[0126] S307: If the first duration is greater than the second duration, the second management board uses the second management board as the main management board when the second duration is reached, and sends a second reset message to the first management board;

[0127] S308: After receiving the second reset information, the first management board determines the first management board as a slave management board.

[0128] like Figure 4 FIG. 1 is a flowchart of another method for determining a master and slave management board provided in an embodiment of the present application, the method comprising the following steps:

[0129] S401, the first management board determines that the second management board is in place through an in-place signal, and the second management board determines that the first management board is in place through an in-place signal;

[0130] S402: The first management board determines that the second management board is not determined as the master management board according to the master-never-determined signal output by the second management board, and the second management board determines that the first management board is not determined as the master management board according to the master-never-determined signal output by the first management board;

[0131] S403, the first management board sends a first request message to the service line card and accesses other hardware units;

[0132] S404, the first management board receives the first reply message returned by the service line card and determines the slot information corresponding to other hardware units in place;

[0133] S405. The first management board uses the slot information corresponding to the other hardware units in place and the slot information corresponding to the first reply message received within the first preset time as a first slot information set;

[0134] In a specific embodiment, the interactive message between the management board and the line card can be as shown in Table 1. The message format is used when the management board sends a message to the service line card and the service line card sends a response message to the management board. When the management board sends a message to the service line card, the target slot is 0xff, indicating that any card that receives the message is allowed to reply the message; when the service line card responds to the management board, the target slot is the slot of the management board that sends the request message.

[0135]

[0136] Table 1

[0137] S406, the second management board sends a second request message to the service line card and accesses other hardware units;

[0138] S407, the second management board receives the second reply message returned by the service line card and the slot information corresponding to other determined hardware units in place;

[0139] S408, the second management board uses the slot information corresponding to the other hardware units in place and the slot information corresponding to the second reply message received within the second preset time as the second slot information set;

[0140] S409, the first management board sends a second election message carrying the first slot information set to the second management board, and the second management board sends a first election message carrying the second slot information set to the first management board;

[0141] S410, the first management board compares the first slot information set and the second slot information set, and determines that the first slot information set is the same as the second slot information set, or determines that the second slot information set is a subset of the first slot information set, or determines that there is at least one first slot information in the first slot information set that is not in the second slot information set, and there is at least one second slot information in the second slot information set that is not in the first slot information set;

[0142] S411, the first management board uses the first management board as the main management board, and sends first reset information to the second management board;

[0143] S412: After receiving the first reset information, the second management board determines the second management board as a slave management board;

[0144] For example, there are 5 service line cards: LC1, LC2, LC3, LC4, and LC5, 3 power supply units: B1', B2', and B3', and 4 fan tray modules: C1', C2', C3', and C4'. The slot information corresponding to LC1 is A1, the slot information corresponding to LC2 is A2, the slot information corresponding to LC3 is A3, the slot information corresponding to LC4 is A4, and the slot information corresponding to LC5 is A5. The slot information corresponding to B1' is B1, the slot information corresponding to B2' is B2, the slot information corresponding to B3' is B3, the slot information corresponding to C1' is C1, the slot information corresponding to C2' is C2, the slot information corresponding to C3' is C3, and the slot information corresponding to C4' is C4.

[0145] If the first slot information set is {A1, A2, A3, A4, A5, B1, B2, B3, C1, C2, C3, C4}; the second slot information set is {A1, A2, A3, A4, A5, B1, B3}, the first management board determines that the second slot information set is itself of the first slot information set, then the first management board is used as the main management board and the first reset information is sent to the second management board.

[0146] If the first slot information set is {A1, A2, A4, A5, B1, B2, B3, C1, C2, C4}; the second slot information set is {A1, A2, A3, A4, A5, B1, B3, C1, C2, C3, C4}, and the first management board determines that there is at least one first slot information in the first slot information set that is not in the second slot information set, and there is at least one second slot information in the second slot information set that is not in the first slot information set, then the first management board is used as the main management board, and the first reset information is sent to the second management board. Among them, B2 in the first slot information set is not in the second slot information set, and A3 and C3 in the second slot information set are not in the first slot information set.

[0147] S413. The second management board compares the first slot information set with the second slot information set, and determines that the first slot information set is a subset of the second slot information set.

[0148] S414: The second management board uses the second management board as the main management board and sends second reset information to the first management board;

[0149] S415: After receiving the second reset information, the first management board determines the first management board as a slave management board.

[0150] If the first slot information set is {A3, A4, A5, B1, B2, B3, C1, C2, C3, C4}; the second slot information set is {A1, A2, A3, A4, A5, B1, B2, B3, C1, C2, C3, C4}, and the second management board determines that the first slot information set is a subset of the second slot information set, then the second management board is used as the main management board and the second reset information is sent to the first management board.

[0151] Based on the same inventive concept, the present application also provides a dual-machine backup device. The implementation of the dual-machine backup device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0152] The present application provides a dual-machine backup device, comprising: a first management board, a second management board and a hardware unit;

[0153] The first management board is used to determine a first slot information set corresponding to a hardware unit manageable by the first management board, receive a first election message carrying a second slot information set sent by the second management board; compare the first slot information set with the second slot information set; determine the first management board as a master management board according to the comparison result, and send a first reset message to the second management board; or receive the second reset message sent by the second management board through the first management board to determine the first management board as a slave management board;

[0154] The second management board is used to determine the second slot information set corresponding to the hardware unit manageable by the second management board, receive the second election message carrying the first slot information set sent by the first management board; compare the first slot information set and the second slot information set; receive the first reset information to determine the second management board as a slave management board; or determine the second management board as a master management board according to the comparison result, and send a second reset information to the first management board.

[0155] In a possible implementation, the hardware unit includes a service line card; and the first management board is specifically configured to:

[0156] Sending a first request message to a service line card; receiving a first reply message returned by the service line card; and using the slot information corresponding to the first reply message received within a first preset time period as the first slot information set.

[0157] In a possible implementation manner, the hardware unit further includes other hardware units, and the first management board is further used for:

[0158] Access the other hardware units; and use the slot information corresponding to the other hardware units in place and the slot information corresponding to the first reply message as the first slot information set.

[0159] In a possible implementation manner, the second management board is specifically used to:

[0160] Send a second request message to the service line card; receive a second reply message returned by the service line card; and use the slot information corresponding to the second reply message received within a second preset time as the second slot information set.

[0161] In a possible implementation manner, the second management board is further used for:

[0162] Access the other hardware units; and use the slot information corresponding to the other determined hardware units in place and the slot information corresponding to the second reply message as the second slot information set.

[0163] In a possible implementation manner, the first management board is specifically used to:

[0164] Determine that the first slot information set is the same as the second slot information set, or determine that the second slot information set is a subset of the first slot information set, or determine that there is at least one first slot information in the first slot information set that is not in the second slot information set, and there is at least one second slot information in the second slot information set that is not in the first slot information set, use the first management board as the main management board, and send the first reset information to the second management board.

[0165] In a possible implementation manner, the second management board is specifically used to:

[0166] Determine that the first slot information set is a subset of the second slot information set, use the second management board as the main management board, and send the second reset information to the first management board.

[0167] In a possible implementation manner, the first management board is further used for:

[0168] Determine that the first election message is not received within a third preset time period, determine the first time period according to the first preset value, the second preset value and the number of hardware units manageable by the first management board, and if it is determined by the second management board that the second election message is not received within the third preset time period, determine the second time period according to the first preset value, the second preset value, the third preset value and the number of hardware units manageable by the second management board; if the first time period is less than the second time period, then when the first time period is reached, use the first management board as the main management board and send the first reset information to the second management board; if the first time period is greater than the second time period, then when the second time period is reached, use the second management board as the main management board and send the second reset information to the first management board.

[0169] In a possible implementation, the first management board determines the first duration according to the first preset value, the second preset value, and the number of hardware units manageable by the first management board, including:

[0170] Calculate a first product of the second preset value and the number of hardware units manageable by the first management board, and use the difference between the first preset value and the first product as the first duration;

[0171] The second management board is specifically used for:

[0172] Calculate the second product of the second preset value and the number of hardware units manageable by the second management board, and use the difference between the first preset value and the second product and the sum of the third preset value as the second duration.

[0173] In a possible implementation manner, before determining the first slot information set corresponding to the hardware unit manageable by the first management board, the first management board is further configured to:

[0174] determining, according to a master-never determined signal output by the second management board, that the second management board is not determined as the master management board;

[0175] The second management board is also used for:

[0176] According to the master-undetermined signal output by the first management board, it is determined that the first management board is not determined as the master management board.

[0177] The embodiment of the present application provides a method for determining the master and slave management boards and a dual-machine backup device, wherein the first management board determines the first slot information set corresponding to the hardware unit manageable by the first management board, and the second management board determines the second slot information set corresponding to the hardware unit manageable by the second management board; the first management board receives the first election message carrying the second slot information set sent by the second management board, compares the first slot information set with the second slot information set, and if the first management board is used as the master management board according to the comparison result, sends the first reset information to the second management board, and the second management board receives the first reset information, and determines the second management board as the slave management board; the second management board compares the first slot information set with the second slot information set, and if the second management board is used as the master management board according to the comparison result, sends the second reset information to the first management board, and the first management board receives the second reset information, and determines the first management board as the slave management board. In the embodiment of the present application, the two management boards respectively exchange information with each other for the hardware units manageable by them, thereby reducing the probability of electing a management board with abnormal management function as the master management board, and improving the reliability of the dual-machine backup device.

[0178] The present application is described above with reference to the block diagrams and / or flow charts showing the methods, devices (systems) and / or computer program products according to the embodiments of the present application. It should be understood that a block of the block diagram and / or flow chart diagram and a combination of blocks of the block diagram and / or flow chart diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable data processing device to produce a machine, so that the instructions executed by the computer processor and / or other programmable data processing device create a method for implementing the functions / actions specified in the block diagram and / or flow chart block.

[0179] Accordingly, the present application may also be implemented with hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium, for use by an instruction execution system or in conjunction with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that may contain, store, communicate, transmit, or convey a program for use by an instruction execution system, device, or apparatus, or in conjunction with an instruction execution system, device, or apparatus.

[0180] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for determining a master and slave management board, characterized in that: Applied to a dual-machine backup device, the method includes: Determine, by the first management board, a first slot information set corresponding to a hardware unit manageable by the first management board, and receive a first election message carrying a second slot information set sent by the second management board; and determine, by the second management board, a second slot information set corresponding to a hardware unit manageable by the second management board, and receive a second election message carrying the first slot information set sent by the first management board; Comparing the first slot information set with the second slot information set by the first management board, and comparing the first slot information set with the second slot information set by the second management board; The first management board is used as the master management board according to the comparison result, and first reset information is sent to the second management board, and the first reset information is received by the second management board to determine the second management board as a slave management board; or the second management board is used as the master management board according to the comparison result, and second reset information is sent to the first management board, and the second reset information sent by the second management board is received by the first management board to determine the first management board as a slave management board.

2. The method according to claim 1, characterized in that The hardware unit includes a service line card; The determining, by the first management board, a first slot information set corresponding to a hardware unit manageable by the first management board includes: Sending a first request message to the service line card through the first management board; receiving, through the first management board, a first reply message returned by the service line card; The slot information corresponding to the first reply message received within the first preset time period is used as the first slot information set by the first management board.

3. The method according to claim 2, characterized in that The hardware unit also includes other hardware units, and the method further includes: Accessing the other hardware units through the first management board; The first management board uses the slot information corresponding to other hardware units in place and the slot information corresponding to the first reply message as the first slot information set.

4. The method according to claim 3, characterized in that The determining, by the second management board, the second slot information set corresponding to the hardware unit manageable by the second management board includes: Sending a second request message to the service line card through the second management board; receiving, by the second management board, a second reply message returned by the service line card; The slot information corresponding to the second reply message received within the second preset time period is used as the second slot information set by the second management board.

5. The method according to claim 4, characterized in that The method further includes: Accessing the other hardware units through the second management board; The second management board uses the slot information corresponding to other in-place hardware units and the slot information corresponding to the second reply message as the second slot information set.

6. The method according to claim 1, characterized in that The step of using the first management board as a main management board according to the comparison result and sending first reset information to the second management board includes: Determine through the first management board that the first slot information set is the same as the second slot information set, or determine that the second slot information set is a subset of the first slot information set, or determine that there is at least one first slot information in the first slot information set that is not in the second slot information set, and there is at least one second slot information in the second slot information set that is not in the first slot information set, use the first management board as the main management board, and send the first reset information to the second management board.

7. The method according to claim 1, characterized in that The step of using the second management board as a main management board according to the comparison result and sending the second reset information to the first management board includes: The second management board determines that the first slot information set is a subset of the second slot information set, uses the second management board as the main management board, and sends the second reset information to the first management board.

8. The method according to claim 1, characterized in that The method further includes: Determining, by the first management board, that the first election message is not received within a third preset time period, determining a first time period according to a first preset value, a second preset value, and the number of hardware units manageable by the first management board; and determining, by the second management board, if determining, by the second management board, that the second election message is not received within the third preset time period, determining a second time period according to the first preset value, the second preset value, the third preset value, and the number of hardware units manageable by the second management board; If the first duration is less than the second duration, when the first duration is reached, the first management board is used as the main management board, and the first reset information is sent to the second management board; If the first time period is greater than the second time period, when the second time period is reached, the second management board is used as the main management board and the second reset information is sent to the first management board.

9. The method according to claim 8, characterized in that The determining, by the first management board, the first duration according to the first preset value, the second preset value, and the number of hardware units manageable by the first management board includes: Calculating, by the first management board, a first product of the second preset value and the number of hardware units manageable by the first management board, and using a difference between the first preset value and the first product as the first duration; The determining the second duration according to the first preset value, the second preset value, the third preset value and the number of hardware units manageable by the second management board through the second management board includes: The second management board calculates the second product of the second preset value and the number of hardware units manageable by the second management board, and takes the difference between the first preset value and the second product and the sum of the third preset value as the second duration.

10. A dual-machine backup device, characterized in that: include: A first management board, a second management board and a hardware unit; The first management board is used to determine a first slot information set corresponding to a hardware unit manageable by the first management board, and receive a first election message carrying a second slot information set sent by the second management board; comparing the first slot information set and the second slot information set; According to the comparison result, the first management board is used as the master management board, and the first reset information is sent to the second management board; or the second reset information sent by the second management board is received by the first management board to determine the first management board as the slave management board; The second management board is used to determine the second slot information set corresponding to the hardware unit manageable by the second management board, and receive a second election message sent by the first management board and carrying the first slot information set; comparing the first slot information set and the second slot information set; receiving the first reset information to determine the second management board as a slave management board; Or, according to the comparison result, the second management board is used as the main management board, and second reset information is sent to the first management board.