Hard disk mode control system, server, method, device, medium and product

By introducing switching components and control components into the hard disk link, the hard disk control mode and port working mode are dynamically switched, which solves the problems of low switching efficiency and high cost in the existing technology and realizes automatic switching of hard disk control mode and performance optimization.

CN120743201AActive Publication Date: 2025-10-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511240711.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-10-03
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

The switching efficiency of the hard disk control mode in the existing technology is low and the hardware design cost is high. It cannot achieve automatic switching and cannot meet the performance and reliability requirements under different loads.

Method used

By introducing switching components and control components into the hard disk link, the switching component is used to switch the data link between the controller and the data port of the hard disk. The control component dynamically switches the control mode and port working mode of the hard disk according to the current status of the controller and the load status of the hard disk, thereby realizing a dynamic connection between the controller and the hard disk.

Benefits of technology

It realizes automatic switching of hard disk control modes, improves switching efficiency, meets the read and write performance requirements under different loads, improves the reliability of server storage systems, and reduces hardware design costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743201A_ABST
    Figure CN120743201A_ABST
Patent Text Reader

Abstract

The invention discloses a hard disk mode control system, a server, a method, equipment, a medium and a product, relates to the technical field of servers, and constructs a hard disk mode control system which is characterized in that a switching component switches a data link between a controller and a data port of a hard disk; the control module is used for controlling the hard disk and switching the control mode and the port working mode of the hard disk through the switching of the data link, the control module controls the control mode of the switching hard disk according to the current in-place state, and controls the switching of the port working mode and the bus working mode of the hard disk according to the bus working state of the controller and the current load of the hard disk. Dynamic switching of connection between the controller and the hard disk is achieved, manual switching is not needed, the mode switching efficiency is improved, loads of the hard disk are considered in the mode switching process, the read-write performance of the hard disk under different loads and the application requirements under different loads are met, the reliability of a server storage system can be improved, and the user experience is improved. Extra hardware does not need to be designed, and the cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a hard disk mode control system, server, method, device, medium and product. Background Art

[0002] As data centers transition to software-defined architectures, storage hardware systems face the core challenges of dynamic bandwidth expansion and controller collaborative management. In dual-controller storage scenarios, the links of dual-port hard drives must dynamically switch between single-controller and dual-controller modes to meet performance and reliability requirements under varying loads.

[0003] Related technologies for switching between single-controller mode and dual-controller mode mainly include fixed backplane methods and cable-based or PCIe (Peripheral Component Interconnect Express) switch chips to achieve switching between single-controller mode and dual-controller mode. However, all of the above methods require manual switching, resulting in low switching efficiency and high hardware design costs. Summary of the Invention

[0004] The present application provides a hard disk mode control system, server, method, device, medium and product to at least solve the problems in the related art of being unable to realize automatic switching of hard disk control modes, low switching efficiency and high hardware design cost.

[0005] The present application provides a hard disk mode control system, wherein the hard disk link includes a server mainboard, a control mainboard, and a hard disk backplane. The server mainboard is provided with multiple controllers and multiple first port components, the first port components are connected to the controllers, the hard disk backplane is provided with at least one hard disk and at least one second port component, the hard disk is provided with multiple data ports, the second port component is connected to the data port of the hard disk, the control mainboard is provided with a hard disk mode control system, and the hard disk mode control system includes a switching component and a control component, wherein: The switching component is connected to the first port component and the second port component respectively, and is used to switch the data link between the controller and the data port of the hard disk, and realize the switching of the control mode of the hard disk and the port working mode by switching the data link; The control component controls the switching component to switch the control mode of the hard disk according to the current status of the controller. After the control mode of the hard disk is switched, the control switching component switches the port working mode of the hard disk and controls the controller to switch the bus working mode according to the bus working status of the controller and the current load of the hard disk.

[0006] The present application also provides a server, including: The server mainboard, the control mainboard and the hard disk backplane constitute a hard disk link, wherein the server mainboard is provided with multiple controllers and multiple first port components, the hard disk backplane is provided with at least one hard disk and at least one second port component, and the control mainboard is provided with the hard disk mode control system of the above embodiment.

[0007] The present application also provides a hard disk mode control method, which is applied to the control component of the hard disk mode control system of the above embodiment, and the control component is configured to perform the following steps: obtaining the current in-place status of the controller, the bus working mode and the current load of the hard disk; controlling the switching component to switch the control mode of the hard disk according to the current in-place status; after the control mode of the hard disk is switched, controlling the switching component to switch the port working mode of the hard disk according to the bus working status of the controller and the current load of the hard disk, and controlling the controller to switch the bus working mode.

[0008] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned hard disk mode control methods when executing the computer program.

[0009] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned hard disk mode control methods are implemented.

[0010] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned hard disk mode control methods when executed by a processor.

[0011] Through the present application, since the single-control mode and multi-control mode of the hard disk mode in the related technology require manual switching, the switching efficiency is low, and the hardware design cost is high, therefore, the embodiment of the present application constructs a hard disk mode control system, and the switching component is connected to the first port component and the second port component respectively, for switching the data link between the controller and the data port of the hard disk, and realizing the switching of the hard disk control mode and the port working mode by switching the data link. The control component controls the switching component to switch the control mode of the hard disk according to the current in-place state. After the control mode of the hard disk is switched, the switching component controls the port working mode of the hard disk according to the bus working state of the controller and the current load of the hard disk, and controls the controller to switch the total The line working mode realizes the dynamic switching of the connection between the controller and the hard disk, without manual switching, and improves the efficiency of switching the hard disk control mode, hard disk port working mode and bus working mode. The hard disk load is taken into consideration during the switching process of the hard disk port working mode and the bus working mode, so as to meet the read and write performance of the hard disk under different loads, as well as the application requirements under different loads, and to a certain extent can improve the reliability of the server storage system, and no additional hardware needs to be designed, the cost is low, and it can solve the technical problems in the related technology that the hard disk control mode cannot be automatically switched and the switching efficiency is low, so as to achieve the technical effect of realizing automatic switching of the hard disk control mode, improving switching efficiency and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] Figure 1 Schematic diagram of a dual-control topology in a dual-port mode in the related art; Figure 2 Schematic diagram of a dual-control topology in a single-port mode in the related art; Figure 3 Schematic diagram of a hard disk mode control system according to an embodiment of the present application; Figure 4 A schematic diagram of a topological structure of a hard disk link of a hard disk mode control system proposed according to an embodiment of the present application; Figure 5 This is a dual-controller read-write topology diagram under low load according to an embodiment of the present application; Figure 6 This is a dual-controller read-write topology diagram under high load according to an embodiment of the present application; Figure 7 is a schematic diagram of a switching unit proposed according to an embodiment of the present application; Figure 8 This is a read-write topology diagram of a single controller under low load according to an embodiment of the present application; Figure 9 This is a single-controller read-write topology diagram under high load according to an embodiment of the present application; Figure 10 A schematic diagram of the structure of a server according to an embodiment of the present application; Figure 11 This is a flow chart of a hard disk mode control method proposed according to an embodiment of the present application; Figure 12 This is a complete flow chart of the hard disk mode control method proposed according to an embodiment of the present application; Figure 13 Schematic diagram of the structure of an electronic device proposed according to an embodiment of the present application. DETAILED DESCRIPTION

