Controller power-down processing method, storage controller and system
By utilizing the independent communication mechanism of BIOS and network cards in the storage system, the controller power-down event is quickly broadcast under the transparent power backup solution, solving the problem that the storage system cannot adjust resources in time to complete subsequent storage services, and improving the reliability and performance of the system.
Patent Information
- Application Number
- CN202311105064.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-02-28
AI Technical Summary
In a storage system that adopts a transparent power backup solution, the controller cannot quickly broadcast notifications after power failure, resulting in the storage system being unable to adjust resources in time to complete subsequent storage services, affecting the system's reliability and performance.
By establishing an independent communication mechanism between the BIOS of the first controller and the network card, the BIOS sends a trigger message after the first controller is powered off, and the network card receives and forwards a notification message to the second controller, thereby realizing a fast broadcast controller powered off event.
The storage system is implemented to quickly broadcast the controller power down event, ensuring that the storage system can adjust resources in a timely manner, avoid storage business interruptions, and improve the reliability and performance of the system.
Smart Images

Figure CN119537109A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a controller power-off processing method, a storage controller and a system. Background Art
[0002] In a storage system that adopts a scale-out architecture, the controllers of multiple storage devices are interconnected through network cards, and multiple functions such as global storage pool, global write cache, and LUN non-attribution are implemented through storage business services. Multiple functions such as message communication, device management, master election, and link management are implemented through cluster control services.
[0003] When a controller loses power, if a non-transparent backup solution is used, the storage business service completes the backup operation of the write cache persistence, and the cluster control service implements cross-node inter-process communication to promptly notify other controllers in the storage system of the controller power failure event. However, the storage business service and cluster control service have diverse functions and complex programs, and are prone to abnormalities during operation, resulting in the failure to complete the backup operation or the failure to notify the controller power failure event in place. Therefore, the storage system using the non-transparent backup solution has poor reliability and unstable performance.
[0004] If a transparent power backup solution is adopted, the controller will enter the BIOS after power failure, and the BIOS will complete the power backup operation of the write cache persistence. Since the BIOS has a single function and a simple program, it is not easy to have abnormalities during operation, so the completion rate of the power backup operation is high. Therefore, the storage system using the transparent power backup solution has high reliability and stable performance. However, after the power failure, the processes of the storage business service and the cluster control service have all exited, and cross-node process communication is impossible. Therefore, how to quickly broadcast the controller power failure notification when implementing the transparent power backup solution so that the storage system can adjust the remaining storage resources in time to complete the subsequent storage business is an urgent problem to be solved. Summary of the invention
[0005] The present application provides a controller power failure processing method, a storage controller and a system, so that when the controller implements a transparent backup power solution, it can also complete a rapid broadcast notification of the controller power failure event so that the storage system can adjust the storage resources in time to complete the storage business.
[0006] In a first aspect, a controller power failure processing method is provided, wherein a first controller is in a storage system, and the storage system further includes a second controller, and the method includes:
[0007] After the first controller is powered off, a basic input / output system BIOS of the first controller sends a trigger message to the network card of the first controller, wherein the BIOS runs independently outside the operating system of the first controller;
[0008] After receiving the trigger message, the network card sends a notification message to the second controller.
[0009] In the above scheme, when the first controller loses power, although the operating system of the first controller stops running, making it impossible for the upper-level software running on the operating system to send notification messages, the notification message can be sent to the second controller through the cooperation of the BIOS and the network card running outside the operating system, so as to achieve the purpose of quickly notifying other controllers of the power failure of the first controller, so that other controllers of the storage system can quickly adjust resources to complete subsequent storage services, avoiding negative impact on the completion of the overall storage business.
[0010] In some possible implementations, the method further includes: after receiving the notification message, the second controller takes over the storage service of the first controller.
[0011] In the above solution, after receiving the notification message from the first controller, the second controller can take over the storage service of the first controller in time, so as to avoid the interruption of the storage service and the negative impact on the completion of the overall storage service.
[0012] In some possible implementations, the first controller and the second controller belong to the same control box, and the power supply between multiple controllers belonging to the same control box is distributed within the box, or the storage services between multiple controllers belonging to the same control box are distributed within the box.
[0013] In some possible implementations, the second controller is a main controller of the storage system, and the method further includes:
[0014] After receiving the notification message, the second controller reallocates the storage services that are in charge of each controller in the storage system.
[0015] In the above scheme, when the second controller is the main controller, it is necessary to reallocate the storage services responsible for each controller in the storage system after receiving the notification message from the first controller to avoid the negative impact of the power failure of the first controller on the completion of the overall storage service.
[0016] In some possible implementations, the method further includes:
[0017] In the case that the first controller loses power, the backup power unit of the first controller supplies power to the BIOS and the network card.
[0018] In the above scheme, when the first controller loses power, although the operating system of the first controller stops running, causing the upper-level software running on the operating system to also stop working, the backup power unit of the first controller can temporarily supply power to the BIOS and the network card running outside the operating system, so that the BIOS and the network card can work together to send notification messages to the second controller, thereby achieving the purpose of quickly notifying other controllers of the power-off event of the first controller.
[0019] In some possible implementations, the method further includes:
[0020] In the case that the first controller loses power, the backup power unit does not supply power to the operating system.
[0021] In some possible implementations, the BIOS of the first controller sends a trigger message to the network card of the first controller, including: the BIOS writes the trigger message to a doorbell register of the network card;
[0022] The network card sends a notification message to the second controller, including: the network card interrupts the current process, reads the trigger message from the doorbell register, reads the memory address of the notification message from the sending queue, reads the notification message from the memory space according to the memory address of the notification message, and sends the notification message to the second controller.
[0023] In the above scheme, after the first controller loses power, the backup power unit of the first controller temporarily supplies power to the BIOS and the network card running outside the operating system. Therefore, the BIOS and the network card can continue to run. Therefore, the notification message can be sent to the second controller through the cooperation of the BIOS and the network card, so as to achieve the purpose of quickly notifying other controllers of the power failure event of the first controller, so that other controllers of the storage system can quickly adjust resources to complete subsequent storage services, avoiding negative impact on the completion of the overall storage business.
[0024] In some possible implementations, the method further includes:
[0025] Before the first controller loses power, obtaining the address of the second controller through software running on the operating system, wherein the software exits when the first controller loses power;
[0026] The software generates the notification message including the address of the second controller, stores the notification message in the memory space, and writes the memory address of the notification message into the sending queue.
[0027] In the above scheme, before the first controller loses power, the notification message to be sent after the power failure is prepared by the software running on the operating system, so that when the first controller loses power, the network card can quickly receive the notification message and then quickly send the notification message to the second controller, thereby improving the efficiency of broadcasting notification of the power failure event of the first controller in the storage system.
[0028] In some possible implementations, reading the notification message from the memory space according to the memory address of the notification message includes:
[0029] The network card sends the memory address of the notification message to the direct memory access controller, and receives the notification message read from the memory space by the direct memory access controller according to the memory address of the notification message.
[0030] In the above scheme, compared with the method of relying on CPU interrupt processing to transmit notification messages, the method of using direct memory access controller to transmit notification messages has a faster transmission speed, thereby improving the efficiency of broadcasting notification of power-off events of the first controller in the storage system.
[0031] In a second aspect, a storage controller is provided, which is used as a first controller, including:
[0032] a processor, used for running an operating system of the first controller, and stopping working when the first controller loses power;
[0033] BIOS, used for sending a trigger message to the network card after the first controller loses power, wherein the BIOS runs independently outside the operating system;
[0034] The network card is used to receive the trigger message and send a notification message to a second storage controller, wherein the second storage controller and the first controller belong to the same storage system.
[0035] In some possible implementations, after receiving the notification message, the second storage controller takes over the storage service of the first controller.
[0036] In some possible implementations, the first controller and the second storage controller belong to the same control box, the power supply between multiple storage controllers belonging to the same control box is distributed within the box, or the storage services between multiple storage controllers belonging to the same control box are distributed within the box.
[0037] In some possible implementations, the second storage controller is a primary storage controller of the storage system.
[0038] After receiving the notification message, the second storage controller reallocates the storage services that are in charge of each storage controller in the storage system.
[0039] In some possible implementations, the first controller further includes a backup power unit.
[0040] The backup power unit is used to supply power to the BIOS and the network card when the first controller loses power.
[0041] In some possible implementations, the backup power unit does not provide power to the operating system when the first controller loses power.
[0042] In some possible implementations, the BIOS is specifically used to write the trigger message into the doorbell register of the network card;
[0043] The above-mentioned network card is specifically used to interrupt the current process, read the above-mentioned trigger message from the above-mentioned doorbell register, read the memory address of the above-mentioned notification message from the sending queue, read the above-mentioned notification message from the memory space according to the memory address of the above-mentioned notification message, and send the above-mentioned notification message to the above-mentioned second storage controller.
[0044] In some possible implementations, the processor is used to obtain the address of the second storage controller before the first controller loses power; it is also used to generate the notification message including the address of the second storage controller, store the notification message in the memory space, and write the memory address of the notification message into the sending queue.
[0045] In some possible implementations, the first controller further includes a direct memory access controller.
[0046] The network card is specifically used to send the memory address of the notification message to the direct memory access controller, and receive the notification message read by the direct memory access controller from the memory space according to the memory address of the notification message.
[0047] In a third aspect, a storage system is provided, comprising a first controller and a second controller, wherein the first controller performs the actions performed by the first controller in any method of the first aspect, and the second controller performs the actions performed by the second controller in any method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0049] Figure 1It is a structural schematic diagram of a storage system provided by the present application;
[0050] Figure 2 It is a flowchart of a controller power failure processing method provided by the present application;
[0051] Figure 3 It is a structural diagram of a storage controller provided by the present application. DETAILED DESCRIPTION
[0052] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0053] In order to facilitate understanding of the embodiments of the present application, the storage system provided by the present application is first introduced.
[0054] See also Figure 1 , Figure 1 This is a schematic diagram of the structure of a storage system provided by this application. The storage system is used to provide data storage services and complete storage services. Figure 1 As shown, the storage system 10 adopts a scale-out architecture to manage multiple storage devices (storage device 11, storage device 12, storage device 13, storage device 14...). In this way, the storage capacity of the storage system 10 can be improved by adding more storage devices to adapt to different storage needs of users. Moreover, with each additional storage device, the performance and capacity of the storage system 10 increase at the same time without affecting the original use of the storage system 10. Among them, the storage system 10 can be a centralized storage system or a distributed storage system. The storage device can be a storage server, a hard disk, a network attached storage (NAS), a cloud storage gateway (CSG), etc.
[0055] Exemplarily, the following takes the storage device 11 as an example to introduce the structure of the storage device 11. Similarly, the structures of the storage device 12, the storage device 13, and the storage device 14 can refer to the structure of the storage device 11.
[0056] In some possible implementations, the storage device 11 has a controller 110. The controller 110 is used to control the storage device 11. The controller 110 has storage business service software 111, cluster control service software 112, a network card 113 and a battery backup unit 114 (BBU). The storage business service software 111 runs on the operating system of the controller 110 and is used to implement functions such as a global storage pool and a global write cache. The cluster control service software 112 runs on the operating system of the controller 110 and is used to implement functions such as device management, link management, selecting a master controller, and split-brain arbitration. The network card 113 is used to communicate with other network cards and transmit messages 115. The backup unit 114 is used to temporarily power the controller 110.
[0057] Similarly, the storage device 12 has a controller 120, which has storage business service software 121, cluster control service software 122, a network card 123, and a backup power unit 124. The storage device 13 has a controller 130, which has storage business service software 131, cluster control service software 132, a network card 133, and a backup power unit 134. The storage device 14 has a controller 140, which has storage business service software 141, cluster control service software 142, a network card 143, and a backup power unit 144.
[0058] In some possible implementations, multiple controllers communicate with each other through network cards. Specifically, the network card 113 of the controller 110 sends the message 115 to the switch 15 through a communication network of any communication mechanism / communication standard, and then the switch 15 sends the message 115 to the network card 123 of the controller 120, the network card 133 of the controller 130, or the network card 143 of the controller 140 through the communication network, thereby realizing the communication between the controller 110 and other controllers. Among them, the communication network can be a wide area network, a local area network, a point-to-point connection, etc., or any combination thereof.
[0059] In some possible implementations, a control box is used to divide the power sources and storage services of multiple controllers. On the one hand, the control box divides the power sources of multiple controllers. Specifically, multiple controllers of the same control box obtain power from the same power grid, and the power supply between multiple controllers of the same control box is allocated within the box, while controllers of different control boxes obtain power from different power grids. On the other hand, the control box divides the storage services of multiple controllers. Specifically, the storage services between multiple controllers of the same control box are allocated within the box, and one controller can take over the storage service of another controller in the same control box, but cannot take over the storage service of another controller in a different control box. Figure 1In the storage system 10 shown, the controller 110 and the controller 120 belong to the control box 161, and the controller 130 and the controller 140 belong to the control box 162. When the controller 110 loses power, the controller 120 belonging to the same control box 161 can take over the storage service of the controller 110, that is, the storage device 12 takes over the storage service on the storage device 11. Since the controller 130 or the controller 140 belongs to the control box 162, the controller 130 or the controller 140 cannot take over the storage service of the controller 110, that is, the storage device 13 or the storage device 14 cannot take over the storage service on the storage device 11. The above-mentioned use of the control box to limit the load range of the controller can be achieved by using an active-active architecture (Active-Active architecture) for multiple controllers of the same control box to complete the storage service, so that the logical unit number (logical unit number, LUN) may not belong to one of the multiple controllers, and the storage service can also be balanced to the multiple controllers in the same control box.
[0060] In some possible implementations, the controller 110 executes a non-transparent power backup solution or a transparent power backup solution when the power is lost, thereby implementing a power backup operation for persisting a write buffer.
[0061] In the non-transparent backup power solution, the BBU 114 provides temporary power supply to support the normal operation of the controller 110, but the controller 110 no longer receives new messages during this period. Therefore, the storage business service software 111 can still operate normally, and the storage business service software 111 performs the backup power operation, that is, writes the cached data into the memory space of the controller 110, and waits for the controller 110 to resume operation before writing the cached data in the memory space to the hard disk.
[0062] In the transparent backup power solution, the BBU 114 temporarily supplies power to support the operation of the basic input output system (BIOS). The BIOS runs outside the operating system of the controller 110. In addition, the BBU 114 does not supply power to the operating system, so the operating system stops running when the controller 110 loses power. Therefore, when the storage business service software 111 exits when the controller 110 loses power, the BIOS performs the backup power operation, that is, writes the cached data into the memory space of the controller 110, and waits for the controller 110 to resume work before writing the cached data in the memory space to the hard disk.
[0063] During the period when the controller 110 executes the above-mentioned non-transparent backup power solution, since the controller 110 is still in a normal working state, the cluster control service software 112 can also operate normally, so the cluster control service software 112 can send notification messages to other controllers in a timely manner through the network card 113, so that other controllers can quickly adjust the storage resources other than the storage device 11 in the storage system 10 to complete subsequent storage services after receiving the notification message from the controller 110. In particular, the controller 120 belonging to the same control box 161 can take over the storage service of the controller 110 after receiving the notification message from the controller 110, so that the storage device 12 can take over the storage service on the storage device 11, avoiding negative impact on the completion of the overall storage service.
[0064] However, in the process of executing the above-mentioned non-transparent backup power solution, although the controller 110 can complete the backup power operation through the storage business service software 111, and can quickly broadcast and notify the controller 110 of the power failure event in the storage system 10 through the cluster control service software 112, the storage business service software 111 and the cluster control service software 112 have to implement multiple functions and the programs are complex. Therefore, these two modules are prone to abnormalities during operation, resulting in the inability to complete the backup power operation or the inability to notify the controller 110 of the power failure event. Therefore, the storage system 10 has poor reliability and unstable performance when the controller adopts the non-transparent backup power solution.
[0065] In the process of executing the above transparent backup power solution, the controller 110 completes the backup power operation through the BIOS. Since the BIOS has a single function and a simple program, it is not easy for anomalies to occur during the operation of the BIOS, and thus the backup power operation is highly completed. Therefore, the storage system 10 has high reliability and stable performance when the controller adopts the transparent backup power solution. However, how to quickly broadcast and notify the controller 110 of a power failure event when the controller 110 implements the transparent backup power solution so that the storage system 10 can timely adjust the storage resources other than the storage device 11 to complete the subsequent storage business is an urgent problem to be solved.
[0066] In order to solve the above problems, the present application provides a controller power failure processing method, a storage controller and a system, which can complete the rapid broadcast notification of the controller power failure event when the storage system adopts a transparent backup power solution.
[0067] See also Figure 2 , Figure 2 1 is a flow chart of a controller power failure processing method provided by the present application. Figure 2 As shown, the controller power-off processing method provided by the present application includes:
[0068] S201: The first controller obtains the address of the second controller through the cluster control service software.
[0069] The first controller may be Figure 1 In the controller 110, the cluster control service software may be Figure 1 The cluster control service software 112 of the middle controller 110, the second controller may be Figure 1 Controller 120, controller 130 or controller 140 in.
[0070] In some possible implementations, before the cluster control service software of the first controller obtains the address of the second controller, the first controller establishes a communication channel with the switch in the storage system through the network card. After the communication channel is established, the network card of the first controller sends a message to the switch through the communication channel. In a specific implementation, the communication channel is established between the first controller and the switch based on a network protocol that provides reliable transmission, such as the transmission control protocol (TCP) and the remote direct data access protocol over converged Ethernet (RDMA over converged ethernet, RoCE). The network card can be Figure 1 The network card 113 of the controller 110 in the storage system may be Figure 1 In the storage system 10, the switch may be Figure 1 In the switch 15 of the storage system 10, the message can be Figure 1 Message 115 in the storage system 10 in.
[0071] It should be understood that the process of establishing a communication channel between the second controller and the switch can refer to the process of establishing a communication channel between the first controller and the switch, and for the sake of brevity of the specification, it will not be elaborated here.
[0072] In some possible implementations, the first controller generates an address request through the cluster control service software. The address request carries the address of the first controller. Subsequently, the cluster control service software sends the address request to the network card of the first controller, and the network card sends the address request to the switch through the communication channel, and the switch sends the address request to the second controller in the storage system through the communication channel. After the network card of the second controller receives the address request, it obtains the address of the first controller from the address request and sends the address request to the cluster control service software of the second controller. The cluster control service software of the second controller sends the address of the second controller to the network card of the second controller according to the address request, and the network card sends the address of the second controller to the switch through the communication channel, and the switch sends the address of the second controller to the first controller through the communication channel. After the network card of the first controller receives the address of the second controller, it sends the address of the second controller to the cluster control service software of the first controller.
[0073] S202: The first controller generates a notification message based on the address of the second controller through the cluster control service software, stores the notification message in a memory space, and writes the memory address of the notification message into a sending queue.
[0074] In some possible implementations, the cluster control service software of the first controller configures a notification message according to the address of the second controller. When the second controller and the first controller belong to different control boxes, the notification message generated by the cluster control service software includes the address of the first controller and the address of the second controller, so that after the second controller receives the notification message, it can determine the location of the controller that has lost power in the storage system according to the address of the first controller carried in the notification message. When the second controller and the first controller belong to the same control box, the notification message generated by the cluster control service software includes the address of the first controller, the address of the second controller, and the business information of the first controller, so that after the second controller receives the notification message, it can determine the location of the controller that has lost power in the storage system according to the address of the first controller carried in the notification message, and can also take over the storage business of the first controller according to the business information of the first controller carried in the notification message. Among them, the control box can be Figure 1 The service information of the first controller is obtained from the storage service software of the first controller. The storage service software may be Figure 1 The storage business service software 111 of the controller 110 in the storage business service software 111.
[0075] In some possible implementations, the cluster control service software of the first controller stores the notification message in the memory space, and writes the memory address of the notification message into the send queue. Specifically, the cluster control service software of the first controller applies for the memory space from the first controller. Subsequently, the cluster control service software stores the configured notification message in the memory space, and writes the memory address of the notification message in the memory space into the work queue entry (WQE) of the send queue (SQ).
[0076] S203: The first controller writes a trigger message to the doorbell register of the network card through the basic input and output system BIOS.
[0077] In some possible implementations, after the first controller loses power, the BIOS is immediately executed, and the power backup operation is completed by the BIOS. In addition, the BIOS generates a trigger message and writes the trigger message into the doorbell register of the network card. Since the doorbell register of the network card is used to notify the network card to interrupt the current process and perform an operation corresponding to the message written into the doorbell register, once the doorbell register is written with a message, the network card immediately interrupts the current process and reads the message from the doorbell register.
[0078] S204: The first controller interrupts the current process through the network card, reads the trigger message from the doorbell register, reads the memory address of the notification message from the sending queue, and reads the notification message from the memory space according to the memory address of the notification message.
[0079] In some possible implementations, after the network card of the first controller reads the trigger message from the doorbell register, it reads the memory address of the notification message from the WQE of the SQ, and then reads the notification message from the memory space according to the memory address of the notification message.
[0080] In a specific implementation, after the network card of the first controller reads the memory address of the notification message, it sends the memory address of the notification message to a direct memory access controller (DMAC). The DMAC reads the notification message from the memory space according to the memory address of the notification message, and then sends the read notification message to the network card. In this implementation, using DMAC to transmit the notification message has a faster transmission speed than relying on CPU interrupt processing to transmit the notification message, thereby improving the efficiency of broadcasting the notification of the power-off event of the first controller in the storage system.
[0081] S205: The first controller sends a notification message to the second controller through the network card.
[0082] In some possible implementations, after the network card of the first controller reads the notification message, it sends the notification message to the switch through the communication channel according to the address of the second controller carried in the notification message, and then the switch sends the notification message to the second controller through the communication channel according to the address of the second controller carried in the notification message. After the network card of the second controller receives the notification message, it sends the notification message to the cluster control service software of the second controller, so that the second controller can determine the location of the controller that has lost power in the storage system according to the address of the first controller carried in the notification message. In particular, when the second controller and the first controller belong to the same control box, the notification message received by the second controller also carries the business information of the first controller, so that the second controller can take over the storage business of the first controller according to the business information of the first controller. In addition, when the second controller is the main controller of the storage system, the second controller needs to reallocate the storage business that each controller in the storage system is responsible for after receiving the notification message.
[0083] To summarize, by implementing the embodiments of the present invention, when the first controller adopts a transparent backup power solution, before the first controller loses power, the cluster control service software in the first controller can prepare the notification message to be sent after the power failure. After the first controller loses power, if the cluster control service software of the first controller cannot operate normally, the BIOS and the network card in the first controller cooperate to send the notification message to the second controller, thereby achieving the purpose of quickly broadcasting the power failure event notification of the first controller in the storage system, so that the storage system can quickly adjust resources to complete subsequent storage services, avoiding negative impact on the completion of the overall storage business.
[0084] It should be understood that the power failure of the first controller described above is only an example of a power failure of the storage system and is not specifically limited here. For example, the power failure of the storage system may also be that the first controller and the second controller of the same control box both lose power, in which case both the first controller and the second controller need to perform a backup power operation. The power failure of the storage system may also be that the first controller and the second controller of different control boxes both lose power, in which case both the first controller and the second controller need to perform a backup power operation.
[0085] See also Figure 3 , Figure 3 300 is a schematic diagram of a storage controller provided by the present application. The storage controller 300 can be used to implement the aforementioned controller power failure processing method. Figure 3 As shown, the storage controller 300 includes: a processor 301, a basic input and output system 302 and a network card 303.
[0086] The processor 301 is used to run the operating system of the storage controller 300, and stops working when the storage controller 300 loses power;
[0087] The basic input and output system 302 is used to send a trigger message to the network card 303 after the storage controller 300 loses power, wherein the basic input and output system 302 runs independently outside the operating system;
[0088] The network card 303 is used to receive a trigger message and send a notification message to the second storage controller, wherein the second storage controller and the storage controller 300 belong to the same storage system.
[0089] In some possible implementations, after receiving the notification message, the second storage controller takes over the storage service of the storage controller 300 .
[0090] In some possible implementations, the storage controller 300 and the second storage controller belong to the same control box, the power supply between multiple storage controllers belonging to the same control box is distributed within the box, or the storage services between multiple storage controllers belonging to the same control box are distributed within the box.
[0091] In some possible implementations, the second storage controller is a main storage controller of the storage system. After receiving the notification message, the second storage controller reallocates storage services that are in charge of each storage controller in the storage system.
[0092] In some possible implementations, the storage controller 300 further includes a backup power unit, which is used to supply power to the basic input and output system 302 and the network card 303 when the storage controller 300 loses power.
[0093] In some possible implementations, the backup power unit does not provide power to the operating system when the storage controller 300 loses power.
[0094] In some possible implementations, the basic input and output system 302 is specifically used to write a trigger message to the doorbell register of the network card 303;
[0095] The network card 303 is specifically used to interrupt the current process, read the trigger message from the doorbell register, read the memory address of the notification message from the sending queue, read the notification message from the memory space according to the memory address of the notification message, and send the notification message to the second storage controller.
[0096] In some possible implementations, the processor 301 is used to obtain the address of the second storage controller before the storage controller 300 loses power; it is also used to generate a notification message including the address of the second storage controller, store the notification message in the memory space, and write the memory address of the notification message into the sending queue.
[0097] In some possible implementations, the storage controller 300 further includes a direct memory access controller.
[0098] The network card 303 is specifically used to send the memory address of the notification message to the direct memory access controller, and receive the notification message read by the direct memory access controller from the memory space according to the memory address of the notification message.
[0099] According to the controller power-off processing method provided in the present application, the present application also provides a storage system, which includes the aforementioned storage controller 300 and a second storage controller.
[0100] It should be understood that in the embodiments of the present invention, "when..." and "when..." both mean that the device will perform corresponding processing under certain objective circumstances, and it does not limit the time, nor does it require the device to perform a judgment action when it is implemented, nor does it mean that there are other limitations.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A controller power failure processing method, characterized in that: The first controller is in a storage system, the storage system further includes a second controller, and the method includes: After the first controller is powered off, a basic input / output system BIOS of the first controller sends a trigger message to a network card of the first controller, wherein the BIOS runs independently outside an operating system of the first controller; After receiving the trigger message, the network card sends a notification message to the second controller.
2. The method according to claim 1, characterized in that The method further comprises: After receiving the notification message, the second controller takes over the storage service of the first controller.
3. The method according to claim 1 or 2, characterized in that: The first controller and the second controller belong to the same control frame, and the power supply between multiple controllers belonging to the same control frame is distributed within the frame, or the storage services between multiple controllers belonging to the same control frame are distributed within the frame.
4. The method according to claim 1, characterized in that: The second controller is a main controller of the storage system, and the method further includes: After receiving the notification message, the second controller reallocates the storage services that are in charge of each controller in the storage system.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: When the first controller loses power, the backup power unit of the first controller supplies power to the BIOS and the network card.
6. The method according to claim 5, characterized in that The method further comprises: When the first controller loses power, the backup power unit does not supply power to the operating system.
7. The method according to any one of claims 1 to 6, characterized in that: The BIOS of the first controller sends a trigger message to the network card of the first controller, including: the BIOS writes the trigger message to the doorbell register of the network card; The network card sends a notification message to the second controller, including: the network card interrupts the current process, reads the trigger message from the doorbell register, reads the memory address of the notification message from the sending queue, reads the notification message from the memory space according to the memory address, and sends the notification message to the second controller.
8. The method according to claim 7, characterized in that The method further comprises: Before the first controller loses power, obtaining the address of the second controller through software running on the operating system, wherein the software exits when the first controller loses power; The software generates the notification message including the address of the second controller, stores the notification message in the memory space, and writes the memory address of the notification message into the sending queue.
9. The method according to claim 7 or 8, characterized in that: The reading the notification message from the memory space according to the memory address of the notification message includes: The network card sends the memory address of the notification message to a direct memory access controller, and receives the notification message read by the direct memory access controller from the memory space according to the memory address of the notification message.
10. A storage controller, characterized in that: Used as a first controller, comprising: a processor, configured to run an operating system of the first controller, and stop operating when the first controller loses power; BIOS, used to send a trigger message to the network card after the first controller loses power, wherein the BIOS runs independently outside the operating system; The network card is used to receive the trigger message and send a notification message to a second storage controller, wherein the second storage controller and the first controller belong to the same storage system.
11. The storage controller according to claim 10, characterized in that: After receiving the notification message, the second storage controller takes over the storage service of the first controller.
12. The storage controller according to claim 10 or 11, characterized in that: The first controller and the second storage controller belong to the same control box, and the power supply between multiple storage controllers belonging to the same control box is distributed within the box, or the storage services between multiple storage controllers belonging to the same control box are distributed within the box.
13. The storage controller according to claim 10, characterized in that: The second storage controller is a main storage controller of the storage system, After receiving the notification message, the second storage controller reallocates the storage services that are in charge of each storage controller in the storage system.
14. The storage controller according to any one of claims 10 to 13, characterized in that: The first controller also includes a backup power unit. The backup power unit is used to supply power to the BIOS and the network card when the first controller loses power.
15. The storage controller according to claim 14, characterized in that: The backup power unit does not supply power to the operating system when the first controller loses power.
16. The storage controller according to any one of claims 10 to 15, characterized in that: The BIOS is specifically used to write the trigger message into the doorbell register of the network card; The network card is specifically used to interrupt the current process, read the trigger message from the doorbell register, read the memory address of the notification message from the sending queue, read the notification message from the memory space according to the memory address of the notification message, and send the notification message to the second storage controller.
17. The storage controller according to claim 16, characterized in that: The processor is configured to obtain the address of the second storage controller before the first controller is powered off; The processor is further configured to generate the notification message including the address of the second storage controller, store the notification message in the memory space, and write the memory address of the notification message into the sending queue.
18. The storage controller according to claim 16 or 17, characterized in that: The first controller also includes a direct memory access controller, The network card is specifically configured to send the memory address of the notification message to the direct memory access controller, and receive the notification message read by the direct memory access controller from the memory space according to the memory address of the notification message.
19. A storage system, characterized in that: The method comprises a first controller and a second controller, wherein the first controller is used to execute the method described in any one of claims 1, 3, 5, 6, 7, 8, and 9, and the second controller is used to execute the method described in claim 2 or 4.