Server and related control method

Through the dual-node architecture and register synchronization mechanism, the complex problem of multiple SSD flash memory management is solved, the performance and availability of the AFA server are improved, and high availability and fast failover between nodes are achieved.

CN113345495BActive Publication Date: 2024-10-25SILICON MOTION INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110220173.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-01-24
Filing Date
2021-02-26
Publication Date
2024-10-25
Estimated Expiration
2041-02-26

AI Technical Summary

Technical Problem

In the existing technology, the management of flash memories of multiple SSDs is complicated, and the existing control methods are not suitable for AFA servers with multiple SSDs, resulting in a decrease in overall performance.

Method used

The server design adopts a dual-node architecture, in which one node serves as the master device and the other node serves as the slave device. Data synchronization and fault detection are achieved through the synchronization mechanism of the register and the communication circuit to ensure high availability and performance between nodes.

Benefits of technology

Effective management of multiple SSD flash memories improves the overall performance and availability of the AFA server, ensuring rapid switching and service recovery in the event of node failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113345495B_ABST
    Figure CN113345495B_ABST
Patent Text Reader

Abstract

The present invention provides a control method for a server, wherein the control method comprises the following steps: periodically controlling a first register and a second register of a first node to have a first value and a second value respectively; periodically controlling a third register and a fourth register of a second node to have a third value and a fourth value respectively; controlling the first register and the fourth register to be synchronized with each other, wherein the first value is different from the fourth value; controlling the second register and the third register to be synchronized with each other, wherein the second value is different from the third value; and periodically checking whether the third register has the third value and whether the fourth register has the fourth value, so as to determine whether the first node fails to work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to memory control, and more particularly to a method for managing data access of an All Flash Array (AFA) server and related apparatus such as an AFA server and a control circuit thereof. Background Art

[0002] The data storage server can be configured to store user data of one or more users, and various control methods for the data storage server have been proposed in the prior art to provide users with a good user experience. Since non-volatile (NV) memory such as flash memory has been widely used in various data storage devices such as solid state drives (SSDs), the prior art proposes to implement a data storage server using a non-volatile (NV) memory type data storage server with NV memory as its storage medium, such as an AFA server in which multiple SSDs are installed. However, some problems may arise. For example, the management of accessing the flash memory of any of the multiple SSDs can be complicated. In order to ensure that the access control of the flash memory in this SSD complies with the relevant specifications, the controller of the flash memory in this SSD is usually equipped with certain management mechanisms to properly manage its internal operations. Although SSD manufacturers may try to make SSDs look like a good solution to replace hard disk drives (HDDs), some characteristics of SSDs are completely different from HDDs. As a result, the above control method may become inappropriate or ineffective for an AFA server equipped with multiple SSDs, thereby causing the overall performance of the AFA server to decrease. Therefore, it is necessary to provide a novel method and related architecture to solve these problems without or with less side effects. Summary of the invention

[0003] Therefore, one of the objectives of the present invention is to provide a control method for a server to solve the above-mentioned problem.

[0004] In one embodiment of the present invention, a server is disclosed, which includes a solid state drive, a first node and a second node. The first node includes a first memory, a first processor and a first communication circuit, wherein the first memory includes a first register and a second register; the first processor is used to control the first register and the second register to have a first value and a second value respectively; and the first communication circuit is coupled to the first processor and the first memory. The second node includes a second memory, a second memory and a second communication circuit, wherein the second memory includes a third register and a fourth register; the second memory is used to control the third register and the fourth register to have a third value and a fourth value respectively; and the second communication circuit is coupled to the second processor, the second memory and the first communication circuit. In the operation of the server, the first register and the fourth register are synchronized with each other, the second register and the third register are synchronized with each other, the first value controlled by the first processor is different from the fourth value controlled by the second processor, and the second value controlled by the first processor is different from the third value controlled by the second processor; and the second processor periodically checks whether the third register has the third value and whether the fourth register has the fourth value to determine whether the first node cannot work.

[0005] In another embodiment of the present invention, a control method of a server is disclosed, which includes the following steps: setting a first node of the server as a master device; periodically controlling a first register and a second register of the first node to have a first value and a second value respectively; setting a second node of the server as a slave device; periodically controlling a third register and a fourth register of the second node to have a third value and a fourth value respectively; controlling the first register and the fourth register to be synchronized with each other, wherein the first value controlled by the first node is different from the fourth value controlled by the second node; controlling the second register and the third register to be synchronized with each other, wherein the second value controlled by the first node is different from the third value controlled by the second node; and periodically checking whether the third register has the third value and whether the fourth register has the fourth value to determine whether the first node cannot work. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1 FIG. 4 is a schematic diagram of an all flash array (AFA) server according to an embodiment of the present invention.

[0007] Figure 2 According to one embodiment of the present invention, Figure 1A schematic diagram of some implementation details of the AFA server is shown.

[0008] Figure 3 According to an embodiment of the present invention, Figure 1 A schematic diagram of a dual-node architecture of the AFA server is shown.

[0009] Figure 4 According to an embodiment of the present invention, Figure 1 A schematic diagram of certain program modules in any one of the multiple nodes shown.

[0010] Figure 5 FIG. 4 is a schematic diagram of a write control method of an AFA server according to an embodiment of the present invention.

[0011] Figure 6 FIG. 4 is a schematic diagram of a cache synchronization mirroring operation according to an embodiment of the present invention.