[0014] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0015] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0016] Before describing the solution of the present application, the solution for implementing hard disk control mode switching in the related art is first introduced to better assist in understanding some relevant contents of the solution of the present application.

[0017] In the current server field, the following three methods are commonly used in dual-control storage link switching design.

[0018] 1. Fixed backplane solution: This solution requires designing the link switching part as a single board. By designing single-controller and dual-controller backplanes that meet the requirements, it supports switching between single-controller and dual-controller hard drive links. 2. Cable switching solution: This solution implements link switching through different cable connection relationships to meet different topology requirements of single control and dual control.

[0019] 3. PCIe switch chip solution: Map the fixed ports of the PCIe switch chip through different configuration schemes to achieve switching between single-control and dual-control hard disk links.

[0020] However, the above-mentioned switching method has the following problems.

[0021] 1. Dynamic switching cannot be achieved.

[0022] 1. For the fixed backplane solution, single-controller (single-controller) and dual-controller (dual-controller) systems require separate backplane hardware designs. Mode switching cannot be achieved using the same design. This solution requires manual board replacement and does not support dynamic switching.

[0023] 2. For cable switching solutions, single-control and dual-control systems require different cable connection topologies to support them. Manual cable connection is also required and dynamic switching is not supported.

[0024] 3. For the PCIe switch chip solution, the corresponding firmware needs to be configured for the PCIe switch chip to support single-control mode or dual-control mode. Single-control mode and dual-control mode correspond to different PCIe switch chip firmware. This burning operation must be performed in the shutdown state and automatic switching cannot be achieved.

[0025] The method for implementing switching based on a PCIe switch chip specifically includes: like Figure 1 As shown in the figure, in dual-port mode, the two controllers are connected to ports 1 and 2 of the hard disk through their respective link 1. At this time, the dual controllers can control the read and write of the hard disk; like Figure 2 As shown, in single-port mode, a single controller is required to control the read and write of the hard disk, and links 1 and 2 of controller 1 are connected to ports 1 and 2 of the hard disk respectively.

[0026] In addition, it should be noted that the above two topology examples involve different link topologies. For PCIe switch chips, different link topologies correspond to different PCIe switch chip firmware configurations. When the PCIe switch chip switches between different link topologies, it needs to be shut down to burn the corresponding firmware configuration.

[0027] 2. Waste of resources and high cost.

[0028] 1. The fixed backplane solution requires the design of two different backplanes, which will further increase the complexity of the supply chain and the cost of spare parts.

[0029] 2. For PCIe switch chip solutions, the more ports the PCIe switch chip supports, the higher the cost. Figure 1 and Figure 2As shown in the figure, regardless of the single-control mode or dual-control mode, 50% of the port resources of each PCIe switch chip will be idle, further causing resource waste.

[0030] 3. It is impossible to specify a switching strategy based on the load and reliability requirements of the current business.

[0031] For example, when the hard disk read and write load is high in dual-port mode, it can be dynamically switched to single-port mode. In this mode, the hard disk read and write performance can be optimized. After the high-load read and write is completed, it can be switched back to dual-port mode to achieve high reliability.

[0032] Based on the above technical problems, an embodiment of the present application provides a hard disk mode control system to realize dynamic switching of the link of a dual-port hard disk between single-control and dual-control modes. It is low-cost and can meet the performance and application requirements under different loads.

[0033] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0034] The embodiments of the present application provide a hard disk mode control system, and the system is described in detail in conjunction with the components of the hard disk mode control system.

[0035] The hard disk link in the hard disk mode control system of the present application includes a server mainboard, a control mainboard and a hard disk backplane. The server mainboard is provided with multiple controllers and multiple first port components, the first port components are connected to the controllers, at least one hard disk and at least one second port component are provided on the hard disk backplane, the hard disk is provided with multiple data ports, the second port component is connected to the data interface of the hard disk, and a hard disk mode control system is provided on the control mainboard.

[0036] like Figure 3 As shown, the hard disk mode control system 10 includes: a switching component 11 and a control component 12.

[0037] Among them, the switching component 11 is connected to the first port component and the second port component respectively, and is used to switch the data link between the controller and the data port of the hard disk, and realizes the switching of the control mode and the port working mode of the hard disk through the switching of the data link; the control component 12 controls the switching component 11 to switch the control mode of the hard disk according to the current in-place status of the controller. After the control mode of the hard disk is switched, the switching component 11 is controlled to switch the port working mode of the hard disk and control the controller to switch the bus working mode according to the bus working status of the controller and the current load of the hard disk.

[0038] Specifically, if Figure 4 As shown, Figure 4This is an example of the topological structure of the hard disk link of the hard disk mode control system. The second port component may include the hard disk backplane upstream port, and the switching component 11 is a switching unit module; the second port component (i.e., the hard disk backplane upstream port) is respectively connected to the switching component 11 and multiple data ports of the hard disk; the first port component may include a first control upstream port and a second control upstream port.

[0039] The in-place state of the controller in the embodiment of the present application is that the controller has established normal communication with the server mainboard, system software, etc., and is successfully identified and marked as available by the server. Conversely, the controller also includes an out-of-place state, which is that the controller is not recognized by the server, or although it is physically installed, it cannot communicate normally, and the system determines that it is unavailable or does not exist; the bus working state between the controller and the first port component includes a normal working state and an abnormal working state.

[0040] It can be understood that the embodiment of the present application constructs a hard disk mode control system 10, including a switching component 11 and a control component 12. The switching component 11 is connected to the first port component and the second port component respectively, and is used to switch the data link between the controller and the data port of the hard disk, and realize the switching of the hard disk control mode and the port working mode by switching the data link. The control component 12 controls the switching component to switch the control mode of the hard disk according to the current in-place state. After the control mode of the hard disk is switched, the switching component 11 is controlled to switch the port working mode of the hard disk and the controller to switch the bus working mode according to the bus working state of the controller and the current load of the hard disk, thereby realizing dynamic switching of the connection between the controller and the hard disk without manual switching, improving the efficiency of switching the hard disk control mode, hard disk port working mode and bus working mode, and taking into account the load of the hard disk in the switching process of the hard disk port working mode and bus working mode, so as to meet the read and write performance of the hard disk under different loads and the application requirements under different loads, and to a certain extent, it can improve the reliability of the server storage system, and does not require the design of additional hardware, and the cost is low.

