Load balancing method and device of storage system, computer device and medium

By obtaining topology information, dividing segments, assigning controllers, and generating recommended information commands, the problem of load imbalance in active-active storage systems is solved, efficient load balancing and business continuity are achieved, and performance and reliability are improved.

CN120560868BActive Publication Date: 2025-10-10INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511067042.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-31
Publication Date
2025-10-10
Estimated Expiration
2045-07-31

AI Technical Summary

Technical Problem

Existing storage system load balancing technology has problems with uneven load distribution, performance degradation, and slow processing in active-active storage systems. In particular, load balancing of active-active LUNs is difficult to implement. Existing methods are overly dependent on hardware and have poor compatibility, and cannot guarantee business continuity and high availability in the event of node or site failures.

Method used

By acquiring topology information, dividing segments, assigning controllers, and generating recommended information commands, the system dynamically adjusts loads and achieves efficient load balancing. The method involves acquiring the topology information of active-active logical units, dividing them into multiple segments, assigning controllers to each segment according to preset allocation rules, and generating recommended information commands, which are sent to the host to achieve load balancing.

Benefits of technology

Without the need for additional hardware, it dynamically completes segment-level controller assignment and path status notification, achieving fine-grained load balancing across sites and controllers, ensuring business continuity and high availability, and can promptly update path status in the event of node or site failure to ensure uninterrupted business.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120560868B_ABST
    Figure CN120560868B_ABST
Patent Text Reader

Abstract

The application relates to a load balancing method and device of a storage system, computer equipment and a medium. The method comprises the following steps: acquiring current topology information of a dual-active logical unit. The dual-active logical unit is divided into multiple segments according to the topology information. According to a preset allocation rule, a home controller is allocated to each segment, and recommendation information is determined. The recommendation information command is generated according to the recommendation information and is sent to a host. The path selection result returned by the host is received, and the home controller processes the host input and output request of the corresponding segment according to the path selection result to complete the load balancing. The method can realize efficient load balancing by acquiring the topology information, dividing the segments, allocating the home controller, generating the recommendation information command, and dynamically adjusting the load according to the feedback of the host.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data storage technology, and in particular to a load balancing method, apparatus, computer equipment, and medium for a storage system. Background Art

[0002] In a multi-controller storage system, multiple controllers not only provide redundancy to ensure service reliability but also share services to achieve high throughput. However, current load balancing technology has many shortcomings. First, storage systems provide services to service hosts through virtual LUN (Logical Unit Number) mapping. If services are unevenly distributed across controllers, performance degradation and slow processing can occur, impacting user experience. Load balancing for active-active LUNs in active-active storage systems is particularly challenging, and the technical details also cover load balancing issues for non-active-active LUNs. Existing load balancing methods primarily include hardware and software. In terms of hardware, a shared large card is inserted at the front end of the storage system, and the business IO (Input / Output) is forwarded to the corresponding controller based on LBA (Logical Block Addressing) calculation. In terms of software, the host side achieves load balancing by controlling the multi-path routing algorithm and needs to handle node failure and site failure scenarios. However, these methods have obvious defects: they are too dependent on hardware. Once the shared large card fails, load balancing cannot be guaranteed. The host multi-path routing algorithm uses custom commands, which has poor compatibility and cannot ensure that all host systems can recognize it normally. In addition, in the event of a node failure or site failure, the host's perception method cannot be guaranteed to be compatible with various types of host systems. Summary of the Invention

[0003] To address the above shortcomings, this application provides a method, device, computer equipment, and medium for load balancing in a storage system. This method achieves efficient load balancing by acquiring topology information, dividing segments, assigning controllers, generating recommended information commands, and dynamically adjusting the load based on host feedback.

[0004] According to a first aspect, the present application provides a load balancing method for a storage system. The method is applied to an active-active storage cluster, where the active-active storage cluster includes a first site and a second site. The first site and the second site are respectively configured with multiple storage controller nodes. The active-active storage cluster is configured with active-active logical units distributed at the first site and the second site, including:

[0005] Obtain the current topology information of the active-active logical unit, the topology information including the number of storage controller nodes at the first site, the number of storage controller nodes at the second site, and the capacity of the active-active logical unit; divide the active-active logical unit into multiple segments according to the topology information, the total number of segments being equal to the total number of storage controller nodes, and the length of each segment being the same; assign an ownership controller to each segment according to a preset allocation rule, and determine recommendation information; the allocation rule is determined by taking the modulus of the sum of the number of storage controller nodes at the first site and the second site through the sequence number of each segment, and the recommendation information includes the starting logical block address of each segment, the ending logical block address of the segment, the identifier of the corresponding ownership controller, and the port group identifier; generate a recommendation information command according to the recommendation information and send it to the host; receive the path selection result returned by the host, and instruct each ownership controller to process the host input and output request of the corresponding segment according to the path selection result to complete load balancing.

[0006] In some embodiments, assigning a controller to each segment according to a preset assignment rule includes:

[0007] If the host is configured in site priority mode, each storage controller node in the same site is set as the home controller of each segment, so that the host has priority access to the controller node in the site; if the host is configured in load balancing mode, each storage controller node in the first site and the second site is set as the home controller of each segment, so that the host selects the optimal path according to the port group status bitmap set in the recommendation information command to achieve load balancing between each storage controller node in the first site and the second site; wherein, the port group status bitmap is used to instruct the host to select an access path.

[0008] In some embodiments, when generating a recommendation information command based on the recommendation information, the method further includes:

[0009] A port group status bitmap is set in the segment descriptor of the recommendation information command. The port group status bitmap represents the access mode of the current segment through bits. The access mode includes a priority access mode and a non-priority access mode. The current segment refers to the segment currently being accessed when the host accesses the active-active logical unit. The priority access mode represents the optimal access path of the current segment, and the non-priority access mode represents the non-optimal access path of the current segment.

[0010] In some embodiments, generating a recommendation information command based on the recommendation information and sending the command to the host includes:

