Load Balancing Method, System and Device

By establishing a second session link of the target logical disk between storage nodes, the storage Qos problem caused by load balancing in the prior art is solved, and efficient load balancing scheduling is achieved to maintain the quality of storage service.

CN113377530BActive Publication Date: 2025-08-05ALIBABA INNOVATION PRIVATE LIMITED
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110604306.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-31
Publication Date
2025-08-05
Estimated Expiration
2041-05-31

AI Technical Summary

Technical Problem

In the prior art, logical disk load balancing scheduling based on storage nodes leads to a decrease in storage Qos satisfaction, the number of user accesses is zero, affecting the quality of storage service.

Method used

By determining the session links of the source storage node, the target storage node, and the target logical disk, sending a reconnection negotiation request, receiving a link reconnection request, and mounting the target logical disk in the target storage node, establishing a second session link to achieve load balancing.

Benefits of technology

Avoid the impact on other logical disks, maintain Qos satisfaction of storage services, and achieve load balancing scheduling of target logical disks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113377530B_ABST
    Figure CN113377530B_ABST
Patent Text Reader

Abstract

This specification provides a load balancing method, system and device. The load balancing method includes: determining a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in the session link of the target logical disk; sending a reconnection negotiation request for the first session link to a computing node; receiving a link reconnection request sent by the computing node in response to the reconnection negotiation request; and establishing a second session link between the computing node and the target logical disk in the target storage node in response to the link reconnection request when the target logical disk is mounted in the target storage node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a load balancing method, system, and device. Background Art

[0002] With the development of the Internet, both enterprises and individuals are increasingly aware of the importance of data storage. Therefore, in order to ensure the quality of storage services, it is usually necessary to load balance the storage nodes based on the traffic of the storage nodes. Currently, for distributed block storage SDS (Software Defined Storage), for example, SDS is used as storage in cloud services such as private clouds and hybrid clouds. In the load balancing scenario of logical disks in storage nodes, due to the large changes in the load of storage nodes, the logical disks are directly evenly scheduled between storage nodes. This scheduling method requires scheduling the entire logical disk and resets the number of user accesses to the logical disk to zero during the scheduling process, which seriously affects the storage QoS satisfaction. Therefore, a more reliable solution is needed. Summary of the Invention

[0003] In view of this, the embodiments of this specification provide two load balancing methods. This specification also relates to a load balancing device, a load balancing system, a computing device, and a computer-readable storage medium to address technical deficiencies in the prior art.

[0004] A first aspect of the embodiments of this specification provides a load balancing method, including:

[0005] Determining a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in the session links of the target logical disk;

[0006] Sending a reconnection negotiation request for the first session link to a computing node;

[0007] receiving a link reconnection request sent by the computing node in response to the reconnection negotiation request;

[0008] In a case where the target logical disk is mounted in the target storage node, in response to the link reconnection request, a second session link is established between the computing node and the target logical disk in the target storage node.

[0009] Optionally, before sending the reconnection negotiation request for the first session link to the computing node, the method further includes:

[0010] When the link state of the first session link is changed, send the link state of the first session link to the computing node, so that the computing node stops sending access requests for the target logical disk through the first session link based on the link state of the first session link;

[0011] Correspondingly, after establishing the second session link between the computing node and the target logical disk in the target storage node, it further includes:

[0012] Send the link state of the second session link to the computing node, where the first session link and the second session link have a corresponding relationship in the computing node.

[0013] Optionally, sending the link state of the first session link to the computing node includes:

[0014] Send a status change notice for the first session link to the computing node;

[0015] Receive a status report instruction for the first session link sent by the computing node in response to the status change notice;

[0016] Based on the status report instruction, send the link state of the first session link to the computing node.

[0017] Optionally, sending a reconnect negotiation request for the first session link to the computing node includes:

[0018] When the access request for the target logical disk through the first session link is completed, send a reconnect negotiation request for the first session link to the computing node.

[0019] Optionally, when it is detected that the preset load balancing condition is met, determining the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk includes:

[0020] Detect the first access volume for the target logical disk;

[0021] Based on the first access volume, determine the target node quantity of the storage node for the target logical disk;

[0022] Compare the target node quantity with the current node quantity of the storage node to which the target logical disk belongs;

[0023] In the case of inconsistent comparison, determine the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0024] Optionally, the determining the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk when detecting that the preset load balancing condition is met includes:

[0025] Detect the second access volume for each storage node;

[0026] When the second access volume of any storage node is greater than the preset access volume, determine the any storage node as the source storage node for load balancing;

[0027] Based on the second access volume of each storage node, determine the target storage node for load balancing among the storage nodes, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk; or

[0028] When detecting a load balancing instruction for a storage node or a target logical disk, based on the balancing information carried in the load balancing instruction, determine the source storage node and the target storage node for load balancing among the storage nodes, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0029] Optionally, before responding to the link reconnection request, further include:

[0030] When the target storage disk does not exist in the target storage node, mount the target storage disk to the target storage node.

[0031] Optionally, after establishing the second session link between the computing node and the target logical disk in the target storage node, further include:

[0032] When there is no session link for the target logical disk in the source storage node, remove the target logical disk from the source storage node.

[0033] Optionally, the responding to the link reconnection request and establishing the second session link between the computing node and the target logical disk in the target storage node includes:

[0034] In response to the link reconnection request, send the connection address of the target storage node to the computing node;

[0035] Receive a second link reconnection request sent by the computing node to the target storage node based on the connection address;

[0036] Based on the second link reconnection request, the target storage node establishes a second session link between the computing node and the target logical disk in the target storage node.

[0037] Optionally, sending the link state of the second session link to the computing node includes:

[0038] Send a status change notice for the second session link to the computing node;

[0039] Receive a status report instruction for the second session link sent by the computing node in response to the status change notice;

[0040] Based on the status report instruction, send the link state of the second session link to the computing node.

[0041] In a second aspect of the embodiments of this specification, another load balancing method is provided, including:

[0042] Receive a reconnection negotiation request for a first session link of a target logical disk sent by a storage node;

[0043] Based on the reconnection negotiation request, disconnect the first session link;

[0044] Send a link reconnection request for the target logical disk to the storage node.

[0045] Optionally, before receiving the reconnection negotiation request for the first session link of the target logical disk sent by the storage node, it further includes:

[0046] Receive the link state of the first session link sent by the storage node;

[0047] Based on the link state, change the link state corresponding to the first session link from a first state to a second state.

[0048] Optionally, receiving the link state of the first session link sent by the storage node includes:

[0049] Receive a status change notice for the first session link sent by the storage node;

[0050] Based on the status change notice, send a status report instruction for the first session link to the storage node;

[0051] Receive the link state of the first session link sent by the storage node in response to the status report instruction.

[0052] Optionally, after sending the link reconnect request for the target logical disk to the storage node, the method further includes:

[0053] Receive the connection address of the target storage node in the storage node sent by the storage node in response to the link reconnect request;

[0054] Send a second link reconnect request to the target storage node based on the connection address.

[0055] Optionally, after sending the link reconnect request for the target logical disk to the storage node, the method further includes:

[0056] Receive the link state of the second session link sent by the storage node;

[0057] Based on the link state, change the link state corresponding to the first session link from the second state to the first state, where the link state corresponding to the first session link has a corresponding relationship with the second session link.

[0058] Optionally, the receiving the link state of the second session link sent by the storage node includes:

[0059] Receive a link state change notice of the second session link sent by the storage node;

[0060] Based on the state change notice, send a status report instruction for the second session link to the storage node;

[0061] Receive the link state of the second session link sent by the storage node in response to the status report instruction.

[0062] In a third aspect of the embodiments of the present specification, a load balancing system is provided, including:

[0063] A storage node and a computing node;

[0064] Wherein, the storage node is configured to determine a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in the session links of the target logical disk; send a reconnect negotiation request for the first session link to the computing node;

[0065] The computing node is configured to receive a reconnection negotiation request for a first session link of a target logical disk sent by the storage node; based on the reconnection negotiation request, disconnect the first session link; and send a link reconnection request for the target logical disk to the storage node.

[0066] The storage node is further configured to receive a link reconnection request sent by the computing node in response to the reconnection negotiation request; and in the case where the target logical disk is mounted in the target storage node, establish a second session link between the computing node and the target logical disk in the target storage node in response to the link reconnection request.

[0067] In a fourth aspect of the embodiments of the present specification, a load balancing device is provided, including:

[0068] A determination module, configured to determine a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in the session link of the target logical disk;

[0069] A sending module, configured to send a reconnection negotiation request for the first session link to the computing node;

[0070] A receiving module, configured to receive a link reconnection request sent by the computing node in response to the reconnection negotiation request;

[0071] An establishment module, configured to establish a second session link between the computing node and the target logical disk in the target storage node in response to the link reconnection request in the case where the target logical disk is mounted in the target storage node.

[0072] Optionally, the load balancing device further includes:

[0073] A first sending status module, configured to send the link status of the first session link to the computing node in the case where the link status of the first session link is changed, so that the computing node stops sending access requests for the target logical disk through the first session link based on the link status of the first session link;

[0074] Correspondingly, the load balancing device further includes:

[0075] A second sending status module, configured to send the link status of the second session link to the computing node, where the first session link and the second session link have a corresponding relationship in the computing node.

[0076] Optionally, the first sending status module is further configured to:

[0077] Send a status change notice for the first session link to the computing node;