[0012] Figure 7 A schematic diagram of a fault detection mechanism according to an embodiment of the present invention.

[0013] Figure 8 FIG. 1 is a schematic diagram showing changes in the values ​​V1_A, V2_A, V1_B and V2_B when the node 100A and the node 100B are both operating normally according to an embodiment of the present invention.

[0014] Fig. 9 FIG. 1 is a schematic diagram of changes in the values ​​V1_A, V2_A, V1_B and V2_B when the node 100A fails to work normally according to an embodiment of the present invention.

[0015]

Explanation of symbols

[0016] 10A, 10B: Top of rack (TOR) switches

[0017] 12A, 12B: Solid State Drive (SSD) Group

[0018] 100: All Flash Array (AFA) Server

[0019] 100A, 100B: Node

[0020] 110A, 110B: Processor

[0021] 112A, 112B: Program module

[0022] 120A, 120B: Dynamic Random Access Memory (DRAM)

[0023] 122A, 122B: Copy to Flash Memory (C2F) Solid State Drive (SSD)

[0024] 130A, 130B: Network interface (IF) module

[0025] 132A, 132B, 134A, 134B: Network interface (IF) circuit

[0026] 140A, 140B: Non-transparent bridge (NTB) communication circuit

[0027] 150A, 150B: Baseboard Management Controller (BMC)

[0028] 152A, 152B: Register circuit

[0029] 160A, 160B: Storage Interface (IF) Module

[0030] 162A, 162B, 164A, 164B: Storage Interface (IF) Circuit

[0031] 170A,170B: Backup power supply unit

[0032] 500~514: Steps

[0033] 610A,610B:Table

[0034] 710_1,710_2,720_1,720_2: register

[0035] V1_A,V2_A,V1_B,V2_B: Value

[0036] t1,t2,t3,t4,t5: time DETAILED DESCRIPTION

[0037] Figure 11 is a schematic diagram of an All Flash Array (AFA) server 100 according to an embodiment of the present invention. The AFA server 100 may include a plurality of nodes, such as two nodes, namely, a node 100A and a node 100B, wherein any one of the plurality of nodes (e.g., one of the node 100A and the node 100B) may have the same or similar architecture as another one of the plurality of nodes (e.g., another one of the node 100A and the node 100B). For example, the node 100A may include at least one processor (e.g., one or more processors such as one or more central processing units (CPUs)) that may be collectively referred to as a processor 110A, and include a dynamic random access memory (DRAM) 120A, a copy-to-Flash (C2F) solid state drive (SSD) 122A, a network interface (IF) module 130A including one or more network interface (IF) circuits such as network interface circuits 132A and 134A (respectively labeled as “network IF CKT” for simplicity), a non-transparent bridge (NTB) module (or NTB) such as an NTB communication circuit 140A (labeled as “NTB CKT” for simplicity), and a board management controller (BMC). The node 100A includes a memory controller (BMC) 150A, a register circuit 152A (labeled as "REG CKT" for simplicity) coupled to the BMC 150A, a storage interface (IF) module 160A including one or more storage interface circuits such as storage interface circuits 162A and 164A (labeled as "Storage IF CKT" for simplicity) and a backup power supply such as a backup power supply unit 170A (e.g., a battery), wherein at least a portion (e.g., a portion or all) of these components can be coupled to each other via a bus of the node 100A, but the present invention is not limited thereto. According to some embodiments, the architecture of the node 100A can be varied in different ways.