[0011] When any of the belonging controllers fails, the identifier of the failed belonging controller is obtained; in the segment descriptor of the recommendation information command, the port group status of the failed belonging controller is set to unavailable according to the identifier; based on the serial number of the corresponding segment of the belonging controller, the total number of remaining available belonging controllers is moduloed to update the recommendation information; based on the updated recommendation information, a recommendation information command is generated and sent to the host to notify the host to obtain the updated belonging controller information.

[0012] In some embodiments, generating a recommendation information command based on the recommendation information and sending the command to the host includes:

[0013] When a failure occurs at any site, the failed site is determined to be the first site or the second site; in the segment descriptor of the recommendation information command, the port group status corresponding to each belonging controller in the failed site is set to unavailable; based on the allocation rule, each belonging controller in the failed site is remapped to each belonging controller in another normal site, and the current recommendation information is determined; a recommendation information command is generated based on the current recommendation information and sent to the host to notify the host to obtain the updated belonging controller information.

[0014] In some embodiments, the active-active logical unit is in single-write mode, and generates a recommendation information command based on the recommendation information and sends it to the host, including:

[0015] Determine whether the site where the primary volume is located is the first site or the second site, and the site where the secondary volume is located is another site where the primary volume is located; in the segment descriptor of the recommendation information command, set the port group status corresponding to the site where the secondary volume is located to unavailable; set each ownership controller in the site where the primary volume is located to the ownership controller of all segments, and determine the current recommendation information; generate a recommendation information command based on the current recommendation information and send it to the host to notify the host to obtain the updated ownership controller information.

[0016] In some embodiments, the method further comprises:

[0017] When the host is configured in load balancing mode, the load of each storage controller node is dynamically monitored; based on the monitoring results, the controller belonging to each segment is dynamically adjusted; the segment descriptor in the recommended information command is updated to reflect the adjusted controller information; the updated recommended information command is sent to the host to notify the host to select an access path based on the latest controller information.

[0018] According to a second aspect, the present application provides a load balancing system for a storage system, which is applied to an active-active storage cluster. The active-active storage cluster includes a first site and a second site. The first site and the second site are respectively configured with multiple storage controller nodes. The active-active storage cluster is configured with active-active logical units distributed at the first site and the second site, including:

[0019] The topology information acquisition module is used to obtain the current topology information of the active-active logical unit, where the topology information includes the number of storage controller nodes at the first site, the number of storage controller nodes at the second site, and the capacity of the active-active logical unit.

[0020] The continuous segment generation module is used to divide the active-active logical unit into multiple segments according to the topology information. The total number of segments is equal to the total number of storage controller nodes, and the length of each segment is the same.

[0021] The controller allocation module is used to allocate a controller to each segment according to a preset allocation rule and determine recommended information; the allocation rule is determined by taking the modulus of the sum of the number of storage controller nodes at the first site and the second site by the sequence number of each segment, and the recommended information includes the starting logical block address of each segment, the ending logical block address of the segment, the identifier of the corresponding controller, and the port group identifier.

[0022] The recommendation command sending module is used to generate a recommendation information command according to the recommendation information and send it to the host.

[0023] The load balancing module is used to receive the path selection result returned by the host and, based on the path selection result, instruct each home controller to process the host input and output requests of the corresponding segment to achieve load balancing.

[0024] According to a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the load balancing method for the storage system in any one of the above embodiments are implemented.

[0025] According to a fourth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which, when executed by the processor, implements the steps of the load balancing method for the storage system in any one of the above-mentioned embodiments.

[0026] The load balancing method of the storage system can be applied to a dual-active storage cluster, the dual-active storage cluster comprising a first site and a second site, the first site and the second site being respectively configured with a plurality of storage controller nodes, and the dual-active storage cluster being configured with a dual-active logical unit distributed in the first site and the second site; the method comprising: first acquiring current topology information of the dual-active logical unit. Then, the dual-active logical unit is divided into a plurality of segments according to the topology information. Next, a home controller is allocated to each segment according to a preset allocation rule, and recommendation information is determined. The allocation rule is determined by taking the sum of the number of storage controller nodes of the first site and the second site as a modulus of the serial number of each segment, and the recommendation information comprises a starting logical block address of each segment, a segment end logical block address, an identifier of the corresponding home controller and a port group identifier. Finally, a recommendation information command is generated according to the recommendation information and sent to a host; a path selection result returned by the host is received, and each home controller processes the host input and output request of the corresponding segment according to the path selection result to complete load balancing. Therefore, the steps of the above method realize efficient load balancing by acquiring topology information, dividing segments, allocating home controllers, generating recommendation information commands, and dynamically adjusting load according to host feedback. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 A flowchart of a load balancing method of a storage system in one or more embodiments of the present application;

[0028] Figure 2 A flowchart of a method for implementing segment-level home controller allocation and path state notification in one or more embodiments of the present application;

[0029] Figure 3 A flowchart of a method for implementing segment-level home controller allocation and path state notification in another one or more embodiments of the present application;

[0030] Figure 4 A flowchart of a method for completing segment-level remapping and path state synchronization when a home controller fails in one or more embodiments of the present application;

[0031] Figure 5 A flowchart of a method for completing segment-level remapping and path state synchronization when a site-level failure occurs in one or more embodiments of the present application;

[0032] Figure 6 A flowchart of a method for completing path switching in a node failure scenario in one or more embodiments of the present application;

[0033] Figure 7 A flowchart of a method for completing path state switching and segment-level remapping when a DALU enters a single-write mode in one or more embodiments of the present application;

[0034] Figure 8 This is a flow chart of a processing method in a single-write mode in one embodiment of the present application;

[0035] Figure 9 This is a flow chart of a method for continuously monitoring and dynamically rebalancing the load of each controller in a load balancing mode in one embodiment of the present application;

[0036] Figure 10 This is an example diagram of segment division and site distribution in one of the embodiments of this application;

[0037] Figure 11 This is an example diagram of segment-home controller mapping in one of the embodiments of this application;

[0038] Figure 12 This is an example of a segment-port group status bitmap in one of the embodiments of the present application;

[0039] Figure 13 This is a structural diagram of a load balancing system of a storage system in another embodiment of the present application;