[0078] Receive a status report instruction for the first session link sent by the computing node in response to the status change notice;

[0079] Based on the status report instruction, send the link status of the first session link to the computing node.

[0080] Optionally, the sending module is further configured to:

[0081] When the access request for the target logical disk through the first session link is completed, send a reconnect negotiation request for the first session link to the computing node.

[0082] Optionally, the determining module is further configured to:

[0083] Detect the first access volume for the target logical disk;

[0084] Based on the first access volume, determine the target number of nodes of the storage node for the target logical disk;

[0085] Compare the target number of nodes with the current number of nodes of the storage node to which the target logical disk belongs;

[0086] In the case of inconsistent comparison, determine the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0087] Optionally, the determining module is further configured to:

[0088] Detect the second access volume for each storage node;

[0089] In the case where the second access volume of any storage node is greater than the preset access volume, determine the any storage node as the source storage node for load balancing;

[0090] Based on the second access volume of each storage node, determine the target storage node for load balancing among the each storage node, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk; or

[0091] In the case where a load balancing instruction for a storage node or a target logical disk is detected, based on the balancing information carried in the load balancing instruction, determine the source storage node and the target storage node for load balancing among the respective storage nodes, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0092] Optionally, the load balancing device further includes:

[0093] A mounting module, configured to mount the target storage disk to the target storage node in the case where the target storage disk does not exist in the target storage node.

[0094] Optionally, the load balancing device further includes:

[0095] A removal module, configured to remove the target logical disk from the source storage node in the case where there is no session link for the target logical disk in the source storage node.

[0096] Optionally, the establishing module is further configured to:

[0097] In response to the link reconnection request, send the connection address of the target storage node to the computing node;

[0098] Receive a second link reconnection request sent by the computing node to the target storage node based on the connection address;

[0099] The target storage node establishes a second session link between the computing node and the target logical disk in the target storage node based on the second link reconnection request.

[0100] Optionally, the second sending status module is further configured to:

[0101] Send a status change notification for the second session link to the computing node;

[0102] Receive a status report instruction for the second session link sent by the computing node in response to the status change notification;

[0103] Based on the status report instruction, send the link status of the second session link to the computing node.

[0104] In a fifth aspect of the embodiments of the present specification, another load balancing device is provided, including:

[0105] A receiving request module, configured to receive a reconnection negotiation request for a first session link of a target logical disk sent by a storage node;

[0106] A disconnection module, configured to disconnect the first session link based on the reconnection negotiation request;

[0107] A sending request module, configured to send a link reconnection request for the target logical disk to the storage node.

[0108] Optionally, the load balancing device further includes:

[0109] A first receiving status module, configured to receive the link status of the first session link sent by the storage node;

[0110] A status change module, configured to change the link status corresponding to the first session link from a first state to a second state based on the link status.

[0111] Optionally, the first receiving status module is further configured to:

[0112] Receive a status change notification of the first session link sent by the storage node;

[0113] Based on the status change notification, send a status report instruction for the first session link to the storage node;

[0114] Receive the link status of the first session link sent by the storage node in response to the status report instruction.

[0115] Optionally, the load balancing device further includes:

[0116] A receiving address module, configured to receive the connection address of the target storage node in the storage node sent by the storage node in response to the link reconnection request;

[0117] A second sending request module, configured to send a second link reconnection request to the target storage node based on the connection address.

[0118] Optionally, the load balancing device further includes:

[0119] A second receiving status module, configured to receive the link status of the second session link sent by the storage node;

[0120] A second status change module, configured to change the link status corresponding to the first session link from a second state to a first state based on the link status, where the link status corresponding to the first session link has a corresponding relationship with the second session link.

[0121] Optionally, the second receiving status module is further configured to:

[0122] Receive the link state change notification for the second session link sent by the storage node;

[0123] Based on the state change notification, send a status report instruction for the second session link to the storage node;

[0124] Receive the link state of the second session link sent by the storage node in response to the status report instruction.

[0125] In a sixth aspect of the embodiments of this specification, a computing device is provided, including a memory, a processor, and computer instructions stored on the memory and executable on the processor. When the processor executes the computer instructions, the steps of the load balancing method are implemented.

[0126] In a seventh aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are executed by a processor, the steps of the load balancing method are implemented.

[0127] The load balancing method provided in this specification has a storage node as the execution entity. By cooperating with a computing node, it determines the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session links of the target logical disk; sends a reconnect negotiation request for the first session link to the computing node; receives the link reconnect request sent by the computing node in response to the reconnect negotiation request; and when the target logical disk is mounted in the target storage node, in response to the link reconnect request, establishes a second session link between the computing node and the target logical disk in the target storage node. It realizes load balancing based on the target logical disk and schedules the first session link in the session links of the target logical disk between storage nodes, avoiding the impact on other logical disks and the impact on other session links of the target logical disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0128] Figure 1 is a schematic diagram of the architecture of a load balancing method provided by an embodiment of this specification;

[0129] Figure 2 is a flowchart of a load balancing method provided by an embodiment of this specification;

[0130] Figure 3 is a device topology diagram of a load balancing method provided by an embodiment of this specification;

[0131] Figure 4 is a flowchart of another load balancing method provided by an embodiment of this specification;

[0132] Figure 5 It is a processing flow chart of a load balancing method applied to an interaction scenario provided by an embodiment of this specification;

[0133] Figure 6 It is a schematic structural diagram of a load balancing system provided by an embodiment of this specification;

[0134] Figure 7 It is a schematic structural diagram of a load balancing device provided by an embodiment of this specification;

[0135] Figure 8 It is a schematic structural diagram of another load balancing device provided by an embodiment of this specification;

[0136] Figure 9 It is a structural block diagram of a computing device provided by an embodiment of this specification. Specific Embodiments

[0137] Many specific details are set forth in the following description in order to provide a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of this specification. Therefore, this specification is not limited by the specific embodiments disclosed below.

[0138] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0139] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon" or "in response to determining".

[0140] First, the noun terms related to one or more embodiments of this specification are explained.

[0141] Distributed block storage SDS (Software Defined Storage): It is a solution that abstracts hardware. The entire data center is automatically controlled by software, aggregates services provided by the infrastructure, and combines policy-based intelligent allocation, automation, and detection functions to achieve resource abstraction, pooling, and automation. Compared with traditional storage methods, software-defined storage SDS reflects the trend of gradually transitioning from a centralized to a distributed storage architecture.

[0142] SCSI (Small Computer System Interface): It is an independent processor standard for system-level interfaces between a computer and its peripheral devices (hard disks, floppy drives, optical drives, printers, scanners, etc.). It is also a parallel interface that can connect eight devices simultaneously through a single cable. The cable and the host (computer) adapter form the SCSI bus. The bus allows two devices to exchange data directly without passing through the host. In the SCSI program, each device is assigned a unique number. For the 8-bit (narrow) band, it can be any number between 0 and 7, and for the 16-bit (wide) band, it can be any number between 8 and 16. These devices request input / output operations. They are the drivers, and the operations executed by the devices are the targets. Each target has the ability to connect eight additional devices through its own controller. These devices are logical units, and each logical unit is assigned a unique identification number for identifying the SCSI control command process.

[0143] iSCSI (Internet Small Computer System Interface): It is a storage technology based on the Internet and the SCSI-3 protocol.

[0144] LUN (Logical Unit Number): In a storage system based on the SCSI protocol, it is a number used to identify a logical unit, which is a device addressed through SCSI. In other words, the storage system partitions the physical hard disk into parts with logical addresses, allowing the host to access them. Such a partition is called a LUN. Usually, the LUN also refers to the logical disk created on the SAN storage. In practical applications, the number of devices that can be connected to the SCSI bus is limited, generally 8 or 16. We can use Target ID (target identification, also known as SCSI identification) to describe these devices. As soon as a device joins the system, it has a code name. Therefore, these identifications can be used to distinguish devices.

[0145] ALUA (Asymmetric Logical Unit Access): Through the ALUA protocol, different session links (Sessions) of the same LUN can be set as Active-Optimized and Active-No-Optimized. The native multi-path of the operating system can preferentially select the Session in the Active state to issue read / write requests.

[0146] UA (Unit Attention): The storage node returns UA to the compute node through a certain Session, notifying the compute node that the status of the Target Port Groups of the storage node has changed, triggering the compute node to send a Report Target Port Groups Command to the storage node.

[0147] iSCSI Redirect: When an iSCSI initiator is ready to communicate with an iSCSI target, it first sends a login request, which contains the identifier of the iSCSI target for communication and authentication information. After the login is completed, an iSCSI session link will be established. With the iSCSI Redirect technology, the storage node cluster only exposes the proxy IP of the iSCSI target (Internet Protocol, i.e., Virtual IP, hereinafter referred to as VIP) to the compute node. When the compute node sends an iSCSI login request, the TS with the VIP returns the real iSCSI target IP address of the redirection in the iSCSI login response, notifying the compute node that the original target has been temporarily transferred to another address and no further regular negotiation will be carried out. Then, the compute node will resend the login request to the new address.

[0148] iSCSI AsyncEvent: It is an interface defined by the iSCSI protocol. The target triggers the initiator to initiate a reconnection by sending an asynchronous event (negotiation request) to the initiator.

[0149] IO request: When a user uses the disk of the storage system, the basic operation is to read data from the disk or write data to the disk. Each read / write request is called an IO request (abbreviated as IO).