[0041] The control mode of the hard disk in the embodiment of the present application includes a single-control mode and a multi-control mode. The bus mode includes two bus working modes, specifically x2x2 (channel split mode) and x4 (channel merge mode). The hard disk port mode includes a multi-port mode and a single-port mode. In summary, the control mode and port mode of the hard disk include a multi-control multi-port mode, a multi-control single-port mode, a single-control single-port mode, and a single-control multi-port mode. In multi-controller multi-port mode, multiple controllers are connected to multiple independent data ports of the hard disk. The hard disk is in multi-port mode. For example, the hard disk has two read and write ports (port 1 and port 2) that work as independent ports and are controlled by two controllers respectively. For example, controller 1 is connected to port 2, and controller 2 is connected to port 1. In multi-controller single-port mode, multiple controllers collaborate to control a single combined data port of the hard drive. The hard drive operates in single-port mode. For example, a hard drive has two read / write ports (port 1 and port 2) combined into one port, with bandwidth added. There are two controllers, with controllers 1 and 2 both connected to the combined port. Single-controller single-port mode is a mode where a single controller controls a single combined port of the hard disk. The hard disk operates in single-port mode. For example, the two read and write ports of the hard disk are combined into one port, which is controlled by only one in-place controller through the combined bus. There are two controllers, controller 1 and controller 2, both connected to the combined port. In single-controller multi-port mode, a single controller is connected to multiple independent ports of the hard disk. The hard disk operates in multi-port mode. For example, the two read and write ports of the hard disk (port 1 and port 2) work as independent ports, but are both controlled by the same controller. There is one controller, and controllers 1 and 2 are both connected to ports 1 and 2.

[0042] Furthermore, in some embodiments of the present application, the control component 12 includes at least one control unit and at least one detection unit, the detection unit detects the current in-place status of the controller, and the control unit is respectively connected to the switching component, the detection unit, the hard disk and the controller to control the switching component and the controller.

[0043] It can be understood that the control component 12 of the embodiment of the present application includes at least one control unit and at least one detection unit, wherein the detection unit is used to detect the current in-place status of the controller, and the control unit is respectively connected to the switching component 11, the detection unit, the hard disk and the controller to control the switching component 11 and the controller, wherein the switching component 11 is used to switch the data link between the controller and the data port of the hard disk, and the switching of the control mode and the port working mode of the hard disk is realized by switching the data link.

[0044] The control unit of the embodiment of the present application is the control center of the entire hard disk mode control system 10, which is connected to the detection unit, hard disk, and controller. The controller's presence information and bus working status information can be obtained through the detection unit, and the hard disk's load status information can be read through the hard disk. According to the obtained controller presence information, bus working status information, and hard disk load status information, the control switching component 11 is controlled to switch different link channel topologies, and the control mode of the hard disk is controlled to be single-control mode or multi-control mode, and the control port working mode is controlled to be switched to multi-port mode or single-port mode. At the same time, a command is sent to the controller to switch the controller's bus mode to an independent working mode (x2x2) or a combined collaborative work mode (x4), thereby meeting application requirements under different configurations and different loads.

[0045] In addition, it should be noted that the controller in the embodiment of the present application is a computing module including a CPU (Central Processing Unit) and a memory; each upstream port provides up to 32 sets of bus interfaces, and the first control upstream port and the second control upstream port can be connected to the corresponding controller respectively by cable or PCB direct connection.

[0046] Furthermore, in some embodiments of the present application, the control unit is used to determine the number of controllers in place according to the current in-place status, determine the control mode of the hard disk according to the number of controllers in place, and control the switching component to switch the control mode of the hard disk.

[0047] It can be understood that the control unit of the embodiment of the present application can determine the number of controllers in place according to the current in-place status, and determine the control mode of the hard disk according to the number of controllers in place, and control the switching component 11 to switch the control mode of the hard disk.

[0048] The in-position state can be represented by 0 or 1, where 0 indicates that the controller is not in position, and 1 indicates that the controller is in position.

[0049] For example, taking the hard disk mode control system including two controllers (controller 1 and controller 2) as an example, if the in-place status of controller 1 is 1 and the in-place status of controller 2 is 0, and the number of controllers in place is determined to be 1, then the control mode of the hard disk is single-controller mode. If the in-place status of controller 1 is 1 and the in-place status of controller 2 is 1, and the number of controllers in place is determined to be 2, then the control mode of the hard disk is dual-controller mode.

[0050] Furthermore, in some embodiments of the present application, the control unit is used to correct the control mode of the hard disk according to the bus working status of the controller after the control mode of the hard disk is switched, and after the control mode is corrected, adjust the port working mode and bus working mode of the hard disk according to the current load.

[0051] Since the bus working state of the controller may change after the control mode of the hard disk is switched, the control unit of the embodiment of the present application can correct the control mode of the hard disk according to the bus working state of the controller after the control mode of the hard disk is switched to ensure the bus communication adaptation between the hard disk and the controller and maintain the reliability of the signal output. After the control mode is corrected, the port working mode and bus working mode of the hard disk are adjusted according to the current load, which can meet the read and write performance of the hard disk under different loads, as well as the application requirements under different loads, ensuring that the system is always in the optimal operating state under different load pressures, avoiding performance bottlenecks or excess performance.

[0052] For example, when the current load is high, the hard disk port working mode is adjusted to single-port mode to ensure the optimal hard disk read and write performance. After the high-load reading and writing is completed, it is switched back to dual-port mode to achieve high reliability.

[0053] For another example, the system is initially in dual-controller mode (controller 1 and controller 2 are both in place and working properly), hard disk 1 is operating in "dual-port mode" (port 1 is connected to controller 2, and port 2 is connected to controller 1), and the controller buses are both in "x2x2 split mode". However, controller 2 goes offline due to a fault (bus abnormality), and the system triggers a control mode switch—from dual-controller mode to single-controller mode (only controller 1 is working).

[0054] 1. After the control mode is switched, the hard disk control mode is corrected according to the working status of the controller bus.