[0040] Figure 14 This is a schematic diagram of the internal structure of a computer device in one or more embodiments of the present application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0042] According to a first aspect, the present application provides a load balancing method for a storage system. The method is applied to a dual-active storage cluster (DASC). The DASC includes a first site and a second site. The first site and the second site are respectively configured with multiple storage controller nodes. The DASC is configured with dual-active logical units distributed at the first site and the second site, including:

[0043] In certain exemplary embodiments of the present application, Figure 1 As shown, the method includes the following steps:

[0044] Step 101: Obtain current topology information of the active-active logical unit.

[0045] Topology information includes the number of storage controller nodes at the first site, the number of storage controller nodes at the second site, and the capacity of active-active logical units. An active-active logical unit refers to a logical storage volume that maintains online read / write access at both redundant storage sites and is directly accessible by controllers at either site. The first site can be the primary storage site in an active-active cluster that handles primary services and prioritizes host input / output (I / O). The second site is a redundant storage site that maintains a real-time mirroring relationship with the first site and seamlessly takes over services in the event of a failure.

[0046] Generally, the current topology information TopInfo of a Dual-Active Logical Unit (DALU) may include: the number of primary site controllers (PSC), which refers to the total number of storage controller nodes participating in the DALU service at site 1; the number of secondary site controllers (SSC), which refers to the total number of storage controller nodes participating in the DALU service at site 2; and the capacity (Cap) of the active-active logical unit, which is the total addressable space of the DALU measured in logical blocks (LBs).

[0047] Step 102: Divide the active-active logical unit into multiple segments according to the topology information.

[0048] Among them, a segment is a continuous logical block address range that is divided into equal lengths in the DALU and accessed by a single controller. The total number of segments is equal to the total number of storage controller nodes N = PSC + SSC, and the length of each segment is the same.

[0049] For example, DASC can divide the DALU into N equal-length data segments (hereinafter referred to as Segments) at one time based on TopInfo through the front-end protocol module, and set the length of each segment (SegLen) = Cap ÷ N, round SegLen down to the logical block boundary, and merge the remaining space less than N blocks into the last segment.

[0050] Step 103: Allocate an attribution controller to each segment according to a preset allocation rule, and determine recommendation information.

[0051] The allocation rule is determined by taking the sequence number of each segment modulo the sum of the number of storage controller nodes at the first and second sites. Recommended information includes each segment's starting logical block address, segment ending logical block address, corresponding owning controller identifier, and port group identifier. The owning controller (hereinafter referred to as OwnerCtl) is the storage controller node responsible for processing all I / O requests for a specified segment, determined based on the preset allocation rule (hereinafter referred to as AssignRule).

[0052] For example, DASC can determine the home controller for each Segment according to AssignRule through the front-end protocol module and generate recommendation information (hereinafter referred to as RefInfo).

[0053] Among them, AssignRule can be defined as:

[0054] OwnerCtl = SegmentID mod N, where SegmentID is numbered sequentially starting from 0;

[0055] When 0≤SegmentID mod N <PSC时,归属第一站点内编号为SegmentID mod N的控制器;

[0056] Otherwise, it belongs to the controller numbered SegmentID mod N–SSC in the second site.

[0057] RefInfo is a list of four-tuples, with each segment corresponding to a four-tuple:

[0058] {StartLBA,EndLBA,OwnerCtlID,PortGroupID};

[0059] Among them, StartLBA represents the segment start logical block address, EndLBA represents the segment end logical block address, OwnerCtlID represents the globally unique identifier of the owning controller, and PortGroupID represents the SCSITarget Port Group identifier corresponding to the owning controller, which is used for SCSI Referrals command addressing.

[0060] Step 104: Generate a recommendation information command based on the recommendation information and send it to the host; receive the path selection result returned by the host, and instruct each home controller to process the host input and output requests of the corresponding segment based on the path selection result to achieve load balancing.

[0061] Path selection result (hereinafter referred to as PathSel): The host multipathing software selects the active / optimized path identifier for accessing a segment based on RefInfo.

[0062] For example, the DASC front-end protocol module can encapsulate RefInfo into a report recommendation information (standard SCSIREPORT REFERRALS) command and send it to the host. The host multipathing software parses the RefInfo, selects the active / optimized path, and returns the PathSel. Based on the PathSel instruction, the front-end protocol module processes the host I / O requests for that segment with the corresponding controller, achieving load balancing within the active-active cluster.

[0063] Through steps 101 to 104, DASC achieves efficient load balancing by obtaining topology information, dividing segments, assigning home controllers, generating recommendation information commands, and dynamically adjusting loads based on host feedback.

[0064] In some embodiments, step 103 includes the following steps:

[0065] If the host is configured in site priority mode, each storage controller node in the same site is set as the home controller of each segment, so that the host has priority access to the controller node in the site.

[0066] Alternatively, if the host is configured in load balancing mode, each of the storage controller nodes in the first site and the second site is set as the belonging controller of each of the segments, so that the host selects the optimal path according to the port group status bitmap set in the recommendation information command to achieve load balancing between each of the storage controller nodes in the first site and the second site.

[0067] The port group status bitmap indicates the host's access path selection. For example, DASC can obtain the host's current policy identifier (PolicyID) from the front-end protocol module. PolicyID is a 1-byte enumeration value: 0x00 indicates site-preferred mode (SPM), and 0x01 indicates load-balanced mode (LBM).

[0068] If PolicyID=0x00 (SPM), Figure 2 As shown, DASC can perform the following sub-steps:

[0069] 1. The front-end protocol module sets all storage controller nodes in the preferred site (preset by the user as site1 or site2) as the owner controller of the corresponding segment in sequence;

[0070] 2. Generate site priority recommendation information (hereinafter referred to as Site-RefInfo). In its Port-State-Bitmap, only the PortGroupID bit corresponding to the priority site is set to Active / Optimized, and all other bits are set to Active / Non-Optimized.

[0071] 3. After parsing the Site-RefInfo, the host multipathing software selects only the Active / Optimized path within the priority site to deliver I / O, ensuring that service traffic falls entirely on that site, implementing a "site priority" load balancing strategy.

