Resource allocation method for storage system and electronic device
By automatically identifying hardware configurations and dynamically loading predefined partitioning schemes, the problem of manual intervention required by traditional storage resource allocation schemes is solved, achieving optimal allocation of storage resources and improving resource utilization and system performance.
Patent Information
- Application Number
- CN202511269495.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-09-05
AI Technical Summary
Existing technologies cannot effectively cope with complex and ever-changing hardware topologies, resulting in insufficient real-time performance and accuracy in storage resource allocation. Traditional solutions require manual intervention and are difficult to adapt to dynamically changing hardware configurations and workload requirements.
By acquiring hardware configuration information, the controller automatically identifies the hardware configuration and dynamically loads predefined partitioning schemes to achieve optimal allocation of storage resources. The system architecture, composed of SAS extension modules, interface modules, and non-volatile memory, automatically identifies the access information of nodes and backplanes and configures resources in real time.
It improves storage resource utilization, has strong adaptability, high configuration accuracy, and significant performance optimization, and is suitable for multi-node storage systems that require flexible resource configuration.
Smart Images

Figure CN120743207B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage resource management, and particularly relates to a resource allocation method for a storage system and an electronic device. BACKGROUND
[0002] With the expansion of the scale of the storage system and the complication of the topology structure, how to efficiently manage and divide the storage resources becomes a key problem for improving the overall system performance. At present, the technical means such as manual configuration or software level management cannot cope with the complex and changeable hardware topology, resulting in insufficient real-time performance and accuracy of resource allocation. SUMMARY
[0003] Therefore, the present application provides a resource allocation method for a storage system and an electronic device.
[0004] One aspect of the present application provides a resource allocation method for a storage system, the storage system comprising a power backboard, at least one target node connected to the power backboard, and at least one hard disk backboard, the power backboard comprising an interface module, and the at least one hard disk backboard each comprising a controller and a hard disk, the method comprising: in response to the controller obtaining resource configuration information through the interface module, determining, by the controller, identification information of a resource allocation scheme according to the resource configuration information, the resource configuration information comprising node in-place information and backboard slot coding, the node in-place information indicating whether the at least one target node is in an in-place state, and the backboard slot coding indicating an access address of an accessed hard disk backboard connected to the power backboard; performing, by the controller, matching in a scheme library according to the identification information to obtain the resource allocation scheme; and according to the resource allocation scheme, allocating, by the controller, storage resources on the accessed hard disk backboard to the at least one target node through the interface module.
[0005] Another aspect of the present application provides an electronic device, comprising: a power backboard comprising an interface module; at least one target node connected to the interface module; a hard disk backboard connected to the at least one target node through the interface module; the hard disk backboard comprising: a hard disk; and a controller connected to the interface module and configured to execute the above method.
[0006] According to the embodiments of the present application, by automatically identifying the hardware configuration and dynamically loading the predefined zoning scheme, the optimal allocation of storage resources can be achieved, and the problem of manual intervention required by the traditional scheme is effectively solved. The system architecture is composed of three core components: a SAS extension module, an interface module, and a non-volatile memory. The SAS extension module serves as the core processing unit of the system and is responsible for executing the resource allocation scheme; the interface module monitors the node in-place state and backplane position information in real time through the hardware interface; and the non-volatile memory stores a plurality of zoning schemes optimized for different hardware configurations. The present application obtains the access information of the nodes and the backplane through the interface module, automatically identifies and performs real-time configuration on the resources, solves the problem of manual configuration required by the traditional scheme, improves the utilization rate of storage resources, has the characteristics of strong self-adaptability, high configuration precision, obvious performance optimization, and is suitable for multi-node storage systems that require flexible resource configuration. BRIEF DESCRIPTION OF DRAWINGS
[0007] The above and other objects, features and advantages of the present application will become more apparent from the following description of the embodiments of the present application taken with reference to the accompanying drawings, in which:
[0008] Figure 1 is an exemplary architecture schematic diagram of the electronic device to which the resource allocation method according to an embodiment of the present application can be applied.
[0009] Figure 2A A flowchart of the resource allocation method according to an embodiment of the present application is schematically shown.
[0010] Figure 2B A schematic diagram of a storage system according to an embodiment of the present application is schematically shown.
[0011] Figure 3 A structural block diagram of a target node and a hard disk backplane according to an embodiment of the present application is schematically shown.
[0012] Figure 4 A schematic diagram of a single-node allocation scheme according to an embodiment of the present application is schematically shown.
[0013] Figure 5 A schematic diagram of a multi-node allocation scheme according to an embodiment of the present application is schematically shown.
[0014] Figure 6 A flowchart of the resource allocation method according to another embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0015] Embodiments of the present application will be described below with reference to the accompanying drawings. Various details of the embodiments of the present application are included to facilitate an understanding, and should be considered in a demonstrative sense only. Therefore, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, for the sake of brevity and clarity, descriptions of well-known functions and constructions are omitted herein.
[0016] In current data center and cloud computing environments, performance optimization and resource management of storage systems have been one of the key technical challenges. With the rapid growth of the number of storage devices and data throughput, traditional storage area networks and direct-attached storage architectures gradually show limitations in flexibility and scalability. SAS (Serial Attached SCSI) technology, as a high-performance storage interface standard, is widely used in enterprise-level storage systems due to its high bandwidth, low latency, and good scalability.
[0017] Traditional SAS domain partitioning methods usually adopt static configuration, i.e., partitioning according to fixed hardware topology and preset rules during system initialization. Although this method is simple and easy to implement, it lacks flexibility and cannot adapt to dynamically changing hardware configurations and workload requirements. For example, in a dual-node high-availability configuration, the allocation of storage resources needs to be adjusted in real time according to the in-place state of the nodes, while the static partitioning scheme cannot automatically adapt to such changes. In addition, different hardware topologies have a significant impact on the performance of SAS domain partitioning, and these factors can easily lead to low resource utilization or performance bottlenecks. In addition, in high-density servers, there are scenarios where multiple hard disk backplane SAS ports are allocated inconsistently, and static configuration methods are difficult to adapt to dynamically changing hardware configurations.
[0018] Currently in SAS topology systems, controllers can partition the storage resources of nodes and backplanes into different SAS domains according to the partitioning functions they have, but usually need to rely on manual configuration or use simple scripting tools to implement, lacking intelligent dynamic adjustment capabilities. This static configuration method increases management complexity and can also lead to uneven resource allocation, reducing system performance.
[0019] In one embodiment, SAS domains are dynamically managed through the software level, such as real-time adjustment of partitioning rules through the operating system or storage management software. However, such methods usually rely on high-level software stacks, have slow response speed, and can introduce additional software overhead, making it difficult to meet the requirements of low latency and high throughput for high-performance storage systems. In addition, dynamic management at the software level often cannot directly access the underlying hardware signals of the controller, resulting in insufficient real-time and accuracy of partition adjustment.
[0020] Based on this, the application provides a resource allocation method for realizing dynamic configuration of storage resources by obtaining hardware configuration information, so that the resource allocation can better cope with complex and variable hardware topology conditions and realize real-time configuration of resources.
[0021] Figure 1 is an exemplary architecture schematic diagram to which the resource allocation method and the electronic device according to an embodiment of the application can be applied. It should be noted that, Figure 1 The architecture shown is only an example of architecture to which the embodiments of the application can be applied, to help those skilled in the art understand the technical content of the application, but does not mean that the embodiments of the application cannot be used in other devices, systems, environments or scenarios.
[0022] As Figure 1 shown, the system architecture 100 according to the embodiment can include a first node Node1, a second node Node2, …, an nth node Node n, a hard disk backboard 110, and a power backboard PDB connected with the above-mentioned n target nodes and the hard disk backboard 110. The hard disk backboard 110 includes a controller 111 and a storage resource 112, and the power backboard PDB includes an interface module 121. The controller 111 on the hard disk backboard 110 can realize information transmission with the n target nodes through the interface module 121.
[0023] It should be noted that the resource allocation method for a storage system provided by the embodiments of the application can generally be executed by the controller 111.
[0024] Figure 2A The flowchart of the resource allocation method according to the embodiments of the application is schematically shown.
[0025] As Figure 2A shown, the resource allocation method for a storage system of the embodiment includes operations S210-S230. The storage system includes a power backboard and at least one target node and at least one hard disk backboard connected with the power backboard, the power backboard includes an interface module, and the at least one hard disk backboard each includes a controller and a hard disk.
[0026] In operation S210, in response to the controller obtaining resource configuration information through the interface module, the controller determines identification information for a resource allocation scheme according to the resource configuration information, the resource configuration information including node in-place information and backboard slot encoding, the node in-place information indicating whether the at least one target node is in an in-place state, and the backboard slot encoding indicating an access address of the accessed hard disk backboard connected with the power backboard.
[0027] The controller can be a SAS expander, and the hard disk backplane can be connected to the interface module of the power backplane through the internally arranged controller. The interface module can be a signal transmission module including a general purpose input / output (GPIO) interface and a signal acquisition channel. The resource configuration information represents the access status of the target node and the hard disk backplane. The resource configuration information includes a node in-place signal and backplane access information. The node in-place signal indicates the activation status of the target node in the SAS system, and the backplane slot coding indicates the configuration status of the hard disk backplane in the SAS system.
[0028] For example, the node in-place signal can be represented as 3 target nodes currently being in the in-place state; the backplane slot coding can be represented as 00, 01, and 10, indicating that the three hard disk backplanes backplane 1, backplane 2, and backplane 3 are currently accessed.
[0029] The identification information is an enumeration value determined according to different resource configuration information to determine the corresponding resource allocation scheme. Each resource allocation scheme has a unique identification information, corresponding to a situation represented by the resource configuration information. The resource allocation scheme refers to a scheme for allocating resources on the hard disk backplane to each in-place target node.
[0030] For example, if the resource configuration information represents that backplane 3 is currently in the access state, and 2 target nodes are in the in-place state, the corresponding identification information is 32.
[0031] For example, if the resource configuration information represents that backplane 1 and backplane 3 are in the access state, and 1 target node is currently in the in-place state, the corresponding identification information includes resource allocation scheme 11 for backplane 1 and resource allocation scheme 31 for backplane 3.
[0032] In operation S220, the controller is used to match in the scheme library according to the identification information to obtain the resource allocation scheme.
[0033] According to the identification information, the resource allocation scheme corresponding to the identification information can be obtained from the scheme library storing a plurality of resource allocation schemes.
[0034] In operation S230, according to the resource allocation scheme, the controller is used to allocate the storage resources on the accessed hard disk backplane to the target node in the in-place state through the interface module.
[0035] The resource allocation scheme indicates the allocation manner of allocating the resources on the hard disk backplane to each in-place target node.
[0036] For example, if the resource configuration information indicates that the backplane 3 is currently in the access state and the two target nodes are in the in-place state, then the information can be determined to be 32, the two-node resource allocation scheme for the backplane 3 can be obtained, and the storage resources on the backplane 3 can be allocated to the two target nodes according to the resource allocation scheme.
[0037] According to embodiments of this application, by automatically identifying hardware configurations and dynamically loading predefined partitioning schemes, optimal allocation of storage resources can be achieved, effectively solving the problem of manual intervention required in traditional solutions. The system architecture consists of three core components: a SAS extension module, an interface module, and non-volatile memory. The SAS extension module, as the core processing unit of the system, is responsible for executing resource allocation schemes; the interface module monitors node presence status and backplane location information in real time through a hardware interface; and the non-volatile memory stores various partitioning schemes optimized for different hardware configurations. This application obtains node and hard disk backplane access information through the interface module, automatically identifies and configures resources in real time, solving the problem of manual configuration required in traditional solutions, improving storage resource utilization, and featuring strong adaptability, high configuration accuracy, and significant performance optimization. It is suitable for multi-node storage systems requiring flexible resource configuration.
[0038] According to an embodiment of this application, the scheme library is used to store resource allocation schemes that match the identification information, with the identification information as an index. The metadata of the resource allocation scheme includes the backplane number and the number of nodes.
[0039] In the embodiments of this application, the resource allocation scheme can be stored in a pre-set scheme library in the memory, using identification information as an index. The specific resource configuration is organized and stored in the scheme library using a two-dimensional metadata structure consisting of "backplane number - number of nodes", thereby obtaining the resource configuration scheme corresponding to the resource configuration. The backplane number indicates the hard disk backplane information in the identification information, and the number of nodes indicates the node information in the identification information.
[0040] Table 1
[0041]
[0042] As shown in Table 1, the identification information consists of "0x" and two digits, where the first digit corresponds to the "backplane number" and the second digit corresponds to the "number of nodes".
[0043] The number of nodes can be determined based on the node access information obtained by the interface module; the backplane number corresponding to at least one connected hard disk backplane can be determined based on the backplane access information obtained by the interface module.
[0044] For example, as shown in Table 1, 0x11 represents that backplane 1 is currently in the access state, and there is currently one node in the presence state. 0x12 represents that backplane 1 is currently in the access state, and there are currently two nodes in the presence state. 0x21 represents that backplane 2 is currently in the access state, and there is currently one node in the presence state. 0x22 represents that backplane 2 is currently in the access state, and there are currently two nodes in the presence state. 0x31 represents that backplane 3 is currently in the access state, and there is currently one node in the presence state. 0x32 represents that backplane 3 is currently in the access state, and there are currently two nodes in the presence state.
[0045] In the embodiments of this application, if the backplane access information indicates that multiple hard disk backplanes are connected at the same time, then a resource allocation scheme is determined based on each hard disk backplane.
[0046] For example, if the resource configuration information indicates that backplane 1, backplane 2, and backplane 3 are currently in an access state, and the two target nodes are in an in-place state, then the identification information can be determined as 0x12, 0x22, and 0x32. 0x12 represents the resource allocation scheme for backplane 1 when there are two target nodes, 0x22 represents the resource allocation scheme for backplane 2 when there are two target nodes, and 0x32 represents the resource allocation scheme for backplane 3 when there are two target nodes.
[0047] According to the embodiments of this application, signal acquisition and parsing are realized through the interface module, and the controller realizes scheme matching and resource allocation, which solves the problem of manual configuration required by traditional schemes and improves the maintainability and scalability of the system.
[0048] Figure 2B A schematic diagram of a storage system according to an embodiment of this application is shown.
[0049] like Figure 2B As shown, the storage system 200 includes at least one target node, a power supply backplane (PDB), and at least one hard disk backplane. The at least one target node may include a first node (Node1) and a second node (Node2). The power supply backplane (PDB) includes an interface module and multiple DIP switches. The at least one hard disk backplane may include a first backplane (BP1), a second backplane (BP2), and a third backplane (BP3).
[0050] According to an embodiment of this application, the power backplane includes an encoding switch connected to a controller; the controller obtains resource configuration information by: obtaining a node presence signal through the interface module of the power backplane; and determining the backplane slot code of the hard disk backplane connected by the encoding value of the encoding switch.
[0051] like Figure 2BAs shown, the first backplane BP1 is connected to the first DIP switch of the power supply backplane PDB through the first controller, the second backplane BP2 is connected to the second DIP switch of the power supply backplane PDB through the second controller, and the third backplane BP3 is connected to the third DIP switch of the power supply backplane PDB through the third controller.
[0052] The controller on the hard drive backplane can obtain the node presence signal sent by at least one target node through the interface module, and can also obtain the backplane slot code of the hard drive backplane through the DIP switch on the power backplane PDB.
[0053] According to embodiments of this application, the interface module of the power backplane is in a star topology. Through connection with at least one target node and a hard disk backplane, the power backplane provides power distribution and signal relay functions for the connected components. The hard disk backplane, through an integrated controller, expands the storage interface and establishes a signal transmission channel with the nodes. This application achieves automatic hardware topology identification and dynamic policy matching through standard SAS expansion modules, and reuses interface modules for status monitoring. It can be directly integrated into server designs, exhibiting high implementability and reducing usage costs.
[0054] According to an embodiment of this application, the identification information includes a backplane number and a number of nodes. Determining the identification information for the resource allocation scheme based on the resource configuration information includes: using the controller to determine the number of nodes based on the node presence signal, where the number of nodes indicates the number of target nodes in the presence state; and using the controller to determine the backplane number based on the backplane slot code, where the backplane number indicates the access address of the hard disk backplane that has been connected.
[0055] The interface module sends the node presence signal of the at least one target node to the controller. The controller determines whether each target node is in the presence state by parsing whether the node presence signal is valid, thereby determining the number of target nodes in the presence state.
[0056] The interface module of the power supply backplane (PDB) can also send the backplane slot code of the hard drive backplane connected to the PDB to the controller. The backplane slot code refers to the code corresponding to the physical slot on the backplane. This code is generated by the DIP switches on the PDB using binary encoding, ensuring that each slot has a unique backplane slot code. Based on the obtained backplane slot code, the connected backplane number can be determined.
[0057] For example, if the first backplane BP1 is connected to the power supply backplane PDB, the first controller can use the DIP switch on the power supply backplane PDB to obtain the backplane slot code corresponding to the slot where the first backplane BP1 is located, which is 00, thereby identifying the hard drive backplane with address number one, i.e., the first backplane BP1. Similarly, if the obtained backplane slot code is 01 and 10, the hard drive backplanes with addresses two and three, i.e., the second backplane BP2 and the third backplane BP3, can be identified.
[0058] In the embodiments of this application, by storing resource allocation schemes optimized for different configurations in memory, and then fully loading them from memory into the running configuration area before reading them, conflicts during scheme switching can be avoided, thus improving scheme switching efficiency. This scheme switching can be implemented using standard SAS extension modules without additional hardware costs. The reception of node presence signals and backplane slot codes can be implemented using simple circuitry, featuring low cost and high reliability.
[0059] Figure 3 A schematic diagram illustrating the structure of a target node and a hard disk backplane according to an embodiment of this application is shown.
[0060] like Figure 3 As shown, this embodiment may include a first node Node1, a second node Node2, a first backplane BP1, a second backplane BP2, and a third backplane BP3 connected to the SAS system. The first backplane BP1 includes a first controller and a first storage resource; the second backplane BP2 includes a second controller and a second storage resource; and the third backplane BP3 includes a third controller and a third storage resource. The target node and the controller, as well as the controller and the storage resource, are connected via interface modules.
[0061] The first node, Node1, is configured with two 5-channel interfaces, one 3-channel interface, and one 2-channel interface. Specifically, the first interface J1 and the fourth interface J4 are 5-channel interfaces, the second interface J2 is a 3-channel interface, and the third interface J3 is a 2-channel interface.
[0062] The first node Node1 can be connected to the first controller of the first backplane BP1 through the first interface J1, to the second controller of the second backplane BP2 through the second interface J2 and the third interface J3, and to the third controller of the third backplane BP3 through the fourth interface J4.
[0063] The second node, Node2, is configured with two 5-channel interfaces, one 3-channel interface, and one 2-channel interface. Specifically, the first interface J5 and the fourth interface J8 are 5-channel interfaces, the second interface J6 is a 3-channel interface, and the third interface J7 is a 2-channel interface.
[0064] The second node Node2 can be connected to the first controller of the first backplane BP1 through the first interface J5, to the second controller of the second backplane BP2 through the second interface J6 and the third interface J7, and to the third controller of the third backplane BP3 through the fourth interface J8.
[0065] In the embodiments of this application, the resource allocation scheme can be divided into a single-node allocation scheme and a multi-node allocation scheme based on the number of target nodes accessed. Resource allocation may include available hard drives on at least one hard drive backplane. Allocating storage resources on at least one hard drive backplane to at least one target node includes: if the node access information indicates that one target node is in a present state, allocating available hard drives on at least one hard drive backplane to the target node according to the single-node allocation scheme; if the node access information indicates that at least two target nodes are in a present state, allocating available hard drives on at least one hard drive backplane to at least two target nodes according to the multi-node allocation scheme at a preset ratio.
[0066] In the embodiments of this application, in the multi-node allocation scheme, the preset ratio can be set according to actual needs, such as 1:1, 5:3, etc.
[0067] For example, such as Figure 3 As shown, if the first node Node1 is in the in-position state and the second node Node2 is in the off state, the first controller can allocate the available hard disk in the first storage resource to the first node Node1 through the first interface J1 of the first node Node1.
[0068] For example, if the second node Node2 is in the in-place state and the first node Node1 is in the off state, the first controller can allocate the available hard disk in the first storage resource to the second node Node2 through the first interface J5 of the second node Node2.
[0069] For example, if the first node Node1 and the second node Node2 are in place, the first controller can allocate half of the available hard disks in the first storage resources to the first node Node1 through the first interface J1 of the first node Node1 according to a preset ratio of 1:1, and allocate the other half of the available hard disks in the first storage resources to the second node Node2 through the first interface J5 of the second node Node2.
[0070] According to embodiments of this application, by determining different resource allocation schemes, the optimal resource allocation scheme can be intelligently selected for single and dual-node modules and different backplane characteristics, ensuring efficient utilization of storage bandwidth and resources and significantly improving data transmission performance.
[0071] Figure 4A schematic diagram of a single-node allocation scheme according to an embodiment of this application is shown.
[0072] like Figure 4 As shown, this embodiment includes a first node Node1 connected to the SAS system, and a first backplane BP1, a second backplane BP2, and a third backplane BP3. The first backplane BP1 includes a first controller and first storage resources; the second backplane BP2 includes a second controller and second storage resources; and the third backplane BP3 includes a third controller and third storage resources. The interfaces of the first node Node1 include a first interface J1, a second interface J2, a third interface J3, and a fourth interface J4. Each hard disk backplane includes 35 available hard disks.
[0073] According to an embodiment of this application, the single-node allocation scheme includes: connecting a first backplane BP1 to a first interface J1 of a first node Node1, and allocating the available hard disks on the first backplane BP1 to the first interface J1 of the first node Node1; connecting a second backplane BP2 to a second interface J2 and a third interface J3 of the first node Node1, and allocating the available hard disks on the second backplane BP2 to the second interface J2 and the third interface J3 of the first node Node1 according to the ratio of the number of channels inside the second interface J2 and the third interface J3; connecting a third backplane BP3 to a fourth interface J4 of the first node Node1, and allocating the available hard disks on the third backplane BP3 to the fourth interface J4 of the first node Node1.
[0074] In the embodiments of this application, the first interface J1 and the fourth interface J4 of the first node Node1 are 5-channel interfaces, the second interface J2 is a 3-channel interface, and the third interface J3 is a 2-channel interface. When allocating available hard drives on the second backplane BP2 to the first node Node1, since the second interface J2 and the third interface J3 are connected simultaneously, the allocation can be made according to the ratio of the number of channels on the interfaces.
[0075] For example, such as Figure 4 As shown, the first storage resource of the first backplane BP1 includes 35 available hard disks, and the first storage resource can be allocated to the first node Node1 through the first interface J1 of the first node Node1.
[0076] For example, the second storage resource of the second backplane BP2 includes 35 available hard disks. According to the ratio of the number of channels inside the second interface J2 and the third interface J3, i.e., 3:2, the second storage resource can be divided into two parts, where the second storage resource includes the first 21 available hard disks [1-21] and the second storage resource includes the last 14 available hard disks [22-35].
[0077] For example, the third storage resource of the third backplane BP3 includes 35 available hard disks, and the third storage resource can be allocated to the first node Node1 through the fourth interface J4 of the first node Node1.
[0078] According to the embodiments of this application, for the case of a single-node connection, the resource allocation scheme can control the node to manage all available resources, thereby improving the utilization rate of storage resources and avoiding resource idleness.
[0079] Figure 5 A schematic diagram of a multi-node allocation scheme according to an embodiment of this application is shown.
[0080] like Figure 5 As shown, this embodiment includes a first node Node1, a second node Node2, a first backplane BP1, a second backplane BP2, and a third backplane BP3 connected to the SAS. The first backplane BP1 includes a first controller and first storage resources; the second backplane BP2 includes a second controller and second storage resources; and the third backplane BP3 includes a third controller and third storage resources. The interfaces of the first node Node1 include a first interface J1, a second interface J2, a third interface J3, and a fourth interface J4; the interfaces of the second node Node2 include a first interface J5, a second interface J6, a third interface J7, and a fourth interface J8. The storage resources of each backplane include 35 available hard disks.
[0081] According to embodiments of this application, the multi-node allocation scheme includes a resource allocation scheme for a first backplane BP1, a resource allocation scheme for a second backplane BP2, and a resource allocation scheme for a third backplane BP3. The available hard drives of each hard drive backplane are divided into a first available hard drive group and a second available hard drive group according to a preset ratio, wherein the first available hard drive group is allocated to the first node Node1, and the second available hard drive group is allocated to the second node Node2.
[0082] The resource allocation scheme for the first backplane BP1 includes: connecting the first backplane BP1 to the first interface J1 of the first node Node1 and the first interface J5 of the second node Node2, allocating the first available hard disk group on the first backplane BP1 to the first interface J1 of the first node Node1, and allocating the second available hard disk group on the first backplane BP1 to the first interface J5 of the second node Node2.
[0083] For example, such as Figure 5As shown, the first storage resource of the first backplane BP1 includes available hard disks [1-35]. According to a preset ratio, the 35 available hard disks can be divided into a first available hard disk group and a second available hard disk group. The first available hard disk group includes available hard disks [1-17], and the second available hard disk group includes available hard disks [18-35]. The first available hard disk group in the first storage resource can be allocated to the first node Node1 through the first interface J1, and the second available hard disk group in the first storage resource can be allocated to the second node Node2 through the first interface J5.
[0084] The resource allocation scheme for the second backplane BP2 includes: connecting the second backplane BP2 to the second interface J2 and the third interface J3 of the first node Node1; connecting the second backplane BP2 to the second interface J6 and the third interface J7 of the second node Node2; allocating the first available hard disk group on the second backplane BP2 to the second interface J2 and the third interface J3 of the first node Node1 according to the ratio of the number of channels inside the second interface J2 and the third interface J3; and allocating the second available hard disk group on the second backplane BP2 to the second interface J6 and the third interface J7 of the second node Node2 according to the ratio of the number of channels inside the second interface J6 and the third interface J7.
[0085] For example, the second storage resources of the second backplane BP2 include available hard disks [1-35]. According to a preset ratio, the 35 available hard disks can be divided into a first available hard disk group and a second available hard disk group. The first available hard disk group includes available hard disks [1-17], and the second available hard disk group includes available hard disks [18-35]. Next, the available hard disks are allocated according to the ratio of the number of channels inside the second interface J2 and the third interface J3 of the first node Node1, i.e., 3:2. When the number of available hard disks cannot be divided evenly, the first available hard disk group can be approximately divided into two parts, where the second storage resources allocated to the second interface J2 of the first node Node1 include the first 10 available hard disks [1-10], and the second storage resources allocated to the third interface J3 of the first node Node1 include the middle 7 available hard disks [11-17]. The available hard disks are allocated according to the ratio of the number of channels inside the second interface J6 and the third interface J7 of the second node Node2. The second available hard disk group is approximately divided into two parts, where the second storage resources allocated to the second interface J6 of the second node Node2 include 10 available hard disks [18-27], and the second storage resources allocated to the third interface J7 of the second node Node2 include 8 available hard disks [28-35].
[0086] The resource allocation scheme for the third backplane BP3 includes: connecting the third backplane BP3 to the fourth interface J4 of the first node Node1 and the fourth interface J8 of the second node Node2, allocating the first available hard disk group on the third backplane BP3 to the fourth interface J4 of the first node Node1, and allocating the second available hard disk group on the third backplane BP3 to the fourth interface J8 of the second node Node2.
[0087] For example, the third storage resource of the third backplane BP3 includes available hard disks [1-35]. According to a preset ratio, the 35 available hard disks can be divided into a first available hard disk group and a second available hard disk group. The first available hard disk group includes available hard disks [1-17], and the second available hard disk group includes available hard disks [18-35]. The first available hard disk group in the third storage resource can be allocated to the first node Node1 through the fourth interface J4, and the second available hard disk group in the third storage resource can be allocated to the second node Node2 through the fourth interface J8.
[0088] According to embodiments of this application, for dual-node mode and hard disk backplane characteristics, resource allocation can be performed based on a pre-set optimal resource allocation scheme to ensure efficient utilization of storage bandwidth and resources, thereby improving performance while significantly reducing operational complexity.
[0089] Figure 6 A flowchart illustrating a resource allocation method according to another embodiment of this application is shown.
[0090] like Figure 6 As shown, the resource allocation method of this embodiment includes operations S611-S612 and operations S621-S622.
[0091] When operating S611, the controller periodically obtains resource configuration information for a first preset number of cycles through the interface module.
[0092] In the embodiments of this application, resource configuration information is obtained through dynamic monitoring. This can be achieved by enabling a timer interrupt to periodically acquire resource configuration information, and determining the validity of the resource configuration information based on the information collected over a first preset number of periods.
[0093] For example, the timer interrupt can be set to a period of 10 milliseconds, and a signal sample is taken every 10 milliseconds. The first preset number can be 8. The signal obtained from the 8 samples is analyzed to obtain the resource configuration information corresponding to the 8 periods.
[0094] In operation S612, if the resource configuration information obtained in a second preset number of consecutive cycles remains unchanged, the identification information of the resource allocation scheme is determined based on the resource configuration information, and the second preset number is less than the first preset number.
[0095] To avoid resource allocation being affected by unstable factors, if resource configuration information is continuously received and remains unchanged, the sampled resource configuration information can be determined to be valid, and the corresponding resource allocation scheme can be obtained based on the resource configuration information.
[0096] For example, the second preset number can be set to 5. After obtaining resource configuration information for 8 cycles, if there are 5 consecutive samplings of consistent resource configuration information, the resource configuration information can be determined to be valid, and the corresponding resource allocation scheme can be obtained.
[0097] According to the embodiments of this application, when the resource configuration information corresponding to the target node and the hard disk backplane is detected, signal de-jitter processing is added. After determining that the resource configuration information is valid, the corresponding resource allocation scheme is matched, which can prevent storage resource access conflicts during scheme switching and reduce performance fluctuations during switching.
[0098] In the embodiments of this application, when the resource configuration information changes, the resource allocation scheme can be re-determined through operation S621 and / or operation S622.
[0099] In operation S621, in response to a node presence signal indicating a change in the presence status of at least one target node, the resource allocation scheme for the connected hard disk backplane is redefined.
[0100] In operation S622, in response to the backplane slot code indicating that the access address of at least one backplane has changed, the resource allocation scheme of the connected hard disk backplane is re-determined according to the changed backplane slot code.
[0101] When the node's presence signal changes, it can be determined that the resource configuration information has changed. At this point, it is necessary to redetermine the resource allocation scheme for at least one hard disk backplane based on the changed resource configuration information.
[0102] For example, when the SAS system starts, two target nodes are in place and three hard drive backplanes are connected. After detecting the corresponding resource configuration information, the controller selects the appropriate multi-node allocation scheme based on the node presence signal and backplane slot code, allocating the storage resources of the first, second, and third backplanes to the two target nodes according to a preset ratio. Subsequently, when one of the target nodes is unplugged, the controller detects a change in the target node's presence signal and, based on the changed resource configuration information, automatically switches the resource allocation scheme to a single-node allocation scheme, allocating all the storage resources of the first, second, and third backplanes to the target node in place. When the unplugged node is reinserted, the controller switches back to multi-node allocation mode based on the resource configuration information, allocating the storage resources of the first, second, and third backplanes to the two target nodes according to a preset ratio.
[0103] In the embodiments of this application, there is also a situation where the backplane slot code changes. When the node's on-premises signal changes, it can also be determined that the resource configuration information has changed, and the resource allocation scheme can be re-determined based on the connected backplanes.
[0104] For example, when the SAS system starts, two target nodes are in place and three backplanes are connected. After detecting the corresponding resource configuration information, the controller selects the appropriate multi-node allocation scheme based on the node presence signal and backplane slot code, allocating the storage resources of the first, second, and third backplanes to the two target nodes according to a preset ratio. Subsequently, when the first backplane is removed, the controller detects a change in the number of backplane numbers received. Based on the changed resource configuration information, it deletes the resource allocation scheme for the first backplane and allocates the storage resources of the second and third backplanes to the two target nodes according to the preset ratio. When the first backplane is reinserted and the second backplane is removed, the controller detects a change in the number of backplane numbers received. Based on the changed resource configuration information, it re-adds the resource allocation scheme for the first backplane, deletes the resource allocation scheme for the second backplane, and allocates the storage resources of the first and third backplanes to the two target nodes according to the preset ratio.
[0105] According to embodiments of this application, through dynamic monitoring and adjustment of resource configuration, when a change in node presence signal is detected, the controller can trigger a reload process to re-match the resource allocation scheme based on the new topology information, smoothly transitioning to the new configuration. All configuration processes can be completed automatically without manual intervention.
[0106] According to an embodiment of this application, the method further includes: in response to the controller failing to obtain resource configuration information within a predetermined time period or the resource configuration information obtained by the controller meeting the matching failure condition, obtaining a default allocation scheme for at least one hard disk backplane, and allocating the available hard disks of at least one hard disk backplane to at least one target node based on the default allocation scheme.
[0107] Failure to obtain resource configuration information within the predetermined time period can refer to situations such as a failure to receive resource configuration information for a certain period of time, a hardware failure, or a mismatch between the predefined resource allocation scheme and the actual target node and backplane being accessed. Matching failure conditions can refer to situations where a resource allocation scheme cannot be determined and allocated based on the resource configuration information. In these cases, a default resource allocation scheme can be determined.
[0108] Table 2
[0109]
[0110] As shown in Table 2, when the node is not in position signal acquisition is abnormal, the default allocation scheme of the corresponding backplane can be determined according to the backplane slot code. If both the node is not in position signal acquisition and the backplane slot code are abnormal, the default allocation scheme that adapts to any backplane can be switched.
[0111] 0x10 indicates that backplane 1 is currently in an access state, and the node presence signal is abnormal. 0x20 indicates that backplane 2 is currently in an access state, and the node presence signal is abnormal. 0x30 indicates that backplane 3 is currently in an access state, and the node presence signal is abnormal. 0x00 indicates that the backplane slot code is abnormally acquired, and the node presence signal is abnormal.
[0112] For example, if the backplane slot code indicates that backplane 2 and backplane 3 are currently connected and the node in-situ signal acquisition fails, then the default allocation schemes 0x20 and 0x30 can be determined.
[0113] For example, if both the node in-situ signal and the backplane slot code fail to be acquired, the default allocation scheme 0x00 can be determined.
[0114] According to embodiments of this application, a well-designed anomaly handling mechanism, including signal stabilization, fault degradation schemes, and default configuration rollback, enables the coordinated operation of automatic hardware perception and intelligent policy matching. This achieves efficient management and flexible configuration of storage resources, significantly improving the adaptability and operational efficiency of multi-node storage systems. The entire solution is implemented based on standard hardware and can be integrated into server designs without additional cost, demonstrating high practical value and promising prospects for widespread adoption.
[0115] In embodiments of this application, the matching failure condition may include at least one of the following: there is no resource allocation scheme in the scheme library that matches the resource configuration information; the resource allocation scheme determined according to the resource configuration information does not match the target node in the in-place state and / or the hard disk backplane that has been connected; and the target node in the in-place state and the hard disk backplane that has been connected are faulty.
[0116] In the aforementioned situations, it can be determined that the resource configuration information meets the matching failure conditions, and a default allocation scheme needs to be determined based on the acquired resource configuration information. When a mismatch is detected between the predefined scheme and the actual hardware, or when matching fails due to hardware malfunctions, the system will match the default allocation scheme, selecting the default allocation scheme corresponding to 0x00 from Table 2.
[0117] According to the embodiments of this application, automatic hardware topology identification and dynamic policy matching enable automatic adaptation of different node configurations and backplane connection methods, providing comprehensive anomaly detection and fault tolerance capabilities, ensuring continuous and stable system operation, and completely eliminating the limitations of traditional solutions that rely on manual configuration.
[0118] In the embodiments of this application, the resource allocation scheme includes three stages: initialization detection, scheme matching, and dynamic adjustment. During the initialization detection stage, the controller automatically identifies the current node configuration status and backplane access status through hardware signals, accurately determining whether the SAS system is in single-node or dual-node working mode. During the scheme matching stage, based on the detected resource configuration information, the most suitable resource allocation strategy is selected from a predefined scheme library to ensure that backplanes with different connection methods can obtain optimal resource configuration. For single-node mode, the system adopts a unified management strategy; for dual-node mode, it handles backplane characteristics separately, implementing symmetrical allocation for single-port backplanes and an asymmetric allocation scheme for multi-port backplanes. During the dynamic adjustment stage, the system status is continuously monitored. When node additions, removals, or backplane changes are detected, a configuration reload process is automatically triggered, ensuring business continuity through state maintenance and smooth transition mechanisms.
[0119] In the embodiments of this application, a three-layer firmware design is adopted, including a hardware abstraction layer, a configuration management layer, and a region control layer. The hardware abstraction layer is responsible for GPIO signal acquisition and parsing; the configuration management layer implements scheme matching and verification logic; and the region control layer directly operates the partition registers of the interface to realize resource allocation. This layered design improves the maintainability and scalability of the system.
[0120] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0121] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of this application, those skilled in the art can make various substitutions and modifications, all of which should fall within the scope of this application.
Claims
1. A resource allocation method for a storage system, the storage system comprising a power backplane and at least one target node and at least one hard disk backplane connected to the power backplane, the power backplane comprising an interface module, and each of the at least one hard disk backplane comprising a controller and a hard disk, characterized in that, The method includes: The controller periodically obtains resource configuration information for a first preset number of cycles through the interface module; the resource configuration information includes a node presence signal and a backplane slot code, the node presence signal indicating whether the at least one target node is in the presence state, and the backplane slot code indicating the access address of the connected hard disk backplane connected to the power backplane; If the resource configuration information obtained in a second preset number of consecutive cycles remains unchanged, the identification information of the resource allocation scheme is determined based on the resource configuration information, wherein the second preset number is less than the first preset number. The controller uses the identification information to match solutions in the solution library to obtain a resource allocation solution; and According to the resource allocation scheme, the controller uses the interface module to allocate the storage resources on the connected hard disk backplane to the target node that is in place.
2. The method according to claim 1, characterized in that, The resource allocation scheme includes a single-node allocation scheme and a multi-node allocation scheme. The storage resources include available hard drives on the hard drive backplane. Allocating the storage resources connected to the hard drive backplane to the target node in the in-place state includes: When the node presence signal indicates that a target node is in a present state, the available hard drives connected to the hard drive backplane are allocated to the target node according to the single node allocation scheme. When the node presence signal indicates that at least two target nodes are in a present state, the available hard drives connected to the hard drive backplane are allocated to the at least two target nodes according to the multi-node allocation scheme in a preset ratio.
3. The method according to claim 1, characterized in that, The power supply backplane includes an coded switch connected to the controller; the controller obtains resource configuration information in the following ways: The node presence signal is obtained through the interface module of the power backplane; and The backplane slot code of the hard drive backplane is determined by the encoding value of the encoding switch.
4. The method according to claim 3, characterized in that, The method further includes: In response to the node presence signal indicating a change in the presence status of the at least one target node, the resource allocation scheme for the connected hard disk backplane is redefined. In response to a change in the access address of the at least one backplane indicated by the backplane slot code, the resource allocation scheme of the connected hard disk backplane is re-determined based on the changed backplane slot code.
5. The method according to claim 1, characterized in that, The identification information includes the backplane number and the number of nodes. Determining the identification information for the resource allocation scheme based on the resource configuration information includes: The controller determines the number of nodes based on the node presence signal, and the number of nodes indicates the number of target nodes that are in the presence state. The controller determines the backplane number based on the backplane slot code, and the backplane number indicates the access address of the connected hard drive backplane.
6. The method according to claim 5, characterized in that, The scheme library is used to store resource allocation schemes that match the identification information, with the identification information as an index. The metadata of the resource allocation scheme includes the backplane number and the number of nodes.
7. The method according to claim 1, characterized in that, The method further includes: In response to the controller failing to obtain the resource configuration information within a predetermined time period or the resource configuration information obtained by the controller meeting the matching failure condition, a default allocation scheme for the at least one hard disk backplane is obtained, and the available hard disks of the at least one hard disk backplane are allocated to the at least one target node based on the default allocation scheme.
8. The method according to claim 7, characterized in that, The matching failure condition includes at least one of the following: There is no resource allocation scheme in the scheme library that matches the resource configuration information; The resource allocation scheme determined based on the resource configuration information does not match the target node in the in-situ state and / or the connected hard disk backplane; and The target node in the in-situ state and the connected hard disk backplane are faulty.
9. An electronic device, comprising: A power supply backplane, the power supply backplane including an interface module; At least one target node is connected to the interface module; The hard drive backplane is connected to the at least one target node via the interface module; The hard drive backplane includes: harddisk; A controller, connected to the interface module, is used to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Blade server and resource distribution method and system
CN105515870A
Double-node server hard disk backboard management method and device, equipment and storage medium
CN118069562A