[0055] The system detects that controller 2 is offline. The control unit sends a command to the switch component to close the link between controller 2 and the hard drive (out1 = off), leaving only port 2 of controller 1 connected to hard drive 1 (out2 = controller 1's bus 1). Hard drive 1 still uses the dual-controller configuration.

[0056] The control unit finds through the detection unit that the load of bus 1 of controller 1 increases due to the switch (it needs to bear all reading and writing of hard disk 1 alone).

[0057] The control unit sends a command to hard disk 1 to correct its control mode, ensuring stable communication between the bus of hard disk 1 and controller 1 in the new single-controller scenario, and avoiding signal mismatch or data errors caused by bus status changes.

[0058] Furthermore, in some embodiments of the present application, a plurality of link channels are provided inside the switching component 11, and the connection or disconnection of the plurality of link channels is used to switch the number of controllers connected to the hard disk and the port position of the hard disk connection.

[0059] Among them, the link channel is the physical signal transmission path connecting the hard disk and the controller. It is a collection of hardware links that realize the interaction of data, instructions, and status signals. It can be understood as a dedicated communication line between the hard disk and the controller. Its core function is to dynamically adjust the connection relationship between the hard disk and the controller and port through on / off operations.

[0060] It can be understood that the switching component 11 of the embodiment of the present application is internally provided with multiple link channels, and the connection or disconnection of the multiple link channels is used to switch the number of controllers connected to the hard disk and the port position of the hard disk access.

[0061] Furthermore, in some embodiments of the present application, the switching component includes multiple switching units, wherein the switching unit includes multiple uplink ports and multiple downlink ports, and a link channel is formed between the uplink ports and downlink ports of the switching unit. The uplink port of the switching unit is connected to the downlink port of the first port component, and the downlink port of the switching unit is connected to the uplink port of the second port component.

[0062] The switching unit may be a 2to2 high-speed switching unit.

[0063] It can be understood that the switching component 11 of the embodiment of the present application includes multiple switching units, the switching unit includes multiple uplink ports and downlink ports, and a link channel is formed between the uplink ports and downlink ports of the switching unit. The uplink port of the switching unit is connected to the downlink port of the first port component, and the downlink port of the switching unit is connected to the uplink port of the second port component.

[0064] Specifically, if Figure 5 As shown, Figure 5 This is the dual controller read and write topology diagram under low load. Figure 5 The system includes two switching units, switching unit 1 and switching unit 2, wherein the uplink port of the switching unit is connected to the downlink port of the first port component, for example, the uplink port 1 of the switching unit is connected to the downlink port 1 of the first control upstream port.

[0065] Furthermore, in some embodiments of the present application, the switching unit connects at least one first port component and at least one second port component, the first port component is connected to at least one switching unit, and the second port component is connected to at least one switching unit.

[0066] It can be understood that the switching unit in the embodiment of the present application connects at least one first port assembly and at least one second port assembly, the first port assembly is connected to at least one switching unit, and the second port assembly is connected to at least one switching unit.

[0067] Specifically, if Figure 4 As shown, Figure 4 The switching unit in Figure 4 The switching unit module in the Figure 4 The first control upstream port and the second control upstream port in the second port component (i.e. Figure 4 hard drive backplane upstream port in the RAID controller card).

[0068] like Figure 6 As shown, Figure 6This is a dual-controller read / write topology diagram under high load. The upstream port 1 of switch unit 1 is connected to the downstream port of the first controller upstream port, the upstream port 2 of switch unit 1 is connected to the downstream port of the second controller upstream port, the upstream port 2 of switch unit 2 is connected to the downstream port of the first controller upstream port, and the upstream port 1 of switch unit 2 is connected to the downstream port of the second controller upstream port. like Figure 6 As shown, the downlink port of the first control upstream port is connected to the uplink port 1 of the switching unit 1, and the downlink port of the first control upstream port is connected to the uplink port 2 of the switching unit 2; the downlink port of the second control upstream port is connected to the uplink port 2 of the switching unit 1, and the downlink port of the second control upstream port is connected to the uplink port 1 of the switching unit 2.

[0069] Furthermore, in some embodiments of the present application, the second port component includes multiple upstream ports and multiple downstream ports, the downstream ports of the second port component are connected to the data interface of the hard disk, and the second port component allows connection to multiple hard disks.

[0070] It can be understood that the second port component of the embodiment of the present application includes multiple upstream ports and multiple downstream ports. The downstream port of the second port component is connected to the data interface of the hard disk. The second port component allows connection to multiple hard disks.

[0071] Specifically, if Figure 4 As shown, the second port component (i.e. Figure 4 The hard disk backplane upstream port in the second port assembly includes multiple upstream ports and multiple downstream ports. The downstream port of the second port assembly is connected to the data interface of the hard disk, and the second port assembly is connected to multiple hard disks.

[0072] Furthermore, in some embodiments of the present application, the switching unit includes multiple upstream ports and multiple downstream ports, and a timing alignment buffer is provided between the upstream ports and the downstream ports. After the switching unit completes the action, the timing alignment buffer delays the port signal for a fixed number of cycles and then outputs it, so that each output signal is aligned with the clock signal; the upstream port and the downstream port are provided with a physical switch and a controller, and the controller switches the opening and closing of the link channels between the multiple upstream ports and the multiple downstream ports according to the switching signal and the channel switching status signal. The enable signal of the multiple downstream ports of the controller controls the opening and closing of the downstream ports, and the channel switching status signal is used to indicate whether the channel switching action is completed.

[0073] The fixed period can be set according to specific circumstances.

[0074] Since the state change of the internal switching circuit of the switching unit in response to the switching signal will cause the signal transmission path to be physically switched, although the switching process may be short, it may cause signal instability and delay differences between different channels. Therefore, a timing alignment buffer is provided between the upstream port and the downstream port of the switching unit in the embodiment of the present application. The timing alignment buffer delays the port signal for a fixed number of cycles after the switching unit completes the action and then outputs it, so that each output signal and the clock signal are aligned; the upstream port and the downstream port are provided with a physical switch and a controller. The controller switches the link channels between multiple upstream ports and multiple downstream ports on and off according to the switching signal and the channel switching status signal. The enable signal of the multiple downstream ports of the controller controls the opening and closing of the downstream port. The channel switching status signal is used to indicate whether the channel switching action is completed.

[0075] Specifically, if Figure 7 As shown, Figure 7 This is a schematic diagram of the switching unit. Its upstream ports, In1 and In2, connect to the controller, while its downstream ports, Out1 and Out2, connect to the hard drive. A timing alignment buffer is located between the upstream port In and the downstream port Out. After the switching unit completes its operation, the buffer delays the port signal by a fixed number of cycles before outputting it, aligning each output signal with the clock. The switching unit inputs a 200MHz clock, which provides a reference alignment for the high-speed unit. The control unit also connects to the switching signal Sel1, the switching completion signal Sel_done, and the enable signals OE1 and OE2. These signals allow the control unit to switch channels and turn them on and off.

[0076] The Sel1 switching signal control logic is shown in Table 1. OE1 is the enable signal for out1, and OE2 is the enable signal for out2. When the enable signal is 1, the corresponding out channel is turned on, and when the enable signal is 0, the corresponding out channel is turned off. Sel_done is used to indicate the completion of the channel switching action. When the signal is 1, the channel switching action is completed, and when the signal is 0, the channel switching action is not completed.

[0077] Table 1

[0078] The following describes the hard disk link and hard disk mode control system of the embodiment of the present application through a specific embodiment.

[0079] The specific hard disk link can switch the backplane topology as follows Figure 4 As shown, taking two controllers as an example (controller 1 and controller 2), it includes controller 1, controller 2, a first control upstream port, a second control upstream port, a switching unit module, a control unit, a hard disk backplane upstream port, a control signal port, a power supply port, and multiple hard disks.

[0080] This hard drive link switchable backplane includes a first upstream control port and a second upstream control port. The first upstream control port's upstream port is connected to the first controller, and its downstream port is connected to the switch module. The second upstream control port's upstream port is connected to the second controller, and its downstream port is connected to the switch module. Each upstream port provides up to 32 bus interfaces, for a total of 64 bus interfaces across the two controllers. Connections to the controllers can be via cable or direct PCB connection.

[0081] The uplink port of the switch unit module is electrically connected to the upstream port of the controller, and the downlink port is connected to the upstream port of the hard disk backplane. The switch unit module is composed of several of the above switch units, and the number of switch units is 32.

[0082] The hard disk link switchable backplane also includes a control signal port, which is connected to the control unit and two controllers and is used to transmit the controller's in-place signal, controller bus status signal and controller Bifurcation bus switching signal.

[0083] The upstream port on the hard drive backplane connects to the switch unit module and hard drives. This port transmits hard drive load status information and signals for switching between single-port and dual-port operating modes. This port can be connected to the hard drives via a cable or direct PCB connection, supporting up to 16 hard drives.

[0084] The hard drive link switchable backplane also includes a control unit, which is connected to the control signal port, the switch unit module, and the upstream port of the hard drive backplane. The control unit obtains the controller presence status and the operating status of the controller bus through the control signal port and performs bifurcation bus switching (x2x2 or x4) based on the controller strategy. It also performs channel switching operations on the switch unit module based on the strategy through the switch unit connection, obtains the hard drive load status through the upstream port of the hard drive backplane, and switches the hard drive between single-port and dual-port operating modes.

[0085] The power supply port provides power to the backplane switching unit module, control unit, and hard disk.

[0086] Combined with the above description of the topology of the hard disk link switchable backplane, the structure of the hard disk mode control system is specifically described, taking two hard disks as an example.

[0087] like Figure 5 As shown, the hard disk mode control system includes two controllers, a controller status detection unit, a control unit, two controller upstream ports, two switching units, and two hard disks.

[0088] Each controller's upstream port is connected to a controller: controller 1 is connected to the first controller's upstream port, and controller 2 is connected to the second controller's upstream port. Each controller provides two x2x2 buses, which can operate independently or be combined into a x4 bus. When combined, the bandwidth doubles. The controller is a computing module that includes the CPU and memory. This module outputs the PCIe bus. Initially, upon power-up, the controller pre-reads the two bus operating modes, x2x2 and x4, from the BIOS. A switching signal initiated by the control unit switches the bus configuration to x2x2 or x4 mode.

[0089] The controller status detection unit (equivalent to the detection unit described above) is used to detect the controller's presence and the bus status of its upstream port. The controller sends a presence signal to the detection unit. If the detection unit receives the presence signal, it determines that the corresponding controller is present; otherwise, it determines that it is not. The detection unit also checks the bus status of the controller's upstream port. If the bus status indicates no errors, the bus is considered normal; otherwise, it is considered abnormal.

[0090] The hard disk can have two read and write ports and can be switched to dual-port working mode or single-port working mode. When used in single-port mode, the two ports are combined into one port, the bandwidth is combined and calculated, and it can be controlled by the bus of the upstream port of one controller; when used in dual-port mode, the two ports work as two independent ports and can be controlled by two controllers.

[0091] The control unit is the control center of the entire system. It is connected to the controller status detection unit, hard disk, and controller. The controller status detection unit can obtain the controller's presence information and bus working status information, and the hard disk's load status information can be read through the hard disk. Based on the acquired controller presence information, bus working status information, and hard disk load status information, and according to the different dynamic switching strategies pre-stored in the control unit, the control switching unit switches to different link topologies and controls the hard disk to switch to single-port or dual-port working mode. At the same time, commands are sent to the controller to make the two sets of controller buses work independently (x2x2) or work together (x4), meeting application requirements under different configurations and loads.

[0092] The switching unit is a high-speed 2-to-2 switching unit. Ports 1 and 2 are inputs, connected to the upstream ports of the two controllers, respectively. Ports 3 and 4 are outputs, connected to the read / write ports of the two hard drives, respectively. The control unit can send control commands to the switching unit, outputting 3 = 1, 4 = 2 or 3 = 2, 4 = 1. Channels can also be closed.

[0093] Based on the above description of the hard disk mode control system, the following specifically describes how to implement the switching between the hard disk port mode and the controller bus mode.

[0094] 1. After the server's storage system (hereinafter referred to as the system) is powered on, the controller status detection unit obtains information about the controller's presence. After the control unit obtains the controller's presence status, it sends a control command to the switching unit to switch links based on the controller's presence status. It also sends a command to the hard disks to switch them to single-port or dual-port operation mode. The control unit sends instructions to controllers 1 and 2, setting the two bus groups on controllers 1 and 2 to independent operation mode (x2x2) or collaborative operation mode (x4).

[0095] For example, if Figure 5 As shown, the control unit reads the controller status detection unit to obtain the bit status of the two controllers. When both controllers are in place, the control unit sends a control command to set the outputs 3 of switch unit 1 to 2 and 4 to 1, and sends a control command to set the outputs 3 of switch unit 2 to 1 and 4 to 2. At this time, bus 1 of controller 1 is connected to read / write port 2 of hard disk 1, and bus 4 of controller 2 is connected to read / write port 1 of hard disk 1; bus 2 of controller 1 is connected to read / write port 2 of hard disk 2, and bus 3 of controller 2 is connected to read / write port 1 of hard disk 2.

[0096] The control unit sends a command to the hard drives, switching Hard Drive 1 and Hard Drive 2 to dual-port operation. During the initial startup phase, the controller pre-reads the two bus operating modes (x2x2 and x4). The control unit then sends a command to Controllers 1 and 2, which then set the bus to x2x2 mode. The two controllers' buses can independently read and write Hard Drives 1 and 2, respectively. The operating bandwidth is calculated based on the bandwidth of a single hard drive read / write port.

[0097] 2. After the system is started, the controller status detection unit detects the working status of all controller buses in real time. If there is no error in the bus working status, it is determined that the controller bus is working normally. Otherwise, it is determined that the bus is working abnormally.

[0098] 3. According to the working status of the controller bus, the control switching unit closes the abnormal bus channel.

[0099] For example, if Figure 8As shown, after the controller status detection unit obtains bus abnormality information from controller 2, the control unit sends a control command to set output 3 of switch unit 1 to off and output 4 to 1, and sends a control command to set output 3 of switch unit 2 to off and output 4 to 2. At this time, bus 1 of controller 1 is connected to read / write port 2 of hard disk 1, and bus 2 of controller 1 is connected to read / write port 2 of hard disk 2. At the same time, the hard disk maintains dual-port operation mode. The bus setting of controller 1 remains in x2x2 mode.

[0100] 4. After the system is powered on, the control unit detects the hard disk load status information in real time. If the hard disk load is greater than 70%, it is judged as high load, otherwise it is judged as medium or low load. The load judgment threshold can be preset in the control unit. According to the load situation, the control switching unit performs bus switching to improve read and write performance.

[0101] For example, if Figure 6 As shown, in dual-controller, dual-port mode, when the control unit obtains hard drive load information and determines that the hard drive is highly loaded, it sends a control command to set outputs 3 of switch unit 1 to 2 and 4 to 1, and to set outputs 3 of switch unit 2 to 2 and 4 to 1. At this point, bus 1 of controller 1 is connected to read / write port 2 of hard drive 1, and bus 2 of controller 1 is connected to read / write port 1 of hard drive 1; bus 3 of controller 2 is connected to read / write port 1 of hard drive 2, and bus 4 of controller 2 is connected to read / write port 2 of hard drive 2. Simultaneously, the control unit switches hard drives 1 and 2 to single-port operation mode. Controller 1's bus can independently control read / write operations for hard drive 1, and controller 2's bus can independently control read / write operations for hard drive 2. The controllers pre-read the two bus operation modes: x2x2 and x4. The control unit sends commands to controllers 1 and 2, which set the bus to x4 mode. After retraining, the link can achieve full read / write bandwidth for the hard drives. At this point, the read / write bandwidth of a single hard drive is maximized, improving read / write performance.

[0102] like Figure 5 As shown, when the reading and writing are completed, the control unit obtains the load status information of the hard disk and determines that it is a medium or low load. The control unit sends a control command to the switching unit, controller and hard disk to switch the control topology back to the dual-control dual-port mode to ensure the reliability of the system's dual-control reading and writing.

[0103] like Figure 9As shown, in single-controller, dual-port mode, when the control unit obtains load status information for hard drive 1 and determines it is highly loaded, it sends a control command to set outputs 3 of switch unit 1 to off and 4 to 1, and sends a control command to set outputs 3 of switch unit 2 to 2 and 4 to off. At this point, bus 1 of controller 1 is connected to read / write port 2 of hard drive 1, and bus 2 of controller 1 is connected to read / write port 1 of hard drive 1. At the same time, the control unit switches hard drive 1 to single-port mode. The controller pre-reads the two bus operating modes, x2x2 and x4. The control unit sends a command to controller 1, which sets the bus to x4 mode. After retraining the link, hard drive 1 can read and write at full bandwidth. At this point, the read and write bandwidth of a single hard drive is maximized, improving read and write performance.

[0104] If the control unit obtains the load information of hard disk 2 and determines that the load is high, the link is switched to hard disk 2 to achieve full bandwidth reading and writing.

[0105] According to the hard disk mode control system proposed in the embodiment of the present application, it includes a switching component and a control component. The switching component is connected to the first port component and the second port component respectively, and is used to switch the data link between the controller and the data port of the hard disk, and realize the switching of the control mode and the port working mode of the hard disk through the switching of the data link. The control component controls the switching component to switch the control mode of the hard disk according to the current in-place status. After the control mode of the hard disk is switched, the switching component is controlled to switch the port working mode of the hard disk and the controller is controlled to switch the bus working mode according to the bus working status of the controller and the current load of the hard disk, thereby realizing dynamic switching of the connection between the controller and the hard disk without manual switching, improving the efficiency of switching the hard disk control mode, the hard disk port working mode and the bus working mode, and taking the load of the hard disk into consideration during the switching process of the hard disk port working mode and the bus working mode, thereby meeting the read and write performance of the hard disk under different loads and the application requirements under different loads, and to a certain extent, it can improve the reliability of the server storage system, without the need to design additional hardware, and the cost is low.

[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0107] An embodiment of the present application also provides a server.

[0108] like Figure 10 As shown, the server 20 includes: a server mainboard 21 , a control mainboard 22 and a hard disk backplane 23 .

[0109] Among them, the server motherboard 21, the control motherboard 22 and the hard disk backplane 23 constitute a hard disk link. The server motherboard 21 is provided with multiple controllers and multiple first port components, the hard disk backplane 23 is provided with at least one hard disk and at least one second port component, and the control motherboard 22 is provided with the hard disk mode control system 10 of the above embodiment.

[0110] The first port component of the embodiment of the present application can be Figure 4 The first control upstream port and the second control upstream port in the second port component can be Figure 4 The upstream port of the hard disk backplane in the .

[0111] It can be understood that the server 20 of the embodiment of the present application includes a server mainboard 21, a control mainboard 22 and a hard disk backplane 23. By setting multiple controllers and multiple first port components on the server mainboard 21, setting at least one hard disk and at least one port component on the hard disk backplane 23, and setting the above-mentioned hard disk mode control system 10 on the control mainboard 22, it is possible to realize automatic switching of the port mode of the hard disk and the bus mode of the controller between multiple controllers for the storage system of the server.

[0112] An embodiment of the present application also provides a hard disk mode control method.

[0113] like Figure 11 As shown, the hard disk mode control method is applied to the control component of the hard disk mode control system of the above embodiment, and the control component is configured to perform the following steps: In step S101 , the current status of the controller, the bus operating mode, and the current load of the hard disk are obtained.

[0114] The current status of the controller can be detected based on the status detection unit.

[0115] It can be understood that the embodiment of the present application can obtain the current in-place status of the controller, the bus working status between the controller and the first port component, and the current load of the hard disk, so as to be used subsequently to determine the port mode of the hard disk and the bus mode of the controller.

[0116] In step S102, the switching component is controlled to switch the control mode of the hard disk according to the current in-place state.

[0117] In some embodiments of the present application, controlling the switching component to switch the control mode of the hard disk according to the current in-place state includes: determining the number of controllers in place according to the current in-place state; determining the control mode of the hard disk according to the number of controllers in place, and controlling the switching component to switch the control mode of the hard disk.

[0118] It can be understood that the embodiment of the present application determines the number of controllers in place according to the current in-place status, determines the control mode of the hard disk according to the number of controllers in place, and controls the switching component to switch the control mode of the hard disk.

[0119] For example, if there are two controllers in place, the hard disk control mode can be dual-controller mode (ie, multi-controller mode).

[0120] In some embodiments of the present application, the control mode of the hard disk is determined based on the number of controllers in place, including: judging whether the number of controllers in place is greater than a preset number; if the number in place is greater than the preset number, determining that the control mode is a multi-control mode; if the number in place is less than or equal to the preset number, determining that the control mode is a single-control mode.

[0121] The preset number may be pre-calibrated, for example, to 1.

[0122] It can be understood that in the embodiment of the present application, if the number of controllers in place is greater than the preset number, the control mode is determined to be a multi-control mode; if the number of controllers in place is less than or equal to the preset number, the control mode is determined to be a single-control mode.

[0123] In step S103 , after the hard disk control mode is switched, the switching component is controlled to switch the hard disk port working mode and the controller is controlled to switch the bus working mode according to the bus working state of the controller and the current load of the hard disk.

[0124] It can be understood that after the control mode of the hard disk is switched, the embodiment of the present application controls the switching component to switch the port working mode of the hard disk and controls the controller to switch the bus working mode according to the bus working status of the controller and the current load of the hard disk, thereby realizing dynamic switching of the connection between the controller and the hard disk without the need for manual switching, thereby improving the efficiency of the hard disk control mode switching, and taking the load of the hard disk into consideration during the switching of the port working mode and bus working mode of the hard disk, thereby meeting the read and write performance of the hard disk under different loads, as well as the application requirements under different loads, and to a certain extent, improving the reliability of the server storage system.

[0125] In addition, it should be noted that compared with the related art that uses a fixed backplane, that is, independent backplane hardware design for single-control and multi-control systems, and the related art that supports single-control mode or multi-control mode based on the configuration of corresponding firmware on the PCIe switch chip, the present application needs to design multiple PCIe switch chip ports, which can save hardware costs to a certain extent and reduce resource waste to a certain extent.

[0126] In some embodiments of the present application, according to the bus working mode of the controller and the current load of the hard disk, the switching component is controlled to switch the port working mode of the hard disk, and the controller is controlled to switch the bus working mode, including: correcting the control mode of the hard disk according to the bus working status of the controller; after the control mode is corrected, adjusting the port working mode and bus working mode of the hard disk according to the current load.

[0127] It is understandable that the embodiment of the present application can correct the control mode of the hard disk according to the bus working status of the controller, and after the control mode is corrected, adjust the port working mode and bus working mode of the hard disk according to the current load.

[0128] In some embodiments of the present application, the control mode of the hard disk is corrected according to the bus working status of the controller, including: if the control mode of the hard disk is a multi-control mode, identifying the type of the bus working status, wherein the type of the bus working status includes a normal working state and an abnormal working state; when the bus working state is an abnormal working state and the number of controllers in the normal working state is less than or equal to a preset number, switching the control mode of the hard disk to a single-control mode.

[0129] The preset number may be pre-calibrated, for example, set to 1.

[0130] It can be understood that the types of bus working states in the embodiments of the present application include normal working states and abnormal working states; when the bus working state is an abnormal working state and the number of controllers in the normal working state is less than or equal to the preset number, the control mode of the hard disk is switched to a single control mode to close the abnormal bus channel.

[0131] In some embodiments of the present application, the port working mode and bus working mode of the hard disk are adjusted according to the current load, including: after the control mode is corrected, determining whether the current load is less than or equal to the load threshold; if the current load is less than or equal to the load threshold, maintaining the port working mode and bus working mode unchanged; if the current load is greater than the load threshold, switching the port working mode of the hard disk to the multi-port mode, and switching the bus working mode of the controller to the channel merging mode.

[0132] The load threshold is the critical value of the current hard disk load state. When the load is less than or equal to the load threshold, it indicates that the hard disk is currently in a medium-low load state. Otherwise, it is in a high-load state. The load threshold can be set according to the specific situation. For example, it can be set to 70% or 80%. There is no specific limitation on this.

[0133] It is understandable that in the embodiment of the present application, when the current load is greater than the load threshold, it is necessary to give priority to improving the read and write performance of the hard disk. Therefore, the port mode of the hard disk is switched to the multi-port mode, and the bus mode of the controller is switched to the channel merging mode, thereby releasing the maximum bandwidth under high load conditions. In conjunction with the multi-port mode, the hard disk can read and write at the maximum bandwidth, avoiding performance bottlenecks caused by insufficient bandwidth, improving the hard disk read and write speed, and thus improving the processing efficiency of the hard disk in high load scenarios. When the current load is less than or equal to the load threshold, it indicates that the demand for bandwidth is low at this time, so the current port mode and the current bus mode are maintained.

[0134] The channel merging mode of the embodiment of the present application is to merge multiple independent buses into one group of buses to work together. For example, there are 2 independent buses x2, which are merged into one group of x4 buses to work together. In the channel merging mode, the bandwidth is doubled when they are merged into one group of buses.

[0135] In some embodiments of the present application, after switching the port working mode of the hard disk to the multi-port mode and switching the bus working mode of the controller to the channel merging mode, it includes: judging whether the current load is less than or equal to the load threshold; if the current load is less than or equal to the load threshold, switching the port working mode of the hard disk to the single-port mode, and switching the bus working mode of the controller to the channel splitting mode.

[0136] It can be understood that in the embodiment of the present application, after switching the port working mode of the hard disk to the multi-port mode and switching the bus working mode of the controller to the channel merging mode, if the current load is less than or equal to the load threshold, indicating that the performance requirement of the hard disk is reduced and the bandwidth is sufficient, the port mode of the hard disk is switched to the single-port mode to optimize resource utilization and improve system reliability.

[0137] In some embodiments of the present application, after controlling the switching component to switch the port working mode of the hard disk and controlling the controller to switch the bus working mode, it also includes: obtaining the user's hard disk mode requirements and bus mode requirements; responding to the user's hard disk mode requirements and bus mode requirements, correcting the port working mode of the hard disk according to the hard disk mode requirements, and correcting the bus working mode of the controller according to the bus mode requirements.

[0138] It is understandable that the control unit of the embodiment of the present application can also modify the port mode of the hard disk based on the user's hard disk mode requirements, and modify the bus mode of the controller according to the bus mode requirements to meet the user's personalized needs in different application scenarios.

[0139] Specifically, the port mode of the hard disk and the bus mode of the controller were previously determined based on multiple factors, including the current status of the controller, the working status of the bus between the controller and the first port component, and the current load of the hard disk. The embodiment of the present application further allows the port mode of the hard disk and the bus mode of the controller to be modified based on user needs, giving user needs a higher priority.

[0140] In other words, the essence of the embodiments of the present application is to achieve a dynamic balance between reliability, availability and performance based on the real-time status of the server storage system.

[0141] It should be noted that the feature descriptions in the embodiments corresponding to the hard disk mode control system can refer to the relevant descriptions in the embodiments corresponding to the hard disk mode control method, which will not be repeated here.

[0142] Specifically, the complete execution process of the hard disk mode control method of the embodiment of the present application is as follows: Figure 12 The following describes two controllers (dual controllers) as an example: S1: The control unit obtains the controller in-place status and enters S2.

[0143] S2: Determine whether the dual controllers are in place. If both are in place, proceed to S3; otherwise, proceed to S4. S3: The control unit controls the switching unit to operate in dual-control dual-port mode and enters S5; S4: The control unit controls the switching unit to close the absent / abnormal bus channel and switches the hard disk to dual-port mode, and enters S7; S5: The control unit obtains the working status of the controller bus and enters S6; S6: Determine whether the bus working status is normal, if not, go to S4, if yes, go to S7; S7: The control unit obtains the hard disk load and enters S8; S8: Determine whether the hard disk load is high or medium-low. If it is high, proceed to S9; if it is medium-low, proceed to S10. S9: The control unit controls the switching unit, hard disk, and controller to operate in single-control / dual-control single-port mode; S10: The control unit does not switch and maintains the current read / write mode.

[0144] According to the hard disk mode control method proposed in the embodiment of the present application, the control mode of the hard disk can be switched based on the current in-place status of the controller. After the control mode of the hard disk is switched, the port working mode of the hard disk is switched, and the controller is controlled to switch the bus working mode according to the bus working status of the controller and the current load of the hard disk, thereby realizing dynamic switching of the connection between the controller and the hard disk without manual switching, improving the efficiency of switching the hard disk control mode, hard disk port working mode and bus working mode, and taking the load of the hard disk into consideration during the switching process of the hard disk port working mode and the bus working mode, thereby meeting the read and write performance of the hard disk under different loads, as well as the application requirements under different loads, and to a certain extent, improving the reliability of the server storage system, without the need to design additional hardware, and with low cost.

[0145] Figure 13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include: Memory 1301 , processor 1302 , and computer programs stored in the memory 1301 and executable on the processor 1302 .

[0146] When the processor 1302 executes the program, the hard disk mode control method provided in the above embodiment is implemented.

[0147] Furthermore, the electronic device further includes: The communication interface 1303 is used for communication between the memory 1301 and the processor 1302 .

[0148] The memory 1301 is used to store computer programs that can be run on the processor 1302 .

[0149] The memory 1301 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0150] If the memory 1301, processor 1302, and communication interface 1303 are implemented independently, the communication interface 1303, memory 1301, and processor 1302 can be connected to each other via a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 13Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0151] Optionally, in a specific implementation, if the memory 1301, the processor 1302 and the communication interface 1303 are integrated on a chip, the memory 1301, the processor 1302 and the communication interface 1303 can communicate with each other through an internal interface.