[0072] Assume that PSC = 4, SSC = 4, and the preferred site is site 1. The OwnerCtl values ​​for segments 0-7 are site 1-0, site 1-1, site 1-2, site 1-3, site 1-0, site 1-1, site 1-2, and site 1-3, respectively. In the Port-State-Bitmap, only bits 0-3 are set to 1, and bits 4-7 are set to 0.

[0073] Or, if PolicyID=0x01 (LBM), Figure 3 As shown, DASC can perform the following sub-steps:

[0074] 1. The front-end protocol module sets all storage controller nodes at the first and second sites alternately as the owner controllers of the corresponding segments, OwnerCtl, according to AssignRule.

[0075] Generates load balancing recommendation information (LB-RefInfo) with the port group state bitmap (Port-State-Bitmap) set to Active / Optimized for all PortGroupIDs.

[0076] 3. After the host multipath software parses the LB-RefInfo, it can freely select the Active / Optimized path between all storage controller nodes at the first and second sites to achieve cross-site load balancing.

[0077] Assume PSC = 4, SSC = 4, and the OwnerCtl of Segments 0-7 are site1-0, site1-1, site1-2, site1-3, site2-0, site2-1, site2-2, and site2-3, respectively. Bits 0-7 of the Port-State-Bitmap are all set to 1. The Port-State-Bitmap is an 8-bit mask, with each bit corresponding to a PortGroupID. Setting a bit to 1 indicates Active / Optimized, while clearing it to 0 indicates Active / Non-Optimized. This bit indicates that the host selects an access path.

[0078] Through the above steps, DASC can dynamically complete segment-level controller assignment and path status notification without the need for additional hardware, relying solely on standard SCSI REPORT REFERRALS interaction between the front-end protocol module and the host. Regardless of whether the host is configured in site-priority mode or load balancing mode, fine-grained load balancing across sites and controllers can be achieved. In the event of a node or site failure, the front-end protocol module will instantly update the RefInfo and Port-State-Bitmap, allowing the host multipath software to automatically switch to the remaining Active / Optimized paths, thereby ensuring business continuity and high availability.

[0079] In some embodiments, when generating a recommendation information command based on the recommendation information, step 104 further includes the following steps:

[0080] Set the port group status bitmap in the segment descriptor of the recommended information command.

[0081] The port group status bitmap uses bits to indicate the access mode of the current segment. Access modes include priority access mode and non-priority access mode. The current segment refers to the segment currently being accessed when the host accesses the active-active logical unit. The priority access mode indicates the optimal access path for the current segment, and the non-priority access mode indicates a suboptimal access path for the current segment.

[0082] DASC can insert the Port-State-Bitmap into the segment descriptor (hereinafter referred to as Segment-Descriptor) of the recommendation information command (hereinafter referred to as RepCmd) through the front-end protocol module.

[0083] The Port-State-Bitmap is an N-bit fixed-length mask, whose length is equal to the total number of storage controller nodes N = PSC + SSC; each bit corresponds to a PortGroupID, and the bit number is mapped one-to-one with the PortGroupID.

[0084] Setting the bit to 1 indicates the preferred access mode (PA), indicating that the PortGroupID corresponding to this bit is the active / optimized path of the current segment.

[0085] Clearing this bit to 0 indicates non-preferred-access (NPA) mode, indicating that the PortGroupID corresponding to this bit is an active / non-optimized path.

[0086] Assume that PSC = 4, SSC = 4, and the owner controller OwnerCtl of the current segment is site1-2. The Port-State-Bitmap is 0b0000_0100_0000_0000, where bit 2 = 1 indicates priority access mode, and the remaining bits are 0, indicating non-priority access mode.

[0087] Next, the DASC can also use the front-end protocol module to append the segment identifier Segment-ID and the current segment Port-State-Bitmap to the segment descriptor to form a tuple {Segment-ID, current segment Port-State-Bitmap}, which is sent to the host along with the current segment RepCmd. After parsing, the host multipathing software selects only the current segment PortGroupID with the current segment 1 set as the current segment Active / Optimized current segment path of the current segment, completing PathSel.

[0088] Through the above steps, DASC can accurately indicate the optimal access path for each segment in the current segment RepCmd in real time, allowing the host to implement segment-level path optimization and fault switching based on the bit status of the current segment Port-State-Bitmap without relying on additional hardware, thereby improving the overall current segment I / O current segment performance and reliability.

[0089] In some embodiments, as Figure 4 As shown, step 104 includes the following steps:

[0090] Step 401: When any home controller fails, obtain the identifier of the failed home controller.

[0091] When a DASC detects a fault in any OwnerCtl through a pre-set fault detection module (hereinafter referred to as FC-Detector), it immediately reads the controller's globally unique identifier (FaultCtlID) from the controller fault table (hereinafter referred to as CFT). The CFT is a read-only register maintained by the front-end protocol module that contains only the faulty controller identifier. It has a width of 1 Byte and is set on fault and cleared on recovery.

[0092] Step 402: In the segment descriptor of the recommendation information command, the port group status of the faulty controller is set to unavailable according to the identifier.

[0093] The DASC can force the corresponding bit of the Port-State-Bitmap corresponding to the FaultCtlID in the Segment-Descriptor to the Unavailable state (hereinafter referred to as Unavailable-State) in the RepCmd to be sent by the front-end protocol module. Unavailable-State uses binary 0 to represent Active / Non-Optimized and adds the Unit-Attention flag to inform the host that the path has failed.

[0094] Step 403: Based on the sequence number of the segment corresponding to the home controller, modulo the total number of available home controllers remaining, and update the recommendation information.

[0095] DASC can re-execute AssignRule based on the total number of remaining available home controllers R=N–1 (where N=PSC+SSC) through the front-end protocol module:

[0096] AssignRule:OwnerCtl=SegmentID mod R;

[0097] Then update RefInfo, remap the Segment responsible for the original FaultCtlID to one of the remaining controllers, and synchronously adjust the {StartLBA, EndLBA, OwnerCtlID, PortGroupID} quadruple.

[0098] Assume PSC=4, SSC=4, N=8; if site1-2 fails, then R=7; Segment2, originally mapped to site1-2, is now mapped to site1-3 (SegmentID=2, 2mod7=2, still located at the first site).