[0150] IOPS (Input / Output Operations Per Second): It is a measurement method used for performance testing of computer storage devices (such as hard disk drives (HDDs), solid-state drives (SSDs), or storage area networks (SANs)). It can be regarded as the number of read / write operations per second, that is, the number of IO requests that the system allows to process per second, with the unit of operations per second.

[0151] RPC (Remote Procedure Call): It is a protocol that a program can use to request services from a program on another computer in the network. Simply put, it is to call a function or method (collectively referred to as a service) on another machine (server) from one machine (client) by passing parameters and obtain the returned result. Since the program using RPC does not have to understand the network protocol supporting the communication, RPC improves the interoperability of programs. In RPC, the program that issues the request is the client program, and the program that provides the service is the server.

[0152] NVME protocol (Non-Volatile Memory Express): It is a standard protocol on the PCIE interface and a protocol for communication between a computing node and a storage node. Among them, PCIE (peripheral component interconnect express) is a high-speed serial computer expansion bus standard.

[0153] QoS (Quality of Service): It refers to the ability of a network to use various underlying technologies to provide better service capabilities for specified network communications. It is a security mechanism of the network and a technology used to solve problems such as network latency and congestion. The guarantee of QoS is very important for a network with limited capacity, especially for streaming multimedia applications such as VoIP and IPTV, because these applications often require a fixed transmission rate and are also sensitive to latency.

[0154] A socket is an abstraction of the endpoints for two-way communication between application processes on different hosts in a network. A socket is one end of the communication between processes on the network, providing a mechanism for application layer processes to exchange data using network protocols. In terms of its position, a socket connects to the application process above and the network protocol stack below. It is the interface for an application program to communicate through network protocols and the interface for an application program to interact with the network protocol root. Specifically, a socket is represented by writing the port number after the dotted decimal IP address, separated by a colon or a comma, that is, socket = (IP address: port number). Each transport layer connection is uniquely determined by two endpoints (i.e., two sockets) at both ends of the communication. For example, if the IP address is 210.37.145.1 and the port number is 23, then the obtained socket is (210.37.145.1:23).

[0155] To achieve load balancing for storage nodes, Figure 1 FIG. shows an architecture schematic diagram of a load balancing method provided according to an embodiment of the present specification.

[0156] Specifically, Figure 1 the application scenario includes: a computing node, a storage node A (Storage Node A), and a storage node B (Storage Node B). Among them, the computing node (the iSCSI initiator of the computing node) accesses the logical disks (such as LUN 0, LUN 1, etc.) in the storage node through the session link established with the storage node. When it is detected that the load (also understood as the access volume) of the storage node A exceeds the preset access volume threshold, it indicates that the load of the storage node A is too large. To reduce the load of the storage node A, LUN 0 in the storage node A is scheduled from the storage node A to the storage node B, and the reconnection of the session link belonging to LUN 0 is triggered, that is, a session link for LUN 0 is recreated on the storage node B. Among them, the SCSI layer generates block devices corresponding to the LUN based on the created session link, and these block devices are stored in the block device layer, and the multipath software then aggregates the block devices for the LUN into a block device sdb.

[0157] In specific implementation, the iSCSI Redirect function can be used to redirect from the storage node A to create a new session link on the storage node B. However, during the process of balancing and scheduling LUN 0, the session link on LUN 0 will be disconnected and recreated. Therefore, during this process, the number of accesses by the user to LUN 0 is reset to zero, seriously affecting the Qos satisfaction of the storage.

[0158] To solve the above problems, further, in this specification, two load balancing methods are provided. This specification also relates to a load balancing device, a load balancing system, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.

[0159] Figure 2 The flowchart of a load balancing method provided according to an embodiment of this specification is shown, which specifically includes the following steps:

[0160] Step 202: Determine the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0161] The execution subject of the method embodiment of this specification is the storage node, and the execution subject of another method embodiment of this specification is the computing node. This specification realizes the load balancing scheduling method based on LUN through the cooperation of the storage node and the computing node.

[0162] Among them, the storage node can be understood as the storage node in the distributed storage cluster for providing storage services. Specifically, the storage node may further include a storage management node, which can perform inter-node scheduling of LUNs and session links (Session, used for IO read and write sessions) based on the load conditions of the distributed storage nodes and the affiliated LUNs to meet the IOPS water level requirements of the LUNs and ensure that the traffic of each storage node tends to be balanced. In practical applications, the storage management node can provide storage services or not, and only act as a storage management role, which is not limited here;

[0163] The computing node can be understood as the node that accesses the storage node. In practical applications, the storage node and the computing node can communicate with each other through the iSCSI protocol. In addition, they can also communicate through the NVMe protocol, which is not limited here.

[0164] Specifically in implementation, when it is detected that the preset load balancing condition is met, the above step 202 can be executed. Among them, the preset load balancing condition can be understood as the condition for triggering load balancing based on LUN set in advance. The preset load balancing condition can be various. Specifically, the preset load balancing condition can be receiving a load balancing instruction manually triggered by the user, or the load of a certain storage node exceeding the preset access volume threshold. In addition, it can also be that the number of nodes of the storage node mounting a certain LUN changes, etc., which is not limited here.

[0165] Further, when it is detected that the preset load balancing condition is satisfied, it is necessary to determine the source storage node for load balancing (which can be understood as the storage node for which the LUN or the session link of the LUN mounted thereon needs to be deleted and adjusted), and the target storage node (which can be understood as the storage node for which the LUN or the session link of the LUN mounted thereon needs to be added and adjusted). In addition, it is also necessary to determine the target logical disk for balanced scheduling (i.e., the LUN scheduled between nodes), and the session link for balanced scheduling in the LUN (i.e., the first session link). In practical applications, after it is detected that the preset load balancing condition is satisfied, it is necessary to determine the scheduling information for load balancing (the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk), so as to schedule the first session link of the target logical disk mounted in the source storage node to the target storage node based on the determined scheduling information, so as to achieve load balancing for the access volume of the computing node.

[0166] During specific implementation, in order to implement scheduling between storage nodes based on LUNs and session links, a device topology diagram such as Figure 3 can be adopted.

[0167] Specifically, Figure 3 in [the diagram], LUN a is respectively mounted (mapped) in storage node 0, storage node 1, storage node 2, and storage node 3, and LUN b is also respectively mounted (mapped) in storage node 0, storage node 1, storage node 2, and storage node 3; the computing node includes: an iSCSI initiator, a SCSI layer, a BLOCK layer, and multipath software, and there are two session links for each LUN in any of the storage nodes in the computing node, so each storage node exclusively occupies two session links of LUNs.

[0168] Among them, a session link for communication is created between the iSCSI initiator and the storage node, the SCSI layer generates a block device corresponding to the LUN based on the created session link, these block devices are stored in the BLOCK layer, and the multipath software aggregates the block devices for the same LUN into the same block device, for example, aggregates the block devices for LUN a into sda and aggregates the block devices for LUN b into sdb. In practical applications, the multipath software can be various and is not limited here.

[0169] In the embodiment of the present application, such as Figure 3In the device topology diagram, the same LUN is mapped to multiple distributed storage cluster nodes, achieving node redundancy. The node redundancy supports being adaptive based on the LUN load condition. And the LUNs of the same node support the unique attribution of multiple Sessions, achieving link redundancy. The link redundancy supports being adaptive based on the LUN load condition.

[0170] In specific implementation, since the preset load balancing conditions can be various, in the first optional implementation manner provided by the embodiments of this specification, when it is detected that the preset load balancing conditions are met, determining the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk includes:

[0171] Detecting the first access volume for the target logical disk;

[0172] Based on the first access volume, determining the target node quantity of the storage node for the target logical disk;

[0173] Comparing the target node quantity with the current node quantity of the storage node to which the target logical disk belongs;

[0174] In the case of inconsistent comparison, determining the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0175] Specifically, the first access volume can be understood as the traffic / or the number of accesses generated by reading and writing to the target logical disk. In practical applications, there are various ways to determine the target node quantity of the storage node for the target logical disk based on the first access volume. For example, based on the correspondence relationship between the preset access volume range for the target logical disk and the node quantity of the storage node for the target logical disk, determining the target node quantity corresponding to the first access volume. In addition, the target node quantity corresponding to the first access volume can also be determined based on the first access volume and a preset calculation formula including the first access volume, which is not limited herein.

[0176] In specific implementation, the calculation formula for the node redundancy number (target node quantity) NUMnode of the target logical disk (such as LUN a) is as follows:

[0177] NUMnode = NUMtotal[(α * WORKLOADluna) / (β * WORKLOADothers)], (1 < NUMnode <= NUMtotal), where the total number of nodes in the distributed storage cluster (i.e., storage nodes) is NUMtotal, the number of redundant nodes of the storage nodes mounting LUN a is NUMnode, NUMnode is directly proportional to the load pressure (the first access volume) WORKLOADluna of LUN a, and the corresponding adaptive coefficient factor is α; it is inversely proportional to the load pressure (access volume) WORKLOADothers for other LUNs, and the corresponding adaptive coefficient factor is β.

[0178] Further, on the basis of determining the target number of nodes of the storage nodes for the target logical disk, compare the determined target number of nodes with the actual number of nodes (the current number of nodes) of the storage nodes currently mounting the target logical disk. If the comparison is consistent, it indicates that no load balancing is required and no processing is needed; if the comparison is inconsistent, it indicates that load balancing needs to be performed based on the target logical disk, then determine the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0179] It should be noted that the inconsistent comparison situations include: the situation where the target number of nodes is greater than the current number of nodes, or the situation where the target number of nodes is less than the current number of nodes.