[0152] The processor 1302 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0153] An embodiment of the present application further provides a non-volatile computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned hard disk mode control method embodiments when running.

[0154] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0155] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned hard disk mode control method embodiments are implemented.

[0156] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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.

[0157] The above describes in detail the hard disk mode control system, server, method, device, medium, and product provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core concept of the present application. It should be noted that for ordinary technicians in this technical field, without departing from the principles of the present application, various improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A hard disk mode control system, characterized in that: The hard disk link includes a server motherboard, a control motherboard and a hard disk backplane. The server motherboard is provided with multiple controllers and multiple first port components, and the first port components are connected to the controllers. The hard disk backplane is provided with at least one hard disk and at least one second port component. The hard disk is provided with multiple data ports, and the second port component is connected to the data port of the hard disk. The control motherboard is provided with a hard disk mode control system, and the hard disk mode control system includes a switching component and a control component, wherein, The switching component is connected to the first port component and the second port component respectively, and is used to switch the data link between the controller and the data port of the hard disk, and realize the switching of the control mode and the port working mode of the hard disk by switching the data link; The control component controls the switching component to switch the control mode of the hard disk according to the current status of the controller. After the control mode of the hard disk is switched, the control component controls the switching component to switch the port working mode of the hard disk and controls the controller to switch the bus working mode according to the bus working status of the controller and the current load of the hard disk.

