Patent Publication Number: US-2023153255-A1

Title: Method of data synchronization and redundant server system

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
     This application claims priority to Taiwanese Invention Patent Application No. 110141801, filed on Nov. 10, 2021. 
     FIELD 
     The disclosure relates to a method of data synchronization and a redundant server system, and more particularly to a method of data synchronization utilized in a redundant server system. 
     BACKGROUND 
     A redundant server system includes an active input/output module (IOM) and a passive IOM. Each of the active IOM and the passive IOM includes a plurality of sensors such as a temperature sensor, a voltage detector, a current detector or the like. Each of the sensors generates a piece of sensor data for each detection, and a corresponding one of the active IOM and the passive IOM collects, via an inter-integrated circuit (l 2 C) interface, sensor data detected by the sensor. The sensor data thus collected are then stored as files in a file system in a user space layer of an operating system (OS) of the redundant server system. In a conventional approach of data synchronization between the active IOM and the passive IOM, each piece of the sensor data collected by one of the active IOM and the passive IOM is individually transmitted (i.e., is not transmitted together with another piece of the sensor data) to the other one of the active IOM and the passive IOM. However, such approach is time consuming and is prone to data loss during transmission. 
     SUMMARY 
     Therefore, an object of the disclosure is to provide a method of data synchronization and a redundant server system that can alleviate at least one of the drawbacks of the prior art. 
     According to one aspect of the disclosure, the method is to be implemented by a redundant server system. The redundant server system includes an active input/output module (IOM) and a passive IOM. The active IOM includes a primary processing unit and at least one primary dedicated sensor that are electrically connected to each other. The primary processing unit includes a primary memory device. The passive IOM includes a secondary processing unit and at least one secondary dedicated sensor that are electrically connected to each other. The secondary processing unit is electrically connected to the primary processing unit of the active IOM, and includes a secondary memory device. The primary memory device stores primary state data that include data detected by all of the at least one primary dedicated sensor and the at least one secondary dedicated sensor. The secondary memory device stores secondary state data that include data detected by all of the at least one primary dedicated sensor and the at least one secondary dedicated sensor. The method includes steps of:
     allocating, by the primary processing unit, a primary transfer buffer in the primary memory device;   allocating, by the secondary processing unit, a secondary transfer buffer in the secondary memory device, a format of the secondary transfer buffer being identical to that of the primary transfer buffer;   by the secondary processing unit, collecting a plurality of pieces of secondary dedicated-sensor data that are numerical values detected by the at least one secondary dedicated sensor, and storing the pieces of secondary dedicated-sensor data in the primary transfer buffer of the active IOM at once;   by the primary processing unit, collecting a plurality of pieces of primary dedicated-sensor data that are numerical values detected by the at least one primary dedicated sensor;   after the pieces of primary dedicated-sensor data have been collected, by the primary processing unit, updating the primary state data based on the pieces of primary dedicated-sensor data thus collected and the pieces of secondary dedicated-sensor data stored in the primary transfer buffer at once, and storing the primary state data thus updated in the secondary transfer buffer of the passive IOM; and   updating, by the secondary processing unit, the secondary state data based on the primary state data that have been updated and that are stored in the secondary transfer buffer.   

     According to another aspect of the disclosure, a redundant server system includes an active input/output module (IOM) and a passive IOM. 
     The active IOM includes a primary processing unit that includes a primary memory device, and at least one primary dedicated sensor that is electrically connected to the primary processing unit. 
     The passive IOM includes a secondary processing unit that is electrically connected to the primary processing unit of the active IOM, and that includes a secondary memory device, and at least one secondary dedicated sensor that is electrically connected to the secondary processing unit. 
     The primary memory device is configured to store primary state data that include data detected by all of the at least one primary dedicated sensor and the at least one secondary dedicated sensor. 
     The secondary memory device is configured to store secondary state data that include data detected by all of the at least one primary dedicated sensor and the at least one secondary dedicated sensor. 
     The primary processing unit is configured to allocate a primary transfer buffer in the primary memory device. 
     The secondary processing unit is configured to allocate a secondary transfer buffer in the secondary memory device. A format of the secondary transfer buffer is identical to that of the primary transfer buffer. 
     The secondary processing unit is configured to collect a plurality of pieces of secondary dedicated-sensor data that are numerical values detected by the at least one secondary dedicated sensor, and to store the pieces of secondary dedicated-sensor data in the primary transfer buffer of the active IOM at once. 
     The primary processing unit is configured to collect a plurality of pieces of primary dedicated-sensor data that are numerical values detected by the at least one primary dedicated sensor. After the pieces of primary dedicated-sensor data have been collected, the primary processing unit is configured to update the primary state data based on the pieces of primary dedicated-sensor data thus collected and the pieces of secondary dedicated-sensor data stored in the primary transfer buffer at once. The primary processing unit is configured to store the primary state data thus updated in the secondary transfer buffer of the passive IOM. 
     The secondary processing unit is configured to update the secondary state data based on the primary state data that have been updated and that are stored in the secondary transfer buffer. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       Other features and advantages of the disclosure will become apparent in the following detailed description of the embodiment(s) with reference to the accompanying drawings. It is noted that various features may not be drawn to scale. 
         FIG.  1    is a block diagram illustrating an example of a redundant server system according to an embodiment of the disclosure. 
         FIG.  2    is a flow chart illustrating an example of a method of data synchronization according to an embodiment of the disclosure. 
     
    
    
     DETAILED DESCRIPTION 
     Before the disclosure is described in greater detail, it should be noted that where considered appropriate, reference numerals or terminal portions of reference numerals have been repeated among the figures to indicate corresponding or analogous elements, which may optionally have similar characteristics. 
     Referring to  FIG.  1   , an embodiment of a redundant server system according to the disclosure is illustrated. The redundant server system includes an active input/output module (IOM)  1 , a passive IOM  2  and a share bus  3 . The active IOM  1  and the passive IOM  2  serve as redundant IOMs for each other, so as to enhance reliability of the redundant server system together. 
     The active IOM  1  includes a primary processing unit  11 , a plurality of primary dedicated sensors  12  and a plurality of primary share sensors  13 . The primary dedicated sensors  12  and the primary share sensors  13  are electrically connected to the primary processing unit  11 . The primary processing unit  11  includes a primary memory device  111 . 
     The passive IOM  2  includes a secondary processing unit  21 , a plurality of secondary dedicated sensors  22  and a plurality of secondary share sensors  23 . The secondary dedicated sensors  22  and the secondary share sensors  23  are electrically connected to the secondary processing unit  21 . The secondary processing unit  21  includes a secondary memory device  211 . The secondary processing unit  21  is electrically connected to the primary processing unit  11  of the active IOM  1 . In this embodiment, the primary processing unit  11  and the secondary processing unit  21  are electrically connected to each other via an inter-integrated circuit (l 2 C) bus, but is not limited thereto. 
     The primary processing unit  11 , the primary share sensors  13 , the secondary processing unit  21  and the secondary share sensors  23  are electrically connected to the share bus  3 . It should be noted that the term “share sensor” is referred to as a sensor that is electrically connected to a share bus throughout this disclosure. 
     In other embodiments, the primary share sensors  13  of the active IOM  1  and the secondary share sensors  23  of the passive IOM  2  may be omitted. 
     In this embodiment, each of the primary processing unit  11  and the secondary processing unit  21  is implemented by a baseboard management controller (BMC), but is not limited thereto. For example, each of the primary processing unit  11  and the secondary processing unit  21  may be a serial attached small computer system interface (SAS) expander or a redundant array of inexpensive disks (RAID) controller in other embodiments. 
     Each of the primary memory device  111  and the secondary memory device  211  is a volatile memory and is electrically rewritable. For example, each of the primary memory device  111  and the secondary memory device  211  may be implemented by a random access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM) or the like, but is not limited thereto. 
     Each of the primary dedicated sensors  12 , the secondary dedicated sensors  22 , the primary share sensors  13  and the secondary share sensors  23  may be implemented by a temperature sensor, a voltage detector, a current detector, a tachometer for measuring rotation speed of a fan, or the like, but is not limited to what are disclosed herein and may vary in other embodiments. 
     The primary memory device  111  is configured to store primary state data that include data detected by all of the primary dedicated sensors  12 , the secondary dedicated sensors  22 , the primary share sensors  13  and the secondary share sensors  23 . The secondary memory device  211  is configured to store secondary state data that include data detected by of all of the primary dedicated sensors  12 , the secondary dedicated sensors  22 , the primary share sensors  13   and the secondary share sensors  23 . In this embodiment, the primary state data and the secondary state data are stored in a system monitor application software that runs in a user space layer of Linux operating system of the redundant server system, but is not limited thereto. It is worth noting that for every round of execution of the system monitor application software, a process of collecting values of all the sensors (i.e., the primary dedicated sensors  12 , the secondary dedicated sensors  22 , the primary share sensors  13  and the secondary share sensors  23 ), a status decision algorithm and a “datasync” function are performed. It takes about two to three seconds per round to execute the system monitor application software. 
     Referring to  FIG.  2   , an embodiment of a method of data synchronization according to the disclosure is illustrated. The method is adapted to be implemented by the redundant server system that is previously described. In practice, the method may be incorporated into an enclosure management service (EMS), which is a software tool utilized for managing power, temperature and operation of fans in a hard disc drive (HDD) rack. The method includes steps S 401  to S 404  that are delineated below. 
     In step S 401 , the primary processing unit  11  allocates a primary transfer buffer in the primary memory device  111 , and the secondary processing unit  21  allocates a secondary transfer buffer in the secondary memory device  211 . In particular, the primary processing unit  11  allocates the primary transfer buffer in a kernel driver layer of the Linux operating system, and the secondary processing unit  21  allocates the secondary transfer buffer in the kernel driver layer of the Linux operating system. Each of the primary buffer and the secondary buffer is a simulated electrically-erasable programmable read-only memory (EEPROM). It is worth noting that a format (also known as a memory layout) of the secondary transfer buffer is identical to that of the primary transfer buffer, and accordingly a certain type of data may be arranged to be stored at an identical location of each of the primary transfer buffer and the secondary transfer buffer. 
     In step S 402 , the secondary processing unit  21  collects, at once, a plurality of pieces of secondary dedicated-sensor data that are numerical values detected by the secondary dedicated sensors  22 , and stores the pieces of secondary dedicated-sensor data in the primary transfer buffer of the active IOM  1 . Specifically, the secondary processing unit  21  packages the pieces of secondary dedicated-sensor data into a single data packet, and stores the data packet in the primary transfer buffer via the l 2 C bus. It is worth noting that such approach is more efficient than the primary processing unit  11  separately collecting, via the l 2 C bus, the pieces of secondary dedicated-sensor data. 
     In step S 403 , the primary processing unit  11  collects a plurality of pieces of primary dedicated-sensor data that are numerical values detected by the primary dedicated sensors  12 , a plurality of pieces of primary share-sensor data that are numerical values detected by the primary share sensors  13 , and a plurality of pieces of secondary share-sensor data that are numerical values detected by the secondary share sensor  23 . After the pieces of primary dedicated-sensor data, the pieces of primary share-sensor data and the pieces of secondary share-sensor data have been collected, the primary processing unit  11  then updates the primary state data at once based on the pieces of primary dedicated-sensor data, the pieces of primary share-sensor data and the pieces of secondary share-sensor data thus collected, and the pieces of secondary dedicated-sensor data stored in the primary transfer buffer. Next, the primary processing unit  11  stores, via the l 2 C bus, the primary state data thus updated in the secondary transfer buffer of the passive IOM  2 . In some embodiments, the primary processing unit  11  may notify the secondary processing unit  21  that the primary state data have been updated and stored in the secondary transfer buffer. 
     In step S 404 , the secondary processing unit  21  updates the secondary state data based on the primary state data that have been updated and that are stored in the secondary transfer buffer. 
     It should be noted that in step S 402 , the secondary processing unit  21  collects only the pieces of secondary dedicated-sensor data, and does not collect the pieces of primary dedicated-sensor data. The secondary processing unit  21  may receive data related to the pieces of primary dedicated-sensor data (i.e., the primary state data that have been updated and that are stored in the secondary transfer buffer) after the primary processing unit  11  has collected the pieces of primary dedicated-sensor data, the pieces of primary share-sensor data and the pieces of secondary share-sensor data, and has updated the primary state data in step S 403 . In this way, the secondary state data may be synchronized to be substantially consistent with the primary state data. 
     In one embodiment where the at least one primary share sensor  13  of the active IOM  1  is omitted and the at least one secondary share sensor  23  of the passive IOM  2  is omitted, in step S 403 , the primary processing unit  11  collects the pieces of primary dedicated-sensor data, updates the primary state data based on the pieces of primary dedicated-sensor data thus collected and the pieces of secondary dedicated-sensor data stored in the primary transfer buffer at once, and stores, via the l 2 C bus, the primary state data thus updated in the secondary transfer buffer. 
     In sum, for the method of data synchronization and the redundant server system according to the disclosure, the primary processing unit  11  of the active IOM  1  allocates the primary transfer buffer in the primary memory device  111  of the primary processing unit  11 , and the secondary processing unit  21  of the passive IOM  2  allocates the secondary transfer buffer in the secondary memory device  211  of the secondary processing unit  21 . Thereafter, the secondary processing unit  21  stores the pieces of secondary dedicated-sensor data collected thereby in the primary transfer buffer of the active IOM  1  at once, so as to enable the primary processing unit  11  to update the primary state data based on the pieces of primary dedicated-sensor data collected by the primary processing unit  11  and the pieces of secondary dedicated-sensor data stored in the primary transfer buffer at once. Afterwards, the primary processing unit  11  stores the primary state data that have been updated in the secondary transfer buffer of the passive IOM  2 , so as to enable the secondary processing unit  21  to update the secondary state data based on the primary state data that have been updated and that are stored in the secondary transfer buffer. In this way, the primary state data stored in the active IOM  1  and the secondary state data stored in the passive IOM  2  are synchronized. Since data for updating are stored in a volatile memory device (i.e., the pieces of secondary dedicated-sensor data stored in the primary transfer buffer and the primary state data stored in the secondary transfer buffer), accessing the data for updating may be faster than accessing a file in a file system. Moreover, each of the active IOM  1  and the passive IOM  2  transmits a corresponding portion of the data for updating each other in batches (i.e., the secondary processing unit  21  stores the pieces of secondary dedicated-sensor data in the primary transfer buffer at once, and the primary processing unit  11  stores the whole primary state data in the secondary transfer buffer), so a number of times that data is transmitted between the active IOM  1  and the passive IOM  2  may be reduced, and the time required for completing a task of data synchronization may thereby be reduced. 
     In the description above, for the purposes of explanation, numerous specific details have been set forth in order to provide a thorough understanding of the embodiment(s). It will be apparent, however, to one skilled in the art, that one or more other embodiments may be practiced without some of these specific details. It should also be appreciated that reference throughout this specification to “one embodiment,” “an embodiment,” an embodiment with an indication of an ordinal number and so forth means that a particular feature, structure, or characteristic may be included in the practice of the disclosure. It should be further appreciated that in the description, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of various inventive aspects; such does not mean that every one of these features needs to be practiced with the presence of all the other features. In other words, in any described embodiment, when implementation of one or more features or specific details does not affect implementation of another one or more features or specific details, said one or more features may be singled out and practiced alone without said another one or more features or specific details. It should be further noted that one or more features or specific details from one embodiment may be practiced together with one or more features or specific details from another embodiment, where appropriate, in the practice of the disclosure. 
     While the disclosure has been described in connection with what is(are) considered the exemplary embodiment(s), it is understood that this disclosure is not limited to the disclosed embodiment(s) but is intended to cover various arrangements included within the spirit and scope of the broadest interpretation so as to encompass all such modifications and equivalent arrangements.