[0180] In the case where the target number of nodes is less than the current number of nodes, it indicates that the number of nodes of the storage nodes mounting the target logical disk needs to be reduced. Then, at least one storage node with the smallest access volume for the target logical disk among the storage nodes mounting the target logical disk (i.e., the reduced number of nodes, which can be determined by the difference between the current number of nodes and the target number of nodes) can be determined as the source storage node, or at least one storage node can be randomly selected from the storage nodes mounting the target logical disk and determined as the source storage node, and there is no limit here; and any one or more storage nodes other than the source storage node among the storage nodes mounting the target logical disk can be determined as the target storage node. In addition, the storage node with the smallest access volume other than the source storage node among the storage nodes mounting the target logical disk can also be determined as the target storage node, and there is no limit here.

[0181] Further, on the basis of determining the source storage node and the target storage node, the session link for the target logical disk in the source storage node can be determined as the first session link for load balancing.

[0182] When the number of target nodes is greater than the number of current nodes, it indicates that the number of storage nodes mounting the target logical disk needs to be increased. Then, at least one storage node with the largest access volume to the target logical disk among the storage nodes mounting the target logical disk (i.e., the number of added nodes, which can be determined by the difference between the number of target nodes and the number of current nodes) can be determined as the source storage node, or at least one storage node can be randomly selected from the storage nodes mounting the target logical disk and determined as the source storage node, without any limitation here; and any one or more storage nodes other than the source storage node in the storage nodes can be determined as the target storage node. In addition, the storage node with the smallest access volume among the storage nodes other than the source storage node can also be determined as the target storage node, without any limitation here.

[0183] Further, on the basis of determining the source storage node and the target storage node, at least one session link of the target logical disk in the source storage node can be determined as the first session link for load balancing.

[0184] In the embodiment of this specification, by determining the number of storage nodes for the target logical disk according to the first access volume of the target logical disk, and on this basis, determining the scheduling information for load balancing, it realizes the adjustment of the number of storage nodes for the target logical disk based on the first access volume of the target logical disk, thereby achieving load balancing based on the target logical disk, and also realizes the adaptability of the storage nodes and session links of the target logical disk according to the load situation, increasing the flexibility of load balancing.

[0185] In addition, in the second optional implementation manner provided by the embodiment of this specification, the determination of the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk can be implemented by any of the following methods:

[0186] 1) Detect the second access volume for each storage node;

[0187] When the second access volume of any storage node is greater than the preset access volume, determine the any storage node as the source storage node for load balancing;

[0188] Based on the second access volume of each storage node, determine the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk among each storage node.

[0189] Among them, the second access volume can be understood as the access traffic or access quantity for the storage node. In practical applications, when the access volume of any storage node is greater than the preset access volume, it indicates that the load of this any storage node is too large and its load needs to be reduced. Then, this any storage node is determined as the source storage node.

[0190] Furthermore, based on the second access volumes of each storage node, at least one storage node with the smallest access volume among these storage nodes can be determined, and this at least one storage node is determined as the target storage node. Or according to the total link quantity of the session links of the target logical disk in each storage node and the target node quantity, determine the link quantity of the session link for the target logical disk in each storage node, and thus determine the target storage node according to the determined link quantity, etc., which is not limited here.

[0191] 2) When a load balancing instruction for the storage node or the target logical disk is detected, based on the balancing information carried in the load balancing instruction, determine the source storage node and the target storage node for load balancing among the storage nodes, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0192] Specifically, when a load balancing instruction for the storage node or the target logical disk is detected, it is possible to further determine the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk based on the balancing information carried in the load balancing instruction, such as: the node identifier of the source storage node, the node identifier of the target storage node, the disk identifier of the target logical disk, and / or the session identifier of the first session link, etc.

[0193] In the embodiment of the present application, when it is detected that the second access volume of the storage node exceeds the preset access volume, load balancing is performed on the storage node based on the target logical disk, which ensures the load balancing of each storage node and also increases the flexibility of load balancing. In addition, it also supports specifying the balancing information for load balancing through the load balancing instruction, and performing load balancing in the case of specifying the balancing information, which further increases the flexibility and freedom of load balancing.

[0194] Step 204: Send a reconnection negotiation request for the first session link to the computing node.

[0195] Among them, the reconnection negotiation request can be understood as a negotiation request sent by the storage node to the computing node to trigger the computing node to initiate a reconnection for the first session link based on this negotiation request.

[0196] During specific implementation, the storage node may send a reconnection negotiation request to the computing node via the first session link, so that the computing node knows which session link needs to be reconnected. In the case where the first session link is multiple session links, the reconnection negotiation request needs to be sent via each session link. In addition, the session identifier of the first session link may also be specified in the reconnection negotiation request, so that the computing node can clearly identify the session link that needs to be reconnected and perform reconnection. There is no limitation here.

[0197] In practical applications, before sending a reconnection negotiation request for the first session link, in order to prevent users from accessing the storage node via the first session link, thus affecting the access requests that still access the storage node via the first session link, the link state of the first session link can be changed, and the changed link state can be sent to the computing node. In an optional implementation manner provided by the embodiments of this specification, before sending the reconnection negotiation request for the first session link to the computing node, it further includes:

[0198] In the case where the link state of the first session link is successfully changed, send the link state of the first session link to the computing node, so that the computing node stops issuing access requests for the target logical disk via the first session link based on the link state of the first session link.

[0199] During specific implementation, before determining that reconnection needs to be performed for the first session link, the link state of the first session link can be changed first (for example, changing the link state of the first session link from the first state to the second state), and in the case where the change is completed, send the link state of the first session link (for example, the second state) to the computing node; after receiving this link state, the computing node will also change the link state of the first session link accordingly at the computing node side. The purpose of changing the link state of the first session link is that in this link state, the computing node will not issue access requests for the first session link.

[0200] Among them, the first state can be understood as an active state, a priority state, etc., which represent states where the session link can be used to issue access requests, and the second state can be understood as an inactive state, a secondary priority state, etc., which represent states where the session link is not used to issue access requests.

[0201] In the embodiments of this application, by changing the link state of the first session link, the computing node no longer issues new access requests via the first session link based on the changed link state, avoiding continuously issuing new access requests on the first session link that is about to be reconnected, and further avoiding the interruption of access requests via the first session link during subsequent load balancing, thus improving the user's access experience.

[0202] In specific implementation, the storage side (storage node) can be reversely notified to the computing side (computing node) through the communication method defined by the protocol interface, so as to smoothly switch the IO to other storage nodes, providing a technical basis for seamless switching. In an optional implementation manner provided by the embodiments of this specification, the sending of the link state of the first session link to the computing node is specifically implemented as follows:

[0203] Send a status change notice for the first session link to the computing node;

[0204] Receive a status report instruction for the first session link sent by the computing node in response to the status change notice;

[0205] Based on the status report instruction, send the link state of the first session link to the computing node.

[0206] In specific implementation, if the link state of the first session link is changed, the source storage node in the storage node can send a status change notice to the computing node through the first session link. Specifically, the communication form of the status change notice can be various, and it can be sent based on the communication method of the NVMe protocol; in the scenario where data communication is carried out between the storage node and the computing node through the iSCSI and / or SCSI protocol, the status change notice can be sent in the UA manner, and the status change notice can be a field code, and the field code is carried on the IO request, SCSI test case IO, or SCSI management class command and returned to the computing node; when the computing node receives the field code carried by any of the above carriers, it can determine that the link state of the first session link in the source storage node has changed, and further based on the status change notice, send a status report instruction to the source storage node through the first session link, and after the source storage node receives the status report instruction, it reports the link state of the first session link (such as: the second state) to the computing node through the first session link, so that after the computing node receives the link state, it changes the link state of the first session link from the first state to the second state.

[0207] In addition, the status change notice can also be sent in the form of a system message or an application message, etc., which is not limited here.

[0208] In practical applications, when a computing node issues an access request, it will select a session link for issuing the access request from the session links with the preferred link state. Therefore, after the link state of the first session link changes from the first state to the second state, no new access requests will be issued through the first session link. Instead, the access requests will be diverted through other session links, which also avoids the interruption of the access requests passing through the first session link during subsequent load balancing, improving the user's access experience.

[0209] Further, in an optional implementation provided by the embodiments of this specification, the sending of a reconnection negotiation request for the first session link to the computing node is specifically implemented as follows:

[0210] When the access request for the target logical disk through the first session link is completed, a reconnection negotiation request for the first session link is sent to the computing node.

[0211] In practical applications, although the computing node will not issue new access requests through the first session link after changing the link state of the first session link, there are still some access requests issued before the change in the first session link that have not been completed. If a reconnection negotiation request for the first session link is directly sent to the computing node when these access requests have not been completed, these uncompleted access requests will be interrupted.

[0212] In the embodiments of this specification, in order not to forcibly interrupt the access requests that the user is making through the first session link and thus ensure the user's access experience, the completion status of the access requests through the first session link can be detected, and when it is determined that all the access requests through the first session link have been completed, a reconnection negotiation request for the first session link is sent to the computing node.

[0213] Step 206: Receive the link reconnection request sent by the computing node in response to the reconnection negotiation request.

[0214] Specifically, when the computing node receives the reconnection negotiation request, it can close the socket port of the first session link at the source storage node, that is, disconnect the first session link, and send a link reconnection request to the storage node.

