Recovery method of storage controller of server, electronic device
By using a method of real-time monitoring and automatic recovery of abnormal storage controllers, the problem of storage controllers being unable to automatically repair themselves during system operation is solved, achieving rapid repair and improved system stability.
Patent Information
- Application Number
- CN202511557545.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-10-29
AI Technical Summary
In existing technologies, storage controllers cannot automatically repair themselves when they malfunction during system operation, leading to data loss, leakage, or tampering, and the processing time is long and the efficiency is low.
By monitoring the operating system status of the storage controller in real time, abnormal storage controllers are identified and boot control commands are generated. The operating system of the abnormal storage controller is automatically restored by utilizing the resource utilization and system disk status information of the normal storage controller.
It enables rapid automatic repair of the storage controller, reduces system downtime, improves the reliability and stability of the storage controller and enhances the availability and maintenance efficiency of the storage system.
Smart Images

Figure CN121029475B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of servers, and in particular to a recovery method of a storage controller of a server and an electronic device. BACKGROUND
[0002] With the growth of data volume, the progress of technology and the change of business needs, the importance of storage is increasing, and storage devices are usually used to store important information, so the reliable operation of storage devices has become the key to ensuring data security and information system reliability. When the system disk of the storage controller fails, it is usually necessary for the customer to handle it manually on site, which has the problems of not timely processing, low processing efficiency, etc., resulting in a large amount of data loss, leakage or even malicious tampering, causing huge losses to individuals, enterprises and institutions. In related technologies, a separate external device such as a U disk is usually needed to repair the damaged storage controller of the system disk, but it cannot be repaired during the operation of the storage system. SUMMARY
[0003] The present application provides a recovery method of a storage controller of a server and an electronic device to at least solve the problem that the storage controller cannot be automatically repaired during the operation of the storage system in related technologies.
[0004] The present application provides a recovery method of a storage controller of a server, including: the server includes a plurality of storage controllers, and the method includes: obtaining operating system state information of the plurality of storage controllers, and determining at least one abnormal storage controller and at least one normal storage controller according to the operating system state information; generating a start control instruction according to the restart boot information of the abnormal storage controller to start the abnormal storage controller; in the case that the basic input / output system of the abnormal storage controller starts successfully, obtaining the resource utilization of the at least one normal storage controller, and determining a target normal storage controller according to the resource utilization of the at least one normal storage controller; determining a target service mode of the target normal storage controller according to the system disk state information of the abnormal storage controller, so that the normal storage controller reloads the operating system of the abnormal storage controller according to the target service mode.
[0005] The present application also provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned recovery method of a storage controller of a server.
[0006] This application monitors the operating system status information of the storage controller in real time and identifies abnormal and normal storage controllers. It then controls the abnormal storage controller to generate a boot control command to start it. After the abnormal storage controller's basic input / output system successfully boots, it further checks the system disk status of the abnormal storage controller and determines the target service mode for diskless remote boot of the operating system based on the operating system resource utilization of the normal storage controller, achieving rapid recovery of the abnormal storage controller. In this way, abnormal storage controllers can be automatically repaired during system operation, reducing system downtime caused by storage controller failures, significantly improving the reliability of the storage controller and the overall stability of the system, thereby enhancing the availability and maintenance efficiency of the storage system. Attached Figure Description
[0007] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 This is a schematic diagram of the structure of multiple controllers of a server according to some embodiments of this application;
[0009] Figure 2 This is a flowchart of a server controller recovery method according to some embodiments of this application;
[0010] Figure 3 This is a flowchart of a method for restoring the controller of a server according to other embodiments of this application;
[0011] Figure 4 This is a flowchart of a server controller recovery method according to some embodiments of this application;
[0012] Figure 5 This is a block diagram of an electronic device according to some embodiments of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0014] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0015] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0016] The specific application environment architecture or specific hardware architecture on which the execution of the recovery method of the server's storage controller depends is described here.
[0017] In some embodiments, refer to Figure 1 The server includes multiple storage controllers, each of which includes a Baseboard Management Controller (BMC), a Basic Input / Output System (BIOS), and a motherboard. In this embodiment, the server is described using three storage controllers, specifically storage controller A, storage controller B, and storage controller C, but this is not intended to limit the scope of the application. Storage controller A includes a Baseboard Management Controller A, a Basic Input / Output System A, and a motherboard A; storage controller B includes a Baseboard Management Controller B, a Basic Input / Output System B, and a motherboard B; and storage controller C includes a Baseboard Management Controller C, a Basic Input / Output System C, and a motherboard C.
[0018] The embodiments of this application provide a method for restoring a server's storage controller. The method is described in detail below, taking into account the execution flow of the method for restoring a server's storage controller.
[0019] Figure 2 This is a flowchart of a recovery method for a server's storage controller according to some embodiments of this application. (Refer to...) Figure 2 The method for restoring the storage controller of the server in this application embodiment may include the following steps:
[0020] S110: Obtain the operating system status information of multiple storage controllers, and determine at least one abnormal storage controller and at least one normal storage controller based on the operating system status information.
[0021] Specifically, during the operation of the storage controller, the baseboard management storage controller monitors the operating system status information of the storage controller in real time. Specifically, baseboard management storage controller A monitors the operating system status information of storage controller B, and baseboard management storage controller C monitors the operating system status information of storage controller C. For example, the operating system of storage controller A sends its status information to baseboard management storage controller A in real time via an LPC (a type of computer bus) interface; the operating system of storage controller B sends its status information to baseboard management storage controller B in real time via an LPC interface; and the operating system of storage controller C sends its status information to baseboard management storage controller C in real time via an LPC interface. Abnormal operating system status information includes an abnormality in a component of the operating system and the BMC's inability to receive operating system status information. Examples include RAID (Redundant Array of Independent Disks) card failure, system disk failure, and the operating system (OS) being infected with a Trojan virus.
[0022] In the following description, storage controller A is used as an abnormal storage controller with abnormal operating system status information, while storage controllers B and C are used as normal storage controllers with normal operating system status information. This is not intended to limit the scope of this application. It should be noted that any storage controller can be any storage controller.
[0023] S120: Generate a startup control command based on the restart boot information of the faulty storage controller to start the faulty storage controller.
[0024] Specifically, when an abnormal storage controller is identified, the BMC of the abnormal storage controller will generate boot control instructions for the abnormal storage controller based on the restart boot information of the abnormal storage controller (such as firmware version, boot parameters, configuration identifiers, etc.). Specifically, the BMC of the abnormal storage controller will generate boot control instructions for the motherboard and boot control instructions for the basic input / output system of the abnormal storage controller to control the boot of the basic input / output system and motherboard of the abnormal storage controller.
[0025] For example, when BMC A determines that memory controller A is an abnormal memory controller, BMC A sends a basic input / output system boot control command to BIOS A through the IIC interface. Then, BMC A sends the motherboard boot control command to CPLD (Complex Programmable Logic Device) A through the IIC (Inter-Integrated Circuit) interface. When CPLD A receives the motherboard boot control command and BIOS A receives the basic input / output system boot control command, they will control memory controller A to restart.
[0026] S130, if the basic input / output system of the abnormal storage controller is successfully started, obtain the resource utilization rate of at least one normal storage controller, and determine the target normal storage controller based on the resource utilization rate of at least one normal storage controller.
[0027] Specifically, when the BIOS of the abnormal storage controller boots successfully, the BMCs of multiple normal storage controllers will obtain the operating system resource utilization of the normal storage controllers and compare the operating system resource utilization of the normal storage controllers. The normal storage controller with the minimum operating system resource utilization among the normal storage controllers will be determined as the target normal storage controller, and the diskless remote boot operating system service of the corresponding target normal storage controller will be the target diskless remote boot operating system service.
[0028] For example, if BIOS A boots successfully, BMC B obtains the operating system resource utilization of storage controller B, and BMC C obtains the operating system resource utilization of storage controller C. The target normal storage controller is determined by comparing the operating system resource utilization of storage controller B and storage controller C. For instance, the storage controller with the smaller value between the operating system resource utilization of storage controller B and storage controller C is determined as the target normal storage controller. Further, if storage controller B is determined to be the target normal storage controller, the diskless remote boot operating system service of storage controller B is identified as the target diskless remote boot operating system service, and the BMC of storage controller B notifies the operating system of storage controller B to enable the diskless remote boot operating system service. If storage controller C is determined to be the target normal storage controller, the diskless remote boot operating system service of storage controller C is identified as the target diskless remote boot operating system service, and the BMC of storage controller C notifies the operating system of storage controller C to enable the diskless remote boot operating system service.
[0029] S140, determine the target service mode of the target normal storage controller based on the system disk status information of the abnormal storage controller, so that the target normal storage controller can reload the operating system of the abnormal storage controller according to the target service mode.
[0030] Specifically, when the BIOS of the faulty storage controller boots successfully, while the BMCs of multiple normal storage controllers obtain the operating system resource utilization of the normal storage controllers, the BIOS of the faulty storage controller will obtain the system disk status information of the faulty storage controller and transmit the system disk status information of the faulty storage controller to its BMC. For example, BIOS A will enumerate storage controller A to obtain the system disk status information of storage controller A and transmit the system disk status information of storage controller A to BMC A.
[0031] Then, the target service mode of the target normal storage controller is determined based on the system disk status information of storage controller A. For example, the target service mode can be determined by looking up a preset relationship mapping table between system disk status information and service mode. The preset relationship mapping table includes multiple system disk status information and the service mode corresponding to each system disk status information.
[0032] After determining the target service mode of the target normal storage controller, the target diskless remote boot operating system service that controls the target normal storage controller establishes a connection with the abnormal storage controller. The target diskless remote boot operating system service will reload the operating system according to the target service mode. For example, assuming that the diskless remote boot operating system service of storage controller C is determined to be the target diskless remote boot operating system service, the diskless remote boot operating system service of storage controller C will establish a connection with storage controller A and reload the preset image operating system for storage controller A according to the target service mode to restore the abnormal storage controller A.
[0033] It should be noted that when multiple abnormal storage controllers occur simultaneously, multiple target normal storage controllers can be identified, and the diskless remote boot operating system service of multiple target normal storage controllers can be enabled to reload the operating system for each of the multiple abnormal storage controllers. Alternatively, an abnormal storage controller can be randomly selected, the diskless remote boot operating system service of the target normal storage controller can be enabled to reload the operating system, and then the next abnormal storage controller can be selected and a new target normal storage controller can be identified to reload the operating system of the next abnormal storage controller.
[0034] This application monitors the operating system status information of the storage controller in real time and identifies abnormal and normal storage controllers. It then controls the abnormal storage controller to generate a boot control command to start it. After the abnormal storage controller's basic input / output system successfully boots, it further checks the system disk status of the abnormal storage controller. Based on the operating system resource utilization of the normal storage controller, it determines the target normal storage controller and, based on the system disk status of the abnormal storage controller, determines the target service mode for the diskless remote boot operating system service of the target normal storage controller, achieving rapid recovery of the abnormal storage controller. In this way, abnormal storage controllers can be automatically repaired during system operation, reducing storage system downtime caused by storage controller failures, significantly improving the reliability and overall stability of the storage controller, and thus enhancing the availability and maintenance efficiency of the storage system.
[0035] In some embodiments, determining the target service mode of the target normal storage controller based on the system disk status information of the abnormal storage controller includes: determining the target service mode as the network-installed operating system mode when the system disk status information of the abnormal storage controller is in an abnormal state.
[0036] Specifically, after determining the system disk status information of the abnormal storage controller, the target service mode of the target normal storage controller is determined based on the system disk status information of the abnormal storage controller. For example, if the system disk of the abnormal storage controller can be read, but the system disk status information of the abnormal storage controller is determined to be in an abnormal state, such as a virus in the system disk, then the target service mode is determined to be the network installation operating system mode.
[0037] In some embodiments, the system disk status information includes virtual disk status information. Determining that the system disk status information of the abnormal storage controller is in an abnormal state includes: determining that the system disk status information of the abnormal storage controller is in an abnormal state when the virtual disk status information is a degradation identifier or a failure identifier.
[0038] Specifically, the system disk status information includes the virtual disk status information. If the virtual disk status information read is a downgrade indicator or a failure indicator, then the system disk status information of the abnormal storage controller is determined to be in an abnormal state.
[0039] In some embodiments, the system disk status information includes physical disk status information. Determining the target service mode of the target normal storage controller based on the system disk status information of the abnormal storage controller includes: determining the target service mode as a memory-booted operating system mode when the physical disk status information is a lost identifier or an offline identifier.
[0040] Specifically, the system disk status information includes physical disk status information. If the physical disk status information read is a lost or offline flag, it means that the system disk of the abnormal storage controller cannot be read. Therefore, the target service mode of the target diskless remote boot operating system service is determined to be the memory boot operating system mode.
[0041] This application enables the recovery of a faulty storage controller by installing an operating system over a network when the system disk is readable but faulty, and by booting an operating system from memory when the system disk is unreadable. In this way, the storage controller can take appropriate measures to restore its normal operation under different fault conditions, thereby improving the availability and maintenance efficiency of the storage system.
[0042] In some embodiments, determining a target normal storage controller based on the resource utilization of at least one normal storage controller includes: obtaining the resource utilization of at least one normal storage controller; and selecting the normal storage controller corresponding to the minimum resource utilization as the target normal storage controller.
[0043] Specifically, when storage controller B and storage controller C are normal storage controllers, the target normal storage controller is determined by comparing the operating system resource utilization of storage controller B and the operating system resource utilization of storage controller C.
[0044] For example, if the operating system resource utilization of storage controller B is less than that of storage controller C, then storage controller B is determined to be the target normal storage controller, and the diskless remote boot operating system service of storage controller B is the target diskless remote boot operating system service; if the operating system resource utilization of storage controller C is less than that of storage controller B, then storage controller C is determined to be the target normal storage controller, and the diskless remote boot operating system service of storage controller C is the target diskless remote boot operating system service.
[0045] This application compares the operating system resource utilization of normal storage controllers and selects the storage controller with the lowest resource utilization as the target normal storage controller. This allows for the determination of the target diskless remote boot operating system service. When repairing abnormal storage controllers, the diskless remote boot service with lower resource consumption can be used first, thereby optimizing resource allocation, improving the overall operating efficiency of the system, reducing the risk of boot failure due to insufficient resources, and enhancing the stability and reliability of the system.
[0046] In some embodiments, the method further includes: when multiple normal storage controllers have the same and minimum resource utilization, obtaining the numbers of the multiple normal storage controllers, wherein the number is used to indicate the number of the storage controller installed in the high-speed peripheral component interconnect expansion slot of the server motherboard; and selecting the normal storage server corresponding to the minimum or maximum number as the target normal storage controller.
[0047] Specifically, assuming storage controllers B and C are normal storage controllers, if the operating system resource utilization of storage controller B and storage controller C are the same, then the serial numbers of storage controllers B and C are obtained and compared to determine the target normal storage controller. The serial number indicates the number of the storage controller installed in the high-speed peripheral component interconnect expansion slot on the server motherboard.
[0048] For example, when the normal storage server with the smallest number is selected as the target normal storage controller, if the number of storage controller B is less than the number of storage controller C, then storage controller B is determined to be the target normal storage controller; if the number of storage controller C is less than the number of storage controller B, then storage controller C is determined to be the target normal storage controller. Conversely, when the normal storage server with the largest number is selected as the target normal storage controller, if the number of storage controller B is greater than the number of storage controller C, then storage controller B is determined to be the target normal storage controller; if the number of storage controller C is greater than the number of storage controller B, then storage controller C is determined to be the target normal storage controller.
[0049] Thus, by introducing a highly deterministic decision-making strategy that assigns the storage controller to the high-speed peripheral component interconnect expansion slot on the server motherboard, the uncertainty caused by random selection among multiple candidate normal storage controllers is effectively solved, thereby ensuring the efficiency, uncontroversiality, and predictability of the selection process, and realizing the full automation and high reliability of the failover process.
[0050] In some embodiments, the above method further includes: after the abnormal storage controller recovers successfully, disabling the target service mode of the target normal storage controller.
[0051] For example, if storage controller B is the target normal storage controller, and the abnormal storage controller A resumes normal operation, then the diskless remote boot operating system service of storage controller B is disabled. For example, the BMC of storage controller B notifies the operating system of storage controller B to disable the diskless remote boot operating system service. If storage controller C is the target normal storage controller, and the abnormal storage controller A resumes normal operation, then the diskless remote boot operating system service of storage controller C is disabled. For example, the BMC of storage controller C notifies the operating system of storage controller C to disable the diskless remote boot operating system service.
[0052] Thus, by disabling the diskless remote boot operating system service of the target normal storage controller after restoring the abnormal storage controller, the previously occupied system resources can be effectively released, ensuring that system resources are used rationally and avoiding resource waste, thereby further improving operating efficiency.
[0053] In some embodiments, the method further includes: sending an alarm command to the normal storage controller when the basic input / output system of the abnormal storage controller fails to start and restarts a preset number of times, so that the normal storage controller issues a warning. The preset number of times can be determined according to actual conditions; for example, it can be 3 times, and no specific limitation is made here.
[0054] Specifically, when the faulty storage controller is storage controller A, upon CPLD A receiving the motherboard's boot control command and BIOS A receiving the basic input / output (BIO) system's boot control command, storage controller A will be restarted. However, storage controller A, specifically its BIO system, may not successfully restart upon receiving the boot control command. Therefore, BMC A can send corresponding boot control commands to BIOS A and CPLD A multiple times to control storage controller A's restart. If the number of boot attempts for the storage controller's BIO system and motherboard reaches a preset number, and the storage controller's BIO system still fails to boot, BMC A will send an alarm command through the storage controller's backplane to BMC B, BMC C, or both BMC B and BMC C. This will cause the operating systems of storage controllers B, C, or both to issue a warning to the user, informing them that storage controller A has malfunctioned and cannot recover on its own.
[0055] In this way, by sending multiple start control commands to attempt to restart the abnormal storage controller, the restart success rate can be improved and the system reliability can be enhanced. If the restart fails after multiple attempts, an alarm command will be sent to other normal storage controllers, triggering them to issue a warning notification to the user. This not only improves the efficiency of fault diagnosis, but also ensures that the user can understand the fault information in a timely manner so as to take maintenance measures quickly, thereby improving the availability and maintenance efficiency of the entire storage system.
[0056] In some embodiments, reloading the operating system of the abnormal storage controller according to the target service mode includes: downloading a network bootloader, an operating system kernel, and a configuration file based on the target service mode; loading the network bootloader and the operating system kernel into the abnormal storage controller, loading a preset image operating system onto the system disk of the abnormal storage controller based on the network bootloader and the operating system kernel, and installing the preset image operating system onto the system disk of the abnormal storage controller according to the configuration file to run, so as to restore the abnormal storage controller.
[0057] Specifically, after the abnormal storage controller establishes a connection with the target diskless remote boot operating system service, the target diskless remote boot operating system service loads a preset image operating system according to the target service mode (such as network installation operating system mode) to restore the abnormal storage controller.
[0058] For example, after the diskless remote boot operating system service of abnormal storage controller A and normal storage controller B establishes a connection, the PXE (Preboot execution environment) client of abnormal storage controller A (the network interface card of the storage controller is configured with the corresponding PXE client) uses the diskless remote boot operating system service of normal storage controller B to download the network boot program (e.g., pxelinux.0), operating system kernel and configuration file. Then, the PXE client of abnormal storage controller A loads the network boot program and operating system kernel into the memory of abnormal storage controller A, and loads the preset image operating system onto the system disk of abnormal storage controller A based on the network boot program and operating system kernel. Finally, according to the configuration file, the preset image operating system is installed into the system disk of abnormal storage controller A and run to restore abnormal storage controller A.
[0059] In some embodiments, reloading the operating system of the abnormal storage controller according to the target service mode includes: downloading the operating system kernel and boot file based on the target service mode; loading the operating system kernel, boot file and preset image operating system into the abnormal storage controller for execution, so as to restore the abnormal storage controller.
[0060] Specifically, after the abnormal storage controller establishes a connection with the target diskless remote boot operating system service, the target diskless remote boot operating system service loads a preset image operating system according to the target service mode (such as memory boot operating system mode) to restore the abnormal storage controller.
[0061] For example, after the diskless remote boot operating system service of abnormal storage controller A and normal storage controller B is established, the PXE client of abnormal storage controller A (the network interface card of the storage controller is configured with the corresponding PXE client) uses the diskless remote boot operating system service of normal storage controller B to download the boot entry file (e.g., initrd) and the operating system kernel. Then, the PXE client of abnormal storage controller A loads the operating system kernel, boot entry file and preset image operating system into the memory of abnormal storage controller A and runs them directly to restore abnormal storage controller A.
[0062] In some embodiments, the target service mode includes a network-installed operating system mode, and the method further includes: if the abnormal storage controller is still in an abnormal state after reloading the operating system of the abnormal storage controller according to the network-installed operating system mode, redetermining the target normal storage controller; and reloading the operating system of the abnormal storage controller according to the network-installed operating system mode of the redetermined target normal storage controller.
[0063] Specifically, if the diskless remote boot operating system service of the target normal storage controller loads the preset image operating system according to the network installation operating system mode, and the abnormal storage controller still cannot be recovered, then it is necessary to re-determine the target normal storage controller. The specific determination method has been described in detail in the above embodiments and will not be repeated here, so that the diskless remote boot operating system service of the target normal storage controller can load the preset image operating system according to the network installation operating system mode to recover the abnormal storage controller.
[0064] This application utilizes the network-installed operating system mode to attempt recovery of an abnormal storage controller after a failure to do so, thereby significantly improving the recovery success rate and enhancing the system's fault tolerance.
[0065] In some embodiments, the target service mode includes a memory-booted operating system mode, and the method further includes: if the abnormal storage controller is still in an abnormal state after reloading the operating system of the abnormal storage controller according to the network-installed operating system mode, then redetermine the target normal storage controller; and reload the operating system of the abnormal storage controller according to the memory-booted operating system mode of the redetermined target normal storage controller.
[0066] Specifically, if the diskless remote boot operating system service of the target normal storage controller loads the preset image operating system according to the network installation operating system mode, and the abnormal storage controller still cannot be recovered, then it is necessary to re-determine the target normal storage controller. The specific determination method has been described in detail in the above embodiments and will not be repeated here, so that the diskless remote boot operating system service of the target normal storage controller loads the preset image operating system according to the memory boot operating system mode to recover the abnormal storage controller.
[0067] This application allows for flexible switching to a memory-booted operating system mode for retrying after a failure to recover an abnormal storage controller via network-installed operating system mode. This significantly improves the recovery success rate and enhances the system's fault tolerance.
[0068] Figure 3 This is a flowchart of a recovery method for a server's storage controller according to other embodiments of this application. (Refer to...) Figure 3 The basic input / output system applied to the storage controller, the recovery method of the server's storage controller in this application embodiment may include the following steps:
[0069] S210 receives the start control command of the basic input / output system.
[0070] Specifically, after identifying the faulty memory controller A, the BMC of faulty memory controller A will generate a basic input / output system boot control command and send the basic input / output system boot control command to BIOSA through the IIC interface. BIOS A receives the basic input / output system boot control command.
[0071] S220, in response to the start control command of the basic input / output system and if the start is successful, obtain the system disk status information of the abnormal storage controller and send the system disk status information of the abnormal storage controller to the baseboard management storage controller of the abnormal storage controller so that the baseboard management storage controller of the abnormal storage controller can determine the target normal storage controller and the target service mode of the target normal storage controller.
[0072] Specifically, when BIOS A receives the boot control command of the Elementary Input / Output System (BIOS), it will control the BIOS to restart. If the BIOS boots successfully, BIOS A will enumerate storage controller A to obtain the system disk status information of storage controller A. The system disk status information of abnormal storage controller A includes virtual disk status information and physical disk status information. BIOS A will then transmit the system disk status information of storage controller A to BMC A so that BMC A of abnormal storage controller A can determine the target service mode of the target normal storage controller.
[0073] For example, BMC B obtains the operating system resource utilization of storage controller B, and BMC C obtains the operating system resource utilization of storage controller C. The target normal storage controller is determined by comparing the operating system resource utilization of storage controller B and storage controller C. For instance, the storage controller with the smaller value between the operating system resource utilization of storage controller B and storage controller C is determined as the target normal storage controller. Further, if storage controller B is determined to be the target normal storage controller, the BMC of storage controller B instructs its operating system to enable the diskless remote boot operating system service; if the diskless remote boot operating system service of storage controller C is determined to be the target diskless remote boot operating system service, the BMC of storage controller C instructs its operating system to enable the diskless remote boot operating system service. After determining the system disk status information of the abnormal storage controller A, the target service mode of the target normal storage controller is determined based on the system disk status information of the abnormal storage controller A. For example, if the virtual disk status information of the system disk of the abnormal storage controller A is a downgraded flag or a failure flag, the target service mode is determined to be the network installation operating system mode; if the physical disk status information of the system disk of the abnormal storage controller A is a lost flag or an offline flag, the target service mode is determined to be the memory boot operating system mode.
[0074] S230, the abnormal storage controller establishes a connection with the remote boot operating system service of the target normal control, so that the remote boot operating system service of the target normal control reloads the operating system of the abnormal storage controller according to the target service mode; wherein, the target normal storage controller is determined based on the operating system resource utilization of the normal storage controller in the normal state of the operating system status information, and the target service mode of the target normal storage controller is determined based on the system disk status information of the abnormal storage controller.
[0075] Specifically, after determining the target normal storage controller and the target service mode of the target normal storage controller, for example, determining storage controller B as the target normal storage controller, the BIOS B of the target normal storage controller B controls the diskless remote boot operating system service of storage controller B to establish a connection with the abnormal storage controller A, so that the diskless remote boot operating system service of storage controller B loads a preset image operating system for the abnormal storage controller A according to the target service mode, so as to restore the abnormal storage controller A.
[0076] In some embodiments, controlling the abnormal storage controller to establish a connection with the target diskless remote boot operating system service includes: controlling the abnormal storage controller to broadcast a Dynamic Host Configuration Protocol (DHCP) message to request the DHCP service to allocate an Internet Protocol (IP) address; and establishing a connection between the abnormal storage controller and the diskless remote boot operating system service of the target normal storage controller based on the IP address.
[0077] Specifically, if storage controller B is identified as the target normal storage controller, the BIOS A of the abnormal storage controller A will control its network interface card to broadcast a Dynamic Host Configuration Protocol (DHCP) message, requesting the DHCP service to allocate an Internet Protocol (IP) address. Once the abnormal storage controller A obtains the IIP address through the DHCP service, it can use this IIP address to communicate over the network. The abnormal storage controller A will then establish a connection with the diskless remote boot operating system service of the target normal storage controller B based on this IIP address.
[0078] In some embodiments, establishing a connection between the abnormal storage controller and the diskless remote boot operating system service of the target normal storage controller based on the Internet Protocol address includes: initiating a Transmission Control Protocol (TCP) connection request to a preset port of the diskless remote boot operating system service of the target normal storage controller according to the Internet Protocol address; and receiving a connection confirmation response returned by the diskless remote boot operating system service of the target normal storage controller to establish a connection between the abnormal storage controller and the diskless remote boot operating system service of the target normal storage controller.
[0079] Specifically, based on the Internet Protocol address, the abnormal storage controller initiates a TCP (Transmission Control Protocol) connection request to the preset port of the diskless remote boot operating system service of the target normal storage controller. After receiving the request, the diskless remote boot operating system service of the target normal storage controller returns a connection confirmation response. The two parties thus complete the establishment of a transport layer session channel, thereby realizing a reliable network connection between the abnormal storage controller and the diskless remote boot operating system service of the target normal storage controller.
[0080] As a concrete example, refer to Figure 4 The method for restoring the storage controller of the server in this application embodiment may further include the following steps:
[0081] S301, Begin.
[0082] S302: Determine if the operating system of the storage controller is malfunctioning. If so, execute S303; otherwise, execute S301.
[0083] S303, restart the abnormal storage controller.
[0084] When an abnormal memory controller is detected, the abnormal memory controller's BMC will generate boot control instructions for the abnormal memory controller's motherboard and boot control instructions for the basic input / output system to control the boot of the abnormal memory controller's basic input / output system and motherboard.
[0085] For example, when BMC A determines that storage controller A is an abnormal storage controller, BMC A sends a basic input / output system boot control command to BIOS A through the IIC interface. Then, BMC A sends a motherboard boot control command to CPLD A through the IIC interface. When CPLD A receives the motherboard boot control command and BIOS A receives the basic input / output system boot control command, it will control storage controller A to restart.
[0086] S304: Determine whether the basic input / output system of the fault storage controller has started normally. If yes, proceed to S305; otherwise, proceed to S306.
[0087] S305, determine the system disk status information of the faulty storage controller. The system disk status information includes virtual disk status information and physical disk status information. If the virtual disk status information of the faulty storage controller is a downgrade flag or a failure flag, then execute S307; if the physical disk status information of the faulty storage controller is a loss flag or an offline flag, then execute S308.
[0088] For example, the system disk status information includes virtual disk status information and physical disk status information. After determining the system disk status information of the abnormal storage controller A, the target service mode of the target normal storage controller is determined based on the system disk status information of the abnormal storage controller A. For example, if the virtual disk status information of the abnormal storage controller A is a downgrade flag or a failure flag, then the target service mode of the target normal storage controller is determined to be the network installation operating system mode; if the physical disk status information of the abnormal storage controller A is a loss flag or an offline flag, then the target service mode of the target normal storage controller is determined to be the memory boot operating system mode.
[0089] S306, attempt to restart the faulty storage controller. If the BIOS of the faulty storage controller still fails to boot after a preset number of restarts, then execute S310.
[0090] Specifically, when the faulty storage controller is storage controller A, upon CPLD A receiving the motherboard's boot control command and BIOS A receiving the basic input / output (BIO) system's boot control command, storage controller A will be restarted. However, storage controller A, specifically its BIO system, may not successfully restart upon receiving the boot control command. Therefore, BMC A can send corresponding boot control commands to BIOS A and CPLD A multiple times to control storage controller A to restart. If the number of boot attempts for the storage controller's BIO system and motherboard reaches a preset number, and the storage controller's BIO system still fails to boot, BMC A will send an alarm command through the storage controller's backplane to BMC B, BMC C, or both BMC B and BMC C. This will cause the operating systems of storage controllers B, C, or both to issue a warning to the user, informing them that storage controller A has malfunctioned and cannot recover on its own.
[0091] S307, the target diskless remote boot operating system service loads a preset image operating system according to the network installation operating system mode.
[0092] For example, after the abnormal storage controller A establishes a connection with the diskless remote boot operating system service of the target normal storage controller B, the PXE client of the abnormal storage controller A (the network interface card of the storage controller is configured with a corresponding PXE client) uses the diskless remote boot operating system service of the target normal storage controller B to download the network boot program (e.g., pxelinux.0), the operating system kernel, and the configuration file. Then, the PXE client of the abnormal storage controller A loads the network boot program and the operating system kernel into the memory of the abnormal storage controller A, and loads the preset image operating system onto the system disk of the abnormal storage controller A based on the network boot program and the operating system kernel. Finally, the preset image operating system is installed into the system disk of the abnormal storage controller according to the configuration file and run to restore the abnormal storage controller A.
[0093] S308, The target diskless remote boot operating system service loads the preset image operating system according to the memory boot operating system mode and executes S310.
[0094] For example, after the diskless remote boot operating system service of the abnormal storage controller A establishes a connection with that of the target normal storage controller B, the PXE client of the abnormal storage controller A (the network interface card of the storage controller is configured with a corresponding PXE client) uses the diskless remote boot operating system service of the target normal storage controller B to download the boot entry file (e.g., initrd) and the operating system kernel. Then, the PXE client of the abnormal storage controller A loads the operating system kernel, boot entry file, and preset image operating system into the memory of the abnormal storage controller A and runs them directly to restore the abnormal storage controller A. Even when the diskless remote boot operating system service of the target normal storage controller loads the preset image operating system in memory boot mode, an alarm should still be triggered. For example, the operating systems of normal storage controller B, normal storage controller C, or normal storage controller B and normal storage controller C should issue a warning to inform the user that the system disk of the abnormal storage controller A cannot be read.
[0095] S309: Determine if the operating system of the faulty storage controller is running normally. If yes, execute S311; otherwise, execute S308.
[0096] S310 issued an alarm message.
[0097] S311, Abnormal storage controller recovery.
[0098] As another concrete example, refer to Figure 1 Each storage controller includes a baseboard management storage controller, a basic input / output system, a motherboard, programmable logic devices, an operating system, and diskless remote boot operating system services, and multiple storage controllers are connected through a storage controller backplane.
[0099] Each time the storage controller powers on, its BIOS monitors the system disk status information by enumerating it. If the virtual disk status information of the abnormal storage controller A is not marked as downgraded or failed, and the physical disk status information is not marked as lost or offline, it indicates that the storage controller's system disk is in a normal state. In this case, booting can proceed according to the BMC's preset values (e.g., if the BMC is set to boot from the system disk with first priority, the BIOS will boot from the system disk with first priority; if it is set to boot from PXE with first priority, the BIOS will boot from PXE with first priority). If the BMC has no preset values, the BIOS defaults to booting from the system disk first. If the system disk fails to boot, it will boot from PXE. Simultaneously, the BIOS transmits the boot information to the BMC of the same storage controller via IIC.
[0100] If the storage controller detects that the virtual disk status information of the system disk on the storage controller is downgraded or failed, or that the physical disk status information is lost or offline, the storage operating system on the storage controller will be unable to boot. In this case, the BIOS transmits the system disk status information to the BMC on the same storage controller via IIC (Inter-Integrated Circuit). The BMC then takes appropriate action based on the system disk status information and other comprehensive factors. The BMC of the storage controller mainly makes a comprehensive judgment by collecting system disk status information transmitted by the BIOS and operating system status information transmitted by the storage controller's operating system, and issues corresponding instructions and actions. These instructions and actions include: ① notifying the CPLD to issue a storage controller restart command via IIC; ② notifying the BIOS to issue a boot priority command via IIC; ③ notifying other storage controllers' BMCs via TCP / IP (Internet Protocol) network. Other storage controllers' BMCs notify the storage OS via LPC to enable or disable the DRBL (Diskless Remote Bootin Linux) service. When the DRBL service needs to be enabled, each storage controller's BMC communicates with the storage OS via LPC to obtain the resource utilization of the storage controller's CPU (Central Processing Unit), memory, etc., and selects the storage controller with the lowest resource utilization to enable the DRBL service. If the utilization is the same, the storage OS with the normal state and the smallest storage controller slot number is selected to enable the DRBL service.
[0101] The CPLD primarily receives reboot commands from the BMC via IIC for restarting the storage controller. Simultaneously, it communicates with the BIOS via IIC to obtain the BIOS status. If the BIOS fails to boot, it will reboot three times by default. If it still fails to boot after three reboots, it will notify the BMC via IIC. The BMC will then notify other storage controller BMCs, which in turn will notify the storage OS to issue an alarm, reminding the user to perform timely maintenance and troubleshooting.
[0102] Each storage controller comes pre-installed with DRBL service and pre-stores the storage system OS image file to be installed. The system OS is pre-configured with two DRBL operating modes:
[0103] ① Memory-booted operating system mode: After the storage controller BIOS boots via PXE, it obtains an IP address via DHCP (Dynamic Host Configuration Protocol) and downloads the storage OS kernel and initrd to memory via DRBL service, loading the complete system image into memory for execution; this allows the storage OS to boot directly from memory when the storage controller's RAID card or system disk fails, thus ensuring the normal operation of the storage system.
[0104] ② Network-based OS Installation Mode: After the storage controller BIOS boots via PXE, it obtains an IP address through DHCP and then downloads pxelinux.0, along with corresponding configuration files and the kernel, using the TFTP (Trivial File Transfer Protocol) service in the DRBL service. The complete system image is then installed onto the system disk according to the pre-configured file requirements. This ensures that if files on the storage controller's system disk are corrupted or the storage OS malfunctions, the storage system can be reinstalled to maintain normal operation.
[0105] The storage controller backplane primarily provides interconnection between storage OS networks and BMC networks, as well as configuration information for each storage controller, such as network configuration and VPD (Vital Product Data) information.
[0106] In addition to running the storage's own software functions, the storage system OS provides the ability to enable or disable the DRBL service, and to send its own health status to the BMC in real time through the LPC interface.
[0107] In summary, by combining the CPLD and BMC modules built into the multi-controller storage with the DRBL service, this system automates the handling of storage OS boot failures when storage OS files are corrupted or abnormal, or when the RAID card or system disk fails to boot. This solves the problem of manual intervention required when the RAID is normal but the storage OS files are abnormal, and also solves the problem of the storage OS failing to boot when the RAID card or system disk is abnormal. It is low-cost, highly efficient, and stable, requiring no manual intervention and greatly improving the availability and reliability of storage.
[0108] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0109] Embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned method for restoring the storage controller of a server.
[0110] Embodiments of this application also provide an electronic device, with reference to Figure 5 The electronic device 400 includes a memory 410, a processor 420, and a computer program stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program, it implements the aforementioned method for restoring the storage controller of the server.
[0111] For a description of the features in the embodiment corresponding to the electronic device, please refer to the relevant description of the embodiment corresponding to the recovery method of the server's storage controller, which will not be repeated here.
[0112] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0113] Embodiments of this application also provide a computer program product, including a computer program / instructions, which, when executed by a processor, implement the aforementioned method for restoring the storage controller of a server.
[0114] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the recovery method embodiments of the storage controller of any of the above-described servers.
[0115] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0116] The foregoing has provided a detailed description of a server storage controller recovery method and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A recovery method of a storage controller of a server, characterized by, The server comprises a plurality of storage controllers, and the method comprises: obtaining operating system state information of the plurality of storage controllers, and determining at least one abnormal storage controller and at least one normal storage controller according to the operating system state information; generating a start control instruction according to restart boot information of the abnormal storage controller, so as to start the abnormal storage controller; in the case that basic input / output system (BIOS) of the abnormal storage controller is successfully started, obtaining resource utilization of at least one normal storage controller, and determining a target normal storage controller according to the resource utilization of at least one normal storage controller; determining a target service mode of the target normal storage controller according to system disk state information of the abnormal storage controller, so that the target normal storage controller reloads the operating system of the abnormal storage controller according to the target service mode; wherein the system disk state information comprises virtual disk state information, and determining the target service mode of the target normal storage controller according to the system disk state information of the abnormal storage controller comprises: in the case that the virtual disk state information is a degradation identifier or a failure identifier, determining that the target service mode is a network installation operating system mode; the system disk state information comprises physical disk state information, and determining the target service mode of the target normal storage controller according to the system disk state information of the abnormal storage controller comprises: in the case that the physical disk state information is a loss identifier or an offline identifier, determining that the target service mode is a memory start operating system mode.
2. The recovery method of a storage controller of a server according to claim 1, wherein, Determining the target normal storage controller according to the resource utilization of at least one normal storage controller comprises: obtaining the resource utilization of at least one normal storage controller; taking the normal storage controller corresponding to the minimum value of the resource utilization as the target normal storage controller.
3. The recovery method of a storage controller of a server according to claim 2, wherein, The method further comprises: in the case that the resource utilization of the plurality of normal storage controllers is the same and is the minimum value, obtaining numbers of the plurality of normal storage controllers, wherein the numbers are used to represent numbers of storage controllers installed in a peripheral component interconnect express (PCIe) slot of a server mainboard; taking the normal storage server corresponding to the minimum value of the numbers or the maximum value of the numbers as the target normal storage controller.
4. The recovery method of a storage controller of a server according to any one of claims 1 to 3, characterized by, The method further comprises: after the abnormal storage controller is successfully recovered, closing the target service mode of the target normal storage controller.
5. The recovery method of a storage controller of a server according to claim 1, wherein, The method further comprises: in the case that the BIOS of the abnormal storage controller is not successfully started and is restarted for a preset number of times, sending an alarm instruction to the normal storage controller, so that the normal storage controller issues a warning.
6. The recovery method of a storage controller of a server according to claim 1, wherein, According to the target service mode, reloading the operating system of the abnormal storage controller comprises: downloading a network boot program, an operating system kernel and a configuration file based on the target service mode; loading the network boot program and the operating system kernel into the abnormal storage controller, and loading a preset mirror operating system into a system disk of the abnormal storage controller based on the network boot program and the operating system kernel, and installing the preset mirror operating system into the system disk of the abnormal storage controller according to the configuration file and running the preset mirror operating system to recover the abnormal storage controller.
7. The recovery method of a storage controller of a server according to claim 1, wherein, reloading the operating system of the abnormal storage controller according to the target service mode, comprising: downloading an operating system kernel and a boot item file based on the target service mode; loading the operating system kernel, the boot item file and a preset mirror operating system into the abnormal storage controller to recover the abnormal storage controller.
8. The recovery method of a storage controller of a server according to claim 6, wherein the target service mode includes a network installation operating system mode. The method further comprises: in the case that the abnormal storage controller is still in an abnormal state after reloading the operating system of the abnormal storage controller according to the network installation operating system mode, re-determining the target normal storage controller; reloading the operating system of the abnormal storage controller according to the network installation operating system mode of the re-determined target normal storage controller.
9. The recovery method of a storage controller of a server according to claim 6, wherein the target service mode includes a memory-initiated operating system mode. The method further comprises: in the case that the abnormal storage controller is still in an abnormal state after reloading the operating system of the abnormal storage controller according to the network installation operating system mode, re-determining the target normal storage controller; reloading the operating system of the abnormal storage controller according to the memory start operating system mode of the re-determined target normal storage controller.
10. An electronic device, comprising: A computer program product comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the recovery method of the storage controller of the server according to any one of claims 1-9.
Citation Information
Patent Citations
Cluster system exception recovery processing method and device
CN111538613A
Method, system, device and equipment for connecting storage controller and storage medium
CN115766824A