2. The hard disk mode control system according to claim 1, characterized in that: The control component includes at least one control unit and at least one detection unit, the detection unit detects the current status of the controller, and the control unit is respectively connected to the switching component, the detection unit, the hard disk and the controller to control the switching component and the controller.

3. The hard disk mode control system according to claim 2, characterized in that: The control unit is used to determine the number of controllers in place according to the current in-place status, determine the control mode of the hard disk according to the number of controllers in place, and control the switching component to switch the control mode of the hard disk.

4. The hard disk mode control system according to claim 3, characterized in that: The control unit is used to correct the control mode of the hard disk according to the bus working state of the controller after the control mode of the hard disk is switched, and after the control mode is corrected, adjust the port working mode and the bus working mode of the hard disk according to the current load.

5. The hard disk mode control system according to claim 1, characterized in that: The switching component is internally provided with a plurality of link channels, and the connection or disconnection of the plurality of link channels is used to switch the number of controllers to which the hard disk is connected and the position of the port to which the hard disk is connected.

6. The hard disk mode control system according to claim 5, characterized in that: The switching component includes multiple switching units, wherein the switching unit includes multiple uplink ports and multiple downlink ports. The uplink ports and downlink ports of the switching units constitute the link channel. The uplink port of the switching unit is connected to the downlink port of the first port component, and the downlink port of the switching unit is connected to the uplink port of the second port component.