[0215] Specifically, in the communication scenario of the iSCSI protocol, this link reconnection request can be understood as an iSCSI login request. In practical applications, a computing node usually sends an iSCSI login request to the virtual IP of the storage management node in a storage node. After receiving this iSCSI login request, the storage management node returns the actual iSCSI IP address of the target storage node to the computing node. After receiving this iSCSI IP address, the computing node sends an iSCSI login request to the target storage node based on this iSCSI IP address.

[0216] Step 208: When the target logical disk is mounted in the target storage node, in response to the link reconnection request, establish a second session link between the computing node and the target logical disk in the target storage node.

[0217] In practical applications, in response to a link reconnection request for a first session link, what is actually executed is to recreate a second session link to replace the first session link. And since during the process of load balancing, the number of session links for the target logical disk remains unchanged, load balancing is achieved by scheduling session links between different storage nodes, and these session links for scheduling are all session links for the same target logical disk.

[0218] Specifically implemented, in order to ensure the successful creation of a second session link with the target storage node for the target storage node, in an optional implementation provided in the embodiments of this specification, before the response to the link reconnection request, it further includes:

[0219] When the target storage disk does not exist in the target storage node, mount the target storage disk to the target storage node.

[0220] Specifically, since the purpose of sending a link reconnection request to the storage node is to establish a session link (i.e., the second session link) between the computing node and the target logical disk of the target storage node, therefore, before this, it is necessary to determine whether the target logical disk is mounted in the target storage node. If so, directly establish a second session link with the target logical disk in the target storage node based on the link reconnection request; if not, it is necessary to mount the target storage disk to the target storage node before sending a reconnection negotiation request for the first session link to the computing node, that is, successfully map the target logical disk on the target storage node.

[0221] Further, for the convenience of managing storage nodes, in an optional implementation provided by the embodiments of this specification, the establishment of the second session link between the computing node and the target logical disk in the target storage node in response to the link reconnection request is specifically implemented as follows:

[0222] In response to the link reconnection request, send the connection address of the target storage node to the computing node;

[0223] Receive the second link reconnection request sent by the computing node to the target storage node based on the connection address;

[0224] The target storage node establishes the second session link between the computing node and the target logical disk in the target storage node based on the second link reconnection request.

[0225] Among them, the connection address can be understood as information for connection such as the IP address and port number of the target storage node.

[0226] In practical applications, the storage management node usually performs load balancing management on each storage node and communicates with the computing node. Therefore, the real IPs of each storage node can be shielded from the computing node, and a virtual IP is provided to the computing node. When the computing node detects the virtual IP, it sends a link reconnection request based on the virtual IP, and the storage management node returns the connection address (such as the IP address) of the target storage node to the computing node, so that the computing node can send a link reconnection request again (that is, send a second link reconnection request to the target storage node) based on the received connection address. After receiving the second link reconnection request, the target storage node establishes the second session link between the computing node and the target logical disk in the target storage node based on the second link reconnection request.

[0227] Specifically, after the establishment of the second session link is completed, a reconnection success notification indicating the success of the request can also be returned to the computing node.

[0228] Further, in the case where the link state of the first session link is changed after the establishment of the second session link, on the basis of sending the link state of the first session link to the computing node, correspondingly, in an optional implementation provided by the embodiments of this specification, after establishing the second session link between the computing node and the target logical disk in the target storage node, it further includes:

[0229] Send the link state of the second session link to the computing node, where the first session link and the second session link have a corresponding relationship in the computing node.

[0230] It should be noted that after disconnecting the first session link and reconstructing the second session link, the second session link replaces the first session link, and the link state corresponding to the first session link in the computing node corresponding to the second session link.

[0231] In practical applications, since the changed link state of the first session link is sent to the computing node before reconnecting the first session link, the link state of the first session link in the computing node is the changed link state (for example: the second state), and reconnecting the first session link is to close / disconnect the first session link and establish a second session link to replace the first session link.

[0232] Based on this, the second session link and the first session link have a corresponding relationship in the computing node, which can be understood as the link states of the second session link and the first session link having a corresponding relationship in the computing node, or it can be understood that the second session link and the first session link correspond to the same link state in the computing node.

[0233] Therefore, based on the received changed link state of the first session link, the computing node changes the link state corresponding to the first session link from the first state to the second state. Since the second session link replaces the first session link, the first session link and the second session link correspond to the same link state in the computing node. Therefore, the storage node sends the link state of the newly created second session link to the computing node, and the link state of this second session link is (the first state), so that after the computing node receives the link state of the second session link, it changes the corresponding link state from the second state to the first state. Further, it can issue an access request for the target logical disk based on the newly established second session link, thereby achieving seamless switching of IO in the entire balanced scheduling process and making the user access unaware.

[0234] Further, in an optional implementation manner provided by the embodiments of this specification, the sending the link state of the second session link to the computing node is specifically implemented by the following method:

[0235] Send a status change notification for the second session link to the computing node;

[0236] Receive a status report instruction for the second session link sent by the computing node in response to the status change notification;

[0237] Based on the status report instruction, send the link state of the second session link to the computing node.

[0238] When specifically implemented, the implementation of sending the link state of the second session link to the computing node is similar to that of sending the link state of the first session link to the computing node above. Refer to the implementation of sending the link state of the first session link to the computing node above, and details will not be elaborated here.

[0239] In summary, for the load balancing method provided in this specification, the execution entity is the storage node. By cooperating with the computing node, it determines the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk; sends a reconnect negotiation request for the first session link to the computing node; receives the link reconnect request sent by the computing node in response to the reconnect negotiation request; when the target logical disk is mounted in the target storage node, in response to the link reconnect request, establishes a second session link between the computing node and the target logical disk in the target storage node; realizes load balancing based on the target logical disk, and schedules the first session link in the session link of the target logical disk between storage nodes, avoiding the impact on other logical disks and the impact on other session links of the target logical disk.

[0240] Another method embodiment provided in this specification corresponds to the above method embodiment. The execution entity of this embodiment is the computing node, while the execution entity of the above method embodiment is the storage node. The two embodiments cooperate with each other to implement the load balancing scheduling method based on LUN. When reading this embodiment, it can correspond to the above method embodiment. Figure 4 The flowchart of another load balancing method provided in an embodiment of this specification is shown, which specifically includes the following steps:

[0241] Step 402: Receive the reconnect negotiation request for the first session link of the target logical disk sent by the storage node.

[0242] In practical applications, during the process of load balancing by the storage node, it is necessary to schedule the first session link of the target logical disk between storage nodes. Therefore, in order to schedule the first session link between storage nodes, a reconnect negotiation request for the first session link needs to be sent to the computing node.

[0243] When specifically implemented, in order to seamlessly switch the access request of the target logical disk between session links, in an optional implementation manner provided in the embodiments of this specification, before receiving the reconnect negotiation request for the first session link of the target logical disk sent by the storage node, it further includes:

[0244] Receive the link state of the first session link sent by the storage node;

[0245] Based on the link state, change the link state corresponding to the first session link from the first state to the second state.

[0246] Among them, the first state can be understood as a state such as an active state or a preferred state, indicating that the session link can be used to issue access requests, and the second state can be understood as a state such as inactive or sub-preferred, indicating that the session link is not used to issue access requests.

[0247] Specifically, after receiving the link state of the first session link sent by the storage node, the computing node, based on the received link state, changes the link state corresponding to the first session link at the computing node from the first state to the second state. When the link state of the first session link is the second state, no new access requests will be issued through the first session link, but the access requests will be diverted through other session links, which also avoids the interruption of access requests through the first session link during the subsequent load balancing process and improves the user's access experience.

[0248] Further, in an optional implementation manner provided by the embodiments of this specification, the receiving the link state of the first session link sent by the storage node is specifically implemented as follows:

[0249] Receive the status change notification of the first session link sent by the storage node;

[0250] Based on the status change notification, send a status report instruction for the first session link to the storage node;

[0251] Receive the link state of the first session link sent by the storage node in response to the status report instruction.

[0252] Specifically, in the above embodiment, after the link state of the first session link changes at the source storage node, it can send a status change notification of its link state to the computing node. After receiving this status change notification, the computing node can send a status report instruction to the storage node that sent this status change notification (i.e., the source storage node in the above embodiment). This status report instruction is used to notify the source storage node to send the link state of the first session link, and after receiving this status report instruction, the source storage node can return its link state through the first session link to implement sending the link state of the first session link to the computing node.

[0253] In addition, in practical applications, the changed link state of the first session link can also be sent by other storage nodes, which is not limited here.

[0254] Step 404: Disconnect the first session link based on the reconnection negotiation request.

[0255] Specifically, the reconnect negotiation request may be sent by the storage node through the first session link. After receiving the reconnect negotiation request, the computing node disconnects the first session link. Specifically, the first session link can be disconnected by closing the socket port of the source storage node corresponding to the first session link.

[0256] Step 406: Send a link reconnect request for the target logical disk to the storage node.

[0257] Specifically, based on the disconnection of the first session link, a link reconnect request for the target logical disk is sent to the storage node.

[0258] In a specific implementation, in an optional implementation manner provided by the embodiments of this specification, after sending the link reconnect request for the target logical disk to the storage node, it further includes:

[0259] Receive the connection address of the target storage node in the storage node sent in response to the link reconnect request;

[0260] Send a second link reconnect request to the target storage node based on the connection address.

