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

By introducing switching and control components into the hard disk link, automatic switching of hard disk control modes is achieved, solving the problems of low switching efficiency and high cost in the existing technology, and improving the reliability and performance of the server storage system.

CN120743201BActive Publication Date: 2025-11-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in switching hard drive control modes and high hardware design costs, making it impossible to achieve automatic switching or dynamic switching based on load and reliability requirements.

Method used

By introducing a switching component and a control component into the hard disk link, the switching component is used to switch the data link between the controller and the hard disk data port, and the control component controls the switching component to switch the hard disk control mode and port working mode according to the controller's presence status and bus working status, thereby realizing automatic switching of hard disk control mode.

Benefits of technology

It enables efficient and dynamic switching between hard disk control mode, port working mode and bus working mode, meets the performance requirements under different loads, improves the reliability of server storage system and reduces hardware design costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743201B_ABST
    Figure CN120743201B_ABST
Patent Text Reader

Abstract

The application 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. A switching component switches a data link between a controller and a data port of a hard disk, and the switching of the data link is used for realizing the switching of a control mode of the hard disk and a port working mode. A control component controls the switching of the control mode of the hard disk according to a current in-place state, controls the switching of the port working mode and the bus working mode of the hard disk according to a bus working state of the controller and a current load of the hard disk, realizes the dynamic switching of the connection between the controller and the hard disk, does not need manual switching, improves the efficiency of mode switching, considers the load of the hard disk in the mode switching process, satisfies the read-write performance of the hard disk under different loads and the application demand under different loads, can improve the reliability of a server storage system, does not need to design additional hardware, and is low in cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This 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 Technology

[0002] As data centers transition to software-defined architectures, storage hardware systems face core challenges in dynamically scaling bandwidth and managing controller collaboration. In dual-controller storage scenarios, the links between dual-port hard drives need to dynamically switch between single-controller and dual-controller modes to meet performance and reliability requirements under different loads.

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

[0004] This application provides a hard disk mode control system, server, method, device, medium, and product to at least solve the problems in related technologies that cannot achieve automatic switching of hard disk control modes, have low switching efficiency, and have high hardware design costs.

[0005] This application provides a hard disk mode control system. The hard disk link includes a server motherboard, a control motherboard, and a hard disk backplane. The server motherboard has multiple controllers and multiple first port components, which are connected to the controllers. The hard disk backplane has at least one hard disk and at least one second port component. The hard disk has multiple data ports, and the second port component is connected to the hard disk's data ports. The control motherboard has a hard disk mode control system, which includes a switching component and a control component.

[0006] 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 hard disk data port. The switching of the data link realizes the switching of the hard disk control mode and the port working mode.

[0007] The control component controls the switching component to switch the hard drive's control mode based on the controller's current on-state. After the hard drive's control mode is switched, the control component controls the switching component to switch the hard drive's port operating mode and controls the controller to switch the bus operating mode based on the controller's bus operating state and the hard drive's current load.

[0008] This application also provides a server, including:

[0009] The server motherboard, control motherboard, and hard disk backplane form a hard disk link. The server motherboard is equipped with multiple controllers and multiple first port components. The hard disk backplane is equipped with at least one hard disk and at least one second port component. The control motherboard is equipped with the hard disk mode control system described in the above embodiment.

[0010] This 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. The control component is configured to perform the following steps: obtain the current presence status of the controller, the bus operating mode, and the current load of the hard disk; control the switching component to switch the control mode of the hard disk according to the current presence status; after the control mode of the hard disk is switched, control the switching component to switch the port operating mode of the hard disk and control the controller to switch the bus operating mode according to the bus operating status of the controller and the current load of the hard disk.

[0011] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described hard disk mode control methods when executing the computer program.

[0012] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described hard disk mode control methods.

[0013] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described hard disk mode control methods.

[0014] This application addresses the issue that related technologies require manual switching between single-controller and multi-controller modes for hard drives, resulting in low switching efficiency and high hardware design costs. Therefore, this application constructs a hard drive mode control system. A switching component is connected to a first port component and a second port component, respectively, to switch the data link between the controller and the hard drive's data port. This data link switching enables the switching of the hard drive's control mode and port operating mode. The control component, based on its current position, controls the switching component to switch the hard drive's control mode. After the hard drive's control mode is switched, based on the controller's bus operating state and the hard drive's current load, the control component switches the hard drive's port operating mode and the controller switches the overall operating mode. The line-operated mode enables dynamic switching between the controller and the hard drive without manual switching. This improves the efficiency of switching between hard drive control mode, hard drive port operating mode, and bus operating mode. Furthermore, the switching process between hard drive port and bus operating modes takes into account the hard drive load, thus meeting the read / write performance and application requirements under different loads. It also improves the reliability of the server storage system to a certain extent. Moreover, it eliminates the need for additional hardware design, resulting in lower costs. This solution addresses the technical problems of inability to achieve automatic switching of hard drive control modes and low switching efficiency in related technologies, achieving the technical effects of automatic hard drive control mode switching, improved switching efficiency, and reduced costs. Attached Figure Description

[0015] 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.

[0016] Figure 1 This is a schematic diagram of a dual-control topology in a dual-port mode in related technologies;

[0017] Figure 2 This is a schematic diagram of a dual-control topology in a single-port mode in related technologies;

[0018] Figure 3 This is a schematic diagram of a hard disk mode control system proposed according to an embodiment of this application;

[0019] Figure 4 This is a schematic diagram of the hard disk link topology of the hard disk mode control system proposed according to an embodiment of this application;

[0020] Figure 5 This is a dual-controller read / write topology diagram under low load proposed according to an embodiment of this application;