[0099] Step 404: Generate a recommendation information command according to the updated recommendation information and send it to the host to notify the host to obtain the updated home controller information.

[0100] DASC can encapsulate the updated RefInfo into RepCmd through the front-end protocol module and send it to the host using the standard SCSIREPORT REFERRALS command. After the host multipathing software parses the RepCmd, it automatically eliminates the faulty path, selects the updated Active / Optimized path PathSel, and continues service I / O.

[0101] Through steps 401 to 404, DASC can complete segment-level remapping and path status synchronization at the moment of home controller failure, ensuring zero service interruption and maintaining load balancing without manual intervention.

[0102] In some embodiments, as Figure 5 As shown, step 104 includes the following steps:

[0103] Step 501: When a failure occurs at any site, determine whether the failed site is the first site or the second site.

[0104] When a DASC detects, through a preset site fault detection module (SF-Detector), that the inter-cluster heartbeat signal interruption between any site and its peer site lasts longer than a preset threshold (Tfail, for example, 200 milliseconds), it immediately identifies the site as a faulty site (Fault-Site) and outputs a faulty site identifier (FaultSiteID). The SF-Detector can be timer-counter logic embedded in the front-end protocol module, with a 1-bit output width: 0 indicates a fault at site 1, and 1 indicates a fault at site 2.

[0105] Step 502: In the segment descriptor of the recommendation information command, the status of the port group corresponding to each home controller in the faulty site is set to unavailable.

[0106] DASC can traverse the segment descriptors of all segments in the RepCmd to be sent through the front-end protocol module, and set the Port-State-Bitmap related bits of all OwnerCtls corresponding to the FaultSiteID to Unavailable-State, and attach the Unit-Attention flag UA-Site-Down to notify the host at one time that all paths to the site have failed.

[0107] Step 503: Based on the allocation rule, each home controller in the faulty site is remapped to each home controller in another normal site, and current recommendation information is determined.

[0108] DASC can execute site-level remapping rules (hereinafter referred to as Site-ReMapRule) through the front-end protocol module: for any Segment, if the original OwnerCtl∈Fault-Site, its OwnerCtl is remapped to a controller selected in sequence in another normal site (hereinafter referred to as Normal-Site), and the total number of segments N remains unchanged; then the recommended information RefInfo-SiteFail is updated, and the four-tuple {StartLBA, EndLBA, OwnerCtlID, PortGroupID} is adjusted synchronously.

[0109] Assume PSC=4, SSC=4, and N=8. If site 2 fails, segments 4-7, originally mapped to sites 2-0 through 2-3, are now mapped to sites 1-0 through 1-3. In the Port-State-Bitmap in RefInfo-SiteFail, only bits 0-3 are set to 1, and bits 4-7 are set to 0.

[0110] Step 504: Generate a recommendation information command based on the current recommendation information and send it to the host to notify the host to obtain updated home controller information.

[0111] DASC can encapsulate RefInfo-SiteFail as RepCmd-SiteFail through the front-end protocol module and immediately send it to the host through the standard SCSI REPORT REFERRALS command. After parsing, the host multipathing software automatically eliminates all paths of the Fault-Site, selects the Active / Optimized path PathSel-SiteFail of the Normal-Site, and continues business I / O.

[0112] Through steps 501 to 504, DASC can complete segment-level remapping and path status synchronization within the millisecond time window when a site-level failure occurs, achieving single-site takeover without manual intervention, ensuring zero service interruption and maintaining load balancing.

[0113] In some embodiments, as Figure 6 As shown, step 104 includes the following steps:

[0114] Step 601: When the FC-Detector detects a fault in any owner controller OwnerCtl, it immediately writes the controller's identifier FaultCtlID into the CFT and triggers an update of the site's optimal path table (OPT). The OPT is a segment-path mapping table maintained by the front-end protocol module with a width of N × 1 bytes, which is used to record the optimal PortGroupID of each segment.

[0115] Step 602: The front-end protocol module sends a path information change notification UA-Path-Change (path change unit attention notification) to the host through the Unit-Attention mechanism, so that the host actively initiates a REPORT REFERRALS request to obtain updates.

[0116] Step 603: The front-end protocol module synchronously sends the latest OPT to the peer cluster storage2 via the inter-cluster control channel. After receiving the OPT, the peer cluster also updates the local OPT and sends UA-Path-Change to its host. This ensures that both hosts can obtain the latest and consistent referral information RefInfo-NodeFail (the latest recommendation information in the node failure scenario) within milliseconds in the event of a node failure, thereby completing the path switch and continuing business I / O.

[0117] In some embodiments, the active-active logical unit is in single-write mode, such as Figure 7 As shown, step 104 includes the following steps:

[0118] Step 701: Determine whether the site where the primary volume is located is the first site or the second site, and whether the site where the secondary volume is located is another site where the primary volume is located.

[0119] DASC can receive the write mode flag (WriteModeFlag) from the backend synchronization module through the preset single-write decision module (Write-Mode Arbiter, hereinafter referred to as WMA); when WriteModeFlag = 0x01, it determines that DALU enters the single-write mode (hereinafter referred to as SWM, Single-Write Mode) and outputs the primary volume site identifier (PrimarySiteID) and the secondary volume site identifier SecondarySiteID.

[0120] PrimarySiteID is a 1-bit enumeration value. 0 indicates that site1 is the site where the primary volume is located, and 1 indicates that site2 is the site where the primary volume is located. SecondarySiteID can be the bitwise complement of PrimarySiteID and is used to uniquely identify the site where the secondary volume is located.

[0121] Step 702: In the segment descriptor of the recommendation information command, the status of the port group corresponding to the site where the auxiliary volume is located is set to unavailable.

[0122] DASC can use the front-end protocol module to force all bits in the Port-State-Bitmap of the port group state bitmap corresponding to all the owner controllers OwnerCtl of the SecondarySiteID to the unavailable state in the Segment-Descriptor of RepCmd, and append the Unit-Attention flag UA-Single-Write to inform the host that the auxiliary volume path has been completely offline.