[0261] In practical applications, since the storage node may not provide the computing node with the real connection address, but provide a virtual IP address. After the computing node sends a link reconnect request for the target logical disk to the storage management node in the storage node based on the virtual IP address, the storage management node sends the connection address of the target storage node in the storage node to the computing node in response to the link reconnect request; after receiving the connection address, the computing node sends a second link reconnect request to the target storage node based on the connection address.

[0262] In a specific implementation, after the target storage node successfully establishes a second session link based on the second link reconnect request, it may send a reconnect success notification to the computing node, and the computing node then receives the reconnect success notification returned by the target storage node based on the second link reconnect request.

[0263] Further, based on the establishment of the second session link on the storage node side, in an optional implementation manner provided by the embodiments of this specification, after sending the link reconnect request for the target logical disk to the storage node, it further includes:

[0264] Receive the link status of the second session link sent by the storage node;

[0265] Based on the link state, change the link state corresponding to the first session link from the second state to the first state, where the link state corresponding to the first session link has a corresponding relationship with the second session link.

[0266] It should be noted that after disconnecting the first session link and reconstructing the second session link, the second session link replaces the first session link, and then the link state corresponding to the first session link in the computing node corresponding to the second session link.

[0267] Based on this, after the computing node changes the link state corresponding to the first session link from the first state to the second state, when receiving the link state of the second session link, based on the received link state, change the link state that was originally changed to the second state back to the first state, so as to reissue the IO request through the newly created second session link, thereby achieving seamless IO switching in the entire balanced scheduling process and making the user access unaware.

[0268] In an optional implementation manner provided by the embodiments of this specification, the receiving the link state of the second session link sent by the storage node includes:

[0269] Receiving a link state change notice of the second session link sent by the storage node;

[0270] Based on the state change notice, sending a status report instruction for the second session link to the storage node;

[0271] Receiving the link state of the second session link sent by the storage node in response to the status report instruction.

[0272] Specifically, the specific implementation of the computing node receiving the link state of the second session link sent by the storage node is similar to the above-mentioned specific implementation of receiving the link state of the first session link sent by the storage node. Refer to the above-mentioned specific implementation of receiving the link state of the second session link sent by the storage node, and details will not be elaborated here.

[0273] In summary, the load balancing method provided by this specification has a computing node as the execution subject. By cooperating with the storage node, it receives a reconnect negotiation request of the first session link of the target logical disk sent by the storage node; based on the reconnect negotiation request, disconnects the first session link; and sends a link reconnect request for the target logical disk to the storage node, achieving load balancing based on the target logical disk and scheduling the first session link in the session links of the target logical disk between storage nodes, avoiding the impact on other logical disks and also avoiding the impact on other session links of the target logical disk.

[0274] The following is combined with the attached Figure 5 , taking the application of the load balancing method provided in this specification in an interactive scenario as an example, the load balancing method will be further described. Among them, Figure 5 shows a processing flow chart of a load balancing method applied to an interactive scenario provided by an embodiment of this specification, which specifically includes the following steps:

[0275] Step 502: Based on the load conditions of each storage node and LUN, the storage management node determines to schedule LUN x from storage node 3 to run on storage node m, and then LUN x is successfully mapped on storage node m.

[0276] Among them, the storage management node (i.e., Storage Manager Node) can be understood as the main node in the storage node (i.e., Storage Server Node, storage service node). The storage management node includes a device management module (i.e., Device Manager). The device management module performs inter-node scheduling of LUN and Session (which can be understood as the session link in the above method embodiment) based on the load conditions of the distributed storage nodes and the affiliated LUN, meets the IOPS water level requirements of the LUN, and ensures that the overall traffic of each storage node tends to be balanced. The device management module is deployed on the control plane node of the distributed storage cluster, and only the main node provides the control plane service capability externally. It communicates with the computing node through the iSCSI protocol interface and communicates with the device service module of the storage service node through the RPC interface. Among them, the sub-modules of the device management module include a device scheduling module (Device Schedule), a virtual IP service module (Virtual IP), a meta database (Meta Data Base), etc.

[0277] Specifically, the device scheduling module is responsible for the scheduling function of LUN and Session between storage nodes; the virtual IP service module provides a unified iSCSI target IP proxy service for the iSCSI initiator of the computing node; the meta database manages the metadata of the data plane nodes of each distributed cluster, including the device topology information inside these nodes;

[0278] In addition, storage node 3 can be understood as the source storage node in the above method embodiment, storage node m can be understood as the target storage node in the above method embodiment, and LUN x can be understood as the target logical disk in the above method embodiment.

[0279] Step 504: After receiving the response that storage node m has successfully mapped LUN x, the storage management node notifies the device service of storage node 3 to return a status change notice of the link status to the computing node through session link 6 and session link 7 respectively.

[0280] Among them, session link 6 and session link 7 can be understood as the first session link in the above method embodiments; the device service module mainly provides the data plane service of the LUN for the computing node.

[0281] The computing node includes: an iSCSI initiator (iSCSI Initiator), a SCSI layer (SCSI Layer), a block device layer (BLOCK Layer), and multipath software. And there are two session links for the LUN x in the storage node in the computing node, that is, each storage node exclusively occupies two session links of the LUN x. Specifically, there are two session links for the LUNx in storage node 0 in the computing node, namely session 0 (i.e., session link 0) and session 1 (i.e., session link 1); there are two session links for the LUN x in storage node 1 in the computing node, namely session 2 (i.e., session link 2) and session 3 (i.e., session link 3); there are two session links for the LUN x in storage node 2 in the computing node, namely session 4 (i.e., session link 4) and session 5 (i.e., session link 5); there are two session links for the LUN x in storage node 3 in the computing node, namely session 6 (i.e., session link 6) and session 7 (i.e., session link 7).

[0282] During specific implementation, a session link is established between the computing node and the storage node through the iSCSI&&SCSI protocol interface, and data communication is performed based on the established session link.

[0283] Specifically, the status change notification can be UA, and the UA can be sent by using an IO or SCSI example test IO or SCSI management class command as a carrier.

[0284] Step 506: After receiving the status change notification, the multipath software of the computing node sends a status report command (Report Target Port Groups Command) to storage node 3 through session link 6 and session link 7 respectively.

[0285] Step 508: After receiving the status report command, storage node 3 returns that the path priority of session link 6 is ANO (Active-No-Optimized, that is, the second preference) through session link 6, and returns that the path priority of session link 7 is ANO through session link 7.

[0286] During specific implementation, a session can return its corresponding path priority in a response command. Among them, the path priority can be understood as the link state in the above method embodiments, and ANO can be understood as the second state in the above method embodiments.

[0287] Step 510: After the multipath software of the computing node receives the above path priorities, it transfers session link 6 and session link 7 from the AO (Active-Optimized, i.e., preferred) path group to the ANO path group, and no longer issues access requests for block device sdx (corresponding to LUN x in the storage node) from session link 6 or session link 7, but only issues them from session links 0 / 1 / 2 / 3 / 4 / 5 in the AO path group.

[0288] Specifically, the access request can be understood as an IO request; AO can be understood as the first state in the above method embodiments.

[0289] Step 512: After the device service module of storage node 3 waits for all the issued access requests for LUN x to be returned to the computing node, it notifies the device management module of the storage management node; after receiving this information, the device management module notifies the device service module of storage node 3 to send a reconnect negotiation request to the computing node through session link 6 and session link 7.

[0290] In specific implementation, the reconnect negotiation request (Negotiation Request) can be an asynchronous event (AsyncEvent) in the iSCSI protocol interface.

[0291] Step 514: After the iSCSI initiator of the computing node receives the AsyncEvent, it closes the socket ports of storage node 3 corresponding to session link 6 and session link 7, and at the same time sends an iSCSI login request (reconnect request) to the virtual IP of the device management module of the storage management node.

[0292] Step 516: After the device management module of the storage management node receives the iSCSI login request, it returns the actual iSCSI IP address of storage node m to the computing node.

[0293] Step 518: After the iSCSI initiator of the computing node receives the response to the iSCSI login request, it sends an iSCSI login request to storage node m. The device service module of storage node m returns a request success to the computing node and at the same time notifies the storage management module of this response event.

[0294] Specifically, the above steps achieve the redirection of session link 6 and session link 7 from storage node 3 to storage node m.

[0295] Step 520: After the storage management module receives the above response event, it deletes the LUN x mapping through storage node 3.

[0296] Step 522: The storage management module notifies the device service module of storage node m to return the link status of session link 6 to the compute node through the newly established session link 6, and return the link status of session link 7 to the compute node through the newly established session link 7.

[0297] Specifically, the status change notification can be UA, and the UA can be sent by using an IO or SCSI test IO or SCSI management class command as a carrier.

[0298] Step 524: After receiving the UA, the multipath software of the compute node sends status report instructions to storage node m through session link 6 and session link 7 respectively.

[0299] Step 526: After receiving the status report instruction, the device service module of storage node m returns that the path priority of session link 6 is AO through session link 6, and returns that the path priority of session link 7 is AO through session link 7.

[0300] Step 528: After receiving the path priorities of the above session link 6 and session link 7, the multipath software of the compute node transfers session link 6 and session link 7 from the ANO path group to the AO path group.

[0301] Specifically, after transferring session link 6 and session link 7 from the ANO path to the AO path group, new IOs for sdx are issued based on load balancing from session links 0 / 1 / 2 / 3 / 4 / 5 / 6 / 7, so as to achieve seamless switching of IOs of LUN x during the entire balanced scheduling process, making the user access unaware.