[0021] Figure 6This is a dual-controller read / write topology diagram under high load proposed according to embodiments of this application;

[0022] Figure 7 This is a schematic diagram of the switching unit proposed according to an embodiment of this application;

[0023] Figure 8 This is a single-controller read / write topology diagram under low load proposed according to embodiments of this application;

[0024] Figure 9 This is a single-controller read / write topology diagram under high load proposed according to the embodiments of this application;

[0025] Figure 10 This is a schematic diagram of the server structure according to an embodiment of this application;

[0026] Figure 11 This is a flowchart of the hard disk mode control method proposed according to an embodiment of this application;

[0027] Figure 12 Here is a complete flowchart of the hard disk mode control method proposed according to the embodiments of this application;

[0028] Figure 13 This is a schematic diagram of the structure of an electronic device proposed according to an embodiment of this application. Detailed Implementation

[0029] 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.

[0030] 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., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0031] Before describing the solution of this application, let's first introduce some solutions for switching hard disk control modes in related technologies to better assist in understanding some related content of the solution of this application.

[0032] In the current server field, the following three methods are commonly used for dual-controller storage link switching designs.

[0033] 1. Fixed backplane solution: This solution requires the link switching part to be designed as a board. By designing single-controller and dual-controller backplanes that meet the requirements, the switching of single-controller and dual-controller hard drive links can be supported.

[0034] 2. Cable switching solution: This solution uses different cable connections to achieve link switching, in order to meet the different topology requirements of single-control and dual-control systems.

[0035] 3. PCIe switching chip solution: By mapping the fixed ports of the PCIe switching chip through different configuration schemes, the switching of hard drive links between single-controller and dual-controller systems can be realized.

[0036] However, the above switching method has the following problems.

[0037] 1. Dynamic switching is not possible.

[0038] 1. For fixed backplane solutions, single-controller (hereinafter referred to as single-controller) and dual-controller (hereinafter referred to as dual-controller) systems require separate independent backplane hardware designs. Mode switching cannot be achieved through the same design. This solution requires manual board replacement and does not support dynamic switching.

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

[0040] 3. For PCIe switching chip solutions, corresponding firmware needs to be configured for the PCIe switching chip to support single-controller mode or dual-controller mode. Single-controller mode and dual-controller mode correspond to different PCIe switching chip firmware. This burning action needs to be performed in a stopped state and cannot be automatically switched.

[0041] The specific methods for switching based on PCIe switching chips include:

[0042] like Figure 1 As shown, in dual-port mode, the two controllers are connected to ports 1 and 2 of the hard drive via their respective links 1. At this time, the two controllers can perform read and write control on the hard drive.

[0043] like Figure 2 As shown, in single-port mode, a single controller is required to control the read and write operations of the hard drive. Links 1 and 2 of controller 1 are connected to ports 1 and 2 of the hard drive, respectively.

[0044] In addition, it should be noted that the two topology examples above involve different link topologies. For PCIe switching chips, different link topologies correspond to different PCIe switching chip firmware configurations, and when a PCIe switching chip switches to different link topologies, it needs to be shut down and the corresponding firmware configuration needs to be flashed.

[0045] Second, it wastes resources and incurs high costs.

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

[0047] 2. For PCIe switching chip solutions, the more ports a PCIe switching chip supports, the higher its cost. Figure 1 and Figure 2 As shown, regardless of whether it is in single-control or dual-control mode, 50% of the port resources of each PCIe switching chip will be idle, which will further waste resources.

[0048] Third, it is impossible to specify a switching strategy based on the current business load and reliability requirements.

[0049] When the hard drive read / write load is high in dual-port mode, it can be dynamically switched to single-port mode. In this mode, the hard drive read / write performance can be guaranteed to be optimal. After the high load read / write is completed, it can be switched back to dual-port mode to achieve high reliability.

[0050] Based on the above technical problems, this application provides a hard disk mode control system that enables dynamic switching between single-control and dual-control modes of the link of a dual-port hard disk, which is low in cost and can meet the performance and application requirements under different loads.

[0051] 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.

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

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

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

[0055] 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 hard disk data port. The switching of the data link realizes the switching of the hard disk control mode and the port working mode. The control component 12 controls the switching component 11 to switch the hard disk control mode according to the current on-state of the controller. After the hard disk control mode is switched, the control component 12 controls the switching component 11 to switch the hard disk port working mode and controls 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.

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

[0057] In this embodiment of the application, the controller's in-situ state is when the controller has established normal communication with the server motherboard, system software, etc., and is successfully identified and marked as available by the server. Conversely, the controller also includes an out-of-situ state, which is when 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 normal working state and abnormal working state.

[0058] It is understood that the embodiments of this application construct a hard disk mode control system 10, including a switching component 11 and a control component 12. The switching component 11 is connected to a first port component and a second port component respectively, and is used to switch the data link between the controller and the data port of the hard disk. The switching of the data link realizes the switching of the control mode and port working mode of the hard disk. The control component 12 controls the switching component to switch the control mode of the hard disk according to the current on-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 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. This realizes the dynamic switching of the connection between the controller and the hard disk without manual switching, which improves the efficiency of switching the hard disk control mode, hard disk port working mode and bus working mode. Moreover, the load of the hard disk is taken into account during the switching 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. It can also improve the reliability of the server storage system to a certain extent, and no additional hardware needs to be designed, resulting in low cost.