[0123] Step 703: Set each owning controller in the site where the primary volume is located as the owning controller of all segments, and determine the current recommendation information.

[0124] DASC can use the front-end protocol module to set all storage controller nodes within PrimarySiteID as the owner controllers of all N segments, OwnerCtl-SWM, in sequence according to the primary volume exclusive rule (Primary-Only-Rule), and generate single-write recommendation information RefInfo-SWM; the OwnerCtlID and PortGroupID in the RefInfo-SWM quadruple only point to the controller within PrimarySiteID, ensuring that all host I / O falls into the primary volume site.

[0125] Assume that PSC = 4, SSC = 4, and PrimarySiteID = 0 (site1). The OwnerCtl-SWM values ​​for segments 0-7 are site1-0, site1-1, site1-2, site1-3, site1-0, site1-1, site1-2, and site1-3, respectively. In the Port-State-Bitmap, only bits 0-3 are set to 1, and bits 4-7 are set to 0.

[0126] Step 704: Generate a recommendation information command based on the current recommendation information and send it to the host to notify the host to obtain updated home controller information.

[0127] DASC can encapsulate the RefInfo-SWM message into a RepCmd-SWM message through the front-end protocol module and send it to the host using the standard SCSIREPORT REFERRALS command. After parsing, the host multipathing software selects only the Active / Optimized path PathSel-SWM message of the PrimarySiteID and continues to send I / O to the primary volume site. The secondary volume site remains silent until the WriteModeFlag value returns to 0x00.

[0128] Through steps 701 to 704, DASC can complete path state switching and segment-level remapping in milliseconds when the DALU enters single-write mode, ensuring that the host only accesses the primary volume site, avoiding cross-site write conflicts, achieving data consistency and maintaining business continuity.

[0129] In some embodiments, as Figure 8 As shown, step 104 includes the following steps:

[0130] Step 801: After receiving the REPORT REFERRALS request from the host, the front-end protocol module first reads the WriteModeFlag. If WriteModeFlag = 0x01 (Single-Write Mode, SWM), proceed to step 802.

[0131] Step 802: The front-end protocol module determines the primary volume site PrimarySiteID (site1 in the figure) and the secondary volume site SecondarySiteID (site2 in the figure), and sets the Port-State-Bitmap of all storage controller nodes belonging to SecondarySiteID to Unavailable-State in the Segment-Descriptor. At the same time, all nodes corresponding to PrimarySiteID are set to the priority access mode Active / Optimized. Then, the latest recommendation information (RefInfo-SWM) is assembled according to 8 segments (seg0~seg7) and encapsulated into a standard SCSI REPORT REFERRALS command and sent to the host, so that the host completes I / O only through the primary volume site. The secondary volume site path is marked as unavailable, realizing path isolation and data consistency guarantee in single-write mode.

[0132] In some embodiments, as Figure 9 As shown, the method further includes the following steps:

[0133] Step 901: When the host is configured in load balancing mode, dynamically monitor the load status of each storage controller node.

[0134] For example, when the host is configured as LBM, DASC can enable the load monitoring submodule (hereinafter referred to as Load-Monitor, LM) through the front-end protocol module to poll the real-time load indicator (LoadMetric) of each storage controller node periodically (Tpoll, which can be 1 second).

[0135] The LoadMetric is obtained by weighted summation of the following three items:

[0136] CPU-Util: Controller CPU utilization (unit: %).

[0137] IO-QD: The internal I / O queue depth of the controller, in bars;

[0138] BW-Util: port bandwidth utilization, unit: %

[0139] LM writes LoadMetric into the load table LoadTable, which is 3 bytes wide and arranged in the order of PortGroupID.

[0140] Step 902: Dynamically adjust the belonging controller of each segment according to the monitoring result; update the segment descriptor in the recommendation information command to reflect the adjusted belonging controller information.

[0141] DASC can use the front-end protocol module to determine whether there is an overloaded node based on the preset load threshold algorithm (Load-Thresh-Algo):

[0142] If a node's LoadMetric ≥ ThreshHigh (a high load threshold of 80%), the node is marked as an overloaded node (OverCtl). The segment migration rule (Segment-Migrate-Rule) is then executed: from the set of segments currently managed by OverCtl, the neighboring node UnderCtl with the lightest load is selected as the new owner controller (NewOwnerCtl).

[0143] Update the segment descriptor Segment-Descriptor, set the PortGroupID corresponding to NewOwnerCtl to PA (Active / Optimized), set the original OverCtl to NPA (Active / Non-Optimized), and simultaneously refresh RefInfo-Dyn.

[0144] Step 903: Send the updated recommendation information command to the host to notify the host to select an access path according to the latest home controller information.

[0145] DASC can encapsulate RefInfo-Dyn into an updated recommendation information command (RepCmd-Dyn) through the front-end protocol module and immediately send it to the host using the standard SCSI REPORT REFERRALS command. After the host multipathing software parses RepCmd-Dyn, it selects Active / Optimized as the dynamic path selection result (PathSel-Dyn) based on the latest segment descriptor, enabling access to the adjusted home controller.

[0146] Through steps 901 to 903, DASC can continuously monitor and dynamically rebalance the load of each controller in load balancing mode, maintaining the optimal performance distribution across sites and controllers without manual intervention.

[0147] In such Figures 10-12 In one embodiment, a load balancing method for a storage system is applied to a DASC. The DASC includes a first site (site 1) and a second site (site 2), each of which is configured with a PSC and an SSC storage controller node. Active-active logical units (DALUs) are distributed within the DASC. The method includes the following steps:

[0148] Step S1: The front-end protocol module obtains the current DALU topology information (TopInfo) through a topology detection frame (Top-Probe). TopInfo includes PSC, SSC, and DALU capacity (Cap) in units of logical blocks (LB).

[0149] Step S2: The front-end protocol module divides the DALU into N equal-length segments based on TopInfo, where N = PSC + SSC, and the length of each segment SegLen = Cap ÷ N (rounded down). The remaining shortfall is merged into the last segment. Figure 10 In the example shown, PSC=4, SSC=4, so N=8, and the segments are numbered seg0 to seg7.