[0302] In summary, the load balancing method provided in this specification, through the cooperation of the storage node and the compute node, by determining the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session links of the target logical disk; sending a reconnect negotiation request for the first session link to the compute node; receiving a link reconnect request sent by the compute node in response to the reconnect negotiation request; when the target logical disk is mounted in the target storage node, in response to the link reconnect request, establishing a second session link between the compute node and the target logical disk in the target storage node; realizes load balancing based on the target logical disk, and schedules the first session link in the session links of the target logical disk between storage nodes, avoiding the impact on other logical disks and the impact on other session links of the target logical disk.

[0303] A system embodiment provided in this specification corresponds to the above method embodiment. When reading this embodiment, it can correspond to the above method embodiment. Figure 6The figure shows a schematic structural diagram of a load balancing system provided according to an embodiment of this specification.

[0304] The load balancing system includes:

[0305] A storage node 602 and a computing node 604;

[0306] Among them, the storage node 602 is configured to determine a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in the session link of the target logical disk; send a reconnect negotiation request for the first session link to the computing node 604;

[0307] The computing node 604 is configured to receive the reconnect negotiation request for the first session link of the target logical disk sent by the storage node 602; based on the reconnect negotiation request, disconnect the first session link; send a link reconnect request for the target logical disk to the storage node;

[0308] The storage node 602 is further configured to receive the link reconnect request sent by the computing node in response to the reconnect negotiation request; in the case of mounting the target logical disk in the target storage node, in response to the link reconnect request, establish a second session link between the computing node and the target logical disk in the target storage node.

[0309] Specifically, for the first session link, in an optional implementation provided by an embodiment of this specification, the storage node 602 is further configured to:

[0310] In the case where the link state of the first session link is changed, send the link state of the first session link to the computing node 604, so that the computing node 604 stops issuing access requests for the target logical disk through the first session link based on the link state of the first session link;

[0311] Correspondingly, the computing node 604 is further configured to:

[0312] Receive the link state of the first session link sent by the storage node 602;

[0313] Based on the link state, change the link state corresponding to the first session link from the first state to the second state.

[0314] In practical applications, for the second session link, in an optional implementation provided by an embodiment of this specification, the storage node 602 is further configured to:

[0315] Send the link state of the second session link to the computing node 604, where the first session link and the second session link have a corresponding relationship at the computing node 604.

[0316] Correspondingly, the computing node 604 is further configured to:

[0317] Receive the link state of the second session link sent by the storage node 602;

[0318] Based on the link state, change the link state corresponding to the first session link from the second state to the first state, where the link state corresponding to the first session link has a corresponding relationship with the second session link.

[0319] In an optional implementation provided by an embodiment of this specification, the storage node 602 is further configured to:

[0320] In response to the link reconnection request, send the connection address of the target storage node to the computing node 604;

[0321] The computing node 604 is further configured to receive the connection address of the target storage node in the storage node sent by the storage node 602 in response to the link reconnection request; send a second link reconnection request to the target storage node based on the connection address;

[0322] The storage node 602 is further configured to:

[0323] Receive the second link reconnection request sent by the computing node 604 to the target storage node based on the connection address;

[0324] The target storage node establishes a second session link between the computing node 604 and the target logical disk in the target storage node based on the second link reconnection request.

[0325] In summary, the load balancing system provided in this specification coordinates the storage nodes and the computing nodes. By determining the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk; sending a reconnection negotiation request for the first session link to the computing node; receiving the link reconnection request sent by the computing node in response to the reconnection negotiation request; when the target logical disk is mounted in the target storage node, in response to the link reconnection request, establishing a second session link between the computing node and the target logical disk in the target storage node; it realizes load balancing based on the target logical disk, and schedules the first session link in the session link of the target logical disk between the storage nodes, avoiding the impact on other logical disks and the impact on other session links of the target logical disk.

[0326] The above is a schematic solution of a load balancing system according to this embodiment. It should be noted that the technical solution of this load balancing system and the technical solution of the above load balancing method belong to the same concept. For the details not described in detail in the technical solution of the load balancing device, reference can be made to the description of the technical solution of the above load balancing method.

[0327] Corresponding to the above method embodiment, this specification also provides an embodiment of a load balancing device. Figure 7 It shows a schematic diagram of a load balancing device provided by an embodiment of this specification. As Figure 7 shown, the device includes:

[0328] A determination module 702, configured to determine the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk;

[0329] A sending module 704, configured to send a reconnection negotiation request for the first session link to the computing node;

[0330] A receiving module 706, configured to receive the link reconnection request sent by the computing node in response to the reconnection negotiation request;

[0331] A establishing module 708, configured to, when the target logical disk is mounted in the target storage node, in response to the link reconnection request, establish a second session link between the computing node and the target logical disk in the target storage node.

[0332] Optionally, the load balancing device further includes:

[0333] The first sending status module is configured to send the link status of the first session link to a computing node when the link status of the first session link is changed, so that the computing node stops issuing access requests for the target logical disk through the first session link based on the link status of the first session link;

[0334] Correspondingly, the load balancing device further includes:

[0335] A second sending status module is configured to send the link status of the second session link to the computing node, where the first session link and the second session link have a corresponding relationship at the computing node.

[0336] Optionally, the first sending status module is further configured to:

[0337] Send a status change notification for the first session link to the computing node;

[0338] Receive a status report instruction for the first session link sent by the computing node in response to the status change notification;

[0339] Send the link status of the first session link to the computing node based on the status report instruction.

[0340] Optionally, the sending module 704 is further configured to:

[0341] Send a reconnect negotiation request for the first session link to the computing node when the access request for the target logical disk through the first session link is completed.

[0342] Optionally, the determining module 702 is further configured to:

[0343] Detect a first access volume for a target logical disk;

[0344] Determine a target node quantity of a storage node for the target logical disk based on the first access volume;

[0345] Compare the target node quantity with the current node quantity of the storage node to which the target logical disk belongs;

[0346] When the comparison is inconsistent, determine a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in the session link of the target logical disk.

[0347] Optionally, the determining module 702 is further configured to:

[0348] Detect the second access volume for each storage node;

[0349] When the second access volume of any storage node is greater than the preset access volume, determine the any storage node as the source storage node for load balancing;

[0350] Based on the second access volume of each storage node, determine the target storage node for load balancing among the storage nodes, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk; or

[0351] When a load balancing instruction for a storage node or a target logical disk is detected, based on the balancing information carried in the load balancing instruction, determine the source storage node and the target storage node for load balancing among the storage nodes, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk.

[0352] Optionally, the load balancing device further includes:

[0353] A mounting module, configured to mount the target storage disk to the target storage node when the target storage disk does not exist in the target storage node.

[0354] Optionally, the load balancing device further includes:

[0355] A removal module, configured to remove the target logical disk from the source storage node when there is no session link for the target logical disk in the source storage node.

[0356] Optionally, the establishing module 708 is further configured to:

[0357] In response to the link reconnection request, send the connection address of the target storage node to the computing node;

[0358] Receive the second link reconnection request sent by the computing node to the target storage node based on the connection address;

[0359] The target storage node establishes a second session link between the computing node and the target logical disk in the target storage node based on the second link reconnection request.

[0360] Optionally, the second sending status module is further configured to:

[0361] Send a status change notification for the second session link to the computing node;

[0362] Receive the status report instruction for the second session link sent by the computing node in response to the status change notification;

[0363] Based on the status report instruction, send the link status of the second session link to the computing node.

[0364] In summary, the load balancing device provided in this specification has a storage node as the execution entity. By cooperating with the computing node, it determines the source storage node and the target storage node for load balancing, the target logical disk in the source storage node, and the first session link in the session link of the target logical disk; sends a reconnection negotiation request for the first session link to the computing node; receives a link reconnection request sent by the computing node in response to the reconnection negotiation request; when the target logical disk is mounted in the target storage node, in response to the link reconnection request, establishes a second session link between the computing node and the target logical disk in the target storage node; realizes load balancing based on the target logical disk, and schedules the first session link in the session link of the target logical disk between storage nodes, avoiding the impact on other logical disks and the impact on other session links of the target logical disk.

[0365] The above is a schematic solution of a load balancing device in this embodiment. It should be noted that the technical solution of this load balancing device belongs to the same concept as the technical solution of the above load balancing method. For the details not described in the technical solution of the load balancing device, reference can be made to the description of the technical solution of the above load balancing method.

[0366] Corresponding to the above method embodiment, this specification also provides another embodiment of a load balancing device, Figure 8 showing a schematic diagram of another load balancing device provided in an embodiment of this specification. As Figure 8 shown, the device includes:

[0367] A receiving request module 802, configured to receive a reconnection negotiation request for the first session link of a target logical disk sent by a storage node;

[0368] A disconnection module 804, configured to disconnect the first session link based on the reconnection negotiation request;

[0369] A sending request module 806, configured to send a link reconnection request for the target logical disk to the storage node.

[0370] Optionally, the load balancing device further includes:

[0371] The first receiving status module is configured to receive the link status of the first session link sent by the storage node;

[0372] The status change module is configured to change the link status corresponding to the first session link from the first state to the second state based on the link status.

[0373] Optionally, the first receiving status module is further configured to:

[0374] Receive the status change notice of the first session link sent by the storage node;

[0375] Based on the status change notice, send a status report instruction for the first session link to the storage node;

