Storage path scheduling method, system, device and program based on iscsi
Through the iscsi-based storage path scheduling method, the problem of the number of exported volumes of the SAN storage device iscsi storage path and storage gateway is solved, and the storage path is highly available and load balancing is realized to ensure the balanced distribution of storage data traffic.
Patent Information
- Application Number
- CN202411742653.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-05-06
AI Technical Summary
When ensuring that the iscsi storage path of the SAN storage device is highly available, how to achieve load balancing when the number of exported volumes of the iscsi storage gateway is limited to avoid the situation where some gateways are under pressure and some gateways are under pressure.
Through an iscsi-based storage path scheduling method, we can determine whether the number of exported volumes reaches the preset threshold, select the optimal storage path to export volumes, create a new path to export volumes, and recalculate the number of storage paths to export volumes when volume export and cancel the export, ensuring high availability and load balancing of storage paths.
It realizes that when the number of volumes exported by iscsi storage paths and storage gateways is limited, the high availability of iscsi storage paths and the load balancing of the storage gateway is ensured, so that the traffic distribution of stored data is balanced, and the gateway pressure is avoided.
Smart Images

Figure CN119937903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an ISCSI-based storage path scheduling method, system, device and program. Background Art
[0002] SAN storage is one of the core technologies of cloud computing. It is widely used in the storage solutions of cloud computing platforms and provides block storage services for cloud computing platforms. SAN storage protocols generally include scsi, iscsi, FC, etc. The iscsi protocol is the most widely used. In order to ensure the security of the storage path, iscsi uses multiple storage gateways to form a high-availability storage path. In this way, if some of the multiple storage gateways are disconnected, it will not affect the normal use of the iscsi storage path, leaving time for operation and maintenance personnel to repair the problem. However, some SAN storage devices have restrictions on the number of exported volumes of iscsi storage paths and storage gateways.
[0003] In order to ensure the high availability of the ISCSI storage path of the SAN storage device and the load balancing of the ISCSI storage gateway of the SAN storage device, the present invention proposes an ISCSI-based storage path scheduling method. Summary of the invention
[0004] In view of this, an embodiment of the present disclosure provides an ISCSI-based storage path scheduling method, which at least partially solves the problems existing in the prior art.
[0005] In a first aspect, an embodiment of the present disclosure provides an ISCSI-based storage path scheduling method, the method comprising the following steps:
[0006] When exporting volumes, determine whether the number of exported volumes of all storage gateways reaches a preset threshold; when the number of exported volumes reaches the preset threshold, return export failure;
[0007] When the number of exported volumes does not reach the preset threshold, determine whether the number of exported volumes of the storage path reaches the preset threshold; wherein, when the number of exported volumes of the storage path reaches the preset threshold, create a new path and export the volumes;
[0008] When the number of storage path export volumes does not reach the preset threshold, the optimal storage path export volume is selected based on the scheduling algorithm;
[0009] When the number of exported volumes of a storage path is 0, the storage path is not deleted and will be reused the next time a volume is exported.
[0010] When exporting or unexporting volumes, the number of exported volumes in the storage path is recalculated.
[0011] According to a specific implementation of the embodiment of the present disclosure, the method further includes:
[0012] Obtain statistics on the number of exported volumes on the storage device and persist them to the data layer;
[0013] Group storage gateways and persist them to the data layer.
[0014] According to a specific implementation of the embodiment of the present disclosure, grouping the storage gateways and persisting them to the data layer includes:
[0015] Each group contains at least two storage gateways. Each group of gateways creates a storage path. Each storage path corresponds to a storage gateway group and is persisted to the data layer.
[0016] According to a specific implementation of the embodiment of the present disclosure, the step of selecting an optimal storage path based on a scheduling algorithm to export a volume includes:
[0017] Obtain the number of exported volumes of the storage gateway, sort the storage gateways from small to large according to the number of exported volumes, and select the storage gateway with the least number of exported volumes;
[0018] The number of exported volumes of the storage path is obtained, the storage paths are sorted from small to large according to the number of exported volumes, and the storage path with the least number of exported volumes is selected.
[0019] In a second aspect, an embodiment of the present disclosure provides an ISCSI-based storage path scheduling system, the system comprising:
[0020] The storage gateway module is configured to determine whether the number of exported volumes of all storage gateways reaches a preset threshold when exporting volumes; wherein, when the number of exported volumes reaches the preset threshold, return export failure;
[0021] The storage path module is configured to determine whether the number of exported volumes of the storage path reaches a preset threshold when the number of exported volumes does not reach a preset threshold; wherein, when the number of exported volumes of the storage path reaches the preset threshold, a new path is created to export the volumes;
[0022] The export module is configured to select an optimal storage path export volume based on a scheduling algorithm when the number of storage path export volumes does not reach a preset threshold;
[0023] When the number of exported volumes of a storage path is 0, the storage path is not deleted and will be reused the next time a volume is exported.
[0024] When exporting or unexporting volumes, the number of exported volumes in the storage path is recalculated.
[0025] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0026] at least one processor; and,
[0027] a memory communicatively connected to the at least one processor; wherein,
[0028] The memory stores instructions that can be executed by the at least one processor. When the instructions are executed by the at least one processor, the at least one processor implements the ISCSI-based storage path scheduling method described in any one of the first aspect or any one of the implementations of the first aspect.
[0029] In a fourth aspect, an embodiment of the present disclosure further provides a computer program product, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the ISCSI-based storage path scheduling method in the aforementioned first aspect or any implementation of the first aspect.
[0030] The storage path scheduling method based on ISCSI in the disclosed embodiment can ensure the high availability of ISCSI storage paths and the load balancing of ISCSI storage gateways while satisfying the export volume quantity restrictions of ISCSI storage paths and storage gateways, so that the flow of storage data is evenly distributed in the storage network, balancing the network pressure of storage gateways, and preventing some gateways from being overloaded and others underloaded. At the same time, the path created by the user will not affect the use of the present invention. Even if the path created by the user does not achieve the effect of balancing the load of the storage gateway, this method can make up for it and re-achieve the load balancing of the storage gateway. The present invention supports use in distributed systems and can be better adapted to various cloud computing platforms. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The above is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0032] Figure 1 A flowchart of a storage path scheduling method based on ISCSI is provided in an embodiment of the present disclosure;
[0033] Figure 2 A flowchart of a storage path scheduling method based on ISCSI is provided in an embodiment of the present disclosure;
[0034] Figure 3 A schematic diagram of the structure of an ISCSI-based storage path scheduling system provided in an embodiment of the present disclosure; and
[0035] Figure 4A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0037] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0038] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement a device and / or practice a method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.
[0039] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.
[0040] The embodiment of the present invention provides an ISCSI-based storage path scheduling method, which ensures the high availability of the ISCSI storage path and the load balancing of the ISCSI storage gateway while meeting the export volume quantity restrictions of the ISCSI storage path and the storage gateway, so that the flow of storage data is evenly distributed in the storage network, and the situation where some gateways are under high pressure and some gateways are under low pressure will not occur.
[0041] The present invention is applicable to concurrent and distributed systems, because when exporting and canceling the export of volumes, synchronization locks need to be added. Locking in non-concurrent and non-distributed systems will affect the performance of this method, and the locking mechanism can be canceled.
[0042] Figure 1 A schematic diagram of an ISCSI-based storage path scheduling method process provided in an embodiment of the present disclosure.
[0043] Figure 2 For Figure 1 The corresponding flowchart of the storage path scheduling method based on ISCSI.
[0044] like Figure 2 As shown, first, obtain the statistical information of the number of exported volumes on the storage device and persist it to the data layer.
[0045] More specifically, considering that there is residual data on the storage devices in some environments that will affect the accuracy of subsequent calculation results, it is necessary to obtain statistical information on the number of exported volumes on the storage devices in advance, persist it to the data layer, and use this as the basic data to add it to the subsequent exported volumes to calculate the number of exported volumes.
[0046] Secondly, group the storage gateways and persist them to the data layer.
[0047] In an embodiment of the present invention, the storage gateways are grouped and persisted to the data layer, including: each group contains at least two storage gateways, each group of gateways creates a storage path, each storage path corresponds to a storage gateway group, and is persisted to the data layer.
[0048] More specifically, in order to achieve high availability and load balancing of network links, storage gateways are grouped into groups of at least two. Each group of gateways creates a storage path. Each storage path corresponds to a storage gateway group and is persisted to the data layer. In this way, each storage path has more than two network links, achieving high availability and load balancing.
[0049] Next, if Figure 1 As shown, at step S110, when exporting volumes, it is determined whether the number of exported volumes of all storage gateways reaches a preset threshold; wherein, when the number of exported volumes reaches the preset threshold, export failure is returned.
[0050] More specifically, if the volume is exported in a concurrent system, it needs to be locked before the subsequent judgment process can be carried out. After passing the maximum limit judgment and storage path selection, it is equivalent to pre-occupying a storage path quota for volume export and then unlocking it.
[0051] More specifically, the process proceeds to step S120.
[0052] In step S120, when the number of exported volumes does not reach the preset threshold, it is determined whether the number of exported volumes of the storage path reaches the preset threshold; wherein, when the number of exported volumes of the storage path reaches the preset threshold, a new path is created to export the volumes.
[0053] More specifically, all storage gateways are traversed to determine whether the number of exported volumes of all storage gateways has reached the maximum limit. If the number of exported volumes of all storage gateways has reached the maximum limit of the storage gateway, relevant information on export failure is returned.
[0054] Traverse all storage paths to determine the number of exported volumes of the storage path. If the maximum storage path limit is reached, create a new path.
[0055] Next, go to step S130.
[0056] At step S130, when the number of storage path export volumes does not reach a preset threshold, an optimal storage path export volume is selected based on a scheduling algorithm.
[0057] In an embodiment of the present invention, the selection of the optimal storage path export volume based on the scheduling algorithm includes: obtaining the number of storage gateway export volumes, sorting the storage gateways from small to large according to the number of export volumes, and selecting the storage gateway with the least number of export volumes; obtaining the number of storage path export volumes, sorting the storage paths from small to large according to the number of export volumes, and selecting the storage path with the least number of export volumes.
[0058] More specifically, in order to achieve the purpose of storage path reuse, when all volumes of a path are unexported, the path will not be deleted. When new volumes are exported, this path will be reselected for export to avoid repeated creation and deletion of paths. Since paths without volume exports will not be counted when counting the number of volume exports of each storage path, it is necessary to calculate the maximum value of the storage path number on the data plane. If the number of storage paths is less than the maximum value of the storage path number, it means that the number of exported volumes on some storage paths is 0. It is necessary to supplement the number of exported volumes of this path to 0 to provide complete data for the subsequent selection of the optimal storage path.
[0059] Traverse all storage paths and select the optimal storage path for export. In order to achieve the effect of storage link load balancing, the number of volumes exported by each storage path should be similar. Therefore, the storage path with the least number of currently exported volumes is generally selected as the export path for the new volume.
[0060] Next, go to step S140.
[0061] At step S140, when the number of exported volumes of the storage path is 0, the storage path is not deleted, and the storage path is reused the next time the volume is exported.
[0062] Next, go to step S150.
[0063] At step S150, when a volume is exported or unexported, the number of exported volumes of the storage path is recalculated.
[0064] More specifically, when exporting or canceling a volume, the number of exported volumes on the storage path is recalculated. If the number of exported volumes on the storage path is 0, the storage path is not deleted and is reused when a new volume is exported. Concurrent system volume cancellation also requires locking, indicating that a storage path quota for volume export is reserved, and then unlocking.
[0065] The key points of the storage path scheduling method based on ISCSI proposed in the present invention are as follows:
[0066] 1. The maximum number of exported volumes for each storage gateway is limited. The maximum number of exported volumes for each storage gateway is greater than the maximum number of exported volumes for each storage path.
[0067] 2. There is a maximum limit on the number of volumes exported by each storage path. The maximum number of exported volumes for each storage path is less than the maximum number of exported volumes for each storage gateway.
[0068] 3. To ensure high availability of storage paths, the total number of storage gateways must be greater than or equal to 2. After the storage gateways are grouped, use the storage gateways in the same group to create storage paths to ensure high availability of storage paths. When the number of storage path volume exports reaches the maximum limit, a new storage path can be created. The number of storage gateways in each group can be customized, but at least two storage gateways are required in one group, otherwise high availability cannot be guaranteed.
[0069] 4. The storage path name has a fixed format, which is used to distinguish the storage path created by this method from the storage path created by the user.
[0070] 5. When exporting volumes, iscsi requires distributed locking, counting the number of exported volumes for each storage gateway and each storage path, and using a scheduling algorithm to select a better path based on the number of exported volumes for each storage gateway and each storage path. Generally, the storage gateway and storage path with the least number of exported volumes are selected to achieve a load balancing effect.
[0071] 6. For storage paths created by users, it is necessary to count the number of volumes exported on each storage path and each storage gateway when managing storage devices, and persist them to the data layer. When exporting volumes again, these statistics need to be added.
[0072] 7. When canceling the export of a volume, a distributed lock is required for synchronization, and the number of exported volumes of the corresponding storage path and storage gateway is recalculated.
[0073] Figure 3 The iscsi-based storage path scheduling system 300 provided by the present invention includes a storage gateway module 310, a storage path module 320 and an export module 330.
[0074] The storage gateway module 310 is used to determine whether the number of exported volumes of all storage gateways reaches a preset threshold when exporting volumes; wherein, when the number of exported volumes reaches the preset threshold, the export failure is returned;
[0075] The storage path module 320 is used to determine whether the number of exported volumes of the storage path reaches a preset threshold when the number of exported volumes does not reach a preset threshold; wherein, when the number of exported volumes of the storage path reaches the preset threshold, a new path is created to export the volumes;
[0076] The export module 330 is used to select the optimal storage path export volume based on the scheduling algorithm when the number of storage path export volumes does not reach a preset threshold;
[0077] When the number of exported volumes of a storage path is 0, the storage path is not deleted and will be reused the next time a volume is exported.
[0078] When exporting or unexporting volumes, the number of exported volumes in the storage path is recalculated.
[0079] See also Figure 4 The present disclosure also provides an electronic device 40, which includes:
[0080] at least one processor; and,
[0081] a memory communicatively connected to the at least one processor; wherein,
[0082] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the ISCSI-based storage path scheduling method in the aforementioned method embodiment.
[0083] The embodiment of the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the ISCSI-based storage path scheduling method in the aforementioned method embodiment.
[0084] The embodiment of the present disclosure also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the ISCSI-based storage path scheduling method in the aforementioned method embodiment.
[0085] Reference below Figure 4, which shows a schematic diagram of the structure of an electronic device 40 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0086] like Figure 4 As shown, the electronic device 40 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 40 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0087] Typically, the following devices may be connected to the I / O interface 405: input devices 406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 408 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 409. The communication device 409 may allow the electronic device 40 to communicate wirelessly or wired with other devices to exchange data. Although the electronic device 40 with various devices is shown in the figure, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0088] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0089] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0090] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0091] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains at least two Internet Protocol addresses; sends a node evaluation request including the at least two Internet Protocol addresses to a node evaluation device, wherein the node evaluation device selects an Internet Protocol address from the at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein the obtained Internet Protocol address indicates an edge node in a content distribution network.
[0092] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet Protocol addresses; selects an Internet Protocol address from the at least two Internet Protocol addresses; and returns the selected Internet Protocol address; wherein the received Internet Protocol address indicates an edge node in a content distribution network.
[0093] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0094] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0095] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0096] It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.
[0097] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A storage path scheduling method based on ISCSI, characterized in that: The method comprises the following steps: When exporting volumes, determine whether the number of exported volumes of all storage gateways reaches a preset threshold; when the number of exported volumes reaches the preset threshold, return export failure; When the number of exported volumes does not reach the preset threshold, determine whether the number of exported volumes of the storage path reaches the preset threshold; wherein, when the number of exported volumes of the storage path reaches the preset threshold, create a new path and export the volumes; When the number of storage path export volumes does not reach the preset threshold, the optimal storage path export volume is selected based on the scheduling algorithm; When the number of exported volumes of a storage path is 0, the storage path is not deleted and will be reused the next time a volume is exported. When exporting or unexporting volumes, the number of exported volumes in the storage path is recalculated.
2. The storage path scheduling method based on ISCSI according to claim 1, characterized in that: The method further comprises: Obtain statistics on the number of exported volumes on the storage device and persist them to the data layer; Group storage gateways and persist them to the data layer.
3. The storage path scheduling method based on ISCSI according to claim 2, characterized in that: The grouping of storage gateways and persisting them to the data layer includes: Each group contains at least two storage gateways. Each group of gateways creates a storage path. Each storage path corresponds to a storage gateway group and is persisted to the data layer.
4. The storage path scheduling method based on ISCSI according to claim 1, characterized in that: The step of selecting an optimal storage path based on a scheduling algorithm to export a volume includes: Obtain the number of exported volumes of the storage gateway, sort the storage gateways from small to large according to the number of exported volumes, and select the storage gateway with the least number of exported volumes; The number of exported volumes of the storage path is obtained, the storage paths are sorted from small to large according to the number of exported volumes, and the storage path with the least number of exported volumes is selected.
5. A storage path scheduling system based on iscsi, characterized in that: The system comprises: The storage gateway module is configured to determine whether the number of exported volumes of all storage gateways reaches a preset threshold when exporting volumes; wherein, when the number of exported volumes reaches the preset threshold, return export failure; The storage path module is configured to determine whether the number of exported volumes of the storage path reaches a preset threshold when the number of exported volumes does not reach a preset threshold; wherein, when the number of exported volumes of the storage path reaches the preset threshold, a new path is created to export the volumes; The export module is configured to select the optimal storage path to export volumes based on the scheduling algorithm when the number of exported volumes of the storage path does not reach a preset threshold; when the number of exported volumes of the storage path is 0, the storage path is not deleted, and the storage path is reused the next time the volume is exported; when the volume is exported or canceled, the number of exported volumes of the storage path is recalculated.
6. An electronic device, characterized in that: The electronic device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor executes the ISCSI-based storage path scheduling method as described in any one of claims 1 to 4.
7. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer is caused to execute the ISCSI-based storage path scheduling method as described in any one of claims 1 to 4.