[0150] Step S3: Assign an owner controller OwnerCtl to each Segment according to the assignment rule AssignRule = SegmentID mod N; the recommended information (RefInfo) is represented by a four-tuple {StartLBA, EndLBA, OwnerCtlID, PortGroupID}. Figure 11 Taking 32 megabytes as an example, each 32 megabytes is a Segment, and StartLBA and EndLBA correspond to continuous logical block intervals.

[0151] Step S4: The front-end protocol module encapsulates RefInfo into a standard SCSI REPORT REFERRALS command RepCmd and passes Figure 12 The port group state bitmap Port-State-Bitmap shown indicates the access mode of each path:

[0152] Active / Optimized: Binary 1, indicating the path the host should prefer;

[0153] Active / Non-Optimized: Binary 0, indicating a tolerable but non-optimal path.

[0154] Figure 12 "active optimized" means optimal, and "active / non-optimized" means non-optimal.

[0155] Step S5: After receiving RepCmd, the host multipath software returns the path selection result PathSel; the front-end protocol module orders the corresponding OwnerCtl to process the host I / O of the Segment according to PathSel to complete load balancing.

[0156] Through the above steps, DASC can achieve segment-level fine-grained load balancing without additional hardware, and update RefInfo in milliseconds when a node or site fails, ensuring zero service interruption.

[0157] According to a second aspect, the present application provides a load balancing system for a storage system, such as Figure 13 As shown, the system is applied to an active-active storage cluster, which includes a first site and a second site. The first site and the second site are respectively configured with multiple storage controller nodes. The active-active storage cluster is configured with active-active logical units distributed at the first site and the second site, including:

[0158] The topology information acquisition module 110 is configured to acquire current topology information of the active-active logical unit, where the topology information includes the number of storage controller nodes at the first site, the number of storage controller nodes at the second site, and the capacity of the active-active logical unit.

[0159] The continuous segment generation module 120 is configured to divide the active-active logical unit into multiple segments according to the topology information. The total number of segments is equal to the total number of storage controller nodes, and the length of each segment is the same.

[0160] The controller distribution module 130 is configured to distribute the home controllers to each segment according to a preset distribution rule, and determine recommendation information; the distribution rule is determined by taking a sum of the storage controller nodes of the first site and the second site modulo a serial number of each segment, and the recommendation information includes a start logical block address of each segment, an end logical block address of the segment, an identifier of the corresponding home controller, and a port group identifier.

[0161] The recommendation command sending module 140 is configured to generate a recommendation information command according to the recommendation information, and send the recommendation information command to the host.

[0162] The load balancing module 150 is configured to receive a path selection result returned by the host, and cause each home controller to process a host input / output request of a corresponding segment according to the path selection result to complete load balancing.

[0163] In some embodiments, the controller distribution module 130 is further configured to, if the host is configured in a site priority mode, set each storage controller node in a same site as a home controller of each segment, so that the host preferentially accesses the controller nodes in the site; and if the host is configured in a load balancing mode, set each storage controller node in the first site and the second site as a home controller of each segment, so that the host selects an optimal path according to a port group state bitmap set in the recommendation information command to achieve load balancing between each storage controller node in the first site and the second site.

[0164] In some embodiments, when the recommendation information command is generated according to the recommendation information, the recommendation command sending module 140 is further configured to set a port group state bitmap in a segment descriptor of the recommendation information command, and the port group state bitmap indicates an access mode of a current segment by a bit, and the access mode includes a priority access mode and a non-priority access mode.

[0165] In some embodiments, the recommendation command sending module 140 is further configured to, when any home controller fails, acquire an identifier of the failed home controller; set a port group state of the failed home controller as unavailable in the segment descriptor of the recommendation information command; take a total number of the remaining available home controllers modulo a serial number of a segment corresponding to the home controller, update the recommendation information; generate the recommendation information command according to the updated recommendation information, and send the recommendation information command to the host, so as to notify the host to acquire the updated home controller information.

[0166] In some embodiments, the recommendation command sending module 140 is also used to determine whether the failed site is the first site or the second site when a failure occurs at any site; in the segment descriptor of the recommendation information command, the port group status corresponding to each belonging controller in the failed site is set to unavailable; based on the allocation rules, each belonging controller in the failed site is remapped to each belonging controller in another normal site, and the current recommendation information is determined; a recommendation information command is generated according to the current recommendation information and sent to the host to notify the host to obtain the updated belonging controller information.

[0167] In some embodiments, the active-active logical unit is in single-write mode, and the recommendation command sending module 140 is further used to determine that the site where the primary volume is located is the first site or the second site identifier, and the site where the auxiliary volume is located is another site where the primary volume is located; in the segment descriptor of the recommendation information command, the port group status corresponding to the site where the auxiliary volume is located is set to unavailable; each ownership controller in the site where the primary volume is located is set as the ownership controller of all segments, and the current recommendation information is determined; a recommendation information command is generated according to the current recommendation information and sent to the host to notify the host to obtain the updated ownership controller information.

[0168] In some embodiments, the recommendation command sending module 140 is also used to dynamically monitor the load status of each storage controller node when the host is configured in load balancing mode; dynamically adjust the ownership controller of each segment based on the monitoring results; update the segment descriptor in the recommendation information command to reflect the adjusted ownership controller information; and send the updated recommendation information command to the host to notify the host to select an access path based on the latest ownership controller information.

[0169] The specific definitions of a load balancing system applicable to storage systems can be found in the definitions of a load balancing method applicable to storage systems described above and will not be further elaborated here. Each module in the aforementioned load balancing system applicable to storage systems may be implemented in whole or in part via software, hardware, or a combination thereof. Each of the aforementioned modules may be embedded in or independent of a processor in a computer device in hardware form, or may be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0170] According to a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the load balancing method for the storage system in any one of the above embodiments are implemented.

[0171] According to a fourth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which, when executed by the processor, implements the steps of the load balancing method for the storage system in any one of the above-mentioned embodiments.

[0172] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 14 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to the load balancing of the storage system. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements any of the above-mentioned methods for load balancing of the storage system.