[0376] Receive the link status of the first session link sent by the storage node in response to the status report instruction.

[0377] Optionally, the load balancing device further includes:

[0378] The receiving address module is configured to receive the connection address of the target storage node in the storage node sent by the storage node in response to the link reconnection request;

[0379] The second sending request module is configured to send a second link reconnection request to the target storage node based on the connection address.

[0380] Optionally, the load balancing device further includes:

[0381] The second receiving status module is configured to receive the link status of the second session link sent by the storage node;

[0382] The second status change module is configured to change the link status corresponding to the first session link from the second state to the first state based on the link status, where the link status corresponding to the first session link has a corresponding relationship with the second session link.

[0383] Optionally, the second receiving status module is further configured to:

[0384] Receive the link status change notice of the second session link sent by the storage node;

[0385] Based on the status change notice, send a status report instruction for the second session link to the storage node;

[0386] Receive the link status of the second session link sent by the storage node in response to the status report instruction.

[0387] In summary, the load balancing device provided in this specification has a computing node as the execution entity. By cooperating with the storage node, it receives a reconnection negotiation request for the first session link of the target logical disk sent by the storage node; based on the reconnection negotiation request, it disconnects the first session link; and sends a link reconnection request for the target logical disk to the storage node. This achieves load balancing based on the target logical disk and schedules the first session link in the session links of the target logical disk between storage nodes, avoiding the impact on other logical disks and also avoiding the impact on other session links of the target logical disk.

[0388] The above is a schematic solution of another load balancing device in this embodiment. It should be noted that the technical solution of this load balancing device and the technical solution of the above-mentioned another load balancing method belong to the same concept. For the details not described in detail in the technical solution of the another load balancing device, reference can be made to the description of the technical solution of the above-mentioned another load balancing method.

[0389] Figure 9 FIG. shows a structural block diagram of a computing device 900 provided according to an embodiment of this specification. The components of the computing device 900 include but are not limited to a memory 910 and a processor 920. The processor 920 is connected to the memory 910 through a bus 930, and a database 950 is used to store data.

[0390] The computing device 900 further includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interfaces (e.g., Network Interface Card (NIC)), such as IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, Worldwide Interoperability for Microwave Access (Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, and so on.

[0391] In an embodiment of this specification, the above components of the computing device 900 and Figure 9 other components not shown in the figure may also be connected to each other, for example, through a bus. It should be understood that Figure 9 the shown structural block diagram of the computing device is only for illustrative purposes and is not a limitation on the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0392] The computing device 900 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or a PC. The computing device 900 can also be a mobile or stationary server.

[0393] Among them, computer instructions are run on the processor 920, and when the processor executes the computer instructions, the steps of the load balancing method are implemented.

[0394] The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above load balancing method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the description of the technical solution of the above load balancing method.

[0395] An embodiment of this specification also provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the load balancing method are implemented.

[0396] The above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above load balancing method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above load balancing method.

[0397] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.

[0398] The computer instructions include computer program code, which may be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, external hard drives, magnetic disks, optical discs, computer memories, read-only memories (ROM), random access memories (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0399] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this specification is not limited by the described action sequence, because according to this specification, some steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily all required by this specification.

[0400] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0401] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of this specification, so that those skilled in the art can well understand and utilize this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A load balancing method, applied to a storage node, wherein the storage node includes a storage management node, the method comprising: Determining a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in a session link of the target logical disk, wherein the target logical disk is mounted on the source storage node and the target storage node, and the target logical disk is load balanced and scheduled between the source storage node and the target storage node; Sending a reconnection negotiation request for the first session link to the computing node, wherein the reconnection negotiation request is sent to the computing node when it is determined, based on completion of access requests through the first session link, that all access requests have been completed; Receiving, by the storage management node, a link reconnection request sent by the computing node in response to the reconnection negotiation request; When the target logical disk is mounted in the target storage node, the storage management node is utilized to establish a second session link between the computing node and the target logical disk in the target storage node in response to the link reconnection request.

2. The load balancing method according to claim 1, before sending the reconnection negotiation request for the first session link to the computing node, further comprising: When the link state of the first session link is changed, sending the link state of the first session link to the computing node, so that the computing node stops issuing access requests to the target logical disk through the first session link based on the link state of the first session link; Correspondingly, after establishing the second session link between the computing node and the target logical disk in the target storage node, the method further includes: The link state of the second session link is sent to the computing node, wherein the first session link and the second session link have a corresponding relationship on the computing node.

3. The load balancing method according to claim 2, wherein the sending the link status of the first session link to the computing node comprises: Sending a status change notification for the first session link to a computing node; receiving a status report instruction for the first session link sent by the computing node in response to the status change notification; Based on the status reporting instruction, the link status of the first session link is sent to the computing node.

4. The load balancing method according to claim 1, wherein the sending a reconnection negotiation request for the first session link to the computing node comprises: When the access request to the target logical disk through the first session link is completed, a reconnection negotiation request for the first session link is sent to the computing node.

5. The load balancing method according to claim 1 , wherein, in response to the link reconnection request, establishing a second session link between the computing node and the target logical disk in the target storage node comprises: In response to the link reconnection request, sending the connection address of the target storage node to the computing node; receiving a second link reconnection request sent by the computing node to the target storage node based on the connection address; The target storage node establishes a second session link between the computing node and the target logical disk in the target storage node based on the second link reconnection request.

6. A load balancing method, applied to a computing node, comprising: receiving a reconnection negotiation request for a first session link of a target logical disk sent by a storage node, wherein the reconnection negotiation request is sent by the storage node when it is determined that all access requests through the first session link have been completed, the target logical disk is mounted on a source storage node and a target storage node, and the target logical disk is load balanced between the source storage node and the target storage node; Disconnecting the first session link based on the reconnection negotiation request; Send a link reconnection request for the target logical disk to the storage management node included in the storage node, so that the storage node uses the storage management node to respond to the link reconnection request and establish a second session link between the computing node and the target logical disk in the target storage node.

7. The load balancing method according to claim 6, before receiving the reconnection negotiation request for the first session link of the target logical disk sent by the storage node, further comprising: receiving a link status for a first session link sent by the storage node; Based on the link status, the link status corresponding to the first session link is changed from a first status to a second status.

8. The load balancing method according to claim 7, wherein receiving the link status of the first session link sent by the storage node comprises: receiving a status change notification for the first session link sent by the storage node; Based on the status change notification, sending a status report instruction for the first session link to the storage node; The link status of the first session link is received, which is sent by the storage node in response to the status report instruction.

9. The load balancing method according to claim 6, further comprising: after sending the link reconnection request for the target logical disk to the storage node; receiving a connection address of a target storage node among the storage nodes sent by the storage node in response to the link reconnection request; A second link reconnection request is sent to the target storage node based on the connection address.

10. The load balancing method according to any one of claims 7 or 8, further comprising: after sending the link reconnection request for the target logical disk to the storage node; receiving a link status for a second session link sent by the storage node; Based on the link state, the link state corresponding to the first session link is changed from the second state to the first state, wherein the link state corresponding to the first session link has a corresponding relationship with the second session link.

11. A load balancing system comprising: Storage nodes and computing nodes, wherein the storage nodes include storage management nodes; The storage node is configured to determine a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in a session link of the target logical disk, wherein the target logical disk is mounted on the source storage node and the target storage node, and the target logical disk is load balanced between the source storage node and the target storage node; and send a reconnection negotiation request for the first session link to the computing node, wherein the reconnection negotiation request is sent to the computing node when it is determined that all access requests have been completed based on the completion status of the access requests through the first session link; The computing node is configured to receive a reconnection negotiation request for a first session link of a target logical disk sent by the storage node; disconnect the first session link based on the reconnection negotiation request; and send a link reconnection request for the target logical disk to a storage management node included in the storage node; The storage node is also configured to utilize the storage management node to receive a link reconnection request sent by the computing node in response to the reconnection negotiation request; and when the target logical disk is mounted in the target storage node, utilize the storage management node to respond to the link reconnection request to establish a second session link between the computing node and the target logical disk in the target storage node.

12. A load balancing device, applied to a storage node, wherein the storage node includes a storage management node, comprising: a determination module configured to determine a source storage node and a target storage node for load balancing, a target logical disk in the source storage node, and a first session link in a session link of the target logical disk, wherein the target logical disk is mounted on the source storage node and the target storage node, and the target logical disk performs load balancing scheduling between the source storage node and the target storage node; a sending module configured to send a reconnection negotiation request for the first session link to the computing node, wherein the reconnection negotiation request is sent to the computing node when it is determined, based on completion status of access requests through the first session link, that all access requests have been completed; a receiving module configured to receive, using the storage management node, a link reconnection request sent by the computing node in response to the reconnection negotiation request; An establishment module is configured to establish a second session link between the computing node and the target logical disk in the target storage node using the storage management node in response to the link reconnection request when the target logical disk is mounted in the target storage node.

13. A computing device comprising: memory and processor; The memory is used to store computer instructions, and when the processor executes the computer instructions, the steps of the load balancing method according to any one of claims 1-5 or 6-10 are implemented.

14. A computer-readable storage medium storing computer instructions, wherein when the computer instructions are executed by a processor, the steps of the load balancing method according to any one of claims 1 to 5 or 6 to 10 are implemented.

Citation Information

Patent Citations

  • Access method of iSCSI client, storage medium, client and storage node

    CN109474700A

  • Path replacement method and device

    CN112650440A