7. The hard disk mode control system according to claim 6, characterized in that: The switching unit connects at least one first port assembly and at least one second port assembly, wherein the first port assembly is connected to at least one switching unit, and the second port assembly is connected to at least one switching unit.

8. The hard disk mode control system according to claim 6, characterized in that: The second port assembly includes a plurality of upstream ports and a plurality of downstream ports. The downstream ports of the second port assembly are connected to the data interface of the hard disk. The second port assembly allows the connection of multiple hard disks.

9. A server, characterized in that: include: A server mainboard, a control mainboard and a hard disk backplane, wherein the server mainboard, the control mainboard and the hard disk backplane constitute a hard disk link, wherein the server mainboard is provided with multiple controllers and multiple first port components, the hard disk backplane is provided with at least one hard disk and at least one second port component, and the control mainboard is provided with the hard disk mode control system described in any one of claims 1-8.

10. A hard disk mode control method, characterized in that: The method is applied to the control component of the hard disk mode control system according to any one of claims 1 to 8, wherein the control component is configured to perform the following steps: Obtaining the current status of the controller, the bus operating mode, and the current load of the hard disk; Controlling the switching component to switch the control mode of the hard disk according to the current in-place state; After the control mode of the hard disk is switched, the switching component is controlled to switch the port working mode of the hard disk and the controller is controlled to switch the bus working mode according to the bus working state of the controller and the current load of the hard disk.

