WO2021046935A1 - Management data synchronization method and apparatus, storage device and readable storage medium - Google Patents

Management data synchronization method and apparatus, storage device and readable storage medium Download PDF

Info

Publication number
WO2021046935A1
WO2021046935A1 PCT/CN2019/108470 CN2019108470W WO2021046935A1 WO 2021046935 A1 WO2021046935 A1 WO 2021046935A1 CN 2019108470 W CN2019108470 W CN 2019108470W WO 2021046935 A1 WO2021046935 A1 WO 2021046935A1
Authority
WO
WIPO (PCT)
Prior art keywords
management data
data synchronization
sequence number
controller
message
Prior art date
Application number
PCT/CN2019/108470
Other languages
French (fr)
Chinese (zh)
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 苏州浪潮智能科技有限公司
Publication of WO2021046935A1 publication Critical patent/WO2021046935A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present invention relates to the field of storage technology, in particular to two management data synchronization methods, devices, storage devices and readable storage media.
  • a multi-controller storage array is a commonly used storage device that consists of a master controller and multiple slave controllers.
  • the master controller is responsible for managing the storage array.
  • a slave controller will be selected as the new master controller and take over the management of the master controller Task, the old master controller becomes the slave controller.
  • the management data of the main controller needs to be synchronized between the controllers.
  • the data synchronization scheme is often that the master controller sends management data to the slave controller.
  • the master controller needs to use complex algorithms to ensure data consistency. Occupies a large part of the performance of the main controller.
  • the master control needs to maintain communication with each slave controller one by one, and constantly verify whether the management data of the slave controller is consistent with the latest management data in the master controller.
  • the threads used to synchronize the management data in the main control will occupy the computing resources and storage resources of the main controller to ensure the consistency of the management data. Due to the synchronization management data occupancy performance, it is difficult for the main controller to guarantee the management quality of the storage array. In severe cases, the multi-controller storage array may not be able to provide external storage services and affect user experience.
  • the purpose of the present invention is to provide two management data synchronization methods, devices, storage devices, and readable storage media.
  • the performance of the main controller is reduced, and the multi-controller storage array can be guaranteed.
  • the stability of storage devices is conducive to improving user experience.
  • the present invention provides the following technical solutions:
  • the first management data synchronization method includes:
  • the slave controller receives and parses the management data synchronization message multicasted by the master controller after the management data changes, and obtains the multicast sequence number;
  • management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence number to synchronize the management data.
  • it also includes:
  • the management data that has been synchronized with the main controller is cleared, so as to synchronize the management data of the new main controller.
  • the determining the main controller switching includes:
  • using the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record includes:
  • the missing multicast sequence number is determined, and when there is no corresponding processing record for the missing multicast sequence number, it is determined that the missing multicast sequence number is the target multicast sequence number.
  • processing the management data synchronization message without corresponding processing records in the order of the multicast sequence number to synchronize the management data includes:
  • the management data synchronization message is sequentially parsed according to the sequence to obtain the management data content.
  • sending the target multicast sequence number to the main controller includes:
  • the management data synchronization message is a classified management data synchronization message, and the management data synchronization message without corresponding processing records is processed in the order of the multicast sequence number to synchronize the management data, including:
  • the management data type includes volume, host, and fan;
  • the management data corresponding to the management data type is synchronized by using the management data content carried in the classification management data synchronization message.
  • the second method of managing data synchronization includes:
  • the master controller multicasts a management data synchronization message to each slave controller;
  • the management data synchronization message includes a multicast sequence number;
  • receiving the missing and unprocessed target multicast sequence number sent from the controller includes:
  • re-sending the target management data synchronization message corresponding to the target multicast sequence number to the slave controller includes:
  • the target management data synchronization message is separately reissued to the slave controller.
  • multicasting the management data synchronization message to each slave controller includes:
  • the management data type includes volume, host, and fan;
  • a storage device including:
  • a plurality of controllers, each of the controllers includes:
  • Memory used to store computer programs
  • the processor is used to implement the steps of the target method when the computer program is executed
  • the target method executed by the slave controller of the plurality of controllers is the same as the above-mentioned first management data synchronization method
  • the target method executed by the main controller of the plurality of controllers is the same as the above-mentioned second management data synchronization method.
  • the first management data synchronization device applied to the slave controller, includes:
  • the management data synchronization message receiving module is used to receive and parse the management data synchronization message multicasted by the main controller after the management data changes, and obtain the multicast sequence number;
  • a message checking module configured to use the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record
  • the message missing processing module is configured to send the target multicast sequence number to the main controller if the target multicast sequence number exists, and receive the corresponding target multicast sequence number reissued by the main controller Target management data synchronization message;
  • the data synchronization module is configured to, if there is no target multicast sequence number, process the management data synchronization messages without corresponding processing records in the order of the multicast sequence numbers to synchronize the management data.
  • the second type of management data synchronization device applied to the main controller, includes:
  • the management data synchronization message multicast module is configured to multicast a management data synchronization message to each slave controller after the management data changes; the management data synchronization message includes a multicast sequence number;
  • the missing message determination module is used to receive the missing target multicast sequence number sent from the controller without processing records
  • the message reissue module is used to reissue the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the non-corresponding processing records in the order of the multicast sequence number
  • the management data synchronization message is used to synchronize the management data.
  • the first management data synchronization method provided by the embodiment of the present invention is applied to the slave controller in the storage device, the management data synchronization message received from the controller is verified by the multicast sequence number whether the message is missing or missing, and After determining that there is a target multicast sequence number that is missing or missing and has no processing record, it actively asks the main controller for the target management data synchronization message corresponding to the target multicast sequence number. Then, after determining that the multicast sequence numbers are continuous, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence numbers to realize the synchronization of the management data with the main controller.
  • the slave controller transfers the original management data synchronization verification operation from itself for processing, and the master controller only needs to multicast the management data synchronization message, and passively reissue the target management that was not received by the individual slave controllers.
  • the data synchronization message is sufficient. That is, it realizes that the management data synchronization task of the master controller is shared to each slave controller, which can avoid the problem of resource occupation of the master controller, can guarantee the quality of the storage array management of the master controller, and further ensure the stability of the storage device .
  • the master controller in the storage device applies the second management data synchronization method provided by the embodiment of the present invention.
  • the master controller multicasts a management data synchronization message to each slave controller; Then it is only necessary to passively wait for the missing and unprocessed target multicast sequence numbers sent by the individual slave controllers; then, the target management data synchronization messages corresponding to the target multicast sequence numbers are reissued to the slave controllers.
  • this method can greatly reduce the pressure of the master controller's management data synchronization. Reduce the calculation and storage performance of the main controller, save more resources to process storage array management tasks, and ensure the stability of the storage device.
  • the embodiment of the present invention also provides two management data synchronization devices, storage devices, and readable storage media corresponding to the above two management data synchronization methods, which have the above technical effects, and will not be repeated here.
  • Figure 1 is an implementation flowchart of the first management data synchronization method in an embodiment of the present invention
  • FIG. 2 is an implementation flowchart of a second management data synchronization method in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a specific implementation process of a method for managing data synchronization in an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a storage device in an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a specific structure of a controller in a storage device provided by this embodiment
  • FIG. 6 is a schematic structural diagram of a first management data synchronization device in an embodiment of the present invention.
  • Fig. 7 is a schematic structural diagram of a second management data synchronization device in an embodiment of the present invention.
  • Figure 1 is an implementation flowchart of a first management data synchronization method in an embodiment of the present invention. The method includes the following steps:
  • the slave controller receives and parses the management data synchronization message multicasted by the master controller after the management data changes, and obtains the multicast sequence number.
  • the slave controller is a slave controller in a storage device such as a multi-controller storage matrix, that is, it is managed by the master controller.
  • each slave controller needs to synchronize management data, and each slave controller can use the same synchronization operation to synchronize management data with the master controller.
  • the master controller after the master controller determines that the management data has changed, it can send a management data synchronization message to each slave controller in a multicast manner.
  • the management data synchronization message includes but is not limited to the multicast sequence number, Manage data content, where the multicast sequence number is the sequence number of the message sent.
  • the management data synchronization message can be numbered in sequence.
  • a multicast group can be set up in advance for the master controller and each slave controller, and then the master controller multicasts management data synchronization messages to the multicast group. In this way, each slave controller in the multicast group is The management data synchronization message can be received.
  • the management data synchronization message After receiving the management data synchronization message from the controller, the management data synchronization message can be parsed according to the protocol of the management data synchronization message to obtain the multicast sequence number of each management data synchronization message.
  • S102 Use the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record.
  • the processing record of the management data synchronization message may be recorded.
  • the multicast sequence number corresponding to the management data synchronization message can be added to the processed message table/queue. In this way, the processed message table/queue can be queried. Determine which management data synchronization messages have been processed; you can also set a processing variable separately.
  • the multicast sequence number corresponding to the management data synchronization message is assigned to the processing variable. By querying the processing variable, the management data message corresponding to the specific multicast sequence number that has been processed can be determined.
  • the target multicast sequence number is not only corresponding to the missing management data synchronization message, but also needs to satisfy that its corresponding management data synchronization message is an unprocessed management data synchronization message. In other words, when the missing message is a processed message, the missing message can be ignored.
  • the target multicast sequence number is determined, including:
  • Step 1 Determine whether the multicast sequence number is continuous
  • Step 2 If no, determine the missing multicast sequence number, and when there is no corresponding processing record for the missing multicast sequence number, determine the missing multicast sequence number as the target multicast sequence number.
  • the multicast sequence number After obtaining the multicast sequence number, first determine whether the received multicast sequence number is continuous. Specifically, if n historically received and processed management data synchronization messages are received, and m management data synchronization messages are currently received, it is determined that the m management data synchronization messages received are the same as the historically received and processed management data synchronization messages. Whether the multicast sequence numbers of the n management data synchronization messages are continuous, and whether the currently received multicast sequence numbers are continuous. For example, there are a total of 10 management data synchronization messages received and processed in history. The multicast message sequence number ranges from 00000 to 00010, and two more management data synchronization messages are currently received. The multicast message sequence numbers are 000009 and 000012. The newly received management data synchronization message is missing, that is, the two currently received management data synchronization messages are not continuous.
  • the management data synchronization message corresponding to the missing multicast sequence number After determining that the received multicast sequence numbers are not continuous, it is further determined whether the management data synchronization message corresponding to the missing multicast sequence number has been processed. For example, when the received management data synchronization message is missing, but the missing management data synchronization message is a processed message, the missing management data synchronization message can be ignored at this time.
  • the multicast sequence number interval corresponding to the unprocessed management data message may also be determined first, and then the management data that has been received in the multicast sequence number interval is further determined Whether there are missing target multicast sequence numbers between synchronization messages.
  • the interval of the multicast sequence number may be a multicast sequence number greater than that corresponding to the processed multicast sequence number. For example, when the sequence number of the processed message is 6, the multicast sequence number interval can be (6. ⁇ ). When the newly received multicast sequence number is 7, 9, 10, it can be seen that 6 and 7 are continuous, but 7 and 9 are not Continuous, the multicast sequence number 8 is confirmed, so the multicast sequence number 8 can be determined as the target multicast sequence number.
  • the number of determined target multicast sequence numbers can be 0, or one or more, and the number of target multicast sequence numbers is based on actual conditions. Resulted from the judgment. When the number of target multicast sequence numbers is 0, that is, there is no target multicast sequence number, and when the number of target multicast sequence numbers is greater than 0, it is determined that there is a target multicast sequence number.
  • step S103 is executed; if the judgment result is no, step S104 is executed.
  • S103 Send the target multicast sequence number to the main controller, and receive the target management data synchronization message corresponding to the target multicast sequence number reissued by the main controller.
  • the target multicast sequence number can be sent to the main controller.
  • sending the target multicast sequence number to the main controller may be specifically sending a reissuance request message carrying the target multicast sequence number to the main controller.
  • the reissuance application message includes, but is not limited to, the number of missing multicast sequence numbers and each target multicast sequence number.
  • the reissuance application message may also include the data content in common messages such as the slave controller ID and the integrity check code.
  • the master controller After receiving the target multicast sequence number, the master controller can reissue to the slave controller a synchronization message of target management data corresponding to the target multicast needs.
  • S104 Process the management data synchronization messages without corresponding processing records in the order of the multicast sequence number to synchronize the management data.
  • management data synchronization messages corresponding to different multicast sequence numbers may be adjusted for the same management data, in order to avoid destroying the internal logical relationship of the management data processing by the public management data synchronization messages, when processing the management data synchronization messages ,
  • the management data synchronization messages without corresponding processing records can be processed in sequence according to the multicast sequence number, so as to realize the synchronization of management data with the main controller.
  • processing the management data synchronization message to synchronize the management data includes:
  • Step 1 Use processing records to filter out management data synchronization messages without corresponding processing records
  • Step 2 Use the multicast sequence number to sort the filtered management data synchronization messages in order
  • Step 3 Analyze the management data synchronization message in sequence according to the arrangement order to obtain the content of the management data.
  • the processing record is a processing variable
  • the management data synchronization message whose multicast sequence number is greater than the current value of the processing variable can be filtered out to be processed.
  • the processing record is the processed message table/queue
  • the processed message table/queue can be traversed to filter out the unprocessed management data synchronization messages.
  • the management data synchronization message can be parsed in sequence according to the sort order to obtain the management data content.
  • the management data content can be obtained from the management data synchronization message according to the specific format definition of the preset management data synchronization message.
  • the management data synchronization include, you can record sequentially: multicast sequence number, main controller ID, subsequent data length, full data mark, data number, data content part; among them, the data content part is the management data content, data content It can be specifically: the ID of data 1, the detailed content length of data 1, the detailed content of data 1,..., the ID of data n, the detailed content length of data n, and the detailed content of data n.
  • the specific data content of the management data synchronization message and the position sequence in the message can be adjusted.
  • the first management data synchronization method provided by the embodiment of the present invention is applied to the slave controller in the storage device, the management data synchronization message received from the controller is verified by the multicast sequence number whether the message is missing or missing, and After determining that there is a target multicast sequence number that is missing or missing and has no processing record, it actively asks the main controller for the target management data synchronization message corresponding to the target multicast sequence number. Then, after determining that the multicast sequence numbers are continuous, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence numbers to realize the synchronization of the management data with the main controller.
  • the slave controller transfers the original management data synchronization verification operation from itself for processing, and the master controller only needs to multicast the management data synchronization message, and passively reissue the target management that was not received by the individual slave controllers.
  • the data synchronization message is sufficient. That is, sharing the management data synchronization task of the master controller to each slave controller can avoid the problem of resource occupation of the master controller, guarantee the management quality of the storage array of the master controller, and further ensure the stability of the storage device.
  • the embodiment of the present invention also provides a corresponding improvement scheme.
  • the same steps as those in the above-mentioned embodiments or corresponding steps can be referred to each other, and the corresponding beneficial effects can also be referred to each other, which will not be repeated in the preferred/improved embodiments herein.
  • the multi-controller storage array may have the situation that the main controller suddenly shuts down, malfunctions, etc., and cannot continue to manage the slave controller.
  • one of the slave controllers can be selected to take over the management of the master controller and become the new master controller. That is, when a master-slave switch occurs, all slave controllers need to synchronize management data with the new master controller, so that the subsequent master-slave switch can be successfully switched.
  • the slave controller determines that the controller is switched, it actively resigns the management data that has been synchronized with the original master controller in order to synchronize the management data with the new master controller.
  • the specific process of determining the main controller switching includes:
  • Step 1 Receive and parse the master controller switching message sent by the target controller to obtain the multicast sequence number and master controller ID;
  • Step 2 When the ID of the main controller is inconsistent with the main controller, determine that the target controller is the new main controller.
  • the new master controller can send a master controller switch message to each slave controller.
  • the main controller switching message may include, but is not limited to: a multicast sequence number, and the main controller ID.
  • the master controller switching message may also include the original master controller ID, subsequent data length, and master-slave switching flag.
  • the target controller is the new main controller.
  • the main controller switching message has a master-slave switching flag, it can be directly considered that the target controller sending the main controller switching message is the new main controller.
  • the management data to be synchronized can also be classified, and the slave controller performs classified storage and synchronization when storing the management data.
  • the management data can be classified in advance, and the management data types can include, but are not limited to, volumes, hosts, and fans.
  • the management data type can also be specifically subdivided into management data corresponding to different volumes and management data corresponding to different hosts.
  • the management data type can be set in the management data synchronization message. In this way, the management data synchronization message is a classified management data synchronization message.
  • the above step S104 processes the management data synchronization messages without corresponding processing records in the order of the multicast sequence number to synchronize the management data, which may specifically include:
  • Step 1 Determine the management data type corresponding to the classified management data synchronization message; wherein, the management data type includes volume, host, and fan;
  • Step 2 Use the management data content carried in the classification management data synchronization message to synchronize the management data corresponding to the management data type.
  • the main controller After determining that the management data has changed, the main controller adds the multicast serial number and management data content to the management data synchronization message, and then writes the specific type of management data into the message, so that the classified management management data message can be obtained , And send the classification management data synchronization message to each slave controller through multicast.
  • the management data type can be determined from the classification management data synchronization message. And classification management data, and use the classification management data content to process the stored management data corresponding to the management data type.
  • Figure 2 is an implementation flowchart of the second management data synchronization method in an embodiment of the present invention. This method and the management data synchronization method disclosed in the first embodiment can be cross-referenced, and include the following steps:
  • the master controller After the management data changes, the master controller multicasts a management data synchronization message to each slave controller.
  • the management data synchronization message includes the multicast sequence number.
  • the master controller and the slave controllers can be processed to be set in the same multicast group.
  • each management data synchronization message can be numbered, that is, different management data messages can include a multicast sequence number, so that the controller can pair the received messages according to the multicast sequence number.
  • Manage data synchronization messages for sequential processing.
  • the master controller After the master controller sends the management data synchronization message to the slave controller, there is no need to interact with the slave controller to determine that the slave controller completes the management data synchronization.
  • the main controller after the main controller multicasts the management data synchronization message, it can be in a waiting state.
  • the management data synchronization message After receiving the management data synchronization message from the controller, the management data synchronization message can be processed according to the management data synchronization method described in the first embodiment. After the slave controller finds that there is a missing target multicast sequence number, it can send the target multicast sequence number to the master controller.
  • the master controller may receive and parse the reissuance request message sent by the slave controller to obtain the target multicast sequence number.
  • the number of target multicast sequence numbers can be one or more.
  • S203 Re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the management data synchronization message without corresponding processing records in the order of the multicast sequence number to synchronize the management data.
  • the master controller finds out the target management synchronization message corresponding to the target multicast sequence number, and then reissues the target management synchronization playback to the slave controller that lacks the target synchronization management data message. After receiving the target management data synchronization message from the controller, it can continue to determine whether the message is continuous, and in the case of continuous multicast sequence numbers, process the received management data synchronization message to synchronize the management data.
  • the target management data synchronization message can be separately reissued to the slave controller. That is, the end-to-end communication mode can be used to reissue the target management data message to the slave controller that lacks the message.
  • the master controller in the storage device applies the second management data synchronization method provided by the embodiment of the present invention. After the management data changes, the master controller multicasts the management data synchronization message to each slave controller; then only Passively wait for the missing and unprocessed target multicast sequence numbers sent by individual slave controllers; then, re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller. It can be seen that compared with the existing master controller that requires end-to-end communication between each slave controller and repeatedly confirming whether the management data is successfully synchronized, this method can greatly reduce the pressure of the master controller's management data synchronization, and Reduce the calculation and storage performance of the main controller, save more resources to process storage array management tasks, and ensure the stability of the storage device.
  • the embodiment of the present invention also provides a corresponding improvement scheme.
  • the same steps as those in the above-mentioned embodiments or corresponding steps can be referred to each other, and the corresponding beneficial effects can also be referred to each other, which will not be repeated in the preferred/improved embodiments herein.
  • the management data to be synchronized can also be classified.
  • the slave controller performs classified storage and synchronization when storing the management data.
  • the management data can be classified in advance, and the management data types can include, but are not limited to, volumes, hosts, and fans.
  • the management data type can also be specifically subdivided into management data corresponding to different volumes and management data corresponding to different hosts.
  • the management data type can be set in the management data synchronization message. In this way, the management data synchronization message is a classified management data synchronization message.
  • step S201 multicasts a management data synchronization message to each slave controller after the management data changes, including:
  • Step 1 After the management data changes, determine the type of management data to be synchronized; among them, the type of management data includes volume, host, and fan;
  • Step 2 Generate a classification management data synchronization message matching the management data type
  • Step 3 Multicast the classified management data synchronization message to each slave controller, so that each slave controller synchronizes the management data according to the management data type.
  • the main control can determine the type of management data to be synchronized.
  • the management data type in the management data synchronization message indicates the management data type, so that the management data synchronization message is a classified management data synchronization message. Then, multicast the classification management data synchronization message to each slave controller.
  • the classified management data can be processed according to the management data type to keep synchronization with the main controller.
  • the management data synchronization method provided by the above-mentioned first embodiment and the above-mentioned second embodiment can be applied to the same multi-controller storage array, that is, the master controller executes the management data synchronization method provided by the above two, and the slave master
  • the device executes the management data synchronization method provided in the foregoing embodiment, and the implementation process is as follows:
  • the volume is of one type
  • the host is of one type
  • the fan is of one type.
  • Each data in each data type has an ID field, and the ID field is unique in this type of data.
  • the ID of volume 1 is 0, the ID of volume 2 is 1, and the ID of host 1 is 2.
  • the multicast messages can include the master Controller ID, multicast serial number, management data type, data ID, data details.
  • the controller After receiving the multicast message from the controller, it judges whether the message has been processed according to the ID of the main controller and the multicast sequence number. If it has been processed, ignore it; otherwise, judge whether the multicast sequence number is continuous, if not, Write down the missing multicast sequence number, and send it unicast to the main controller, save the data received this time, and parse the message after the missing multicast message is received again; otherwise, the parsed multicast sequence number is continuous For the unprocessed messages, update its own management data. Sequential analysis of multicast messages can ensure data consistency with the main controller.
  • the main controller first multicasts the "main controller switching" message, and then multicasts all management data, and the multicast sequence number starts from 0 again. .
  • the ordinary node receives the "main controller switching" message, it clears its own management data and resynchronizes the main controller data.
  • FIG. 3 is a schematic diagram of a specific implementation process of a management data synchronization method in an embodiment of the present invention.
  • the management data such as one type of volume, one type of host, one type of fan, and so on.
  • Each data in each data type has an ID field, and the ID field is unique in this type of data.
  • the id of volume 1 is 0, the id of volume 2 is 1, the id of host 1 is 0, and so on.
  • the present invention does not provide a specific classification method, and can be classified by itself during specific implementation. In this way, when the subsequent main controller records the multicast record, it can record the data ID without having to record the detailed content of the data, reducing the amount of recorded data.
  • all controllers form a multicast group.
  • the main controller needs to multicast the changed management data to the multicast group (it may be necessary to send multiple multicast messages, that is, management data synchronization messages , Each message can send one or more types of data), and write down the sending record (including the main controller ID, multicast serial number, management data type, data 1 ID, data 2 ID, ..., data n's ID).
  • the format of the management data synchronization message (message 1 in Figure 3, the message type is 0) is shown in Table 1:
  • the message format of multicast management data includes:
  • Multicast sequence number it can start from 0 and increase in order to identify the multicast message sent by the main controller
  • Main controller ID the unique identification of the main controller
  • Message type the value 0 here means multicast management data
  • Subsequent data length the number of bytes following this field in this message.
  • Data Type The data type of the management data sent. Only one type of data can be sent at a time.
  • Full data mark 0 means that it only contains the changed management data of this type; 1 means that it contains all the management data of this type;
  • Number of data the number of management data sent
  • ID of data 1 the data ID of the first data
  • the detailed content length of data 1 the number of message bytes occupied by the detailed content of the first data
  • the detailed content of data 1 the detailed content of the first data
  • ID of data n the data ID of the nth data
  • the detailed content length of data n the number of message bytes occupied by the detailed content of the nth data
  • the main controller switching message (message 2) is used to inform other controllers that the main controller has been switched (message type 1).
  • the specific message format is shown in Table 3:
  • the reissuance application message (message 3 in Figure 3) is used to notify the host controller of the unreceived multicast message.
  • the specific message format is shown in Table 4:
  • Step. Receive multicast message 1. If received, go to the next step.
  • Step2 Identify a message uniquely according to the ID of the main controller and the multicast sequence number, and judge whether the message has been processed. If it has been processed, ignore it; otherwise, go to the next step.
  • Step3 Obtain the multicast sequence number in the message, and judge whether it is continuous with the most recently processed multicast sequence number. If it is not continuous, go to the next step; otherwise, go to Step 6.
  • Step4 Assemble the missing multicast sequence number into message 3 (namely, reissue application message), send it to the main controller using unicast, and go to the next step.
  • message 3 namely, reissue application message
  • Step5. Save the currently received message, do not process it temporarily, go to Step1.
  • Step6 Process the received messages with consecutive multicast sequence numbers (including the previously saved but unprocessed messages) in order, and update their own management data.
  • Step7 (not shown in the figure).
  • the main controller After the main controller receives the message of Step 4 of the above process, it should immediately obtain the corresponding data according to the sending record, and use the missing multicast sequence number to send the multicast message 1. This can ensure that ordinary nodes can synchronize the data of the main controller in time.
  • Step5 if there are multiple packet loss phenomena in the network, the unprocessed messages in Step5 may not be updated in time. Therefore, the slave controller needs to restart the thread to continuously check whether there are saved but unprocessed messages in Step5. If it exists, it means that there is a missing multicast sequence number, and Step4 needs to be performed.
  • the main controller first multicasts the "main controller switch" message (same as the main controller switch message above), and then multicast For all management data, the multicast sequence number starts from 0 again. After the ordinary node receives the "main controller switching" message, it clears its own management data and clears the message records and data related to the old main controller.
  • the multicast technology is used to design incremental multicast sequence numbers, and the multicast messages are processed sequentially, which ensures that the slave controller and the master controller manage the management while reducing the synchronization workload of the master controller. Data consistency.
  • the embodiment of the present invention also provides a storage device.
  • the storage device described below and the management data synchronization method described above can be referenced correspondingly.
  • the storage device includes:
  • each controller includes:
  • Memory used to store computer programs
  • the processor is used to implement the steps of the target method when the computer program is executed
  • the target method executed by the slave controller D1 in the plurality of controllers is the method in the first embodiment
  • the target method executed by the main controller D2 of the plurality of controllers is the same as the method in the second embodiment above.
  • FIG. 5 is a schematic diagram of a specific structure of a controller in a storage device provided by this embodiment.
  • the controller may have relatively large differences due to different configurations or performance, and may include one or more A processor (central processing units, CPU) 322 (for example, one or more processors), a memory 332, and one or more storage media 330 (for example, one or more storage devices with a large amount of data) storing application programs 342 or data 344.
  • the memory 332 and the storage medium 330 may be short-term storage or persistent storage.
  • the program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the data processing device.
  • the central processing unit 322 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the controller 301.
  • the controller 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and/or one or more operating systems 341.
  • one or more power supplies 326 for example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the steps in the management data synchronization method described above can be implemented by the structure of the controller.
  • the embodiment of the present invention also provides a management data synchronization device that can be applied to the slave controller.
  • the management data synchronization device described below and the management data synchronization method described above may correspond to each other and refer to each other. .
  • the device includes:
  • the management data synchronization message receiving module 101 is configured to receive and parse the management data synchronization message multicasted by the main controller after the management data changes, and obtain the multicast sequence number;
  • the message checking module 102 is configured to use the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record;
  • the message missing processing module 103 is configured to send the target multicast sequence number to the main controller if there is a target multicast sequence number, and receive the target management data synchronization message corresponding to the target multicast sequence number reissued by the main controller;
  • the data synchronization module 104 is configured to, if there is no target multicast sequence number, process the management data synchronization messages without corresponding processing records in the order of the multicast sequence number to synchronize the management data.
  • the first management data synchronization device provided by the embodiment of the present invention is applied to the slave controller in the storage device, and the management data synchronization message received from the controller is automatically verified whether the message is missing or missing according to the multicast sequence number, and After determining that there is a target multicast sequence number that is missing or missing and has no processing record, it actively asks the main controller for the target management data synchronization message corresponding to the target multicast sequence number. Then, after determining that the multicast sequence numbers are continuous, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence numbers to realize the synchronization of the management data with the main controller.
  • the slave controller transfers the original management data synchronization verification operation from itself for processing, and the master controller only needs to multicast the management data synchronization message, and passively reissue the target management that was not received by the individual slave controllers.
  • the data synchronization message is sufficient. That is, sharing the management data synchronization task of the master controller to each slave controller can avoid the problem of resource occupation of the master controller, guarantee the management quality of the storage array of the master controller, and further ensure the stability of the storage device.
  • the master-slave switching processing module is used to clear the management data that has been synchronized with the master controller after the master controller is switched, so as to synchronize the management data of the new master controller.
  • the master-slave switching processing module is specifically used to receive and parse the master controller switching message sent by the target controller to obtain the multicast sequence number and the master controller ID; in the master controller ID When it is inconsistent with the main controller, determine that the target controller is the new main controller.
  • the message checking module 102 is specifically used to determine whether the multicast sequence number is continuous; if not, it determines the missing multicast sequence number, and when there is no corresponding processing record for the missing multicast sequence number, Determine the missing multicast sequence number as the target multicast sequence number.
  • the data synchronization module 104 is specifically configured to use processing records to filter out management data synchronization messages without corresponding processing records; use multicast sequence numbers to sequence the selected management data synchronization messages Sorting: Analyze the management data synchronization messages in sequence according to the sort order to obtain the management data content.
  • the message missing processing module 103 is specifically configured to send a reissue request message carrying the target multicast sequence number to the main controller.
  • the data synchronization module 104 is specifically configured to determine the management data type corresponding to the classified management data synchronization message when the management data synchronization message is a classified management data synchronization message; wherein, the management The data types include volumes, hosts, and fans; the management data content carried in the classified management data synchronization message is used to synchronize the management data corresponding to the management data type.
  • Embodiment 6 is a diagrammatic representation of Embodiment 6
  • the embodiment of the present invention also provides a management data synchronization device applicable to the main controller.
  • the management data synchronization device described below and the management data synchronization method described above can be referred to each other.
  • the device includes the following modules:
  • the management data synchronization message multicast module 201 is configured to multicast the management data synchronization message to each slave controller after the management data changes; the management data synchronization message includes the multicast sequence number;
  • the missing message determining module 202 is configured to receive the missing target multicast sequence number sent from the controller without processing records;
  • the message reissue module 203 is used to reissue the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the management data synchronization message without corresponding processing records in the order of the multicast sequence number, To synchronize management data.
  • the master controller in the storage device applies the second management data synchronization device provided by the embodiment of the present invention. After the management data changes, the master controller multicasts management data synchronization messages to each slave controller; then only Passively wait for the missing and unprocessed target multicast sequence numbers sent by individual slave controllers; then, re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller. It can be seen that compared with the existing master controller that requires end-to-end communication between each slave controller and repeatedly confirms whether the management data is successfully synchronized, this device can greatly reduce the pressure of the master controller's management data synchronization. Reduce the calculation and storage performance of the main controller, save more resources to process storage array management tasks, and ensure the stability of the storage device.
  • the missing message determining module 202 is configured to receive and analyze the reissue request message sent from the controller to obtain the target multicast sequence number.
  • the message reissue module 203 is specifically configured to separately reissue the target management data synchronization message to the slave controller.
  • the management data synchronization message multicast module 201 is specifically configured to determine the type of management data to be synchronized after the management data changes; wherein, the management data types include volume, host, Fan; Generate classification management data synchronization messages matching the management data type; multicast the classification management data synchronization messages to each slave controller, so that each slave controller synchronizes management data according to the management data type.
  • the embodiment of the present invention also provides a readable storage medium.
  • the readable storage medium described below and the method for synchronizing management data described above can be referred to each other.
  • a readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for managing data synchronization in the foregoing method embodiment are implemented.
  • the readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk that can store program codes. Readable storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Hardware Redundancy (AREA)

Abstract

A management data synchronization method and apparatus applied to a master controller, and a management data synchronization method and apparatus applied to a slave controller, and a storage device and a readable storage medium. According to the method, multicast technology is used to design progressively increasing multicast serial numbers and sequentially process multicast messages, and a slave controller determines, by means of the multicast serial numbers, whether messages are missing, and insofar as the messages are missing, actively pulls missing messages from a master controller, such that management data synchronization is realized. According to the method, insofar as the synchronization workload of the master controller is reduced, the consistency of management data in the slave controller and the master controller is ensured, and the system stability of a multi-controller storage array can be further ensured.

Description

管理数据同步方法、装置、存储设备及可读存储介质Management data synchronization method, device, storage device and readable storage medium
本申请要求于2019年09月12日提交至中国专利局、申请号为201910866500.6、发明名称为“管理数据同步方法、装置、存储设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed to the Chinese Patent Office on September 12, 2019, the application number is 201910866500.6, and the invention title is "Management data synchronization method, device, storage device and readable storage medium". All of them The content is incorporated in this application by reference.
技术领域Technical field
本发明涉及存储技术领域,特别是涉及两种管理数据同步方法、装置、存储设备及可读存储介质。The present invention relates to the field of storage technology, in particular to two management data synchronization methods, devices, storage devices and readable storage media.
背景技术Background technique
随着互联网的高速发展,特别是云计算与网联网的发展,用户与应用数据呈现高速增长状态,存储阵列应运而生,专门用来存储数据。With the rapid development of the Internet, especially the development of cloud computing and network networking, user and application data are showing rapid growth, and storage arrays have emerged to store data.
多控制器存储阵列是一种常用的存储设备,由一个主控制器和多个从控制器组成。主控制器负责管理存储阵列,为提高可靠性,当主控制器失去管理能力时(例如控制器突然关机等情况),将选取一个从控制器作为新的主控制器,并接管主控制器的管理任务,旧的主控制器变为从控制器。在主控制器切换后,为保证管理服务不变,需要在各控制器之间同步主控制器的管理数据。A multi-controller storage array is a commonly used storage device that consists of a master controller and multiple slave controllers. The master controller is responsible for managing the storage array. In order to improve reliability, when the master controller loses its management capability (such as a sudden shutdown of the controller), a slave controller will be selected as the new master controller and take over the management of the master controller Task, the old master controller becomes the slave controller. After the main controller is switched, in order to ensure that the management service remains unchanged, the management data of the main controller needs to be synchronized between the controllers.
目前数据同步方案往往是主控制器发送管理数据到从控制器,每一次数据发送,为了保障各个控制器各自存储的管理数据的一致性性,需要主控制器利用复杂算法保证数据一致性,需要占用主控制器很大一部分性能。具体的,主控制需要逐个与各个从控制器之间保持通信,并不断验证从控制器的管理数据是否与主控制器内最新的管理数据一致,在从控制器数量较多,或管理数据变更较为频繁时,主控制内用于同步管理数据的线程则会占用主控制器的计算资源、存储资源,以保障管理数据一致性。由于同步管理数据占用性能,导致主控制器难以保障存储阵列管理质量,严重时,可能会导致多控制器存储阵列无法对外提供存储服务,影响用户体验。At present, the data synchronization scheme is often that the master controller sends management data to the slave controller. Each time data is sent, in order to ensure the consistency of the management data stored by each controller, the master controller needs to use complex algorithms to ensure data consistency. Occupies a large part of the performance of the main controller. Specifically, the master control needs to maintain communication with each slave controller one by one, and constantly verify whether the management data of the slave controller is consistent with the latest management data in the master controller. There are more slave controllers or management data changes. When it is more frequent, the threads used to synchronize the management data in the main control will occupy the computing resources and storage resources of the main controller to ensure the consistency of the management data. Due to the synchronization management data occupancy performance, it is difficult for the main controller to guarantee the management quality of the storage array. In severe cases, the multi-controller storage array may not be able to provide external storage services and affect user experience.
综上所述,如何有效地解决管理数据同步占用主控制器性能等问题,是目前本领域技术人员急需解决的技术问题。In summary, how to effectively solve the problem of the synchronization of the management data occupying the performance of the main controller is a technical problem urgently needed to be solved by those skilled in the art.
发明内容Summary of the invention
本发明的目的是提供两种管理数据同步方法、装置、存储设备及可读存储介质,通过从控制器分担管理数据同步任务,减少占用主控制器性能,可保障多控制器存储阵列这一类存储设备的稳定性,有利于提高用户体验。The purpose of the present invention is to provide two management data synchronization methods, devices, storage devices, and readable storage media. By sharing management data synchronization tasks from the controller, the performance of the main controller is reduced, and the multi-controller storage array can be guaranteed. The stability of storage devices is conducive to improving user experience.
为解决上述技术问题,本发明提供如下技术方案:In order to solve the above technical problems, the present invention provides the following technical solutions:
第一种管理数据同步方法,包括:The first management data synchronization method includes:
从控制器接收并解析主控制器在管理数据发生变化后多播的管理数据同步报文,获得多播序号;The slave controller receives and parses the management data synchronization message multicasted by the master controller after the management data changes, and obtains the multicast sequence number;
利用所述多播序号确定是否存在缺失且无处理记录的目标多播序号;Using the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record;
如果是,则向所述主控制器发送所述目标多播序号,并接收所述主控制器补发的所述目标多播序号对应的目标管理数据同步报文;If yes, send the target multicast sequence number to the main controller, and receive a target management data synchronization message corresponding to the target multicast sequence number reissued by the main controller;
如果否,则按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。If not, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence number to synchronize the management data.
优选地,还包括:Preferably, it also includes:
确定主控制器切换后,清除与所述主控制器已同步的管理数据,以便同步新主控制器的管理数据。After it is determined that the main controller is switched, the management data that has been synchronized with the main controller is cleared, so as to synchronize the management data of the new main controller.
优选地,所述确定主控制器切换,包括:Preferably, the determining the main controller switching includes:
接收并解析目标控制器发送的主控制器切换报文,获得多播序号和主控制器ID;Receive and parse the master controller switching message sent by the target controller to obtain the multicast sequence number and master controller ID;
在所述主控制器ID与所述主控制器不一致时,确定所述目标控制器为所述新主控制器。When the main controller ID is inconsistent with the main controller, it is determined that the target controller is the new main controller.
优选地,利用所述多播序号确定是否存在缺失且无处理记录的目标多播序号,包括:Preferably, using the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record includes:
判断所述多播序号是否连续;Judging whether the multicast sequence number is continuous;
如果否,则确定出缺失多播序号,在所述缺失多播序号无对应处理记录时,确定所述缺失多播序号为所述目标多播序号。If not, the missing multicast sequence number is determined, and when there is no corresponding processing record for the missing multicast sequence number, it is determined that the missing multicast sequence number is the target multicast sequence number.
优选地,按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据,包括:Preferably, processing the management data synchronization message without corresponding processing records in the order of the multicast sequence number to synchronize the management data includes:
利用处理记录筛选出无对应处理记录的管理数据同步报文;Use processing records to filter out management data synchronization messages without corresponding processing records;
利用所述多播序号对筛选出的所述管理数据同步报文进行顺序排序;Order the filtered management data synchronization messages by using the multicast sequence number;
按照排列顺序依次解析所述管理数据同步报文,获得管理数据内容。The management data synchronization message is sequentially parsed according to the sequence to obtain the management data content.
优选地,向所述主控制器发送所述目标多播序号,包括:Preferably, sending the target multicast sequence number to the main controller includes:
向所述主控制器发送携带所述目标多播序号的补发申请报文。Sending a reissuance request message carrying the target multicast sequence number to the main controller.
优选地,所述管理数据同步报文为分类管理数据同步报文,按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据,包括:Preferably, the management data synchronization message is a classified management data synchronization message, and the management data synchronization message without corresponding processing records is processed in the order of the multicast sequence number to synchronize the management data, including:
确定所述分类管理数据同步报文对应的管理数据类型;其中,所述管理数据类型包括卷、主机、风扇;Determine the management data type corresponding to the classified management data synchronization message; wherein, the management data type includes volume, host, and fan;
利用所述分类管理数据同步报文携带的管理数据内容对所述管理数据类型对应的管理数据进行同步。The management data corresponding to the management data type is synchronized by using the management data content carried in the classification management data synchronization message.
第二种管理数据同步方法,包括:The second method of managing data synchronization includes:
主控制器在管理数据发生变化后,向各个从控制器多播管理数据同步报文;所述管理数据同步报文包括多播序号;After the management data changes, the master controller multicasts a management data synchronization message to each slave controller; the management data synchronization message includes a multicast sequence number;
接收从控制器发送的缺失且无处理记录的目标多播序号;Receive the missing and no-processed target multicast sequence number sent from the controller;
将所述目标多播序号对应的目标管理数据同步报文补发给所述从控制器,以便所述从控制器按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。Re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the management data synchronization message without corresponding processing records in the order of the multicast sequence number To synchronize management data.
优选地,接收从控制器发送的缺失且无处理记录的目标多播序号,包括:Preferably, receiving the missing and unprocessed target multicast sequence number sent from the controller includes:
接收并解析所述从控制器发送的补发申请报文,获得所述目标多播序号。Receiving and analyzing the reissuance request message sent by the slave controller to obtain the target multicast sequence number.
优选地,将所述目标多播序号对应的目标管理数据同步报文补发给所述从控制器,包括:Preferably, re-sending the target management data synchronization message corresponding to the target multicast sequence number to the slave controller includes:
将所述目标管理数据同步报文单独补发给所述从控制器。The target management data synchronization message is separately reissued to the slave controller.
优选地,在管理数据发生变化后,向各个从控制器多播管理数据同步报文,包括:Preferably, after the management data changes, multicasting the management data synchronization message to each slave controller includes:
在所述管理数据发生变化后,确定出待同步的管理数据类型;其中,所述管理数据类型包括卷、主机、风扇;After the management data changes, determine the management data type to be synchronized; wherein, the management data type includes volume, host, and fan;
生成与所述管理数据类型匹配的分类管理数据同步报文;Generating a classification management data synchronization message matching the management data type;
将所述分类管理数据同步报文多播至各个所述从控制器,以便各个所述从控制器根据所述管理数据类型同步所述管理数据。Multicast the classification management data synchronization message to each of the slave controllers, so that each of the slave controllers synchronizes the management data according to the management data type.
一种存储设备,包括:A storage device including:
多个控制器,每个所述控制器包括:A plurality of controllers, each of the controllers includes:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行所述计算机程序时实现目标方法的步骤;The processor is used to implement the steps of the target method when the computer program is executed;
多个所述控制器中的从控制器,所执行的所述目标方法如上述第一种管理数据同步方法;The target method executed by the slave controller of the plurality of controllers is the same as the above-mentioned first management data synchronization method;
多个所述控制器中的主控制器,所执行的所述目标方法如上述第二种管理数据同步方法。The target method executed by the main controller of the plurality of controllers is the same as the above-mentioned second management data synchronization method.
第一种管理数据同步装置,应用于从控制器,包括:The first management data synchronization device, applied to the slave controller, includes:
管理数据同步报文接收模块,用于接收并解析主控制器在管理数据发生变化后多播的管理数据同步报文,获得多播序号;The management data synchronization message receiving module is used to receive and parse the management data synchronization message multicasted by the main controller after the management data changes, and obtain the multicast sequence number;
报文校验模块,用于利用所述多播序号确定是否存在缺失且无处理记录的目标多播序号;A message checking module, configured to use the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record;
报文缺失处理模块,用于若存在所述目标多播序号,则向所述主控制器发送所述目标多播序号,并接收所述主控制器补发的所述目标多播序号对应的目标管理数据同步报文;The message missing processing module is configured to send the target multicast sequence number to the main controller if the target multicast sequence number exists, and receive the corresponding target multicast sequence number reissued by the main controller Target management data synchronization message;
数据同步模块,用于若不存在目标多播序号,则按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。The data synchronization module is configured to, if there is no target multicast sequence number, process the management data synchronization messages without corresponding processing records in the order of the multicast sequence numbers to synchronize the management data.
第二种管理数据同步装置,应用于主控制器,包括:The second type of management data synchronization device, applied to the main controller, includes:
管理数据同步报文组播模块,用于在管理数据发生变化后,向各个从控制器多播管理数据同步报文;所述管理数据同步报文包括多播序号;The management data synchronization message multicast module is configured to multicast a management data synchronization message to each slave controller after the management data changes; the management data synchronization message includes a multicast sequence number;
遗漏报文确定模块,用于接收从控制器发送的缺失且无处理记录的目标多播序号;The missing message determination module is used to receive the missing target multicast sequence number sent from the controller without processing records;
报文补发模块,用于将所述目标多播序号对应的目标管理数据同步报文补发给所述从控制器,以便所述从控制器按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。The message reissue module is used to reissue the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the non-corresponding processing records in the order of the multicast sequence number The management data synchronization message is used to synchronize the management data.
一种可读存储介质,所述可读存储介质上存储有计算机程序,所述计 算机程序被处理器执行时实现上述第一种或第二种管理数据同步方法的步骤。A readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned first or second method for managing data synchronization are realized.
在存储设备中的从控制器中应用本发明实施例所提供的第一种管理数据同步方法,从控制器接收到的管理数据同步报文,根据多播序号自行验证报文是否遗漏缺失,并在确定存在遗漏缺失且无处理记录的目标多播序号之后,主动向主控制器索取目标多播序号对应的目标管理数据同步报文。然后在确定多播序号连续之后,按照多播序号顺序处理无对应处理记录的管理数据同步报文,即可实现与主控制器同步管理数据。而在此过程中,从控制器将原管理数据同步验证操作转移自自身进行处理,而主控制器仅需多播管理数据同步报文,以及被动补发个别从控制器未接收到的目标管理数据同步报文即可。即,实现了将主控制器的管理数据同步任务分担至各个从控制器,可避免出现主控制器资源占用的问题,可保障主控制器的存储阵列管理质量,进一步保障该存储设备的稳定性。The first management data synchronization method provided by the embodiment of the present invention is applied to the slave controller in the storage device, the management data synchronization message received from the controller is verified by the multicast sequence number whether the message is missing or missing, and After determining that there is a target multicast sequence number that is missing or missing and has no processing record, it actively asks the main controller for the target management data synchronization message corresponding to the target multicast sequence number. Then, after determining that the multicast sequence numbers are continuous, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence numbers to realize the synchronization of the management data with the main controller. In this process, the slave controller transfers the original management data synchronization verification operation from itself for processing, and the master controller only needs to multicast the management data synchronization message, and passively reissue the target management that was not received by the individual slave controllers. The data synchronization message is sufficient. That is, it realizes that the management data synchronization task of the master controller is shared to each slave controller, which can avoid the problem of resource occupation of the master controller, can guarantee the quality of the storage array management of the master controller, and further ensure the stability of the storage device .
相应地,在存储设备中的主控制器应用本发明实施例所提供的第二种管理数据同步方法,主控制器在管理数据发生变化后,向各个从控制器多播管理数据同步报文;然后仅需被动等待个别从控制器发送的缺失且无处理记录的目标多播序号;然后将目标多播序号对应的目标管理数据同步报文补发给从控制器即可。可见,相比于现有的主控制器需要于各个从控制器进行端到端通信,并反复确认管理数据是否同步成功而言,本方法可大大减轻主控制器的管理数据同步的压力,可减少占用主控制器的计算、存储性能,能节省更多的资源处理存储阵列管理任务,可保障该存储设备的稳定性。Correspondingly, the master controller in the storage device applies the second management data synchronization method provided by the embodiment of the present invention. After the management data changes, the master controller multicasts a management data synchronization message to each slave controller; Then it is only necessary to passively wait for the missing and unprocessed target multicast sequence numbers sent by the individual slave controllers; then, the target management data synchronization messages corresponding to the target multicast sequence numbers are reissued to the slave controllers. It can be seen that, compared with the existing master controller that needs to communicate end-to-end with each slave controller and repeatedly confirm whether the management data is successfully synchronized, this method can greatly reduce the pressure of the master controller's management data synchronization. Reduce the calculation and storage performance of the main controller, save more resources to process storage array management tasks, and ensure the stability of the storage device.
相应地,本发明实施例还提供了与上述两种管理数据同步方法相对应的两种管理数据同步装置、存储设备和可读存储介质,具有上述技术效果,在此不再赘述。Correspondingly, the embodiment of the present invention also provides two management data synchronization devices, storage devices, and readable storage media corresponding to the above two management data synchronization methods, which have the above technical effects, and will not be repeated here.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员 来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为本发明实施例中第一种管理数据同步方法的实施流程图;Figure 1 is an implementation flowchart of the first management data synchronization method in an embodiment of the present invention;
图2为本发明实施例中第二种管理数据同步方法的实施流程图;2 is an implementation flowchart of a second management data synchronization method in an embodiment of the present invention;
图3为本发明实施例中一种管理数据同步方法的具体实现流程示意图;3 is a schematic diagram of a specific implementation process of a method for managing data synchronization in an embodiment of the present invention;
图4为本发明实施例中一种存储设备的结构示意图;4 is a schematic structural diagram of a storage device in an embodiment of the present invention;
图5为本实施例提供的一种存储设备中控制器的具体结构示意图;FIG. 5 is a schematic diagram of a specific structure of a controller in a storage device provided by this embodiment;
图6为本发明实施例中第一种管理数据同步装置的结构示意图;6 is a schematic structural diagram of a first management data synchronization device in an embodiment of the present invention;
图7为本发明实施例中第二种管理数据同步装置的结构示意图。Fig. 7 is a schematic structural diagram of a second management data synchronization device in an embodiment of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面结合附图和具体实施方式对本发明作进一步的详细说明。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a 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 those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
实施例一:Example one:
请参考图1,图1为本发明实施例中第一种管理数据同步方法的实施流程图,该方法包括以下步骤:Please refer to Figure 1. Figure 1 is an implementation flowchart of a first management data synchronization method in an embodiment of the present invention. The method includes the following steps:
S101、从控制器接收并解析主控制器在管理数据发生变化后多播的管理数据同步报文,获得多播序号。S101. The slave controller receives and parses the management data synchronization message multicasted by the master controller after the management data changes, and obtains the multicast sequence number.
其中,从控制器即为多控制器存储矩阵这一类存储设备中的从控制器,即其受主控制器管理。在本发明实施例中,各个从控制器都需要同步管理数据,各个从控制器可采用相同的同步操作与主控制器之间同步管理数据。Among them, the slave controller is a slave controller in a storage device such as a multi-controller storage matrix, that is, it is managed by the master controller. In the embodiment of the present invention, each slave controller needs to synchronize management data, and each slave controller can use the same synchronization operation to synchronize management data with the master controller.
在本发明实施例中,在主控制器确定管理数据发生变化之后,可通过多播的方式向各个从控制器发送管理数据同步报文,该管理数据同步报文包括但不限于多播序号、管理数据内容,其中多播序号即报文发送的序列号,为了便于数据同步,可按照顺序对管理数据同步报文进行编号。也就是说,可预先为主控制器与各个从控制器设置一个多播组,然后主控制器向多播组多播管理数据同步报文,如此,该多播组内的各个从控制器均可 接收到管理数据同步报文。In the embodiment of the present invention, after the master controller determines that the management data has changed, it can send a management data synchronization message to each slave controller in a multicast manner. The management data synchronization message includes but is not limited to the multicast sequence number, Manage data content, where the multicast sequence number is the sequence number of the message sent. In order to facilitate data synchronization, the management data synchronization message can be numbered in sequence. In other words, a multicast group can be set up in advance for the master controller and each slave controller, and then the master controller multicasts management data synchronization messages to the multicast group. In this way, each slave controller in the multicast group is The management data synchronization message can be received.
从控制器接收到管理数据同步报文之后,可按照管理数据同步报文的协议对管理数据同步报文进行解析,获得各个管理数据同步报文的多播序号。After receiving the management data synchronization message from the controller, the management data synchronization message can be parsed according to the protocol of the management data synchronization message to obtain the multicast sequence number of each management data synchronization message.
S102、利用多播序号确定是否存在缺失且无处理记录的目标多播序号。S102: Use the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record.
在本发明实施例中,在处理管理数据同步报文之后,可记录管理数据同步报文的处理记录。例如,可每处理一个管理数据同步报文后,将该管理数据同步报文对应的多播序号添加至已处理报文表中/队列,如此,便可通过查询已处理报文表/队列,确定哪些管理数据同步报文已处理;也可单独设置一个处理变量,在每处理一个管理数据同步报文之后,将该管理数据同步报文对应的多播序号赋值给该处理变量,如此,通过查询该处理变量,便可确定当前已处理至哪一个具体的多播序号对应的管理数据报文。In the embodiment of the present invention, after processing the management data synchronization message, the processing record of the management data synchronization message may be recorded. For example, after processing a management data synchronization message, the multicast sequence number corresponding to the management data synchronization message can be added to the processed message table/queue. In this way, the processed message table/queue can be queried. Determine which management data synchronization messages have been processed; you can also set a processing variable separately. After each management data synchronization message is processed, the multicast sequence number corresponding to the management data synchronization message is assigned to the processing variable. By querying the processing variable, the management data message corresponding to the specific multicast sequence number that has been processed can be determined.
其中,目标多播序号即为既对应缺失的管理数据同步报文,同时也需满足其对应的管理数据同步报文为未处理的管理数据同步报文。也就是说,当缺失报文属于已处理过的报文时,则可忽略该缺失报文。Among them, the target multicast sequence number is not only corresponding to the missing management data synchronization message, but also needs to satisfy that its corresponding management data synchronization message is an unprocessed management data synchronization message. In other words, when the missing message is a processed message, the missing message can be ignored.
具体的,确定目标多播序号,包括:Specifically, the target multicast sequence number is determined, including:
步骤一、判断多播序号是否连续;Step 1: Determine whether the multicast sequence number is continuous;
步骤二、如果否,则确定出缺失多播序号,在缺失多播序号无对应处理记录时,确定缺失多播序号为目标多播序号。Step 2: If no, determine the missing multicast sequence number, and when there is no corresponding processing record for the missing multicast sequence number, determine the missing multicast sequence number as the target multicast sequence number.
为便于描述,下面将上述两个步骤结合起来进行说明。For ease of description, the above two steps are combined for description below.
得到多播序号之后,首先确定接收到的多播序号是否连续。具体的,如历史接收且已处理的管理数据同步报文n个,当前又接收到m个管理数据同步报文,则确定接收到的这m个管理数据同步报文与历史接收且已处理的地n个管理数据同步报文的多播序号是否连续,以及当前接收到的多播序号之间是否连续。例如,历史接收且已处理的管理数据同步报文共10个,多播报文序号从00000——00010,当前又接收到2个管理数据同步报文,多播报文序号为000009和000012,可将新接收到的管理数据同步报文出现了缺失,即当前接收到的两个管理数据同步报文不连续。After obtaining the multicast sequence number, first determine whether the received multicast sequence number is continuous. Specifically, if n historically received and processed management data synchronization messages are received, and m management data synchronization messages are currently received, it is determined that the m management data synchronization messages received are the same as the historically received and processed management data synchronization messages. Whether the multicast sequence numbers of the n management data synchronization messages are continuous, and whether the currently received multicast sequence numbers are continuous. For example, there are a total of 10 management data synchronization messages received and processed in history. The multicast message sequence number ranges from 00000 to 00010, and two more management data synchronization messages are currently received. The multicast message sequence numbers are 000009 and 000012. The newly received management data synchronization message is missing, that is, the two currently received management data synchronization messages are not continuous.
在确定接收到的多播序号不连续之后,再进一步确定缺失的多播序号对应的管理数据同步报文是否已被处理。例如,当接收到的管理数据同步 报文缺失时,但缺失的管理数据同步报文为已处理过的报文,此时可忽略该管理数据同步报文的缺失。After determining that the received multicast sequence numbers are not continuous, it is further determined whether the management data synchronization message corresponding to the missing multicast sequence number has been processed. For example, when the received management data synchronization message is missing, but the missing management data synchronization message is a processed message, the missing management data synchronization message can be ignored at this time.
在本发明的其他实施例中,在确定目标多播序号时,还可先确定未处理管理数据报文对应的多播序号区间,然后进一步确定在该多播序号区间内已接收到的管理数据同步报文之间是否出现缺失的目标多播序号。其中,多播序号区间即可为大于已处理多播序号对应的多播序号。例如当已处理报文序号为6,则多播序号区间可为(6.∞),当新接收到的多播序号为7,9,10,可见,6与7连续,但7与9不连续,确实了多播序号8,因此可将多播序号8确定为目标多播序号。In other embodiments of the present invention, when determining the target multicast sequence number, the multicast sequence number interval corresponding to the unprocessed management data message may also be determined first, and then the management data that has been received in the multicast sequence number interval is further determined Whether there are missing target multicast sequence numbers between synchronization messages. Among them, the interval of the multicast sequence number may be a multicast sequence number greater than that corresponding to the processed multicast sequence number. For example, when the sequence number of the processed message is 6, the multicast sequence number interval can be (6.∞). When the newly received multicast sequence number is 7, 9, 10, it can be seen that 6 and 7 are continuous, but 7 and 9 are not Continuous, the multicast sequence number 8 is confirmed, so the multicast sequence number 8 can be determined as the target multicast sequence number.
需要说明的是,在每接收到一个或多个管理数据同步报文之后,确定出的目标多播序号的数量可以为0,也可以为1或多个,目标多播序号的数量根据实际情况进行判定而得出。当目标多播序号的数量为0时,即不存在目标多播序号,当目标多播序号的数量大于0时,则确定存在目标多播序号。It should be noted that after receiving one or more management data synchronization messages, the number of determined target multicast sequence numbers can be 0, or one or more, and the number of target multicast sequence numbers is based on actual conditions. Resulted from the judgment. When the number of target multicast sequence numbers is 0, that is, there is no target multicast sequence number, and when the number of target multicast sequence numbers is greater than 0, it is determined that there is a target multicast sequence number.
在确定出是否存在目标多播序号之后,便可根据判断结果执行后续步骤,具体的,如果判断结果为是,则执行步骤S103;如果判断结果为否,则执行步骤S104。After determining whether there is a target multicast sequence number, the subsequent steps can be executed according to the judgment result. Specifically, if the judgment result is yes, step S103 is executed; if the judgment result is no, step S104 is executed.
S103、向主控制器发送目标多播序号,并接收主控制器补发的目标多播序号对应的目标管理数据同步报文。S103: Send the target multicast sequence number to the main controller, and receive the target management data synchronization message corresponding to the target multicast sequence number reissued by the main controller.
为了保障管理数据的一致性,在发现存在缺失且未处理的目标多播序号之后,可向主控制器发送该目标多播序号。In order to ensure the consistency of the management data, after discovering that there is a missing and unprocessed target multicast sequence number, the target multicast sequence number can be sent to the main controller.
其中,向主控制器发送目标多播序号,可具体为向主控制器发送携带目标多播序号的补发申请报文。其中,补发申请报文包括但不限于缺失的多播序号个数,以及各个目标多播序号。例如,补发申请报文还可以包括从控制器ID,完整性校验码等常见报文携带数据内容。Wherein, sending the target multicast sequence number to the main controller may be specifically sending a reissuance request message carrying the target multicast sequence number to the main controller. Among them, the reissuance application message includes, but is not limited to, the number of missing multicast sequence numbers and each target multicast sequence number. For example, the reissuance application message may also include the data content in common messages such as the slave controller ID and the integrity check code.
主控制器接收到该目标多播序号之后,可向从控制器补发目标多播需要对应的目标管理数据同步报文。After receiving the target multicast sequence number, the master controller can reissue to the slave controller a synchronization message of target management data corresponding to the target multicast needs.
S104、按照多播序号顺序处理无对应处理记录的管理数据同步报文,以同步管理数据。S104: Process the management data synchronization messages without corresponding processing records in the order of the multicast sequence number to synchronize the management data.
考虑到不同多播序号对应的管理数据同步报文,可能会针对同一个管理数据进行调整,为避免破坏公共管理数据同步报文对管理数据处理的内 部逻辑关系,在处理管理数据同步报文时,可按照多播序号依次对无对应处理记录的管理数据同步报文进行处理,以实现与主控制器同步管理数据。Considering that the management data synchronization messages corresponding to different multicast sequence numbers may be adjusted for the same management data, in order to avoid destroying the internal logical relationship of the management data processing by the public management data synchronization messages, when processing the management data synchronization messages , The management data synchronization messages without corresponding processing records can be processed in sequence according to the multicast sequence number, so as to realize the synchronization of management data with the main controller.
其中,处理管理数据同步报文,以同步管理数据,包括:Among them, processing the management data synchronization message to synchronize the management data includes:
步骤一、利用处理记录筛选出无对应处理记录的管理数据同步报文;Step 1: Use processing records to filter out management data synchronization messages without corresponding processing records;
步骤二、利用多播序号对筛选出的管理数据同步报文进行顺序排序;Step 2: Use the multicast sequence number to sort the filtered management data synchronization messages in order;
步骤三、按照排列顺序依次解析管理数据同步报文,获得管理数据内容。Step 3: Analyze the management data synchronization message in sequence according to the arrangement order to obtain the content of the management data.
为便于描述,下面将上述三个步骤结合起来进行说明。For ease of description, the above three steps are combined for description below.
首先,根据处理记录筛选出无对应处理记录的管理数据同步报文。具体的,当处理记录为处理变量,则可将多播序号大于处理变量当前数值的管理数据同步报文筛选出待处理。当处理记录为已处理报文表/队列时,则可通过遍历查询已处理报文表/队列,筛选出未处理的管理数据同步报文。First, filter out management data synchronization messages without corresponding processing records based on processing records. Specifically, when the processing record is a processing variable, the management data synchronization message whose multicast sequence number is greater than the current value of the processing variable can be filtered out to be processed. When the processing record is the processed message table/queue, the processed message table/queue can be traversed to filter out the unprocessed management data synchronization messages.
然后,按照多播序号对筛选出的待处理的管理数据同步报文进行顺序排序。Then, sort the filtered management data synchronization messages to be processed according to the multicast sequence number.
排序后,便可按照排列顺序依次解析管理数据同步报文,获得管理数据内容。其中,解析过程,即可按照预先设置的管理数据同步报文的具体格式定义,从管理数据同步报文中获得管理数据内容。例如,在管理数据同步包括中可依次记录:多播序号,主控制器ID,后续数据长度,全数据标记,数据个数,数据内容部分;其中,数据内容部分即为管理数据内容,数据内容可具体为:数据1的ID,数据1的详细内容长度,数据1的详细内容,…,数据n的ID,数据n的详细内容长度,数据n的详细内容。当然,在本发明的其他实施例中,管理数据同步报文的具体的数据内容以及在报文中的位置顺序均可调整。After sorting, the management data synchronization message can be parsed in sequence according to the sort order to obtain the management data content. Among them, in the parsing process, the management data content can be obtained from the management data synchronization message according to the specific format definition of the preset management data synchronization message. For example, in the management data synchronization include, you can record sequentially: multicast sequence number, main controller ID, subsequent data length, full data mark, data number, data content part; among them, the data content part is the management data content, data content It can be specifically: the ID of data 1, the detailed content length of data 1, the detailed content of data 1,..., the ID of data n, the detailed content length of data n, and the detailed content of data n. Of course, in other embodiments of the present invention, the specific data content of the management data synchronization message and the position sequence in the message can be adjusted.
在存储设备中的从控制器中应用本发明实施例所提供的第一种管理数据同步方法,从控制器接收到的管理数据同步报文,根据多播序号自行验证报文是否遗漏缺失,并在确定存在遗漏缺失且无处理记录的目标多播序号之后,主动向主控制器索取目标多播序号对应的目标管理数据同步报文。然后在确定多播序号连续之后,按照多播序号顺序处理无对应处理记录的管理数据同步报文,即可实现与主控制器同步管理数据。而在此过程中,从控制器将原管理数据同步验证操作转移自自身进行处理,而主控制器仅 需多播管理数据同步报文,以及被动补发个别从控制器未接收到的目标管理数据同步报文即可。即,将主控制器的管理数据同步任务分担至各个从控制器,可避免出现主控制器资源占用的问题,可保障主控制器的存储阵列管理质量,进一步保障该存储设备的稳定性。The first management data synchronization method provided by the embodiment of the present invention is applied to the slave controller in the storage device, the management data synchronization message received from the controller is verified by the multicast sequence number whether the message is missing or missing, and After determining that there is a target multicast sequence number that is missing or missing and has no processing record, it actively asks the main controller for the target management data synchronization message corresponding to the target multicast sequence number. Then, after determining that the multicast sequence numbers are continuous, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence numbers to realize the synchronization of the management data with the main controller. In this process, the slave controller transfers the original management data synchronization verification operation from itself for processing, and the master controller only needs to multicast the management data synchronization message, and passively reissue the target management that was not received by the individual slave controllers. The data synchronization message is sufficient. That is, sharing the management data synchronization task of the master controller to each slave controller can avoid the problem of resource occupation of the master controller, guarantee the management quality of the storage array of the master controller, and further ensure the stability of the storage device.
需要说明的是,基于上述实施例一,本发明实施例还提供了相应的改进方案。在优选/改进实施例中涉及与上述实施例中相同步骤或相应步骤之间可相互参考,相应的有益效果也可相互参照,在本文的优选/改进实施例中不再一一赘述。It should be noted that, based on the first embodiment described above, the embodiment of the present invention also provides a corresponding improvement scheme. In the preferred/improved embodiments, the same steps as those in the above-mentioned embodiments or corresponding steps can be referred to each other, and the corresponding beneficial effects can also be referred to each other, which will not be repeated in the preferred/improved embodiments herein.
优选地,考虑到多控制器存储阵列可能会出现主控制器突然关机、故障等无法继续对从控制器进行管理的情况。此时,可通过切换主从控制器,即可在从控制器中选定一个从控制器接替主控制器的管理工作,使之成为新的主控制器。即,出现主从切换时,所有的从控制器需与新主控制器进行管理数据同步,以便后续需要进行主从切换时,能够顺利进行切换。Preferably, it is considered that the multi-controller storage array may have the situation that the main controller suddenly shuts down, malfunctions, etc., and cannot continue to manage the slave controller. At this time, by switching between the master and slave controllers, one of the slave controllers can be selected to take over the management of the master controller and become the new master controller. That is, when a master-slave switch occurs, all slave controllers need to synchronize management data with the new master controller, so that the subsequent master-slave switch can be successfully switched.
在本发明实施例中,为了在主从切换后,从控制器与新主控制器保持管理数据同步,在上述实施例一的基础上,还可执行以下步骤:In the embodiment of the present invention, in order to synchronize the management data between the slave controller and the new master controller after the master-slave switchover, on the basis of the first embodiment, the following steps can be performed:
确定主控制器切换后,清除与主控制器已同步的管理数据,以便同步新主控制器的管理数据。After confirming that the main controller is switched, clear the management data that has been synchronized with the main controller to synchronize the management data of the new main controller.
即,从控制器在确定出控制器发生切换后,主动请辞与原主控制器已同步的管理数据,以便与新主控制器同步管理数据。That is, after the slave controller determines that the controller is switched, it actively resigns the management data that has been synchronized with the original master controller in order to synchronize the management data with the new master controller.
其中,确定主控制器切换的具体过程,包括:Among them, the specific process of determining the main controller switching includes:
步骤一、接收并解析目标控制器发送的主控制器切换报文,获得多播序号和主控制器ID;Step 1: Receive and parse the master controller switching message sent by the target controller to obtain the multicast sequence number and master controller ID;
步骤二、在主控制器ID与主控制器不一致时,确定目标控制器为新主控制器。Step 2: When the ID of the main controller is inconsistent with the main controller, determine that the target controller is the new main controller.
当出现主从切换时,或多控制器存储阵列建立时(即集群建立时),新主控制器可向各个从控制器发送主控制器切换报文。该主控制器切换报文可包括但不限于:多播序号,主控制器ID。例如,主控制器切换报文还可包括原主控制器ID,后续数据长度和主从切换标志。When a master-slave switch occurs, or when a multi-controller storage array is established (that is, when a cluster is established), the new master controller can send a master controller switch message to each slave controller. The main controller switching message may include, but is not limited to: a multicast sequence number, and the main controller ID. For example, the master controller switching message may also include the original master controller ID, subsequent data length, and master-slave switching flag.
当主控制器切换报文中的主控制器ID与原主控制器不一致时,则可确定目标控制器为新主控制器。优选地,若主控制器切换报文中具有主从切 换标志时,则可直接认为发送主控制器切换报文的目标控制器即为新主控制器。When the main controller ID in the main controller switching message is inconsistent with the original main controller, it can be determined that the target controller is the new main controller. Preferably, if the main controller switching message has a master-slave switching flag, it can be directly considered that the target controller sending the main controller switching message is the new main controller.
优选地,为便于从控制器能够更快更准确地与主控制器同步管理数据,还可对待同步的管理数据进行分类,从控制器在存储管理数据时,进行分类存储以及同步。具体的,可预先对管理数据进行分类,管理数据类型可包括但不限于卷、主机、风扇。例如,管理数据类型还可具体细分为不同的卷对应的管理数据,不同的主机对应的管理数据。在定义管理数据同步报文时,可在管理数据同步报文中设置管理数据类型,如此,管理数据同步报文则为分类管理数据同步报文。上述步骤S104按照多播序号顺序处理无对应处理记录的管理数据同步报文,以同步管理数据,则可具体包括:Preferably, in order to facilitate the slave controller to synchronize the management data with the master controller faster and more accurately, the management data to be synchronized can also be classified, and the slave controller performs classified storage and synchronization when storing the management data. Specifically, the management data can be classified in advance, and the management data types can include, but are not limited to, volumes, hosts, and fans. For example, the management data type can also be specifically subdivided into management data corresponding to different volumes and management data corresponding to different hosts. When defining the management data synchronization message, the management data type can be set in the management data synchronization message. In this way, the management data synchronization message is a classified management data synchronization message. The above step S104 processes the management data synchronization messages without corresponding processing records in the order of the multicast sequence number to synchronize the management data, which may specifically include:
步骤一、确定分类管理数据同步报文对应的管理数据类型;其中,管理数据类型包括卷、主机、风扇;Step 1: Determine the management data type corresponding to the classified management data synchronization message; wherein, the management data type includes volume, host, and fan;
步骤二、利用分类管理数据同步报文携带的管理数据内容对管理数据类型对应的管理数据进行同步。Step 2: Use the management data content carried in the classification management data synchronization message to synchronize the management data corresponding to the management data type.
为便于描述,下面将上述两个步骤结合起来进行说明。For ease of description, the above two steps are combined for description below.
主控制器在确定管理数据出现变化之后,在管理数据同步报文中添加多播序号、管理数据内容时,再将管理数据的具体类型写入报文,如此便可得到分类管理管理数据报文,并通过多播方式将分类管理数据同步报文发送给各个从控制器。After determining that the management data has changed, the main controller adds the multicast serial number and management data content to the management data synchronization message, and then writes the specific type of management data into the message, so that the classified management management data message can be obtained , And send the classification management data synchronization message to each slave controller through multicast.
从控制器接收到分类管理数据同步报文之后,参照上述实施例一所描述的方法确定出待处理的分类管理数据同步报文之后,便可从分类管理数据同步报文确定出管理数据类型,以及分类管理数据,并利用该分类管理数据内容对已存储的与该管理数据类型对应的管理数据进行处理。After receiving the classification management data synchronization message from the controller, after determining the classification management data synchronization message to be processed with reference to the method described in the first embodiment, the management data type can be determined from the classification management data synchronization message. And classification management data, and use the classification management data content to process the stored management data corresponding to the management data type.
实施例二:Embodiment two:
请参考图2,图2为本发明实施例中第二种管理数据同步方法的实施流程图,该方法与上述实施例一所公开的管理数据同步方法可相互参照,包括以下步骤:Please refer to Figure 2. Figure 2 is an implementation flowchart of the second management data synchronization method in an embodiment of the present invention. This method and the management data synchronization method disclosed in the first embodiment can be cross-referenced, and include the following steps:
S201、主控制器在管理数据发生变化后,向各个从控制器多播管理数据同步报文。S201: After the management data changes, the master controller multicasts a management data synchronization message to each slave controller.
其中,管理数据同步报文包括多播序号。Among them, the management data synchronization message includes the multicast sequence number.
为了实现主控制器以多播方式向从控制器发送管理数据同步报文,可加工主控制器和从控制器设置在同一个多播组内。In order to realize that the master controller sends management data synchronization messages to the slave controllers in a multicast manner, the master controller and the slave controllers can be processed to be set in the same multicast group.
主控制器具体如何确定管理数据发生变化的具体实现过程,可参见现有的确定过程,在此不再一一赘述。For the specific implementation process of how the main controller determines the change of the management data, please refer to the existing determination process, which will not be repeated here.
主控制器在确定管理数据发生变化之后,为了使得各个从控制器存储的管理数据与主控制器保持同步,此时主控制器可向从控制器多播管理数据同步报文。为了避免破坏各个管理数据同步报文之间的逻辑关系,可对各个管理数据同步报文进行编号,即管理数据不同报文可包括多播序号,以便从控制器根据多播序号对接收到的管理数据同步报文进行顺序处理。After the master controller determines that the management data has changed, in order to keep the management data stored by each slave controller synchronized with the master controller, the master controller can multicast management data synchronization messages to the slave controllers at this time. In order to avoid destroying the logical relationship between the management data synchronization messages, each management data synchronization message can be numbered, that is, different management data messages can include a multicast sequence number, so that the controller can pair the received messages according to the multicast sequence number. Manage data synchronization messages for sequential processing.
主控制器向从控制器发送了管理数据同步报文之后,无需与从控制器进行交互,以确定从控制器完成管理数据同步。在本发明实施例中,主控制器多播了管理数据同步报文之后,便可处于等待状态。After the master controller sends the management data synchronization message to the slave controller, there is no need to interact with the slave controller to determine that the slave controller completes the management data synchronization. In the embodiment of the present invention, after the main controller multicasts the management data synchronization message, it can be in a waiting state.
S202、接收从控制器发送的缺失且无处理记录的目标多播序号。S202: Receive a target multicast sequence number that is missing and has no processing record sent from the controller.
从控制器接收到管理数据同步报文之后,便可按照上述实施例一所描述的管理数据同步方法对管理数据同步报文进行处理。在从控制器发现存在缺失的目标多播序号之后,便可向主控制器发送该目标多播序号。After receiving the management data synchronization message from the controller, the management data synchronization message can be processed according to the management data synchronization method described in the first embodiment. After the slave controller finds that there is a missing target multicast sequence number, it can send the target multicast sequence number to the master controller.
具体的,主控制器可接收并解析从控制器发送的补发申请报文,获得目标多播序号。其中,目标多播序号的数量可以为一个也可以为多个。Specifically, the master controller may receive and parse the reissuance request message sent by the slave controller to obtain the target multicast sequence number. Among them, the number of target multicast sequence numbers can be one or more.
S203、将目标多播序号对应的目标管理数据同步报文补发给从控制器,以便从控制器按照多播序号顺序处理无对应处理记录的管理数据同步报文,以同步管理数据。S203: Re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the management data synchronization message without corresponding processing records in the order of the multicast sequence number to synchronize the management data.
主控制器查找出与目标多播序号对应的目标管理同步报文,然后将该目标管理同步播放补发给缺失该目标同步管理数据报文的从控制器。从控制器接收到目标管理数据同步报文之后,便可继续判断是否报文是否连续,并在多播序号连续的情况下,对接收到的管理数据同步报文进行处理,以同步管理数据。The master controller finds out the target management synchronization message corresponding to the target multicast sequence number, and then reissues the target management synchronization playback to the slave controller that lacks the target synchronization management data message. After receiving the target management data synchronization message from the controller, it can continue to determine whether the message is continuous, and in the case of continuous multicast sequence numbers, process the received management data synchronization message to synchronize the management data.
优选地,为了避免出现补发的某个从控制器的目标管理数据同步报文多播给了多播组中的各个从控制器,给从控制器造成干扰,在向补发目标管理数据时,可将目标管理数据同步报文单独补发给从控制器。即可采用端到端的通信方式将目标管理数据报文补发给缺失该报文的从控制器。Preferably, in order to avoid reissuing the target management data synchronization message of a certain slave controller being multicast to each slave controller in the multicast group, causing interference to the slave controllers, when the target management data is reissued , The target management data synchronization message can be separately reissued to the slave controller. That is, the end-to-end communication mode can be used to reissue the target management data message to the slave controller that lacks the message.
在存储设备中的主控制器应用本发明实施例所提供的第二种管理数据同步方法,主控制器在管理数据发生变化后,向各个从控制器多播管理数据同步报文;然后仅需被动等待个别从控制器发送的缺失且无处理记录的目标多播序号;然后将目标多播序号对应的目标管理数据同步报文补发给从控制器即可。可见,相比与现有的主控制器需要于各个从控制器进行端到端通信,并反复确认管理数据是否同步成功而言,本方法可大大减轻主控制器的管理数据同步的压力,可减少占用主控制器的计算、存储性能,能节省更多的资源处理存储阵列管理任务,可保障该存储设备的稳定性。The master controller in the storage device applies the second management data synchronization method provided by the embodiment of the present invention. After the management data changes, the master controller multicasts the management data synchronization message to each slave controller; then only Passively wait for the missing and unprocessed target multicast sequence numbers sent by individual slave controllers; then, re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller. It can be seen that compared with the existing master controller that requires end-to-end communication between each slave controller and repeatedly confirming whether the management data is successfully synchronized, this method can greatly reduce the pressure of the master controller's management data synchronization, and Reduce the calculation and storage performance of the main controller, save more resources to process storage array management tasks, and ensure the stability of the storage device.
需要说明的是,基于上述实施例二,本发明实施例还提供了相应的改进方案。在优选/改进实施例中涉及与上述实施例中相同步骤或相应步骤之间可相互参考,相应的有益效果也可相互参照,在本文的优选/改进实施例中不再一一赘述。It should be noted that, based on the second embodiment above, the embodiment of the present invention also provides a corresponding improvement scheme. In the preferred/improved embodiments, the same steps as those in the above-mentioned embodiments or corresponding steps can be referred to each other, and the corresponding beneficial effects can also be referred to each other, which will not be repeated in the preferred/improved embodiments herein.
优选地,为便于从控制器能够更快更准确地与主控制器同步管理数据,还可对待同步的管理数据进行分类,如此,从控制器在存储管理数据时,进行分类存储以及同步。具体的,可预先对管理数据进行分类,管理数据类型可包括但不限于卷、主机、风扇。例如,管理数据类型还可具体细分为不同的卷对应的管理数据,不同的主机对应的管理数据。在定义管理数据同步报文时,可在管理数据同步报文中设置管理数据类型,如此,管理数据同步报文则为分类管理数据同步报文。Preferably, in order to facilitate the slave controller to synchronize the management data with the master controller faster and more accurately, the management data to be synchronized can also be classified. In this way, the slave controller performs classified storage and synchronization when storing the management data. Specifically, the management data can be classified in advance, and the management data types can include, but are not limited to, volumes, hosts, and fans. For example, the management data type can also be specifically subdivided into management data corresponding to different volumes and management data corresponding to different hosts. When defining the management data synchronization message, the management data type can be set in the management data synchronization message. In this way, the management data synchronization message is a classified management data synchronization message.
为实现上述技术效果,上述步骤S201在管理数据发生变化后,向各个从控制器多播管理数据同步报文,包括:In order to achieve the above technical effect, the above step S201 multicasts a management data synchronization message to each slave controller after the management data changes, including:
步骤一、在管理数据发生变化后,确定出待同步的管理数据类型;其中,管理数据类型包括卷、主机、风扇;Step 1. After the management data changes, determine the type of management data to be synchronized; among them, the type of management data includes volume, host, and fan;
步骤二、生成与管理数据类型匹配的分类管理数据同步报文;Step 2: Generate a classification management data synchronization message matching the management data type;
步骤三、将分类管理数据同步报文多播至各个从控制器,以便各个从控制器根据管理数据类型同步管理数据。Step 3: Multicast the classified management data synchronization message to each slave controller, so that each slave controller synchronizes the management data according to the management data type.
为便于描述,下面将上述三个步骤结合起来进行说明。For ease of description, the above three steps are combined for description below.
主控制在确定管理数据发送变化之后,可确定待同步的管理数据类型。在生成管理数据同步报文时,在管理数据同步报文中的管理数据类型中表明该管理数据类型,如此管理数据同步报文即为分类管理数据同步报文。 然后,将分类管理数据同步报文多播给各个从控制器即可。After determining the management data transmission change, the main control can determine the type of management data to be synchronized. When the management data synchronization message is generated, the management data type in the management data synchronization message indicates the management data type, so that the management data synchronization message is a classified management data synchronization message. Then, multicast the classification management data synchronization message to each slave controller.
各个从控制器接收到分类管理数据同步报文之后,可根据管理数据类型对分类存储的管理数据进行处理,以与主控制器保持同步。After each slave controller receives the classified management data synchronization message, the classified management data can be processed according to the management data type to keep synchronization with the main controller.
实施例三:Example three:
上述实施例一和上述实施例二所提供的管理数据同步方法,可应用同一个多控制器存储阵列中,即其中的主控制器执行上述二所提供的管理数据同步方法,其中的从主控器执行上述实施例所提供的管理数据同步方法,实现过程,如下:The management data synchronization method provided by the above-mentioned first embodiment and the above-mentioned second embodiment can be applied to the same multi-controller storage array, that is, the master controller executes the management data synchronization method provided by the above two, and the slave master The device executes the management data synchronization method provided in the foregoing embodiment, and the implementation process is as follows:
首先,将管理数据分类。例如卷为一种类型、主机为一种类型、风扇为一种类型等。每种数据类型中的各个数据存在ID字段,ID字段在此类型数据中唯一,例如卷1的ID为0、卷2的ID为1、主机1的ID为2。First, classify the management data. For example, the volume is of one type, the host is of one type, and the fan is of one type. Each data in each data type has an ID field, and the ID field is unique in this type of data. For example, the ID of volume 1 is 0, the ID of volume 2 is 1, and the ID of host 1 is 2.
其次,所有控制器组成多播组,当管理数据变化时,主控制器需将变化的管理数据多播到多播组中(可能需要批量发送多个多播报文),多播报文中可包括主控制器ID、多播序号、管理数据的类型、数据ID、数据详细内容。Secondly, all controllers form a multicast group. When the management data changes, the main controller needs to multicast the changed management data to the multicast group (it may be necessary to send multiple multicast messages in batches). The multicast messages can include the master Controller ID, multicast serial number, management data type, data ID, data details.
再次,从控制器接收到多播报文后,根据主控制器ID、多播序号,判断是否处理过这个报文,如果已处理过,则忽略;否则判断多播序号是否连续,如果不连续,记下缺失的多播序号,并将其单播发送给主控制器,保存此次接收的数据,等重新收到缺失的多播报文后,再解析此次报文;否则解析多播序号连续的且未处理的报文,更新自身管理数据。顺序解析多播报文,可保证与主控制器数据一致性。Once again, after receiving the multicast message from the controller, it judges whether the message has been processed according to the ID of the main controller and the multicast sequence number. If it has been processed, ignore it; otherwise, judge whether the multicast sequence number is continuous, if not, Write down the missing multicast sequence number, and send it unicast to the main controller, save the data received this time, and parse the message after the missing multicast message is received again; otherwise, the parsed multicast sequence number is continuous For the unprocessed messages, update its own management data. Sequential analysis of multicast messages can ensure data consistency with the main controller.
最后,当集群建立或主控制器切换后,默认所有管理数据均存在变化,主控制器先多播“主控制器切换”报文,然后再多播所有管理数据,多播序号重新从0开始。普通节点收到“主控制器切换”报文后,清除自身管理数据,重新同步主控制器数据。Finally, when the cluster is established or the main controller is switched, all management data is changed by default. The main controller first multicasts the "main controller switching" message, and then multicasts all management data, and the multicast sequence number starts from 0 again. . After the ordinary node receives the "main controller switching" message, it clears its own management data and resynchronizes the main controller data.
为便于本领域技术人员理解上述实现过程,以及实际应用时具体如何结合上述实施例一和实施例二分别提供的管理数据同步方法,下面以具体的应用场景为例进行详细说明。In order to facilitate those skilled in the art to understand the foregoing implementation process and how to specifically combine the management data synchronization methods provided in the foregoing Embodiment 1 and Embodiment 2 in practical applications, specific application scenarios are used as an example to describe in detail below.
请参考图3,图3为本发明实施例中一种管理数据同步方法的具体实现流程示意图。Please refer to FIG. 3, which is a schematic diagram of a specific implementation process of a management data synchronization method in an embodiment of the present invention.
首先,将管理数据分类,例如卷为一种类型、主机为一种类型、风扇为一种类型等等。每种数据类型中的各个数据存在ID字段,ID字段在此类型数据中唯一,例如卷1的id为0、卷2的id为1、主机1的id为0等等。本发明不提供具体的分类方法,可在具体实施时自行划分。这样在后续主控制器记录多播记录时,可以记录数据ID,而不必记录数据详细内容,减少记录的数据量。First, classify the management data, such as one type of volume, one type of host, one type of fan, and so on. Each data in each data type has an ID field, and the ID field is unique in this type of data. For example, the id of volume 1 is 0, the id of volume 2 is 1, the id of host 1 is 0, and so on. The present invention does not provide a specific classification method, and can be classified by itself during specific implementation. In this way, when the subsequent main controller records the multicast record, it can record the data ID without having to record the detailed content of the data, reducing the amount of recorded data.
其次,所有控制器组成多播组,当主控制器管理数据变化时,主控制器需将变化的管理数据多播到多播组中(可能需要发送多个多播报文,即管理数据同步报文,每个报文可发送一种或多种类型的数据),并记下发送记录(包括主控制器ID、多播序号、管理数据类型、数据1的ID、数据2的ID、…、数据n的ID)。Secondly, all controllers form a multicast group. When the management data of the main controller changes, the main controller needs to multicast the changed management data to the multicast group (it may be necessary to send multiple multicast messages, that is, management data synchronization messages , Each message can send one or more types of data), and write down the sending record (including the main controller ID, multicast serial number, management data type, data 1 ID, data 2 ID, ..., data n's ID).
其中,管理数据同步报文(图3中的报文1,消息类型为0)格式如表1:Among them, the format of the management data synchronization message (message 1 in Figure 3, the message type is 0) is shown in Table 1:
Figure PCTCN2019108470-appb-000001
Figure PCTCN2019108470-appb-000001
表1Table 1
其中,管理数据同步报文中的数据内容部分如表2:Among them, the data content part of the management data synchronization message is shown in Table 2:
Figure PCTCN2019108470-appb-000002
Figure PCTCN2019108470-appb-000002
表2Table 2
可见,多播管理数据时的报文格式,包括:It can be seen that the message format of multicast management data includes:
多播序号:可从0开始,顺序递增,标识主控制器发送的多播报文;Multicast sequence number: it can start from 0 and increase in order to identify the multicast message sent by the main controller;
主控制器ID:主控制器的唯一标识;Main controller ID: the unique identification of the main controller;
消息类型:此处取值0,表示多播管理数据;Message type: the value 0 here means multicast management data;
后续数据长度:此报文中,这个字段后面的字节个数。Subsequent data length: the number of bytes following this field in this message.
数据类型:发送的管理数据的数据类型,一次只能发送一种类型的数据。Data Type: The data type of the management data sent. Only one type of data can be sent at a time.
全数据标记:0表示仅包含变化的此类型的管理数据;1表示包含此类型的所有管理数据;Full data mark: 0 means that it only contains the changed management data of this type; 1 means that it contains all the management data of this type;
数据个数:发送的管理数据个数;Number of data: the number of management data sent;
数据1的ID:第1个数据的数据ID;ID of data 1: the data ID of the first data;
数据1的详细内容长度:第1个数据详细内容占用的报文字节数;The detailed content length of data 1: the number of message bytes occupied by the detailed content of the first data;
数据1的详细内容:第1个数据的详细内容;The detailed content of data 1: the detailed content of the first data;
数据n的ID:第n个数据的数据ID;ID of data n: the data ID of the nth data;
数据n的详细内容长度:第n个数据详细内容占用的报文字节数;The detailed content length of data n: the number of message bytes occupied by the detailed content of the nth data;
数据n的详细内容:第n个数据的详细内容。Details of data n: Details of the nth data.
主控制器切换报文(报文2)用于告知其它控制器,主控制器已切换(消息类型为1),其具体报文格式如表3:The main controller switching message (message 2) is used to inform other controllers that the main controller has been switched (message type 1). The specific message format is shown in Table 3:
Figure PCTCN2019108470-appb-000003
Figure PCTCN2019108470-appb-000003
表3table 3
补发申请报文(图3中的报文3),用于告知未收到的主控制器多播报文,其具体报文格式如表4:The reissuance application message (message 3 in Figure 3) is used to notify the host controller of the unreceived multicast message. The specific message format is shown in Table 4:
Figure PCTCN2019108470-appb-000004
Figure PCTCN2019108470-appb-000004
表4Table 4
再次,如图3所示,展示了从控制器接收到多播报文1后的处理流程,如下:Again, as shown in Figure 3, the processing flow after receiving multicast message 1 from the controller is shown as follows:
Step1、接收多播报文1,如果接收到,则转到下一步。Step1. Receive multicast message 1. If received, go to the next step.
Step2、根据主控制器ID、多播序号唯一识别一个报文,判断此报文是否已处理过,如果处理过,则忽略;否则转到下一步。Step2. Identify a message uniquely according to the ID of the main controller and the multicast sequence number, and judge whether the message has been processed. If it has been processed, ignore it; otherwise, go to the next step.
Step3、获取报文中多播序号,判断与最近一次处理的多播序号是否连续,如果不连续,则转到下一步;否则转到Step6。Step3. Obtain the multicast sequence number in the message, and judge whether it is continuous with the most recently processed multicast sequence number. If it is not continuous, go to the next step; otherwise, go to Step 6.
Step4、将缺失的多播序号组装成报文3(即补发申请报文),使用单播发送给主控制器,转到下一步。Step4. Assemble the missing multicast sequence number into message 3 (namely, reissue application message), send it to the main controller using unicast, and go to the next step.
Step5、保存当前接收的报文,暂不处理,转到Step1。Step5. Save the currently received message, do not process it temporarily, go to Step1.
Step6、按顺序处理已接收的多播序号连续的报文(包括之前保存但未处理的),更新自身管理数据。Step6. Process the received messages with consecutive multicast sequence numbers (including the previously saved but unprocessed messages) in order, and update their own management data.
Step7(图中未绘制)、主控制器收到上述流程Step4的报文后,应立即根据发送记录,获取对应数据,使用缺失的多播序号发送多播报文1。这样可以保证普通节点可以及时同步主控制器数据。Step7 (not shown in the figure). After the main controller receives the message of Step 4 of the above process, it should immediately obtain the corresponding data according to the sending record, and use the missing multicast sequence number to send the multicast message 1. This can ensure that ordinary nodes can synchronize the data of the main controller in time.
上述流程中,如果网络中存在多次丢包现象,Step5中未处理的报文可能更新不及时,因此从控制器需要再起线程,不断检查在Step5中是否存在 已保存但未处理的报文。如果存在,则说明存在缺失多播序号,需执行Step4。In the above process, if there are multiple packet loss phenomena in the network, the unprocessed messages in Step5 may not be updated in time. Therefore, the slave controller needs to restart the thread to continuously check whether there are saved but unprocessed messages in Step5. If it exists, it means that there is a missing multicast sequence number, and Step4 needs to be performed.
最后,当集群建立或主控制器切换后,认为所有管理数据均存在变化,主控制器先多播“主控制器切换”报文(同上文中的主控制器切换报文),然后再多播所有管理数据,多播序号重新从0开始。普通节点收到“主控制器切换”报文后,清除自身管理数据,清空旧主控制器相关的报文记录和数据。Finally, when the cluster is established or the main controller is switched, it is considered that all management data has changed, and the main controller first multicasts the "main controller switch" message (same as the main controller switch message above), and then multicast For all management data, the multicast sequence number starts from 0 again. After the ordinary node receives the "main controller switching" message, it clears its own management data and clears the message records and data related to the old main controller.
可见,在本实施例中,利用多播技术,设计递增的多播序号,并顺序处理多播报文,在降低主控制器同步工作量的情况下,保证了从控制器与主控制器中管理数据的一致性。It can be seen that in this embodiment, the multicast technology is used to design incremental multicast sequence numbers, and the multicast messages are processed sequentially, which ensures that the slave controller and the master controller manage the management while reducing the synchronization workload of the master controller. Data consistency.
实施例四:Embodiment four:
相应于上面的方法实施例,本发明实施例还提供了一种存储设备,下文描述的存储设备与上文描述的管理数据同步方法可相互对应参照。Corresponding to the above method embodiment, the embodiment of the present invention also provides a storage device. The storage device described below and the management data synchronization method described above can be referenced correspondingly.
参见图4所示,该存储设备包括:As shown in Figure 4, the storage device includes:
多个控制器,每个控制器包括:Multiple controllers, each controller includes:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于执行计算机程序时实现目标方法的步骤;The processor is used to implement the steps of the target method when the computer program is executed;
多个控制器中的从控制器D1,所执行的目标方法如上述实施例一的方法;The target method executed by the slave controller D1 in the plurality of controllers is the method in the first embodiment;
多个控制器中的主控制器D2,所执行的目标方法如上述实施例二的方法。The target method executed by the main controller D2 of the plurality of controllers is the same as the method in the second embodiment above.
具体的,请参考图5,图5为本实施例提供的一种存储设备中控制器的具体结构示意图,该控制器可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)322(例如,一个或一个以上处理器)和存储器332,一个或一个以上存储应用程序342或数据344的存储介质330(例如一个或一个以上海量存储设备)。其中,存储器332和存储介质330可以是短暂存储或持久存储。存储在存储介质330的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对数据处理设备中的一系列指令操作。更进一步地,中央处理器322可以设置为与存储介质330通信,在控制器301上执行存储介质330中的一系列指令操 作。Specifically, please refer to FIG. 5. FIG. 5 is a schematic diagram of a specific structure of a controller in a storage device provided by this embodiment. The controller may have relatively large differences due to different configurations or performance, and may include one or more A processor (central processing units, CPU) 322 (for example, one or more processors), a memory 332, and one or more storage media 330 (for example, one or more storage devices with a large amount of data) storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 may be short-term storage or persistent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the data processing device. Furthermore, the central processing unit 322 may be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the controller 301.
控制器301还可以包括一个或一个以上电源326,一个或一个以上有线或无线网络接口350,一个或一个以上输入输出接口358,和/或,一个或一个以上操作系统341。例如,Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。The controller 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input and output interfaces 358, and/or one or more operating systems 341. For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
上文所描述的管理数据同步方法中的步骤可以由控制器的结构实现。The steps in the management data synchronization method described above can be implemented by the structure of the controller.
实施例五:Embodiment five:
相应于上面的方法实施例一,本发明实施例还提供了一种可应用从控制器中的管理数据同步装置,下文描述的管理数据同步装置与上文描述的管理数据同步方法可相互对应参照。Corresponding to the first embodiment of the above method, the embodiment of the present invention also provides a management data synchronization device that can be applied to the slave controller. The management data synchronization device described below and the management data synchronization method described above may correspond to each other and refer to each other. .
请参考图6,该装置包括:Please refer to Figure 6, the device includes:
管理数据同步报文接收模块101,用于接收并解析主控制器在管理数据发生变化后多播的管理数据同步报文,获得多播序号;The management data synchronization message receiving module 101 is configured to receive and parse the management data synchronization message multicasted by the main controller after the management data changes, and obtain the multicast sequence number;
报文校验模块102,用于利用多播序号确定是否存在缺失且无处理记录的目标多播序号;The message checking module 102 is configured to use the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record;
报文缺失处理模块103,用于若存在目标多播序号,则向主控制器发送目标多播序号,并接收主控制器补发的目标多播序号对应的目标管理数据同步报文;The message missing processing module 103 is configured to send the target multicast sequence number to the main controller if there is a target multicast sequence number, and receive the target management data synchronization message corresponding to the target multicast sequence number reissued by the main controller;
数据同步模块104,用于若不存在目标多播序号,则按照多播序号顺序处理无对应处理记录的管理数据同步报文,以同步管理数据。The data synchronization module 104 is configured to, if there is no target multicast sequence number, process the management data synchronization messages without corresponding processing records in the order of the multicast sequence number to synchronize the management data.
在存储设备中的从控制器中应用本发明实施例所提供的第一种管理数据同步装置,从控制器接收到的管理数据同步报文,根据多播序号自行验证报文是否遗漏缺失,并在确定存在遗漏缺失且无处理记录的目标多播序号之后,主动向主控制器索取目标多播序号对应的目标管理数据同步报文。然后在确定多播序号连续之后,按照多播序号顺序处理无对应处理记录的管理数据同步报文,即可实现与主控制器同步管理数据。而在此过程中,从控制器将原管理数据同步验证操作转移自自身进行处理,而主控制器仅需多播管理数据同步报文,以及被动补发个别从控制器未接收到的目标管理数据同步报文即可。即,将主控制器的管理数据同步任务分担至各个从控制器,可避免出现主控制器资源占用的问题,可保障主控制器的存储阵 列管理质量,进一步保障该存储设备的稳定性。The first management data synchronization device provided by the embodiment of the present invention is applied to the slave controller in the storage device, and the management data synchronization message received from the controller is automatically verified whether the message is missing or missing according to the multicast sequence number, and After determining that there is a target multicast sequence number that is missing or missing and has no processing record, it actively asks the main controller for the target management data synchronization message corresponding to the target multicast sequence number. Then, after determining that the multicast sequence numbers are continuous, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence numbers to realize the synchronization of the management data with the main controller. In this process, the slave controller transfers the original management data synchronization verification operation from itself for processing, and the master controller only needs to multicast the management data synchronization message, and passively reissue the target management that was not received by the individual slave controllers. The data synchronization message is sufficient. That is, sharing the management data synchronization task of the master controller to each slave controller can avoid the problem of resource occupation of the master controller, guarantee the management quality of the storage array of the master controller, and further ensure the stability of the storage device.
在本发明的一种具体实施方式中,还包括:In a specific embodiment of the present invention, it further includes:
主从切换处理模块,用于确定主控制器切换后,清除与主控制器已同步的管理数据,以便同步新主控制器的管理数据。The master-slave switching processing module is used to clear the management data that has been synchronized with the master controller after the master controller is switched, so as to synchronize the management data of the new master controller.
在本发明的一种具体实施方式中,主从切换处理模块,具体用于接收并解析目标控制器发送的主控制器切换报文,获得多播序号和主控制器ID;在主控制器ID与主控制器不一致时,确定目标控制器为新主控制器。In a specific embodiment of the present invention, the master-slave switching processing module is specifically used to receive and parse the master controller switching message sent by the target controller to obtain the multicast sequence number and the master controller ID; in the master controller ID When it is inconsistent with the main controller, determine that the target controller is the new main controller.
在本发明的一种具体实施方式中,报文校验模块102,具体用于判断多播序号是否连续;如果否,则确定出缺失多播序号,在缺失多播序号无对应处理记录时,确定缺失多播序号为目标多播序号。In a specific embodiment of the present invention, the message checking module 102 is specifically used to determine whether the multicast sequence number is continuous; if not, it determines the missing multicast sequence number, and when there is no corresponding processing record for the missing multicast sequence number, Determine the missing multicast sequence number as the target multicast sequence number.
在本发明的一种具体实施方式中,数据同步模块104,具体用于利用处理记录筛选出无对应处理记录的管理数据同步报文;利用多播序号对筛选出的管理数据同步报文进行顺序排序;按照排列顺序依次解析管理数据同步报文,获得管理数据内容。In a specific embodiment of the present invention, the data synchronization module 104 is specifically configured to use processing records to filter out management data synchronization messages without corresponding processing records; use multicast sequence numbers to sequence the selected management data synchronization messages Sorting: Analyze the management data synchronization messages in sequence according to the sort order to obtain the management data content.
在本发明的一种具体实施方式中,报文缺失处理模块103,具体用于向主控制器发送携带目标多播序号的补发申请报文。In a specific implementation of the present invention, the message missing processing module 103 is specifically configured to send a reissue request message carrying the target multicast sequence number to the main controller.
在本发明的一种具体实施方式中,数据同步模块104,具体用于在管理数据同步报文为分类管理数据同步报文时,确定分类管理数据同步报文对应的管理数据类型;其中,管理数据类型包括卷、主机、风扇;利用分类管理数据同步报文携带的管理数据内容对管理数据类型对应的管理数据进行同步。In a specific embodiment of the present invention, the data synchronization module 104 is specifically configured to determine the management data type corresponding to the classified management data synchronization message when the management data synchronization message is a classified management data synchronization message; wherein, the management The data types include volumes, hosts, and fans; the management data content carried in the classified management data synchronization message is used to synchronize the management data corresponding to the management data type.
实施例六:Embodiment 6:
相应于上面的方法实施例二,本发明实施例还提供了一种可应用主控制器的管理数据同步装置,下文描述的管理数据同步装置与上文描述的管理数据同步方法可相互对应参照。Corresponding to the second embodiment of the method above, the embodiment of the present invention also provides a management data synchronization device applicable to the main controller. The management data synchronization device described below and the management data synchronization method described above can be referred to each other.
参见图7所示,该装置包括以下模块:As shown in Figure 7, the device includes the following modules:
管理数据同步报文组播模块201,用于在管理数据发生变化后,向各个从控制器多播管理数据同步报文;管理数据同步报文包括多播序号;The management data synchronization message multicast module 201 is configured to multicast the management data synchronization message to each slave controller after the management data changes; the management data synchronization message includes the multicast sequence number;
遗漏报文确定模块202,用于接收从控制器发送的缺失且无处理记录的目标多播序号;The missing message determining module 202 is configured to receive the missing target multicast sequence number sent from the controller without processing records;
报文补发模块203,用于将目标多播序号对应的目标管理数据同步报文补发给从控制器,以便从控制器按照多播序号顺序处理无对应处理记录的管理数据同步报文,以同步管理数据。The message reissue module 203 is used to reissue the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the management data synchronization message without corresponding processing records in the order of the multicast sequence number, To synchronize management data.
在存储设备中的主控制器应用本发明实施例所提供的第二种管理数据同步装置,主控制器在管理数据发生变化后,向各个从控制器多播管理数据同步报文;然后仅需被动等待个别从控制器发送的缺失且无处理记录的目标多播序号;然后将目标多播序号对应的目标管理数据同步报文补发给从控制器即可。可见,相比与现有的主控制器需要于各个从控制器进行端到端通信,并反复确认管理数据是否同步成功而言,本装置可大大减轻主控制器的管理数据同步的压力,可减少占用主控制器的计算、存储性能,能节省更多的资源处理存储阵列管理任务,可保障该存储设备的稳定性。The master controller in the storage device applies the second management data synchronization device provided by the embodiment of the present invention. After the management data changes, the master controller multicasts management data synchronization messages to each slave controller; then only Passively wait for the missing and unprocessed target multicast sequence numbers sent by individual slave controllers; then, re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller. It can be seen that compared with the existing master controller that requires end-to-end communication between each slave controller and repeatedly confirms whether the management data is successfully synchronized, this device can greatly reduce the pressure of the master controller's management data synchronization. Reduce the calculation and storage performance of the main controller, save more resources to process storage array management tasks, and ensure the stability of the storage device.
在本发明的一种具体实施方式中,遗漏报文确定模块202,用于接收并解析从控制器发送的补发申请报文,获得目标多播序号。In a specific implementation of the present invention, the missing message determining module 202 is configured to receive and analyze the reissue request message sent from the controller to obtain the target multicast sequence number.
在本发明的一种具体实施方式中,报文补发模块203,具体用于将目标管理数据同步报文单独补发给从控制器。In a specific implementation of the present invention, the message reissue module 203 is specifically configured to separately reissue the target management data synchronization message to the slave controller.
在本发明的一种具体实施方式中,管理数据同步报文组播模块201,具体用于在管理数据发生变化后,确定出待同步的管理数据类型;其中,管理数据类型包括卷、主机、风扇;生成与管理数据类型匹配的分类管理数据同步报文;将分类管理数据同步报文多播至各个从控制器,以便各个从控制器根据管理数据类型同步管理数据。In a specific embodiment of the present invention, the management data synchronization message multicast module 201 is specifically configured to determine the type of management data to be synchronized after the management data changes; wherein, the management data types include volume, host, Fan; Generate classification management data synchronization messages matching the management data type; multicast the classification management data synchronization messages to each slave controller, so that each slave controller synchronizes management data according to the management data type.
实施例七:Embodiment Seven:
相应于上面的方法实施例,本发明实施例还提供了一种可读存储介质,下文描述的一种可读存储介质与上文描述的一种管理数据同步方法可相互对应参照。Corresponding to the above method embodiment, the embodiment of the present invention also provides a readable storage medium. The readable storage medium described below and the method for synchronizing management data described above can be referred to each other.
一种可读存储介质,可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述方法实施例的管理数据同步方法的步骤。A readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for managing data synchronization in the foregoing method embodiment are implemented.
该可读存储介质具体可以为U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可存储程序代码的可读存储介质。The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk that can store program codes. Readable storage medium.
需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or equipment including a series of elements not only includes those elements, but also includes no Other elements clearly listed, or they also include elements inherent to the process, method, article, or equipment. Without more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or equipment that includes the element.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals may further realize that the units and algorithm steps of the examples described in the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two, in order to clearly illustrate the possibilities of hardware and software. Interchangeability, in the above description, the composition and steps of each example have been generally described in accordance with the function. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present invention.

Claims (15)

  1. 一种管理数据同步方法,其特征在于,包括:A method for managing data synchronization, which is characterized in that it includes:
    从控制器接收并解析主控制器在管理数据发生变化后多播的管理数据同步报文,获得多播序号;The slave controller receives and parses the management data synchronization message multicasted by the master controller after the management data changes, and obtains the multicast sequence number;
    利用所述多播序号确定是否存在缺失且无处理记录的目标多播序号;Using the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record;
    如果是,则向所述主控制器发送所述目标多播序号,并接收所述主控制器补发的所述目标多播序号对应的目标管理数据同步报文;If yes, send the target multicast sequence number to the main controller, and receive a target management data synchronization message corresponding to the target multicast sequence number reissued by the main controller;
    如果否,则按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。If not, the management data synchronization messages without corresponding processing records are processed in the order of the multicast sequence number to synchronize the management data.
  2. 根据权利要求1所述的管理数据同步方法,其特征在于,还包括:The management data synchronization method according to claim 1, further comprising:
    确定主控制器切换后,清除与所述主控制器已同步的管理数据,以便同步新主控制器的管理数据。After it is determined that the main controller is switched, the management data that has been synchronized with the main controller is cleared, so as to synchronize the management data of the new main controller.
  3. 根据权利要求2所述的管理数据同步方法,其特征在于,所述确定主控制器切换,包括:The management data synchronization method according to claim 2, wherein the determining the main controller to switch comprises:
    接收并解析目标控制器发送的主控制器切换报文,获得多播序号和主控制器ID;Receive and parse the master controller switching message sent by the target controller to obtain the multicast sequence number and master controller ID;
    在所述主控制器ID与所述主控制器不一致时,确定所述目标控制器为所述新主控制器。When the main controller ID is inconsistent with the main controller, it is determined that the target controller is the new main controller.
  4. 根据权利要求1所述的管理数据同步方法,其特征在于,利用所述多播序号确定是否存在缺失且无处理记录的目标多播序号,包括:The management data synchronization method according to claim 1, wherein determining whether there is a target multicast sequence number that is missing and has no processing record by using the multicast sequence number comprises:
    判断所述多播序号是否连续;Judging whether the multicast sequence number is continuous;
    如果否,则确定出缺失多播序号,在所述缺失多播序号无对应处理记录时,确定所述缺失多播序号为所述目标多播序号。If not, the missing multicast sequence number is determined, and when there is no corresponding processing record for the missing multicast sequence number, it is determined that the missing multicast sequence number is the target multicast sequence number.
  5. 根据权利要求1所述的管理数据同步方法,其特征在于,按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据,包括:The management data synchronization method according to claim 1, wherein the processing of the management data synchronization messages without corresponding processing records in the order of the multicast sequence number to synchronize management data comprises:
    利用处理记录筛选出无对应处理记录的管理数据同步报文;Use processing records to filter out management data synchronization messages without corresponding processing records;
    利用所述多播序号对筛选出的所述管理数据同步报文进行顺序排序;Order the filtered management data synchronization messages by using the multicast sequence number;
    按照排列顺序依次解析所述管理数据同步报文,获得管理数据内容。The management data synchronization message is sequentially parsed according to the sequence to obtain the management data content.
  6. 根据权利要求1所述的管理数据同步方法,其特征在于,向所述主 控制器发送所述目标多播序号,包括:The management data synchronization method according to claim 1, wherein sending the target multicast sequence number to the main controller comprises:
    向所述主控制器发送携带所述目标多播序号的补发申请报文。Sending a reissuance request message carrying the target multicast sequence number to the main controller.
  7. 根据权利要求1至6任一项所述的管理数据同步方法,其特征在于,所述管理数据同步报文为分类管理数据同步报文,按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据,包括:The management data synchronization method according to any one of claims 1 to 6, wherein the management data synchronization message is a classified management data synchronization message, and all data without corresponding processing records are processed in the order of the multicast sequence number. The management data synchronization message to synchronize management data includes:
    确定所述分类管理数据同步报文对应的管理数据类型;其中,所述管理数据类型包括卷、主机、风扇;Determine the management data type corresponding to the classified management data synchronization message; wherein, the management data type includes volume, host, and fan;
    利用所述分类管理数据同步报文携带的管理数据内容对所述管理数据类型对应的管理数据进行同步。The management data corresponding to the management data type is synchronized by using the management data content carried in the classification management data synchronization message.
  8. 一种管理数据同步方法,其特征在于,包括:A method for managing data synchronization, which is characterized in that it includes:
    主控制器在管理数据发生变化后,向各个从控制器多播管理数据同步报文;所述管理数据同步报文包括多播序号;After the management data changes, the master controller multicasts a management data synchronization message to each slave controller; the management data synchronization message includes a multicast sequence number;
    接收从控制器发送的缺失且无处理记录的目标多播序号;Receive the missing and no-processed target multicast sequence number sent from the controller;
    将所述目标多播序号对应的目标管理数据同步报文补发给所述从控制器,以便所述从控制器按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。Re-send the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the management data synchronization message without corresponding processing records in the order of the multicast sequence number To synchronize management data.
  9. 根据权利要求8所述的管理数据同步方法,其特征在于,接收从控制器发送的缺失且无处理记录的目标多播序号,包括:The management data synchronization method according to claim 8, wherein receiving the missing and no-processed target multicast sequence number sent from the controller comprises:
    接收并解析所述从控制器发送的补发申请报文,获得所述目标多播序号。Receiving and analyzing the reissuance request message sent by the slave controller to obtain the target multicast sequence number.
  10. 根据权利要求8所述的管理数据同步方法,其特征在于,将所述目标多播序号对应的目标管理数据同步报文补发给所述从控制器,包括:The management data synchronization method according to claim 8, wherein the re-sending the target management data synchronization message corresponding to the target multicast sequence number to the slave controller comprises:
    将所述目标管理数据同步报文单独补发给所述从控制器。The target management data synchronization message is separately reissued to the slave controller.
  11. 根据权利要求8至10任一项所述的管理数据同步方法,其特征在于,在管理数据发生变化后,向各个从控制器多播管理数据同步报文,包括:The management data synchronization method according to any one of claims 8 to 10, wherein after the management data changes, multicasting a management data synchronization message to each slave controller includes:
    在所述管理数据发生变化后,确定出待同步的管理数据类型;其中,所述管理数据类型包括卷、主机、风扇;After the management data changes, determine the management data type to be synchronized; wherein, the management data type includes volume, host, and fan;
    生成与所述管理数据类型匹配的分类管理数据同步报文;Generating a classification management data synchronization message matching the management data type;
    将所述分类管理数据同步报文多播至各个所述从控制器,以便各个所 述从控制器根据所述管理数据类型同步所述管理数据。The classification management data synchronization message is multicast to each of the slave controllers, so that each of the slave controllers synchronizes the management data according to the management data type.
  12. 一种存储设备,其特征在于,包括:A storage device, characterized in that it comprises:
    多个控制器,每个所述控制器包括:A plurality of controllers, each of the controllers includes:
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    处理器,用于执行所述计算机程序时实现目标方法的步骤;The processor is used to implement the steps of the target method when the computer program is executed;
    多个所述控制器中的从控制器,所执行的所述目标方法如权利要求1至7任一项所述的方法;The target method executed by the slave controller in the plurality of controllers is the method according to any one of claims 1 to 7;
    多个所述控制器中的主控制器,所执行的所述目标方法如权利要求8至11任一项所述的方法。The target method executed by the main controller among the plurality of controllers is the method according to any one of claims 8 to 11.
  13. 一种管理数据同步装置,其特征在于,应用于从控制器,包括:A management data synchronization device, which is characterized in that it is applied to a slave controller and includes:
    管理数据同步报文接收模块,用于接收并解析主控制器在管理数据发生变化后多播的管理数据同步报文,获得多播序号;The management data synchronization message receiving module is used to receive and parse the management data synchronization message multicasted by the main controller after the management data changes, and obtain the multicast sequence number;
    报文校验模块,用于利用所述多播序号确定是否存在缺失且无处理记录的目标多播序号;A message checking module, configured to use the multicast sequence number to determine whether there is a target multicast sequence number that is missing and has no processing record;
    报文缺失处理模块,用于若存在所述目标多播序号,则向所述主控制器发送所述目标多播序号,并接收所述主控制器补发的所述目标多播序号对应的目标管理数据同步报文;The message missing processing module is configured to send the target multicast sequence number to the main controller if the target multicast sequence number exists, and receive the corresponding target multicast sequence number reissued by the main controller Target management data synchronization message;
    数据同步模块,用于若不存在目标多播序号,则按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。The data synchronization module is configured to, if there is no target multicast sequence number, process the management data synchronization messages without corresponding processing records in the order of the multicast sequence numbers to synchronize the management data.
  14. 一种管理数据同步装置,其特征在于,应用于主控制器,包括:A management data synchronization device, which is characterized in that it is applied to a main controller and includes:
    管理数据同步报文组播模块,用于在管理数据发生变化后,向各个从控制器多播管理数据同步报文;所述管理数据同步报文包括多播序号;The management data synchronization message multicast module is configured to multicast a management data synchronization message to each slave controller after the management data changes; the management data synchronization message includes a multicast sequence number;
    遗漏报文确定模块,用于接收从控制器发送的缺失且无处理记录的目标多播序号;The missing message determination module is used to receive the missing target multicast sequence number sent from the controller without processing records;
    报文补发模块,用于将所述目标多播序号对应的目标管理数据同步报文补发给所述从控制器,以便所述从控制器按照所述多播序号顺序处理无对应处理记录的所述管理数据同步报文,以同步管理数据。The message reissue module is used to reissue the target management data synchronization message corresponding to the target multicast sequence number to the slave controller, so that the slave controller processes the non-corresponding processing records in the order of the multicast sequence number The management data synchronization message is used to synchronize the management data.
  15. 一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至11任一项所述管理数据同步方法的步骤。A readable storage medium, characterized in that a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the steps of the method for managing data synchronization according to any one of claims 1 to 11 are realized .
PCT/CN2019/108470 2019-09-12 2019-09-27 Management data synchronization method and apparatus, storage device and readable storage medium WO2021046935A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910866500.6A CN110557399A (en) 2019-09-12 2019-09-12 Management data synchronization method and device, storage equipment and readable storage medium
CN201910866500.6 2019-09-12

Publications (1)

Publication Number Publication Date
WO2021046935A1 true WO2021046935A1 (en) 2021-03-18

Family

ID=68740258

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/108470 WO2021046935A1 (en) 2019-09-12 2019-09-27 Management data synchronization method and apparatus, storage device and readable storage medium

Country Status (2)

Country Link
CN (1) CN110557399A (en)
WO (1) WO2021046935A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110955509A (en) * 2019-12-11 2020-04-03 深圳迅策科技有限公司 Finance concurrent transaction processing apparatus
TWI782316B (en) * 2020-08-24 2022-11-01 達明機器人股份有限公司 Method for synchronizing process

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296161A (en) * 2007-04-26 2008-10-29 华为技术有限公司 Method, system, device, receiving equipment and transmitting equipment for data retransmission
CN101630290A (en) * 2009-08-17 2010-01-20 成都市华为赛门铁克科技有限公司 Method and device of processing repeated data
US20170127364A1 (en) * 2015-10-30 2017-05-04 Panasonic Intellectual Property Management Co., Ltd. Communication apparatus and communication system
CN106790563A (en) * 2016-12-27 2017-05-31 浙江省公众信息产业有限公司 Distributed memory system and method
CN107147507A (en) * 2016-03-01 2017-09-08 中卫大河云联网络技术有限公司 The control plane framework and control method of a kind of software defined network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7729350B2 (en) * 2004-12-30 2010-06-01 Nokia, Inc. Virtual multicast routing for a cluster having state synchronization
EP2012446A1 (en) * 2007-07-06 2009-01-07 Nokia Corporation Higher layer synchronization between base stations
CN105988893A (en) * 2015-02-10 2016-10-05 北京中科同向信息技术有限公司 Technique based on data replication
CN106331081B (en) * 2016-08-19 2020-03-06 苏州浪潮智能科技有限公司 Information synchronization method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101296161A (en) * 2007-04-26 2008-10-29 华为技术有限公司 Method, system, device, receiving equipment and transmitting equipment for data retransmission
CN101630290A (en) * 2009-08-17 2010-01-20 成都市华为赛门铁克科技有限公司 Method and device of processing repeated data
US20170127364A1 (en) * 2015-10-30 2017-05-04 Panasonic Intellectual Property Management Co., Ltd. Communication apparatus and communication system
CN107147507A (en) * 2016-03-01 2017-09-08 中卫大河云联网络技术有限公司 The control plane framework and control method of a kind of software defined network
CN106790563A (en) * 2016-12-27 2017-05-31 浙江省公众信息产业有限公司 Distributed memory system and method

Also Published As

Publication number Publication date
CN110557399A (en) 2019-12-10

Similar Documents

Publication Publication Date Title
US9207988B2 (en) Method, system, and device for managing server hardware resources in a cloud scheduling environment
EP3235199B1 (en) Multicast advertisement message for a network switch in a storage area network
US11743097B2 (en) Method and system for sharing state between network elements
US20150248298A1 (en) Rebooting infiniband clusters
US9699276B2 (en) Data distribution method and system and data receiving apparatus
JP6325001B2 (en) Method and system using recursive event listeners in nodes of hierarchical data structures
US20090049172A1 (en) Concurrent Node Self-Start in a Peer Cluster
US9367298B1 (en) Batch configuration mode for configuring network devices
US10797986B2 (en) Link discovery method and apparatus
WO2021046935A1 (en) Management data synchronization method and apparatus, storage device and readable storage medium
US20150134672A1 (en) Data Copy Management Apparatus and Data Copy Method Thereof
US20170078387A1 (en) Framework for distributed key-value store in a wide area network
CN111400041A (en) Server configuration file management method and device and computer readable storage medium
US9372708B2 (en) Synchronizing multicast groups
TWI740210B (en) Method for terminal device management and server
WO2017071430A1 (en) Message processing method, network card, system, information update method, and server
US9575865B2 (en) Information processing system and monitoring method
EP4006657A1 (en) Systems and methods for group control using service data objects
US11870703B2 (en) Method for configuring and managing TSN network and system applying the method
WO2022042393A1 (en) Configuration error information transmission method and device
CN115210694A (en) Data transmission method and device
WO2020238057A1 (en) Redis-based mqtt cluster monitoring method, apparatus, and storage medium
US11811643B2 (en) System and method for managing computing resources
CN115550200B (en) Method and device for associating server IP (Internet protocol) with service identifier
CN112764666B (en) Method, apparatus and computer program product for storage management

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: 19944795

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19944795

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19944795

Country of ref document: EP

Kind code of ref document: A1