[0059] The hard drive control modes in this application embodiment include single-controller mode and multi-controller mode. The bus modes include two types: x2x2 (channel splitting mode) and x4 (channel merging mode). The hard drive port modes include multi-port mode and single-port mode. In summary, the hard drive control modes and port modes include multi-controller multi-port mode, multi-controller single-port mode, single-controller single-port mode, and single-controller multi-port mode.

[0060] In the multi-controller multi-port mode, multiple controllers are connected to multiple independent data ports of the hard drive. The hard drive is in multi-port mode. For example, the hard drive has two read / 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.

[0061] The multi-controller single-port mode is a single merged data port of a hard drive that is controlled collaboratively by multiple controllers. The hard drive works in single-port mode. For example, if the hard drive has two read / write ports (port 1 and port 2), they are merged into one port, and the bandwidth is superimposed. There are two controllers, controller 1 and controller 2, which are both connected to the merged port.

[0062] In single-controller single-port mode, a single controller controls a single merged port of the hard drive. The hard drive operates in single-port mode. For example, the two read and write ports of the hard drive are merged into one port, which is controlled by only one in-situ controller through the merged bus. There are two controllers, controller 1 and controller 2, both connected to the merged port.

[0063] In single-controller multi-port mode, a single controller is connected to multiple independent ports of the hard drive. The hard drive operates in multi-port mode. For example, the two read / write ports of the hard drive (port 1 and port 2) work as independent ports, but they are all controlled by the same controller. There is one controller, and controllers 1 and 2 are both connected to port 1 and port 2.

[0064] Furthermore, in some embodiments of this application, the control component 12 includes at least one control unit and at least one detection unit. The detection unit detects the current in-situ state of the controller, and the control unit is connected to the switching component, the detection unit, the hard disk, and the controller respectively, and controls the switching component and the controller.

[0065] It is understood that the control component 12 in this application embodiment includes at least one control unit and at least one detection unit. The detection unit is used to detect the current presence state of the controller. The control unit is connected to the switching component 11, the detection unit, the hard disk and the controller respectively, and controls the switching component 11 and the controller. The switching component 11 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 of the hard disk and the working mode of the port through the switching of the data link.

[0066] The control unit in this embodiment is the control center of the entire hard disk mode control system 10. It is connected to the detection unit, hard disk, and controller. It can obtain the controller's presence information and bus working status information through the detection unit, and read the hard disk's load status information through the hard disk. Based on the obtained controller presence information, bus working status information, and hard disk load status information, it controls the switching component 11 to switch different link channel topologies, and controls the hard disk's control mode to single-control mode or multi-control mode, and switches the control port working mode to multi-port mode or single-port mode. At the same time, it sends commands to the controller to switch the controller's bus mode to independent working mode (x2x2) or merged collaborative working mode (x4), thereby meeting the application requirements under different configurations and different loads.

[0067] Furthermore, it should be noted that the controller in this embodiment is a computing module that includes a CPU (Central Processing Unit) and memory; each upstream port provides up to 32 bus interfaces, and the connection method between the first upstream port and the second upstream port and the corresponding controller can be cable or direct connection to the PCB.

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

[0069] It is understood that the control unit in this application embodiment can determine the number of in-situ controllers based on the current in-situ status, and determine the control mode of the hard disk based on the number of in-situ controllers, and control the switching component 11 to switch the control mode of the hard disk.

[0070] The status of being in place can be represented by 0 or 1, where 0 indicates that the controller is not in place and 1 indicates that the controller is in place.

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

[0072] Furthermore, in some embodiments of this application, the control unit is used to correct the control mode of the hard disk according to the bus operating state of the controller after the control mode of the hard disk is switched, and after the control mode is corrected, to adjust the port operating mode and bus operating mode of the hard disk according to the current load.

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

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

[0075] For example, the system is initially in dual-controller mode (both controller 1 and controller 2 are in place and working normally), hard disk 1 is working in "dual-port mode" (port 1 is connected to controller 2, and port 2 is connected to controller 1), and the controller bus is 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 works).

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

[0077] The system detects that controller 2 is offline. The control unit sends a command to the switching component to close the link between controller 2 and the hard drive (out1=off), leaving only the connection between controller 1 and hard drive 1 at port 2 (out2 = bus 1 of controller 1). At this time, hard drive 1 still uses the configuration of dual-controller mode.

[0078] The control unit detected through the detection unit that the load on bus 1 of controller 1 increased after the switch (it needs to handle all read and write operations of hard disk 1 alone).

[0079] 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-control scenario, and avoiding signal mismatch or data errors caused by changes in bus status.

[0080] Furthermore, in some embodiments of this application, the switching component 11 is 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 location of the hard disk connection.

[0081] The link channel is the physical signal transmission path connecting the hard drive and the controller. It is a set 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 drive and the controller. Its core function is to dynamically adjust the connection relationship between the hard drive and the controller and the port through the connection / disconnection operation.

[0082] It is understood that the switching component 11 in this embodiment of the application is internally configured 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 connection.

[0083] Furthermore, in some embodiments of this application, the switching component includes multiple switching units, wherein each switching unit includes multiple uplink ports and multiple downlink ports, the uplink ports and downlink ports of the switching unit form a 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.

[0084] The switching unit can be a 2to2 high-speed switching unit.

[0085] It is understood that the switching component 11 in this application embodiment includes multiple switching units, each of which includes multiple uplink ports and downlink ports. The uplink ports and downlink ports of the switching units form a 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.

[0086] Specifically, such as Figure 5 As shown, Figure 5 For low-load reading and writing of the topology diagram by dual controllers, Figure 5 It includes two switching units, switching unit 1 and switching unit 2. 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.

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

[0088] It is understood that the switching unit in the embodiments of this application is connected to 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.