11. The hard disk mode control method according to claim 10, wherein: The step of controlling the switching component to switch the control mode of the hard disk according to the current in-place state includes: Determine the number of controllers in place according to the current in-place status; The control mode of the hard disk is determined according to the number of controllers in place, and the switching component is controlled to switch the control mode of the hard disk.

12. The hard disk mode control method according to claim 11, wherein: The determining the control mode of the hard disk according to the number of controllers in place includes: Determining whether the number of controllers in place is greater than a preset number; If the number of in-place units is greater than the preset number, determining that the control mode is a multi-control mode; If the number of in-place units is less than or equal to the preset number, it is determined that the control mode is a single control mode.

13. The hard disk mode control method according to claim 10, wherein: The step of controlling the switching component to switch the port operating mode of the hard disk and controlling the controller to switch the bus operating mode according to the bus operating mode of the controller and the current load of the hard disk comprises: Modifying the control mode of the hard disk according to the bus operating state of the controller; After the control mode is modified, the port operating mode and the bus operating mode of the hard disk are adjusted according to the current load.

14. The hard disk mode control method according to claim 13, wherein: The step of modifying the control mode of the hard disk according to the bus operating state of the controller includes: If the control mode of the hard disk is a multi-control mode, identifying the type of the bus working state, wherein the type of the bus working state includes a normal working state and an abnormal working state; When the bus working state is the abnormal working state and the number of controllers in the normal working state is less than or equal to a preset number, the control mode of the hard disk is switched to a single-control mode.

15. The hard disk mode control method according to claim 14, wherein: The adjusting the port operating mode and the bus operating mode of the hard disk according to the current load includes: After the control mode is modified, determining whether the current load is less than or equal to a load threshold; If the current load is less than or equal to the load threshold, the port working mode and the bus working mode are maintained unchanged; if the current load is greater than the load threshold, the port working mode of the hard disk is switched to the multi-port mode, and the bus working mode of the controller is switched to the channel merging mode.

16. The hard disk mode control method according to claim 15, wherein: After the port operation mode of the hard disk is switched to the multi-port mode and the bus operation mode of the controller is switched to the channel merging mode, the method includes: Determine whether the current load is less than or equal to a load threshold; if so, switch the port operating mode of the hard disk to a single-port mode, and switch the bus operating mode of the controller to a channel split mode.

17. The hard disk mode control method according to claim 10, wherein: After controlling the switching component to switch the port working mode of the hard disk and controlling the controller to switch the bus working mode, the method further includes: Obtain the user's hard disk mode and bus mode requirements; In response to the user's hard disk mode requirement and bus mode requirement, the port working mode of the hard disk is modified according to the hard disk mode requirement, and the bus working mode of the controller is modified according to the bus mode requirement.

18. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the hard disk mode control method according to any one of claims 10 to 17 when executing the computer program.

19. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the hard disk mode control method according to any one of claims 10 to 17.

20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the hard disk mode control method according to any one of claims 10 to 17 are implemented.

Citation Information

Patent Citations

  • Method, system and related device for confirming master-slave relationship among multiple controllers

    CN112486740A

  • A circuit and method for realizing PCIE resource automatic allocation and a storage medium

    CN113688084A

  • Data redundancy backup device and method, vehicle-mounted equipment and storage medium

    CN117234803A

  • Double-channel CPU control method, system and device and storage medium

    CN117389944A

  • Controller communication system, method, computer product, device and storage medium

    CN120353749A