[0038] Similarly, the node 100B may include at least one processor (e.g., one or more processors such as one or more CPUs) which may be collectively referred to as a processor 110B, and may include a DRAM 120B, a C2F SSD 122B, a network interface (IF) module 130B including one or more network interface (IF) circuits such as network interface circuits 132B and 134B (respectively labeled as “Network IF CKT” for simplicity), an NTB module (or NTB) such as an NTB communication circuit 140B labeled as “NTBCKT” for simplicity), a BMC 150B, a register circuit 152B (labeled as “Register CKT” for simplicity) coupled to the BMC 150B, a storage interface (IF) module 160B including one or more storage interface circuits such as storage interface circuits 162B and 164B (respectively labeled as “Storage IF CKT" for simplicity) and a backup power source such as a backup power source unit 170B (e.g., a battery), wherein at least a portion (e.g., a portion or all) of these components can be coupled to each other via a bus of the node 100B, but the present invention is not limited thereto. According to certain embodiments, the architecture of the node 100B can be varied differently.

[0039] like Figure 1 As shown, the AFA server 100 may further include a plurality of SSDs coupled to the nodes 100A and 100B, such as an SSD group 12A and an SSD group 12B, the SSD groups 12A and 12B may be coupled to the nodes 100A and 100B, and may be pre-connected / linked to the nodes 100A and 100B, respectively, wherein the dotted lines between the nodes 100A and 100B and the SSD groups 12B and 12A may indicate a plurality of optional connections. For example, the node 100A may use the storage interface module 160A to activate the connection between the storage interface circuit 164A and the SSD group 12A to access data in the SSD group 12A, and the node 100B may use the storage interface module 160B to activate the connection between the storage interface circuit 164B and the SSD group 12B to further access data in the SSD group 12B. When necessary, the connection relationship between nodes 100A and 100B and SSD groups 12A and 12B can be changed. For example, node 100A can use storage interface module 160A to start the connection between storage interface circuit 162A and SSD group 12B to access data in SSD group 12B, and node 100B can use storage interface module 160B to start the connection between storage interface circuit 162B and SSD group 12A to access data in SSD group 12A.

[0040] The processor 110A running the program module 112A can be used to control the operation of the node 100A. The DRAM 120A can be used to buffer data (e.g., data to be written to the SSD group 12A), and the C2F SSD 122A can be used to copy the buffered data (referred to as "buffered data") in the DRAM 120A to the flash memory in the C2F SSD 122A to prevent data loss of the buffered data when necessary. For example, the C2F SSD 122A can be implemented by an expansion card such as an M.2 module (e.g., a circuit board with a connector that complies with the M.2 specification) installed on a main circuit board (e.g., a motherboard or a motherboard) in the node 100A, wherein the C2F SSD 122A can include a storage controller, one or more flash memory chips, etc., but the present invention is not limited thereto. In addition, the network interface module 130A including the network interface circuits 132A and 134A can be used to couple the node 100A (e.g., the processor 110A on the main circuit board, the DRAM 120A, etc.) to at least one network (e.g., a local area network (LAN), a wide area network (WAN), the Internet, etc.) through at least one network switch such as a top-of-rack (TOR) switch 10A and 10B. In addition, the storage interface module 160A including the storage interface circuits 162A and 164A can be used to couple the node 100A (e.g., the processor 110A on the main circuit board, the DRAM 120A, etc.) to multiple flash storage devices (e.g., SSD groups 12A and 12B shared by the nodes 100A and 100B) to access (e.g., read or write) data in the multiple flash storage devices. In this way, the AFA server 100 can be used to provide user storage services through the node 100A.

[0041] Similarly, the processor 110B running the program module 112B can be used to control the operation of the node 100B. The DRAM 120B can be used to buffer data (e.g., data to be written to the SSD group 12B), and the C2F SSD 122B can be used to copy the buffered data in the DRAM 120B (referred to as "buffered data") to the flash memory in the C2F SSD 122B to prevent the buffered data from being lost when necessary. For example, the C2F SSD 122B can be implemented by an expansion card such as an M.2 module (e.g., a circuit board with a connector that complies with the M.2 specification) installed on a main circuit board (e.g., a motherboard or a motherboard) in the node 100B, wherein the C2F SSD 122B can include a storage controller, one or more flash memory chips, etc., but the present invention is not limited thereto. In addition, the network interface module 130B including network circuits 132B and 134B can be used to couple the node 100B (e.g., the processor 110B on the main circuit board, DRAM 120B, etc.) to at least one network (e.g., LAN, WAN, Internet, etc.) through at least one network switch such as TOR switches 10A and 10B. In addition, the storage interface module 160B including storage interface circuits 162B and 164B can be used to couple the node 100B (e.g., the processor 110B on the main circuit board, DRAM 120B, etc.) to multiple flash storage devices (e.g., SSD groups 12A and 12B shared by nodes 100A and 100B) to access (e.g., read or write) data in the multiple flash storage devices. In this way, the AFA server 100 can be used to provide user storage services through the node 100B.

[0042] Regarding the communication between the node 100A and its peer node (e.g., the node 100B), the NTB module (e.g., the NTB communication circuit 140A) can be used to communicate with the corresponding NTB module (e.g., the NTB communication circuit 140B) through an NTB path (labeled as "NTB" for simplicity) between the nodes 100A and 100B, so as to synchronize the data and storage states of the nodes 100A and 100B, and further make them the same. Similarly, regarding the communication between the node 100B and its peer node (e.g., the node 100A), the NTB module (e.g., the NTB communication circuit 140B) can be used to communicate with the corresponding NTB module (e.g., the NTB communication circuit 140A) through the NTB path (labeled as "NTB" for simplicity) between the nodes 100A and 100B, so as to synchronize the data and storage states of the nodes 100A and 100B, and further make them the same. In particular, the NTB modules such as the NTB communication circuits 140A and 140B can provide a function of a transmission bridge between the nodes 100A and 100B and separate the respective address domains of the nodes 100A and 100B so that the nodes 100A and 100B have independent address domains from each other, so as to provide / enhance the communication between the nodes 100A and 100B without any address conflict. For example, the respective buses of the nodes 100A and 100B can comply with the Peripheral Component Interconnect Express (PCIe) standard, and the NTB module of each of the nodes 100A and 100B can be considered as an endpoint of the node, wherein the nodes 100A and 100B can communicate with each other and share devices through the transmission bridge, but the present invention is not limited thereto. According to some embodiments, NTB modules such as NTB communication circuits 140A and 140B may be implemented through a customized network interface circuit to control nodes 100A and 100B to communicate with each other as if they are communicating through the network interface circuit.

[0043] Under the control of processor 110A running program module 112A and processor 110B running program module 112B, nodes 100A and 100B may maintain and monitor pulses on the NTB to determine the availability of peer nodes for high availability (HA) control. For example, node 100B may be used to send a pulse signal to node 100A, and node 100A may be used to detect and monitor the pulse signal from node 100B to determine the availability of node 100B, wherein the presence or absence of the pulse signal from node 100B may indicate whether node 100B is available (or healthy). For another example, node 100A may be used to send a pulse signal to node 100B, and node 100B may be used to detect and monitor the pulse signal from node 100A to determine the availability of node 100A, wherein the presence or absence of the pulse signal from node 100A may indicate whether node 100A is available (or healthy). Based on Figure 1 The architecture shown, Figure 1 As shown, when one of the nodes 100A and 100B is unavailable, the other one of the nodes 100A and 100B can continue to provide the storage service of the AFA server 100 to the user.

[0044] It should be noted that the AFA server 100 is equipped with more than one inter-node communication path (e.g., more than one inter-communication path between nodes). In addition to the NTB path, the AFA server 100 may also be configured to have one or more other communication paths, such as a BMC path between BMCs 150A and 150B, wherein BMC 150A may be used to manage at least a portion (e.g., a portion or all) of the hardware layer of node 100A, and BMC 150B may be used to manage at least a portion (e.g., a portion or all) of the hardware layer of node 100B. With respect to communication between node 100A and its peer node (e.g., node 100B), BMC 150A may be used to communicate with BMC 150B via the BMC path to access (e.g., read or write) one or more register values ​​of one or more registers in register circuit 152B to perform status check operations on node 100B, etc. Similarly, with respect to communication between the node 100B and its peer node (e.g., the node 100A), the BMC 150B may be used to communicate with the BMC 150A via the BMC path to access (e.g., read or write) one or more register values ​​of one or more registers in the register circuit 152A to perform status check operations on the node 100A, etc. In particular, the BMC 150A and the BMC 150B may independently manage the respective hardware layers of the nodes 100A and 100B without relying on the processors 110A and 110B. For example, when the processor 110A fails, the BMC 150A may process the unfinished work of the node 100A, and when the processor 110B fails, the BMC 150B may process the unfinished work of the node 100B, but the present invention is not limited thereto. According to some embodiments, BMCs 150A and 150B may be used to take over nodes 100A and 100B, respectively, to perform emergency processing operations to reduce the probability of data loss.

[0045] According to this embodiment, the AFA server 100 can be configured to be powered by multiple types of power supplies. Each of the nodes 100A and 100B can include at least one main power supply (e.g., at least one power supply) for providing power to other components of the node when the main power supply is in a normal power supply condition. For example, the main power supply of the node 100A can supply power to the main circuit board of the node 100A, and the main power supply of the node 100B can supply power to the main circuit board of the node 100B. When an abnormal power supply condition of one or more nodes (e.g., the node 100A and / or the node 100B) is detected, one or more related backup power supplies (e.g., the backup power supply unit 170A and / or the backup power supply unit 170B) in the AFA server 100 can be used to provide backup power. For example, when a power failure occurs in the main power supply of node 100A, the backup power supply unit 170A can supply power to the main circuit board of node 100A (for example, processor 110A, DRAM 120A, C2F SSD 122A, NTB communication circuit 140A, BMC150A, register circuit 152A, etc.); when a power failure occurs in the main power supply of node 100B, the backup power supply unit 170B can supply power to the main circuit board of node 100B (for example, processor 110B, DRAM 120B, C2F SSD 122B, NTB communication circuit 140B, BMC150B, register circuit 152B, etc.).

[0046] According to some embodiments, each node of the nodes 100A and 100B (e.g., each node in the respective main circuit boards of the nodes 100A and 100B) may further include a plurality of sensors / detectors for detecting at least the components of the node to generate detection results (e.g., status information obtained from any one of the sensors / detectors). For example, a power detection result among the detection results may indicate the power status of the main power supply of the node, and in particular, may indicate whether an abnormal power supply condition occurs at the node, so as to trigger the node to start a backup power supply (e.g., backup power supply unit 170A or backup power supply unit 170B) to provide backup power.

[0047] Figure 2 According to an embodiment of the present invention, Figure 1 Certain implementation details of the AFA server 100 shown in FIG. 1 , wherein the SSD 100S may be used as Figure 1Examples of multiple SSDs mentioned in the illustrated embodiment. In addition to the nodes 100A and 100B and the SSD 100S, the AFA server 100 may further include a backplane circuit 100R. The backplane circuit 100R may be used to electrically connect the SSD 100S such as the SSD groups 12A and 12B to the nodes 100A and 100B. For example, the backplane circuit 100R may be implemented by a backplane circuit board with related connectors, etc. In addition, a partial path of the NTB path between the NTB communication circuits 140A and 140B and a partial path of the BMC path between the BMCs 150A and 150B may be implemented in the backplane circuit 100R. Since each of the BMC path and the NTB path does not pass through any cables that may be susceptible to damage, the communication path between the nodes 100A and 100B is robust, and thus the nodes 100A and 100B can maintain effective communication and related control to ensure the overall performance and normal operation of the AFA server 100.

[0048] According to some embodiments, each SSD in the SSD 100S may be a single port SSD, and in particular, may be a single port device-based SSD. In addition, with the backplane circuit 100R, the AFA server 100 may support hot swapping of each SSD in the SSD 100S.

[0049] According to some embodiments, one of the two nodes 100A and 100B can be used as an active node in the high availability (HA) architecture of the AFA server 100, that is, playing the role of the active node, and the other of the two nodes 100A and 100B can be used as a standby node in the HA architecture of the AFA server 100, that is, playing the role of the standby node. The two nodes 100A and 100B, such as the active node and the standby node, can interact with each other, and in particular, can exchange node information through at least two communication paths (such as the NTB path between the NTB communication circuits 140A and 140B and the BMC path between the BMCs 150A and 150B), and can synchronize data through the NTB path, but the present invention is not limited thereto. According to some embodiments, the AFA server 100 can be equipped with more than two inter-node communication paths (e.g., more than two inter-communication paths between nodes).

[0050] Figure 3 According to an embodiment of the present invention, Figure 1FIG. 1 is a schematic diagram of a dual-node architecture of an AFA server 100 shown in FIG. 1 . According to this embodiment, nodes 100A and 100B can be configured as the active node and the standby node, respectively, but the present invention is not limited thereto. For example, nodes 100A and 100B can exchange their roles when necessary. Figure 3 As shown, except for some hardware (HW) components such as Figure 1 or Figure 2 In addition to some of the components in the illustrated architecture, certain software (SW) programs / programs may also be illustrated, such as an HA framework program, a web server program, a database program, a storage control module program operating in a service mode, and a storage control module program operating in a standby mode (respectively labeled as "HA framework," "Web server," "database," "storage control module in service mode," and "storage control module in standby mode" for simplicity) to indicate the associated interactions in the AFA server 100, wherein the names of the above programs represent their respective related functions.

[0051] The software programs (e.g., HA framework programs, Web server programs, database programs, and storage control module programs operating in the service mode) running on the node 100A may be used as an example of the program module 112A, and the software programs (e.g., HA framework programs, Web server programs, database programs, and storage control module programs operating in the standby mode) running on the node 100B may be used as an example of the program module 112B, but the present invention is not limited thereto. In addition, the one or more network interface circuits of the network interface module 130A may further include a network interface circuit 136A, and the one or more network interface circuits of the network interface module 130B may further include a network interface circuit 136B. Therefore, the AFA server 100 may be equipped with at least three inter-node communication paths (e.g., at least three inter-communication paths between nodes), such as an NTB path, a BMC path, and a network path between the network interface circuits 136A and 136B. For example, the nodes 100A and 100B may be used to perform cache mirroring operations via the NTB path, check local / remote controller status via the BMC path, and perform additional communication operations via the network path between the network interface circuits 136A and 136B.

[0052] Figure 4 According to an embodiment of the present invention, Figure 1Schematic diagram of a program module 112 in any (e.g., each) of the plurality of nodes 100A and 100B shown. For example, the program module 112 may represent a program module 112A running on a processor 110A of the node 100A or a program module 112B running on a processor 110B of the node 100B. Figure 4 As shown, the program module 112 may include certain main program modules, such as a storage protocol and block input / output (IO) interface module, a storage cache module, a storage pool module, a storage service continuous HA module, a storage function module, and a storage management module (respectively labeled as "storage protocol and block IO interface", "storage cache", "storage pool", "storage service continuous HA", "storage function" and "storage management" for simplicity), wherein any of these main program modules may include one or more sub-modules. In addition, the arrows between certain program modules in the program module 112 indicate that these program modules may interact with each other between the program modules of the multiple layers to which they belong. For example, the storage protocol and block IO interface module may be regarded as an upper layer above the storage cache module (e.g., an upper layer program module), the storage pool module may be regarded as a lower layer below the storage cache module (e.g., a lower layer program module), the storage function module and the storage cache module may be arranged in an intermediate layer as an intermediate layer program module, wherein the storage protocol and block IO interface module and the storage pool module may be used to interact with the client device and the SSD group, but the present invention is not limited thereto. When necessary, the node can trigger other program modules to interact with one or more of these program modules.

[0053] The storage protocol and block IO interface module may include certain sub-modules such as a Small Computer System Interface (SCSI) module, an Internet SCSI (iSCSI) module, and a Block Device module (respectively labeled as "SCSI", "iSCSI", and "Block Device" for simplicity). The storage cache module may include certain sub-modules such as a Persistent Memory using SW implementation module and a Write Buffer module (also referred to as "Write Buffer module"), which are respectively labeled as "Persistent Memory (Software Implementation)" and "Write Buffer" for simplicity. The storage pool module may include a sub-module such as a Flash Array module (labeled as "Flash Array" for simplicity). The storage service continuity HA module may include a sub-module such as an HA framework module (labeled as "HA Framework" for simplicity). The storage function module may include certain submodules such as a volume manager module and a data reduction module (respectively labeled as "volume manager" and "data reduction" for simplicity), wherein the data reduction module may include certain submodules such as a compression engine module and a deduplication engine module, which may be respectively referred to as a "compression engine" and a "deduplication engine". The storage management module may include certain submodules such as a web user interface (UI) module, an application programming interface (API) server module, a request broker (RequestBroker) module and a database module (respectively labeled as "web UI", "API server", "request broker" and "database" for simplicity). The names of the above modules indicate their related functions respectively. For ease of understanding, for a certain module such as a volume manager module, a compression engine module, a deduplication engine module, etc., the operation of consulting the module mentioned in certain embodiments may include operations such as calling and querying the module to obtain corresponding processing results from it, but the present invention is not limited to this.

[0054] According to some embodiments, the AFA server 100 (eg, the active node, such as one of the nodes 100A and 100B) may be configured to receive requests such as write requests, read requests, etc. from client devices external to the AFA server 100 and operate in response to these requests.

[0055] Figure 5 Schematic diagram of a write control method of an AFA server 100 according to an embodiment of the present invention. In step 500, the AFA server 100 is powered on, and the AFA server 100 is able to communicate with other electronic devices via at least one network (e.g., LAN, WAN, Internet, etc.) and TOR switches 10A and 10B. In step 502, one node of the AFA server 100 acts as a master device, and the other node acts as a slave device. In this embodiment, node 100A acts as a master device that can communicate with other electronic devices via TOR switches 10A and 10B and access SSD 100S, and node 100B acts as a slave device that is not allowed to access SSD 100S when node 100A is working normally. In step 504, the processor 110A configures DRAM space in the DRAM 120A for use as a write buffer, and the processor 110A further notifies the processor 110B of the node 100B to configure DRAM space in the DRAM 120B for use as a write buffer, wherein the write buffer in the DRAM 120A / 120B may have any suitable size, such as 16 gigabytes (GB) or 32GB. In step 506, the node 100A receives data from a user device, that is, the user writes data to the AFA server 100 through the network. In step 508, the node 100A writes the data into the DRAM space in the DRAM 120A, and the processor 110A further establishes the following. Figure 6 See Table 610A. Figure 6 , wherein table 610A includes a unique ID (i.e., user ID), the logical address of the data at the user end, the data length, and the starting address of the data in DRAM 120A. In step 510, node 100A executes a cache mirroring mechanism to send the data and corresponding information to node 100B through NTB, wherein the corresponding information may be at least a portion of the content of table 610A, for example, the corresponding information may include the user ID, the logical address of the data at the user end, and the data length. In step 512, processor 110B of node 100B writes the data into the DRAM space in DRAM 120B, and processor 110B further establishes the following. Figure 6 Table 610B is shown. Figure 6 , wherein table 610B includes a user ID, a logical address of the data at the user end, a data length, and a starting address of the data in DRAM 120B. After the data is completely written to DRAM 120B, the processor 110B of node 100B sends a notification to node 100A to inform that the cache synchronization mirroring operation has been completed. In step 514, only after the processor 110A receives the notification from node 100B, node 100A sends a message to the user's electronic device through TOR switch 10A / 10B to notify that the data has been successfully received, and then the processor 110A starts to move the data stored in DRAM 120A to SSD 100S. In one embodiment, when the size of the data stored in DRAM 120 and capable of being moved exceeds a predetermined value, such as more than 64 kilobytes, the processor 110A moves the data stored in DRAM 120A to SSD 100S.

[0056] When the data stored in DRAM 120A is successfully moved to SSD 100S, processor 110A deletes the data in DRAM 120A and updates table 610A to delete the relevant information of the data. In addition, processor 110A also notifies node 100B that the data has been stored in SSD 100S so that processor 110B can delete the data in DRAM 120B and update table 610B to delete the relevant information of the data.

[0057] Figure 5 , 6 The cache synchronization mirroring mechanism described in the illustrated embodiment is used as a failover mechanism to protect data that has been written to the DRAM 120A but has not yet been written to the SSD 100S, that is, once the master device stores the received data in the DRAM 120A, the master device immediately transmits the data to the slave device so that both the master device and the slave device have the data. Therefore, since both the master device and the slave device have the data, once the master device fails to work properly, the slave device can immediately replace the master device to perform the operation that should have been performed by the master device, that is, the slave device moves the data stored in the DRAM 120B to the SSD 100S at an appropriate time.

[0058] In detail, if the master device (e.g., node 100A) suddenly fails to access the SSD 100S, such as the operating system of the master device crashes, the memory or storage element in the master device is damaged, the downstream port is disabled, or any other failure reason, the AFA server 100 can immediately execute a failover mechanism, that is, the slave device (e.g., node 100B) is configured to perform the operation of the master device. The present invention also proposes a fault detection mechanism, which can effectively and accurately detect whether the master device cannot work normally. Figure 7 FIG. 1 is a schematic diagram of a fault detection mechanism according to an embodiment of the present invention. Figure 7 As shown, the node 100A is configured with two registers 710_1 and 710_2, and the processor 110A of the node 100A can control the registers 710_1 and 710_2 so that the register 710_1 has a value V1_A and the register 710_2 has a value V2_A. The node 100B is configured with two registers 720_1 and 720_2, and the processor 110B of the node 100B can control the registers 720_1 and 720_2 so that the register 720_1 has a value V1_B and the register 720_2 has a value V2_B. In one embodiment, the register 710_1 of the node 100A and the register 720_1 of the node 100B are allocated by a PCIe device, that is, the register 710_1 and the register 720_1 are PCIe base address registers (BAR); in addition, the register 710_2 of the node 100A and the register 720_2 of the node 100B are allocated by a PCIe device, that is, the register 710_2 and the register 720_2 are PCIe base address registers.

[0059] The register 710_1 of the node 100A and the register 720_2 of the node 100B are synchronized with each other, but the value V1_A controlled by the processor 110A is different from the value V2_B controlled by the processor 110B. In addition, the register 710_2 of the node 100A and the register 720_1 of the node 100B are synchronized with each other, but the value V2_A controlled by the processor 110A is different from the value V1_B controlled by the processor 110B. For example, assuming that the value V1_A and the value V2_A are '0' and '1' respectively, the processor 110A may periodically check whether the value V1_A and the value V2_A are equal to '0' and '1' respectively; if the value V1_A and the value V2_A are not equal to '0' and '1', the processor 110A immediately changes the values ​​of the registers 710_1 and 710_2 to make the value V1_A equal to '0' and the value V2_A equal to '1'. Similarly, assuming that the value V1_B and the value V2_B are '0' and '1' respectively, the processor 110B can periodically check whether the value V1_B and the value V2_B are equal to '0' and '1' respectively; if the value V1_B and the value V2_B are not equal to '0' and '1', the processor 110B immediately changes the values ​​of the registers 720_1 and 720_2 so that the value V1_B is equal to '0' and the value V2_B is equal to '1'. As described above, when both the node 100A and the node 100B work well, the processor 110A will always determine that the values ​​V1_A and V2_A are not equal to the predetermined value, because the values ​​V1_A and V2_A will always be synchronized by the values ​​V2_B and V1_B, and the processor 110A needs to periodically update the values ​​V1_A and V2_A to '0' and '1' respectively. Therefore, if the processor 110A determines that the values ​​V1_A and V2_A are always '0' and '1', it means that the node 100B does not update its values ​​V1_B and V2_B, and at this time the processor 110A can determine that the node 100B cannot work properly. Similarly, when both the node 100A and the node 100B work well, the processor 110B will always determine that the values ​​V1_B and V2_B are not equal to the predetermined values, because the values ​​V1_B and V2_B will always be synchronized by the values ​​V2_A and V1_A, and the processor 110B needs to periodically update the values ​​V1_B and V2_B to '0' and '1', respectively. Therefore, if the processor 110B determines that the values ​​V1_B and V2_B are always '0' and '1', it means that the node 100A does not update its values ​​V1_A and V2_A, and at this time the processor 110B can determine that the node 100A cannot work properly.

[0060] Figure 8 This is a schematic diagram of the changes in the values ​​V1_A, V2_A, V1_B and V2_B when both the node 100A and the node 100B are operating normally according to an embodiment of the present invention. Figure 8 In the illustrated embodiment, the predetermined values ​​of the numerical values ​​V1_A and V2_A are '0' and '1', respectively. That is, if the numerical values ​​V1_A and V2_A are not '0' and '1', the processor 110A will update them to the predetermined values ​​'0' and '1'. In addition, the predetermined values ​​of the numerical values ​​V1_B and V2_B are '0' and '1', respectively. That is, if the numerical values ​​V1_B and V2_B are not '0' and '1', the processor 110B will update them to the predetermined values ​​'0' and '1'. Figure 8 As shown, at time t1, the AFA server 100 is powered on, and at this time, the values ​​V1_A, V2_A, V1_B and V2_B are all equal to '0'. At time t2, the processor 110A of the node 100A checks the values ​​V1_A and V2_A, and updates the values ​​V1_A and V2_A to '0' and '1' respectively; at the same time, the values ​​V1_B and V2_B of the node 100B are synchronized by the values ​​V2_A and V1_A respectively, that is, the value V1_B becomes '1', and the value V2_B becomes '0'. At time t3, the processor 110B of the node 100B checks the values ​​V1_B and V2_B, and updates the values ​​V1_B and V2_B to '0' and '1' respectively; at the same time, the values ​​V1_A and V2_A of the node 100A are synchronized by the values ​​V2_B and V1_B respectively, that is, the value V1_A becomes '1', and the value V2_A becomes '0'. At time t4, the processor 110A of the node 100A checks the values ​​V1_A and V2_A, and updates the values ​​V1_A and V2_A to '0' and '1' respectively; at the same time, the values ​​V1_B and V2_B of the node 100B are synchronized by the values ​​V2_A and V1_A respectively, that is, the value V1_B becomes '1', and the value V2_B becomes '0'. At time t5, the processor 110B of the node 100B checks the values ​​V1_B and V2_B, and updates the values ​​V1_B and V2_B to '0' and '1' respectively; at the same time, the values ​​V1_A and V2_A of the node 100A are synchronized by the values ​​V2_B and V1_B respectively, that is, the value V1_A becomes '1', and the value V2_A becomes '0'. As described above, when both the node 100A and the node 100B work well, the values ​​in the registers 710_1, 710_2, 720_1 and 720_2 will change periodically as the synchronization mechanism progresses, and therefore the processor 110A / 110B needs to regularly update the values ​​in the registers.

[0061] It should be noted that the steps of checking and updating the processor 110A and the steps of checking and updating the processor 110B are performed in a time-staggered manner, that is, the cycle of the steps of checking and updating the processor 110A is the same as the cycle of the steps of checking and updating the processor 110B. Figure 8For example, the interval between time t2 and t4 is equal to the interval between time t3 and t5 (ie, (t4-t2)=(t5-t3)).

[0062] Fig. 9 This is a schematic diagram of the changes in the values ​​V1_A, V2_A, V1_B and V2_B when the node 100A fails to work normally according to an embodiment of the present invention. Fig. 9 In the illustrated embodiment, the predetermined values ​​of the numerical values ​​V1_A and V2_A are '0' and '1', respectively. That is, if the numerical values ​​V1_A and V2_A are not '0' and '1', the processor 110A will update them to the predetermined values ​​'0' and '1'. In addition, the predetermined values ​​of the numerical values ​​V1_B and V2_B are '0' and '1', respectively. That is, if the numerical values ​​V1_B and V2_B are not '0' and '1', the processor 110B will update them to the predetermined values ​​'0' and '1'. Fig. 9 As shown, at time t1, the processor 110A of the node 100A checks the values ​​V1_A and V2_A, and updates the values ​​V1_A and V2_A to '0' and '1' respectively; at the same time, the values ​​V1_B and V2_B of the node 100B are synchronized by the values ​​V2_A and V1_A respectively, that is, the value V1_B becomes '1', and the value V2_B becomes '0'. At time t2, the processor 110B of the node 100B checks the values ​​V1_B and V2_B, and updates the values ​​V1_B and V2_B to '0' and '1' respectively; at the same time, the values ​​V1_A and V2_A of the node 100A are synchronized by the values ​​V2_B and V1_B respectively, that is, the value V1_A becomes '1', and the value V2_A becomes '0'. At time t3, the node 100A suddenly fails to work properly, and the processor 110A therefore does not update the values ​​V1_A and V2_A, that is, the values ​​V1_A and V2_A remain '1' and '0' respectively. At time t4, the processor 110B of the node 100B checks the values ​​V1_B and V2_B and finds that the values ​​V1_B and V2_B do not need to be updated, so the processor 110B can determine that the node 100A (master device) fails to work properly, and the node 100B (slave device) can execute the failover mechanism to execute the operation that should have been executed by the node 100A.

[0063] In summary, since the node 100A / 100B can determine whether another node is not working by simply checking its own register without referring to the notification from the other node, the fault detection mechanism of this embodiment can effectively and accurately detect whether other nodes are not working properly.

[0064] In one embodiment, when the failover mechanism is executed, the node 100B will change from a slave device to a master device. Therefore, for the convenience of software design, the predetermined values ​​of V1_A and V2_A in the node 100A will be designed to be the same as the predetermined values ​​of V1_B and V2_B in the node 100B, however, the present invention is not limited thereto.

[0065] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A server comprising: A solid state drive; A first node, comprising: A first memory including a first register and a second register; a first processor, used for controlling the first register and the second register to have a first value and a second value respectively; and a first communication circuit coupled to the first processor and the first memory; and A second node, comprising: a second memory including a third register and a fourth register; a second processor, used for controlling the third register and the fourth register to have a third value and a fourth value respectively; and a second communication circuit coupled to the second processor, the second memory and the first communication circuit; The first register and the fourth register are synchronized with each other, the second register and the third register are synchronized with each other, the first value controlled by the first processor is different from the fourth value controlled by the second processor, and the second value controlled by the first processor is different from the third value controlled by the second processor; and the second processor periodically checks whether the third register has the third value and checks whether the fourth register has the fourth value to determine whether the first node cannot work.

2. The server according to claim 1, wherein: The second processor periodically checks whether the third register has the third value and whether the fourth register has the fourth value; if the third register does not have the third value and the fourth register does not have the fourth value, the second processor determines that the first node works normally, and the second processor controls the third register and the fourth register to be updated to have the third value and the fourth value respectively; and if the third register has the third value and the fourth register has the fourth value, the second processor determines that the first node cannot work.

3. The server according to claim 2, wherein: If the first node is configured to access the SSD and the second node is a slave device that does not access the SSD, when the second processor determines that the first node cannot work, the second node activates a failover mechanism to execute operations that should have been executed by the first node.

4. The server according to claim 2, wherein: The first processor periodically checks whether the first register has the first value and whether the second register has the second value; if the first register does not have the first value and the second register does not have the second value, the first processor determines that the second node works well, and the first processor controls the first register and the second register to be updated to have the first value and the second value respectively; and if the first register has the first value and the second register has the second value, the first processor determines that the second node cannot work.

5. The server according to claim 1, wherein: The first value is the same as the third value, and the second value is the same as the fourth value.

6. The server according to claim 1, wherein: The first buffer is allocated by the quick peripheral component interconnect device of the first node; and the second buffer is allocated by the quick peripheral component interconnect device of the second node.

7. A method for controlling a server, comprising: Setting a first node of the server as a master device; A first register and a second register of the first node are periodically controlled to have a first value and a second value respectively; Setting a second node of the server as a slave device; A third register and a fourth register of the second node are periodically controlled to have a third value and a fourth value respectively; Controlling the first register and the fourth register to be synchronized with each other, wherein the first value controlled by the first node is different from the fourth value controlled by the second node; controlling the second register and the third register to be synchronized with each other, wherein the second value controlled by the first node is different from the third value controlled by the second node; and Periodically checking whether the third register has the third value and whether the fourth register has the fourth value to determine whether the first node cannot work.

8. The control method according to claim 7, characterized in that: The step of periodically checking whether the third register has the third value and whether the fourth register has the fourth value to determine whether the first node is unable to work comprises: If the third register does not have the third value and the fourth register does not have the fourth value, then the first node is determined to be working normally, and the third register and the fourth register are controlled to have the third value and the fourth value respectively; and If the third register has the third value and the fourth register has the fourth value, it is determined that the first node cannot work.

9. The control method according to claim 8, characterized in that: The first node is configured to access a solid state drive in the server, and the second node is a slave device that does not access the solid state drive. The control method further includes: If it is determined that the first node cannot work, a failover mechanism is started to enable the second node to perform the operation that should have been performed by the first node.

10. The control method according to claim 8, characterized in that: Also included: Periodically checking whether the first register has the first value and whether the second register has the second value; If the first register does not have the first value and the second register does not have the second value, then the second node is determined to be working properly, and the first register and the second register are controlled to have the first value and the second value respectively; and If the first register has the first value and the second register has the second value, it is determined that the second node cannot operate.

11. The control method according to claim 7, characterized in that: The first value is the same as the third value, and the second value is the same as the fourth value.

12. The control method according to claim 7, characterized in that: The first buffer is allocated by the quick peripheral component interconnect device of the first node; and the second buffer is allocated by the quick peripheral component interconnect device of the second node.