[0089] Specifically, such as Figure 4 As shown, Figure 4 The switching unit in the middle (i.e. Figure 4 The switching unit module in the middle is connected to the first port component (i.e. Figure 4 The first upstream port and the second upstream port of the control) and the second port component (i.e. Figure 4 (Upstream port of the hard drive backplane).

[0090] like Figure 6 As shown, Figure 6 For high load, the dual controller read / write topology is configured such that the uplink port 1 of switching unit 1 is connected to the downlink port of the first upstream controller, the uplink port 2 of switching unit 1 is connected to the downlink port of the second upstream controller, the uplink port 2 of switching unit 2 is connected to the downlink port of the first upstream controller, and the uplink port 1 of switching unit 2 is connected to the downlink port of the second upstream controller.

[0091] like Figure 6 As shown, the downlink port of the first upstream control port is connected to the uplink port 1 of the switching unit 1, and the downlink port of the first upstream control port is connected to the uplink port 2 of the switching unit 2; the downlink port of the second upstream control port is connected to the uplink port 2 of the switching unit 1, and the downlink port of the second upstream control port is connected to the uplink port 1 of the switching unit 2.

[0092] Furthermore, in some embodiments of this application, the second port component includes multiple uplink ports and multiple downlink ports, the downlink ports of the second port component are connected to the data interface of the hard disk, and the second port component allows multiple hard disks to be connected.

[0093] It is understood that the second port component in this application embodiment includes multiple uplink ports and multiple downlink ports. The downlink ports of the second port component are connected to the data interface of the hard disk, and the second port component allows multiple hard disks to be connected.

[0094] Specifically, such as Figure 4 As shown, the second port component (i.e. Figure 4 The upstream port of the hard drive backplane 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 drive. The second port component is connected to multiple hard drives.

[0095] Furthermore, in some embodiments of this application, the switching unit includes multiple uplink ports and multiple downlink ports. A timing alignment buffer is provided between the uplink ports and the downlink ports. After the switching unit completes its operation, the timing alignment buffer outputs the port signals after a fixed number of cycles, so that each output signal is aligned with the clock signal. The uplink ports and downlink ports are provided with physical switches and controllers. The controller switches the opening and closing of the link channels between the multiple uplink ports and the multiple downlink ports according to the switching signal and the channel switching status signal. The enable signal of the multiple downlink ports controls the opening and closing of the downlink ports. The channel switching status signal is used to indicate whether the channel switching operation is completed.

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

[0097] Since the change in the state of the internal switching circuit of the switching unit in response to the switching signal will cause a physical switch in the signal transmission path, although the switching process may be brief, it may lead to signal instability and delay differences between different channels. Therefore, a timing alignment buffer is provided between the uplink port and the downlink port of the switching unit in this embodiment. The timing alignment buffer outputs the port signal after the switching unit completes the action by delaying it by a fixed number of cycles, so that each output signal is aligned with the clock signal. The uplink port and the downlink port are provided with physical switches and controllers. The controller switches the opening and closing of the link channels between multiple uplink ports and multiple downlink ports according to the switching signal and the channel switching status signal. The enable signal of multiple downlink ports controls the opening and closing of the downlink ports. The channel switching status signal is used to indicate whether the channel switching action is completed.

[0098] Specifically, such as Figure 7 As shown, Figure 7 The schematic diagram shows the switching unit. The uplink ports In1 and In2 are connected to the controller, while the downlink ports out1 and out2 are connected to the hard drive. A timing alignment buffer is provided between the uplink port In and the downlink port out. After the switching unit completes its operation, the buffer delays the port signals for a fixed number of cycles before outputting, aligning each output signal with the clock. The switching unit inputs a 200MHz clock, which provides a reference alignment to the high-speed unit. Simultaneously, there are switching signals Sel1, switching completion signals Sel_done, and enable signals OE1 and OE2 connected to the control unit. The control unit can use these signals to switch channels, turning them off / on.

[0099] The control logic for the Sel1 switching signal 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 open; when the enable signal is 0, the corresponding out channel is closed. Sel_done is used to indicate that the channel switching action is complete. When the signal is 1, it indicates that the channel switching action is complete; when the signal is 0, it indicates that the channel switching action is not complete.

[0100] Table 1

[0101]

[0102] The following specific embodiment describes the hard disk link and hard disk mode control system of this application.

[0103] Specific hard drive link switchable backplane topology such as Figure 4 As shown, taking two controllers as an example (controller 1 and controller 2), it includes controller 1, controller 2, first upstream control port, second upstream control port, switching unit module, control unit, hard disk backplane upstream port, control signal port, power supply port, and multiple hard disks.

[0104] The switchable backplane for the hard drive link includes a first upstream port and a second upstream port. The uplink port of the first upstream port is connected to the first controller, and the downlink port is connected to the switching unit module. The uplink port of the second upstream port is connected to the second controller, and the downlink port is connected to the switching unit module. Each upstream port provides a maximum of 32 bus interfaces, and the two controllers provide a total of 64 bus interfaces. The connection to the controller can be either cable or direct PCB connection.

[0105] The uplink port of the switching 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 switching unit module consists of several of the above-mentioned switching units, with a total of 32 switching units.

[0106] The switchable hard drive link backplane also includes a control signal port, which connects to the control unit and two controllers to transmit controller presence signals, controller bus status signals, and controller bifurcation bus switching signals.

[0107] The upstream port on the hard drive backplane connects to the switching unit module and the hard drive. This port is used to transmit hard drive load status information and signals for switching between single-port and dual-port operating modes. The connection between this port and the hard drive can be via cable or direct PCB connection, and it can be expanded to support up to 16 hard drives.

[0108] The switchable backplane for hard drive links also includes a control unit, a control signal port, a switching unit module, and upstream ports connected to the hard drive backplane. The control unit obtains the controller's presence status and the controller bus's operating status through the control signal port, and performs Bifurcation bus switching (x2x2 or x4) on the controller according to the strategy. It also performs channel switching operations on the switching unit module through the switching unit connection according to the strategy, and obtains the hard drive's load status and switches between single-port and dual-port operating modes on the hard drive through the upstream ports of the hard drive backplane.

[0109] The power supply ports supply power to the backplane switching unit module, control unit, and hard drive.

[0110] Based on the above description of the topology of the switchable hard drive link backplane, we will now describe the structure of the hard drive mode control system, taking two hard drives as an example.

[0111] 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.

[0112] Each controller's upstream port connects to one 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 sets of x2x2 buses, which can operate independently or be combined into a single x4 bus for collaborative operation. When combined, the bandwidth doubles. The controller is a computing module containing a CPU and memory. This module outputs a PCIe bus. Upon power-up, the controller initially reads the two bus operating modes (x2x2 and x4) from the BIOS and switches the bus configuration to x2x2 or x4 mode via a switching signal initiated by the control unit.

[0113] The controller status detection unit (equivalent to the detection unit mentioned above) is used to detect the controller's presence status and the bus operation status with the controller's 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 present. Simultaneously, the detection unit detects the operation status of the controller's upstream port bus. If there are no errors in the bus operation status, it determines that the bus is operating normally; otherwise, it determines that the bus is malfunctioning.

[0114] A hard drive can have two read / write ports and can switch between dual-port and single-port working modes. In single-port mode, the two ports are combined into one port, and the bandwidth is calculated by combining them. It can be controlled by the bus of the upstream port of one controller. In dual-port mode, the two ports work as two independent ports and can be controlled by two controllers.

[0115] The control unit serves as the central control hub of the entire system. It connects to the controller status detection unit, hard drive, and controller. The controller status detection unit can acquire the controller's presence and bus operating status information, while the hard drive's load status information can be read. Based on the acquired controller presence, bus operating status, and hard drive load status information, and according to different dynamic switching strategies pre-stored in the control unit, the switching unit controls the switching unit to switch between different link topologies and controls the hard drive to switch to single-port or dual-port operating mode. Simultaneously, commands are sent to the controller to enable the controller's two bus sets to operate independently (x2x2) or in a combined, coordinated manner (x4), meeting the application requirements under different configurations and loads.

[0116] The switching unit is a 2-to-2 high-speed switching unit, where 1 and 2 are inputs, connected to the upstream ports of the two controllers respectively, and 3 and 4 are outputs, connected to the read / write ports of the two hard drives respectively. Control commands can be sent to the switching unit from the control unit, resulting in outputs 3=1, 4=2 or 3=2, 4=1. Channels can also be shut down.

[0117] Based on the above description of the hard disk mode control system, the following section explains in detail how to switch between the hard disk port mode and the controller bus mode.

[0118] 1. After the server's storage system (hereinafter referred to as the system) is powered on, the controller status detection unit obtains the controller's presence information. After the control unit obtains the controller's presence status, it sends a control command to the switching unit to perform link switching based on the controller's presence status; at the same time, it sends a command to the hard drive to switch the hard drive to a single-port or dual-port working mode. The control unit sends instructions to controller 1 and controller 2 to set the two sets of buses of controller 1 and controller 2 to independent working mode (x2x2) or cooperative working mode (x4).

[0119] For example, such as 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 position, during the initial power-on phase, the control unit sends a control command to make the outputs 3=2 and 4=1 of switching unit 1, and sends a control command to make the outputs 3=1 and 4=2 of switching unit 2. At this time, bus 1 of controller 1 is connected to read / write port 2 of hard disk 1, 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.

[0120] The control unit sends commands to the hard drives to switch Hard Drive 1 and Hard Drive 2 to dual-port operating mode. During the initial power-on phase, the controller pre-reads the two bus operating modes, x2x2 and x4. The control unit sends instructions to Controller 1 and Controller 2, which then set the bus to x2x2 mode. The two controllers can independently control the read and write operations of Hard Drive 1 and 2, with the operating bandwidth calculated based on the bandwidth of one read / write port of each hard drive.

[0121] 2. After the system is powered on, the controller status detection unit monitors the working status of all controller buses in real time. If there are no errors in the bus working status, it is determined that the controller bus is working normally; otherwise, it is determined that the bus is malfunctioning.

[0122] 3. Based on the operating status of the controller bus, the control switching unit will shut down the abnormal bus channel.

[0123] For example, such as Figure 8 As shown, when the controller status detection unit obtains the bus abnormality information of controller 2, the control unit sends a control command to make the outputs 3=off and 4=1 of switching unit 1, and sends a control command to make the outputs 3=off and 4=2 of switching unit 2. At this time, bus 1 of controller 1 and read / write port 2 of hard disk 1 are connected, and bus 2 of controller 1 and read / write port 2 of hard disk 2 are connected; at the same time, the hard disk maintains the dual-port working mode. The bus setting of controller 1 remains in x2x2 mode.

[0124] 4. After the system is powered on, the control unit monitors the hard drive load status in real time. If the hard drive load is greater than 70%, it is determined to be a high load; otherwise, it is determined to be a medium or low load. The load determination threshold can be preset in the control unit. Based on the load, the switching unit is controlled to switch buses to improve read and write performance.

[0125] For example, such as Figure 6As shown, in dual-controller dual-port mode, when the control unit obtains the hard drive's load status information and determines it to be under high load, the control unit sends a control command to make the outputs 3=2 and 4=1 of switching unit 1, and sends a control command to make the outputs 3=2 and 4=1 of switching unit 2. At this time, 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 controls hard drive 1 and hard drive 2 to switch to single-port working mode. The bus of controller 1 can independently control read / write operations on hard drive 1, and the bus of controller 2 can independently control read / write operations on hard drive 2. The controller will pre-read the two bus working modes x2 and x4, and the control unit sends instructions to controller 1 and controller 2, and controller 1 and controller 2 set the bus to x4 mode. After this link is retrained, full bandwidth read / write can be achieved, at which point the read / write bandwidth of a single hard drive reaches its maximum, thereby improving read / write performance.

[0126] like Figure 5 As shown, when the read and write operations are completed, the control unit obtains the load status information of the hard drive and determines that it is under medium to low load. The control unit then sends control commands to the switching unit, the controller, and the hard drive to switch the control topology back to the dual-controller dual-port mode, ensuring the reliability of the system's dual-controller read and write operations.

[0127] like Figure 9 As shown, in single-controller dual-port mode, when the control unit obtains the load status information of hard disk 1 and determines it to be under high load, the control unit sends a control command to make the outputs 3=off and 4=1 of switching unit 1, and sends a control command to make the outputs 3=2 and 4=off of switching unit 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 1 of hard disk 1. Simultaneously, the control unit controls hard disk 1 to switch to single-port working mode. The controller will pre-read the two bus working modes x2 and x4, and the control unit sends a command to controller 1, which sets the bus to x4 mode. After this link is retrained, hard disk 1 can achieve full bandwidth read / write. At this time, the read / write bandwidth of a single hard disk reaches its maximum, thereby improving read / write performance.

[0128] If the control unit obtains the load information of hard disk 2 and determines that it is under high load, it will switch the link to hard disk 2 to achieve full bandwidth read and write.

[0129] The hard disk mode control system proposed in this application includes a switching component and a control component. The switching component is connected to a first port component and a second port component, respectively, and is used to switch the data link between the controller and the hard disk's data port. By switching the data link, the control mode and port working mode of the hard disk are switched. The control component controls the switching component to switch the hard disk's control mode according to the current on-state. After the hard disk's control mode is switched, the control component controls the switching component to switch the hard disk's port working mode and controls the controller to switch the bus working mode according to the controller's bus working state and the hard disk's current load. This realizes dynamic switching of the connection between the controller and the hard disk without manual switching, improving the efficiency of switching the hard disk's control mode, hard disk port working mode, and bus working mode. Furthermore, the hard disk's load is taken into account during the switching process of the hard disk's port working mode and bus working mode, thereby meeting the hard disk's read and write performance under different loads and the application requirements under different loads. It can also improve the reliability of the server storage system to a certain extent, and it does not require the design of additional hardware, resulting in lower costs.

[0130] 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.

[0131] Embodiments of this application also provide a server.

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

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

[0134] The first port component in this embodiment can be... Figure 4 The first upstream port and the second upstream port of the control system, the second port component can be Figure 4 The upstream port of the hard drive backplane.

[0135] It is understood that the server 20 in this embodiment includes a server motherboard 21, a control motherboard 22, and a hard disk backplane 23. By setting multiple controllers and multiple first port components on the server motherboard 21, setting at least one hard disk and at least one port component on the hard disk backplane 23, and setting the aforementioned hard disk mode control system 10 on the control motherboard 22, automatic switching between the port mode of the hard disk and the bus mode of the controller can be realized for the server's storage system among multiple controllers.

[0136] Embodiments of this application also provide a hard disk mode control method.

[0137] like Figure 11 As shown, this hard disk mode control method is applied to the control component of the hard disk mode control system in the above embodiment. The control component is configured to perform the following steps:

[0138] In step S101, the current in-situ status of the controller, the bus operating mode, and the current load of the hard disk are obtained.

[0139] The current in-situ status of the controller can be detected based on the status detection unit.

[0140] It is understood that the embodiments of this application can obtain the current in-situ state of the controller, the bus operating state between the controller and the first port component, and the current load of the hard disk, so as to subsequently determine the port mode of the hard disk and the bus mode of the controller.

[0141] In step S102, the control mode of the hard disk is switched by the control switching component according to the current in-situ status.

[0142] In some embodiments of this application, controlling the switching component to switch the control mode of the hard disk according to the current in-situ state includes: determining the number of controllers in place according to the current in-situ 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.

[0143] It is understood that, in this embodiment of the application, the number of in-situ controllers is determined based on the current in-situ status, and the control mode of the hard disk is determined based on the number of in-situ controllers, and the control switching component is used to switch the control mode of the hard disk.

[0144] For example, there are two in-place controllers, and the hard drive can be controlled in a dual-control mode (i.e., a multi-control mode).

[0145] In some embodiments of this application, determining the control mode of the hard disk based on 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 controllers in place is greater than the preset number, then determining the control mode as a multi-controller mode; if the number of controllers in place is less than or equal to the preset number, then determining the control mode as a single-controller mode.

[0146] The preset quantity can be pre-defined, for example, as 1.

[0147] It is understood that in this embodiment of the application, if the number of controllers in place is more than a 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.

[0148] 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.

[0149] It is understood that, in this embodiment of the application, after the hard drive control mode is switched, the switching component is controlled to switch the hard drive 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 drive. This achieves dynamic switching of the connection between the controller and the hard drive without manual switching, which improves the efficiency of hard drive control mode switching. Furthermore, the hard drive load is taken into account during the switching process between the hard drive port working mode and the bus working mode, so as to meet the read and write performance of the hard drive under different loads and the application requirements under different loads. This can also improve the reliability of the server storage system to a certain extent.

[0150] Furthermore, it should be noted that, compared to related technologies that require independent backplane hardware design for single-control and multi-control systems using a fixed backplane, and related technologies that require configuring corresponding firmware on PCIe switching chips to support single-control or multi-control modes, this application can save hardware costs to a certain extent and reduce resource waste to a certain extent.

[0151] In some embodiments of this application, the switching component is controlled to switch the port operating mode of the hard disk and the controller is controlled to switch the bus operating mode according to the bus operating mode of the controller and the current load of the hard disk. This includes: correcting the control mode of the hard disk according to the bus operating state of the controller; and after the control mode is corrected, adjusting the port operating mode and bus operating mode of the hard disk according to the current load.

[0152] It is understood that the embodiments of this application can modify the control mode of the hard disk according to the bus working state of the controller, and after the control mode is modified, adjust the port working mode and bus working mode of the hard disk according to the current load.

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

[0154] The preset quantity can be pre-calibrated, for example, set to 1.

[0155] It is understood that the bus working state types in this application embodiment include normal working state and abnormal working state; when the bus working state is abnormal working state, and the number of controllers in normal working state is less than or equal to a preset number, the hard disk control mode is switched to single control mode to shut down the abnormal bus channel.

[0156] In some embodiments of this application, adjusting the port operating mode and bus operating mode of the hard disk according to the current load includes: 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 operating mode and bus operating mode unchanged; if the current load is greater than the load threshold, switching the port operating mode of the hard disk to multi-port mode and switching the bus operating mode of the controller to channel merging mode.

[0157] The load threshold is the critical value of the current load state of the hard drive. When the load is less than or equal to the load threshold, it indicates that the hard drive is currently in a low to medium load state, and vice versa. The load threshold can be set according to specific circumstances, such as 70% or 80%, without any specific limitation.

[0158] It is understood that in this embodiment of the application, when the current load is greater than the load threshold, it is necessary to prioritize improving the read and write performance of the hard drive. Therefore, the port mode of the hard drive is switched to multi-port mode, and the bus mode of the controller is switched to channel merging mode, so as to release the maximum bandwidth under high load. With the multi-port mode, the hard drive can read and write with the maximum bandwidth, avoid the performance bottleneck caused by insufficient bandwidth, improve the hard drive read and write speed, that is, improve the processing efficiency of the hard drive under high load scenarios.

[0159] When the current load is less than or equal to the load threshold, it indicates that the bandwidth requirement is low, so the current port mode and the current bus mode are maintained.

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

[0161] In some embodiments of this application, after switching the hard disk port working mode to multi-port mode and switching the controller bus working mode to channel merging mode, the method includes: 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, then switching the hard disk port working mode to single-port mode and switching the controller bus working mode to channel split mode.

[0162] It is understood that, in this embodiment of the application, after switching the hard drive's port working mode to multi-port mode and switching the controller's bus working mode to channel merging mode, if the current load is less than or equal to the load threshold, it indicates that the hard drive's performance requirements have decreased and the bandwidth is sufficient. In this case, the hard drive's port mode is switched to single-port mode to optimize resource utilization and improve system reliability.

[0163] In some embodiments of this application, after controlling the switching component to switch the port operating mode of the hard disk and controlling the controller to switch the bus operating mode, the method further 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 operating mode of the hard disk according to the hard disk mode requirements, and correcting the bus operating mode of the controller according to the bus mode requirements.

[0164] It is understood that the control unit in this application embodiment can also modify the port mode of the hard drive based on the user's hard drive mode requirements, and modify the bus mode of the controller according to the bus mode requirements, so as to meet the user's personalized needs in different application scenarios.

[0165] Specifically, in the past, the port mode of the hard drive and the bus mode of the controller were determined based on various factors such as the current on-state of the controller, the bus working state between the controller and the first port component, and the current load of the hard drive. However, the embodiments of this application further allow the port mode of the hard drive and the bus mode of the controller to be modified based on the user's needs, with the user's needs as a higher priority.

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

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

[0168] Specifically, the complete execution flow of the hard disk mode control method in this application embodiment is as follows: Figure 12 As shown, the description uses two controllers (i.e., dual control) as an example, including:

[0169] S1: The control unit obtains the controller's presence status and proceeds to S2.

[0170] S2: Determine if both controls are in place. If both are in place, proceed to S3; otherwise, proceed to S4.

[0171] S3: The control unit controls the switching unit to work in dual-control dual-port mode, then enters S5;

[0172] S4: The control unit controls the switching unit to close the off-line / abnormal bus channel and switches the hard drive to dual-port mode, then enters S7;

[0173] S5: The control unit obtains the controller bus operating status and proceeds to S6;

[0174] S6: Determine if the bus is working properly. If not, proceed to S4; otherwise, proceed to S7.

[0175] S7: The control unit obtains the hard drive load and proceeds to S8;

[0176] S8: Determine whether the hard drive load is high or medium-low. If it is high, proceed to S9; if it is medium-low, proceed to S10.

[0177] S9: The control unit controls the switching unit, hard disk, and controller to operate in single-port mode of single-control / dual-control;

[0178] S10: The control unit does not switch and maintains the current read / write mode.

[0179] According to the hard disk mode control method proposed in the embodiments of this application, the control mode of the hard disk can be switched based on the current presence state 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 switched to switch the bus working mode according to the bus working state of the controller and the current load of the hard disk. This realizes the dynamic switching of the connection between the controller and the hard disk without manual switching, which improves the efficiency of switching the hard disk control mode, hard disk port working mode and bus working mode. Moreover, the load of the hard disk is taken into account during the switching 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. It can also improve the reliability of the server storage system to a certain extent, and no additional hardware needs to be designed, resulting in lower cost.

[0180] Figure 13 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0181] The memory 1301, the processor 1302, and the computer program stored on the memory 1301 and executable on the processor 1302.

[0182] When the processor 1302 executes the program, it implements the hard disk mode control method provided in the above embodiments.

[0183] Furthermore, electronic devices also include:

[0184] Communication interface 1303 is used for communication between memory 1301 and processor 1302.

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

[0186] The memory 1301 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage.

[0187] If the memory 1301, processor 1302, and communication interface 1303 are implemented independently, then the communication interface 1303, memory 1301, and processor 1302 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 13 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

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

[0189] 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 this application.

[0190] Embodiments of this application also provide a non-volatile computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described embodiments of the hard disk mode control method when running.

[0191] 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.

[0192] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the hard disk mode control method.

[0193] 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.

[0194] The foregoing has provided a detailed description of a hard disk mode control system, server, method, device, medium, and product 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 core ideas of this application. 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 hard disk mode control system, characterized in that, The hard drive link includes a server motherboard, a control motherboard, and a hard drive backplane. The server motherboard has multiple controllers and multiple first port components, which are connected to the controllers. The hard drive backplane has at least one hard drive and at least one second port component. The hard drive has multiple data ports, and the second port component is connected to the data ports of the hard drive. The control motherboard has a hard drive mode control system, which 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, thereby switching the control mode and 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 drive according to the current on-state of the controller. After the control mode of the hard drive is switched, the switching component controls the port working mode of the hard drive and the controller switches the bus working mode according to the bus working state of the controller and the current load of the hard drive.

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 presence status of the controller. The control unit is connected to the switching component, the detection unit, the hard disk, and the controller, respectively, and controls 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 based on the current in-place status, determine the control mode of the hard disk based on 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 operating state of the controller after the control mode of the hard disk is switched, and after the control mode is corrected, to adjust the port operating mode and the bus operating 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 has multiple link channels internally. Connecting or disconnecting these multiple link channels is used to switch the number of controllers connected to the hard drive and the port location of the hard drive connection.

6. The hard disk mode control system according to claim 5, characterized in that, The switching component includes multiple switching units, wherein each switching unit includes multiple uplink ports and multiple downlink ports, and the uplink ports and downlink ports of the switching unit form 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 is connected to at least one first port component and at least one second port component, wherein the first port component is connected to at least one of the switching units and the second port component is connected to at least one of the switching units.

8. The hard disk mode control system according to claim 6, characterized in that, The second port component includes multiple uplink ports and multiple downlink ports. The downlink ports of the second port component are connected to the data interface of the hard disk. The second port component allows multiple hard disks to be connected.

9. A server, characterized in that, include: The server motherboard, control motherboard, and hard disk backplane form a hard disk link. The server motherboard 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. The control motherboard is provided with a hard disk mode control system as 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-8, wherein the control component is configured to perform the following steps: Obtain the current in-situ status of the controller, the bus operating mode, and the current load of the hard disk; Based on the current in-situ status, the switching component is controlled to switch the control mode of the hard disk; After the control mode of the hard drive is switched, the switching component is controlled to switch the port working mode of the hard drive 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 drive.

11. The hard disk mode control method according to claim 10, characterized in that, The step of controlling the switching component to switch the hard disk's control mode based on the current in-situ state includes: The number of controllers in place is determined based on their current in-place status; The control mode of the hard drive is determined based on the number of controllers in place, and the switching component is controlled to switch the control mode of the hard drive.

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

13. The hard disk mode control method according to claim 10, characterized in that, The step of controlling the switching component to switch the port operating mode of the hard drive and controlling the controller to switch the bus operating mode based on the bus operating mode of the controller and the current load of the hard drive includes: The control mode of the hard disk is corrected according to the bus operating status of the controller; After the control mode is corrected, 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, characterized in that, The step of correcting the control mode of the hard disk according to the bus operating state of the controller includes: If the hard disk is controlled in a multi-controller mode, then the type of bus operating state is identified, wherein the type of bus operating state includes normal operating state and abnormal operating state; When the bus is in 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 single control mode.

15. The hard disk mode control method according to claim 14, characterized in that, The step of 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 corrected, it is determined 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, the port working mode and bus working mode remain unchanged. If the current load is greater than the load threshold, the port working mode of the hard disk is switched to multi-port mode, and the bus working mode of the controller is switched to channel merging mode.

16. The hard disk mode control method according to claim 15, characterized in that, After switching the hard drive's port operating mode to multi-port mode and switching the controller's bus operating mode to channel merging mode, the process includes: Determine 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, switch the hard disk port working mode to single-port mode and switch the controller bus working mode to channel split mode.

17. The hard disk mode control method according to claim 10, characterized in that, After controlling the switching component to switch the port operating mode of the hard disk and controlling the controller to switch the bus operating mode, the method further includes: Obtain the user's hard drive mode requirements and bus mode requirements; In response to the user's hard drive mode and bus mode requirements, the controller adjusts the port operating mode of the hard drive according to the hard drive mode requirement and the bus operating mode of the controller according to the bus mode requirement.

18. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the hard disk mode control method according to any one of claims 10-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 when the computer program is executed by a processor, it implements the steps of the hard disk mode control method according to any one of claims 10-17.

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

Citation Information

Patent Citations

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

    CN112486740A

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

    CN117234803A