[0173] In particular, any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (RamCUs), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0174] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0175] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make numerous variations and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application.

[0176] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

Claims

1. A load balancing method for a storage system, characterized in that: The method is applied to an active-active storage cluster, the active-active storage cluster including a first site and a second site, the first site and the second site respectively configured with multiple storage controller nodes, and the active-active storage cluster configured with active-active logical units distributed at the first site and the second site, including: Obtaining current topology information of the active-active logical unit, the topology information including the number of storage controller nodes at the first site, the number of storage controller nodes at the second site, and the capacity of the active-active logical unit; Dividing the active-active logical unit into a plurality of segments according to the topology information, wherein the total number of the segments is equal to the total number of the storage controller nodes, and the lengths of the segments are the same; Assigning a controller to each segment according to a preset allocation rule and determining recommended information; the allocation rule is determined by taking the modulo of the sum of the number of storage controller nodes at the first site and the second site by the sequence number of each segment, and the recommended information includes the starting logical block address, the ending logical block address, the corresponding controller identifier, and the port group identifier of each segment; generating a recommendation information command according to the recommendation information and sending the command to the host; receiving a path selection result returned by the host, and instructing each home controller to process the host input and output requests of the corresponding segment according to the path selection result to achieve load balancing; Allocating a controller to each segment according to a preset allocation rule includes: If the host is configured in site priority mode, each storage controller node in the same site is set as the home controller of each segment, so that the host has priority access to the controller node in the site; If the host is configured in load balancing mode, setting each of the storage controller nodes in the first site and the second site as the home controller of each of the segments, so that the host selects an optimal path according to the port group status bitmap set in the recommendation information command to achieve load balancing between each of the storage controller nodes in the first site and the second site; The port group status bitmap is used to instruct the host to select an access path.

2. The method according to claim 1, characterized in that When generating a recommendation information command according to the recommendation information, the method further includes: Setting a port group status bitmap in the segment descriptor of the recommendation information command, wherein the port group status bitmap indicates an access mode of the current segment through bits, wherein the access mode includes a priority access mode and a non-priority access mode; The current segment refers to the segment currently being accessed when the host accesses the active-active logical unit, the priority access mode represents the optimal access path of the current segment, and the non-priority access mode represents the non-optimal access path of the current segment.

3. The method according to claim 1, characterized in that Generating a recommendation information command according to the recommendation information and sending the command to the host includes: When any home controller fails, obtain the identifier of the failed home controller; In the segment descriptor of the recommendation information command, setting the port group status of the faulty controller to unavailable according to the identifier; Based on the sequence number of the segment corresponding to the home controller, modulo the total number of available home controllers remaining, and update the recommendation information; The recommendation information command is generated according to the updated recommendation information and sent to the host to notify the host to obtain the updated home controller information.

4. The method according to claim 1, wherein Generating a recommendation information command according to the recommendation information and sending the command to the host includes: When a failure occurs at any site, determining whether the failed site is the first site or the second site; In the segment descriptor of the recommendation information command, setting the port group status corresponding to each home controller in the faulty site to unavailable; Based on the allocation rule, remap the home controllers in the faulty site to the home controllers in another normal site, and determine current recommendation information; The recommendation information command is generated according to the current recommendation information and sent to the host to notify the host to obtain updated home controller information.

5. The method according to claim 1, wherein The active-active logic unit is in a single-write mode, and generating a recommendation information command according to the recommendation information and sending the command to the host includes: Determine that the site where the primary volume is located is the first site or the second site identifier, and the site where the secondary volume is located is another site where the primary volume is located; In the segment descriptor of the recommendation information command, the port group status corresponding to the site where the auxiliary volume is located is set to unavailable; Setting each of the ownership controllers in the site where the primary volume is located as the ownership controller of all the segments, and determining current recommendation information; The recommendation information command is generated according to the current recommendation information and sent to the host to notify the host to obtain updated home controller information.

6. The method according to claim 2, characterized in that The method further comprises: When the host is configured in load balancing mode, dynamically monitoring the load of each storage controller node; Dynamically adjust the controller assigned to each segment according to the monitoring results; Updating the segment descriptor in the recommendation information command to reflect the adjusted home controller information; The updated recommendation information command is sent to the host to notify the host to select an access path based on the latest home controller information.

7. A load balancing system for a storage system, characterized in that: The system is applied to an active-active storage cluster, the active-active storage cluster including a first site and a second site, the first site and the second site respectively configured with multiple storage controller nodes, and the active-active storage cluster configured with active-active logical units distributed at the first site and the second site, including: A topology information acquisition module, configured to acquire current topology information of the active-active logical unit, the topology information including the number of storage controller nodes at the first site, the number of storage controller nodes at the second site, and the capacity of the active-active logical unit; a continuous segment generation module, configured to divide the active-active logical unit into a plurality of segments according to the topology information, wherein the total number of the segments is equal to the total number of the storage controller nodes, and the lengths of the segments are the same; a controller allocation module, configured to allocate an owner controller to each segment according to a preset allocation rule and determine recommended information; the allocation rule is determined by taking the sequence number of each segment modulo the sum of the number of storage controller nodes at the first site and the second site; the recommended information includes the starting logical block address of each segment, the ending logical block address of the segment, the identifier of the corresponding owner controller, and the port group identifier; A recommendation command sending module, configured to generate a recommendation information command based on the recommendation information and send the command to the host; A load balancing module, configured to receive the path selection result returned by the host, and instruct each home controller to process the host input and output requests of the corresponding segment according to the path selection result to achieve load balancing; The controller allocation module is also used to: if the host is configured in site priority mode, set each storage controller node in the same site as the home controller of each segment, so that the host has priority access to the controller node in the site; if the host is configured in load balancing mode, set each storage controller node in the first site and the second site as the home controller of each segment, so that the host selects the optimal path according to the port group status bitmap set in the recommendation information command to achieve load balancing between each storage controller node in the first site and the second site; wherein, the port group status bitmap is used to instruct the host to select an access path.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Fault processing method for asymmetric active-active double-controller system

    CN107179967A

  • Nginx-based load balancing implementation method and apparatus, computer device, and storage medium

    CN108965381A