CN113608690B - Method, device, equipment and readable medium for iscsi target multipath grouping - Google Patents

Method, device, equipment and readable medium for iscsi target multipath grouping Download PDF

Info

Publication number
CN113608690B
CN113608690B CN202110809756.0A CN202110809756A CN113608690B CN 113608690 B CN113608690 B CN 113608690B CN 202110809756 A CN202110809756 A CN 202110809756A CN 113608690 B CN113608690 B CN 113608690B
Authority
CN
China
Prior art keywords
node
allocation table
paths
information
allocated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110809756.0A
Other languages
Chinese (zh)
Other versions
CN113608690A (en
Inventor
张廷雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202110809756.0A priority Critical patent/CN113608690B/en
Publication of CN113608690A publication Critical patent/CN113608690A/en
Application granted granted Critical
Publication of CN113608690B publication Critical patent/CN113608690B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, a device, equipment and a readable medium for iscsi target multipath grouping, wherein the method comprises the following steps: responding to the starting of a management tool of an iscsi target, and acquiring node information of a back-end storage cluster; filling the obtained node information into a node allocation table and initializing the node allocation table; responding to the received instruction for creating the logical volume mapping, and selecting a storage node with the minimum path number in a node allocation table for allocation based on the path number set by a user; updating the node allocation table. By using the scheme of the invention, the paths of all targets can be uniformly dispersed on the back-end storage node, the influence of paths among different targets is reduced, and the read-write performance of the storage node is fully exerted.

Description

Method, device, equipment and readable medium for iscsi target multipath grouping
Technical Field
The present invention relates to the field of computers, and more particularly to a method, apparatus, device, and readable medium for iscsi target multipath grouping.
Background
In the cloud computing era, the application of distributed block storage is more and more widespread, and the tgt service can map iscsi target (storage device end, device for storing disk or RAID, distributed storage cluster, and the purpose of providing disk used by other hosts) end volumes to iscsi initiator (client capable of using target) end hosts through iscsi protocol. By means of multipath, the load balancing of the IO traffic and the fault switching can be achieved. However, the multipath selection under tgt service often needs to be created manually by a user, which easily causes uneven path allocation, so that on one hand, the multipath cannot achieve the effect of failover, and on the other hand, the read-write performance of the mapping volume is affected.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method, apparatus, device and readable medium for iscsi target multipath grouping, which can uniformly disperse paths of all targets on a back-end storage node, reduce the influence of paths between different targets, and fully exert the read-write performance of the storage node.
Based on the above objects, an aspect of an embodiment of the present invention provides a method for iscsi target multipath grouping, comprising the steps of:
responding to the starting of a management tool of an iscsi target, and acquiring node information of a back-end storage cluster;
filling the obtained node information into a node allocation table and initializing the node allocation table;
responding to the received instruction for creating the logical volume mapping, and selecting a storage node with the minimum path number in a node allocation table for allocation based on the path number set by a user;
updating the node allocation table.
According to one embodiment of the present invention, in response to receiving an instruction to create a logical volume map, selecting a storage node with the smallest number of paths in a node allocation table to allocate based on the number of paths set by a user includes:
responding to the received instruction for creating the logical volume mapping, and acquiring the number of paths set by a user;
arranging the number of the allocated paths in the node allocation table from small to large;
and selecting the node with the minimum number of allocated paths corresponding to the number of the paths set by the user after arrangement for allocation.
According to one embodiment of the invention, updating the node allocation table includes:
and in response to selecting the node with the minimum allocated path number corresponding to the number of the paths set by the user after the arrangement, allocating, and adding 1 to the allocated path number corresponding to the allocated node.
According to one embodiment of the present invention, further comprising:
in response to receiving an instruction for deleting the logical volume mapping, matching the IP address of the logical volume mapping to be deleted with the node allocation table;
subtracting 1 from the number of allocated paths corresponding to the matched IP addresses in the node allocation table;
and deleting the information mapped by the logic volume to be deleted.
According to one embodiment of the invention, the node information includes the number of nodes of the cluster and the IP address corresponding to each node.
According to one embodiment of the invention, the data structure in the node allocation table is a two-dimensional array, and the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP addresses corresponding to the nodes.
According to one embodiment of the present invention, further comprising:
and correlating the IP information of the distributed storage nodes with the mapping information of the created logical volume, and storing the IP information and the mapping information into a back-end storage cluster.
In another aspect of the embodiment of the present invention, there is also provided an apparatus for iscsi target multipath grouping, the apparatus including:
the acquisition module is configured to respond to the starting of the management tool of the iscsi target and acquire the node information of the back-end storage cluster;
the initialization module is configured to fill the acquired node information into the node allocation table and initialize the node allocation table;
the allocation module is configured to respond to the received instruction for creating the logical volume mapping, and select the storage node with the minimum path number in the node allocation table to allocate based on the path number set by a user;
and the updating module is configured to update the node allocation table.
According to one embodiment of the invention, the allocation module is further configured to:
responding to the received instruction for creating the logical volume mapping, and acquiring the number of paths set by a user;
arranging the number of the allocated paths in the node allocation table from small to large;
and selecting the node with the minimum number of allocated paths corresponding to the number of the paths set by the user after arrangement for allocation.
According to one embodiment of the invention, the update module is further configured to:
and in response to selecting the node with the minimum allocated path number corresponding to the number of the paths set by the user after the arrangement, allocating, and adding 1 to the allocated path number corresponding to the allocated node.
According to one embodiment of the invention, the method further comprises a deletion module configured to:
in response to receiving an instruction for deleting the logical volume mapping, matching the IP address of the logical volume mapping to be deleted with the node allocation table;
subtracting 1 from the number of allocated paths corresponding to the matched IP addresses in the node allocation table;
and deleting the information mapped by the logic volume to be deleted.
According to one embodiment of the invention, the node information includes the number of nodes of the cluster and the IP address corresponding to each node.
According to one embodiment of the invention, the data structure in the node allocation table is a two-dimensional array, and the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP addresses corresponding to the nodes.
According to one embodiment of the invention, the memory module is configured to:
and correlating the IP information of the distributed storage nodes with the mapping information of the created logical volume, and storing the IP information and the mapping information into a back-end storage cluster.
In another aspect of the embodiments of the present invention, there is also provided a computer apparatus including:
at least one processor; and
and a memory storing computer instructions executable on the processor, the instructions when executed by the processor performing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the methods described above.
The invention has the following beneficial technical effects: according to the method for grouping the iscsi target multipath, provided by the embodiment of the invention, the node information of the rear-end storage cluster is obtained by responding to the starting of the management tool of the iscsi target; filling the obtained node information into a node allocation table and initializing the node allocation table; responding to the received instruction for creating the logical volume mapping, and selecting a storage node with the minimum path number in a node allocation table for allocation based on the path number set by a user; by means of the technical scheme of updating the node allocation table, paths of all targets can be uniformly dispersed on the back-end storage node, influence of paths among different targets is reduced, and reading and writing performances of the storage node are fully exerted.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are necessary for the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention and that other embodiments may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method of iscsi target multipath grouping according to one embodiment of the invention;
FIG. 2 is a schematic diagram of an apparatus for iscsi target multipath grouping according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to one embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
With the above object in view, in a first aspect, an embodiment of a method for iscsi target multipath grouping is provided. Fig. 1 shows a schematic flow chart of the method.
As shown in fig. 1, the method may include the steps of:
s1, responding to the starting of a management tool of an iscsi target, and acquiring node information of a back-end storage cluster.
When tgt (iscsi target's management tool) service is started, node information of the back-end storage cluster needs to be acquired, where the node information includes the number of storage nodes and IP information of the storage nodes.
S2, filling the obtained node information into a node allocation table and initializing the node allocation table.
The data structure in the node allocation table is a two-dimensional array, the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP address corresponding to the node, for example, the node number in the first row of the node allocation table records the number of allocated paths in each node, the second row records the number of allocated paths in each node, and the third row records the IP address corresponding to each node.
S3, responding to the received instruction for creating the logical volume map (target), and selecting a storage node with the minimum path number in the node allocation table to allocate based on the path number set by a user.
S4, updating the node allocation table.
When the target is created, a storage node with the minimum path number is selected for distribution according to the path number set by a user, for example, the path number set by the user is x, the distributed path number recorded in the second row in the node distribution table is arranged from small to large, then x nodes with the minimum distributed path number are selected for distribution, the distributed path number corresponding to the node distributed at this time is added with 1, and the IP information and the target information are associated and stored.
By the technical scheme, paths of all targets can be uniformly dispersed on the back-end storage node, the influence of paths among different targets is reduced, and the read-write performance of the storage node is fully exerted.
In a preferred embodiment of the present invention, in response to receiving an instruction to create a logical volume map, selecting a storage node with the smallest number of paths in the node allocation table to allocate based on the number of paths set by the user comprises:
responding to the received instruction for creating the logical volume mapping, and acquiring the number of paths set by a user;
arranging the number of the allocated paths in the node allocation table from small to large;
and selecting the node with the minimum number of allocated paths corresponding to the number of the paths set by the user after arrangement for allocation. For example, the number of paths set by the user is x, the number of allocated paths recorded in the node allocation table is arranged from small to large, and then x nodes with the smallest number of allocated paths are selected for allocation in sequence.
In a preferred embodiment of the present invention, updating the node allocation table comprises:
and in response to selecting the node with the minimum allocated path number corresponding to the number of the paths set by the user after the arrangement, allocating, and adding 1 to the allocated path number corresponding to the allocated node.
In a preferred embodiment of the present invention, further comprising:
in response to receiving an instruction for deleting the logical volume mapping, matching the IP address of the logical volume mapping to be deleted with the node allocation table;
subtracting 1 from the number of allocated paths corresponding to the matched IP addresses in the node allocation table;
and deleting the information mapped by the logic volume to be deleted.
In a preferred embodiment of the present invention, the node information includes the number of nodes of the cluster and the IP address corresponding to each node.
In a preferred embodiment of the present invention, the data structure in the node allocation table is a two-dimensional array, and the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP addresses corresponding to the nodes.
In a preferred embodiment of the present invention, further comprising:
and correlating the IP information of the distributed storage nodes with the mapping information of the created logical volume, and storing the IP information and the mapping information into a back-end storage cluster.
By the technical scheme, paths of all targets can be uniformly dispersed on the back-end storage node, the influence of paths among different targets is reduced, and the read-write performance of the storage node is fully exerted.
It should be noted that, it will be understood by those skilled in the art that all or part of the procedures in implementing the methods of the above embodiments may be implemented by a computer program to instruct related hardware, and the above program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the above methods when executed. Wherein the storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like. The computer program embodiments described above may achieve the same or similar effects as any of the method embodiments described above.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
With the above object in mind, in a second aspect of the embodiments of the present invention, an apparatus for iscsi target multipath grouping is provided, as shown in fig. 2, an apparatus 200 includes:
the acquisition module is configured to respond to the starting of the management tool of the iscsi target and acquire the node information of the back-end storage cluster.
When tgt (iscsi target's management tool) service is started, node information of the back-end storage cluster needs to be acquired, where the node information includes the number of storage nodes and IP information of the storage nodes.
And the initialization module is configured to fill the acquired node information into the node allocation table and initialize the node allocation table.
The data structure in the node allocation table is a two-dimensional array, the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP address corresponding to the node, for example, the node number in the first row of the node allocation table records the number of allocated paths in each node, the second row records the number of allocated paths in each node, and the third row records the IP address corresponding to each node.
And the allocation module is configured to respond to the received instruction for creating the logical volume mapping, and select the storage node with the minimum path number in the node allocation table to allocate based on the path number set by the user.
And the updating module is configured to update the node allocation table.
When the target is created, a storage node with the minimum path number is selected for distribution according to the path number set by a user, for example, the path number set by the user is x, the distributed path number recorded in the second row in the node distribution table is arranged from small to large, then x nodes with the minimum distributed path number are selected for distribution, the distributed path number corresponding to the node distributed at this time is added with 1, and the IP information and the target information are associated and stored.
In a preferred embodiment of the invention, the allocation module is further configured to:
responding to the received instruction for creating the logical volume mapping, and acquiring the number of paths set by a user;
arranging the number of the allocated paths in the node allocation table from small to large;
and selecting the node with the minimum number of allocated paths corresponding to the number of the paths set by the user after arrangement for allocation.
In a preferred embodiment of the invention, the update module is further configured to:
and in response to selecting the node with the minimum allocated path number corresponding to the number of the paths set by the user after the arrangement, allocating, and adding 1 to the allocated path number corresponding to the allocated node.
In a preferred embodiment of the present invention, the method further comprises a deletion module configured to:
in response to receiving an instruction for deleting the logical volume mapping, matching the IP address of the logical volume mapping to be deleted with the node allocation table;
subtracting 1 from the number of allocated paths corresponding to the matched IP addresses in the node allocation table;
and deleting the information mapped by the logic volume to be deleted.
In a preferred embodiment of the present invention, the node information includes the number of nodes of the cluster and the IP address corresponding to each node.
In a preferred embodiment of the present invention, the data structure in the node allocation table is a two-dimensional array, and the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP addresses corresponding to the nodes.
In a preferred embodiment of the invention, the device further comprises a memory module configured to:
and correlating the IP information of the distributed storage nodes with the mapping information of the created logical volume, and storing the IP information and the mapping information into a back-end storage cluster.
Based on the above object, a third aspect of the embodiments of the present invention proposes a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor performing the method of:
and responding to the starting of the management tool of the iscsi target, and acquiring the node information of the back-end storage cluster.
When tgt (iscsi target's management tool) service is started, node information of the back-end storage cluster needs to be acquired, where the node information includes the number of storage nodes and IP information of the storage nodes.
Filling the obtained node information into a node allocation table and initializing the node allocation table.
The data structure in the node allocation table is a two-dimensional array, the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP address corresponding to the node, for example, the node number in the first row of the node allocation table records the number of allocated paths in each node, the second row records the number of allocated paths in each node, and the third row records the IP address corresponding to each node.
And responding to the received instruction for creating the logical volume mapping, and selecting the storage node with the minimum path number in the node allocation table to allocate based on the path number set by the user.
Updating the node allocation table.
When the target is created, a storage node with the minimum path number is selected for distribution according to the path number set by a user, for example, the path number set by the user is x, the distributed path number recorded in the second row in the node distribution table is arranged from small to large, then x nodes with the minimum distributed path number are selected for distribution, the distributed path number corresponding to the node distributed at this time is added with 1, and the IP information and the target information are associated and stored.
In a preferred embodiment of the present invention, in response to receiving an instruction to create a logical volume map, selecting a storage node with the smallest number of paths in the node allocation table to allocate based on the number of paths set by the user comprises:
responding to the received instruction for creating the logical volume mapping, and acquiring the number of paths set by a user;
arranging the number of the allocated paths in the node allocation table from small to large;
and selecting the node with the minimum number of allocated paths corresponding to the number of the paths set by the user after arrangement for allocation.
In a preferred embodiment of the present invention, updating the node allocation table comprises:
and in response to selecting the node with the minimum allocated path number corresponding to the number of the paths set by the user after the arrangement, allocating, and adding 1 to the allocated path number corresponding to the allocated node.
In a preferred embodiment of the present invention, further comprising:
in response to receiving an instruction for deleting the logical volume mapping, matching the IP address of the logical volume mapping to be deleted with the node allocation table;
subtracting 1 from the number of allocated paths corresponding to the matched IP addresses in the node allocation table;
and deleting the information mapped by the logic volume to be deleted.
In a preferred embodiment of the present invention, the node information includes the number of nodes of the cluster and the IP address corresponding to each node.
In a preferred embodiment of the present invention, the data structure in the node allocation table is a two-dimensional array, and the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP addresses corresponding to the nodes.
In a preferred embodiment of the present invention, further comprising:
and correlating the IP information of the distributed storage nodes with the mapping information of the created logical volume, and storing the IP information and the mapping information into a back-end storage cluster.
Based on the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. Fig. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium S31 stores a computer program S32 that, when executed by a processor, performs the following method:
and responding to the starting of the management tool of the iscsi target, and acquiring the node information of the back-end storage cluster.
When tgt (iscsi target's management tool) service is started, node information of the back-end storage cluster needs to be acquired, where the node information includes the number of storage nodes and IP information of the storage nodes.
Filling the obtained node information into a node allocation table and initializing the node allocation table.
The data structure in the node allocation table is a two-dimensional array, the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP address corresponding to the node, for example, the node number in the first row of the node allocation table records the number of allocated paths in each node, the second row records the number of allocated paths in each node, and the third row records the IP address corresponding to each node.
And responding to the received instruction for creating the logical volume mapping, and selecting the storage node with the minimum path number in the node allocation table to allocate based on the path number set by the user.
Updating the node allocation table.
When the target is created, a storage node with the minimum path number is selected for distribution according to the path number set by a user, for example, the path number set by the user is x, the distributed path number recorded in the second row in the node distribution table is arranged from small to large, then x nodes with the minimum distributed path number are selected for distribution, the distributed path number corresponding to the node distributed at this time is added with 1, and the IP information and the target information are associated and stored.
In a preferred embodiment of the present invention, in response to receiving an instruction to create a logical volume map, selecting a storage node with the smallest number of paths in the node allocation table to allocate based on the number of paths set by the user comprises:
responding to the received instruction for creating the logical volume mapping, and acquiring the number of paths set by a user;
arranging the number of the allocated paths in the node allocation table from small to large;
and selecting the node with the minimum number of allocated paths corresponding to the number of the paths set by the user after arrangement for allocation.
In a preferred embodiment of the present invention, updating the node allocation table comprises:
and in response to selecting the node with the minimum allocated path number corresponding to the number of the paths set by the user after the arrangement, allocating, and adding 1 to the allocated path number corresponding to the allocated node.
In a preferred embodiment of the present invention, further comprising:
in response to receiving an instruction for deleting the logical volume mapping, matching the IP address of the logical volume mapping to be deleted with the node allocation table;
subtracting 1 from the number of allocated paths corresponding to the matched IP addresses in the node allocation table;
and deleting the information mapped by the logic volume to be deleted.
In a preferred embodiment of the present invention, the node information includes the number of nodes of the cluster and the IP address corresponding to each node.
In a preferred embodiment of the present invention, the data structure in the node allocation table is a two-dimensional array, and the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP addresses corresponding to the nodes.
In a preferred embodiment of the present invention, further comprising:
and correlating the IP information of the distributed storage nodes with the mapping information of the created logical volume, and storing the IP information and the mapping information into a back-end storage cluster.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. The above-described functions defined in the methods disclosed in the embodiments of the present invention are performed when the computer program is executed by a processor.
Furthermore, the above-described method steps and system units may also be implemented using a controller and a computer-readable storage medium storing a computer program for causing the controller to implement the above-described steps or unit functions.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or general purpose or special purpose processor. Further, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, and the program may be stored in a computer readable storage medium, where the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and many other variations of the different aspects of the embodiments of the invention as described above exist, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (9)

1. A method of iscsi target multipath grouping, comprising the steps of:
responding to the starting of a management tool of an iscsi target, and acquiring node information of a back-end storage cluster;
filling the obtained node information into a node allocation table and initializing the node allocation table;
and in response to receiving an instruction for creating the logical volume map, selecting a storage node with the minimum path number in the node allocation table to allocate based on the path number set by the user, wherein in response to receiving the instruction for creating the logical volume map, selecting the storage node with the minimum path number in the node allocation table to allocate based on the path number set by the user includes: in response to receiving an instruction for creating the logical volume mapping, acquiring the number of paths set by a user, arranging the number of allocated paths in the node allocation table from small to large, and selecting the node with the minimum number of allocated paths corresponding to the number of paths set by the user after arrangement for allocation;
updating the node allocation table.
2. The method of claim 1, wherein updating the node allocation table comprises:
and in response to selecting the node with the minimum allocated path number corresponding to the number of the paths set by the user after the arrangement, allocating, and adding 1 to the allocated path number corresponding to the allocated node.
3. The method as recited in claim 1, further comprising:
in response to receiving an instruction for deleting the logical volume mapping, matching an IP address of the logical volume mapping to be deleted with the node allocation table;
subtracting 1 from the number of allocated paths corresponding to the matched IP address in the node allocation table;
and deleting the information mapped by the logic volume to be deleted.
4. The method of claim 1, wherein the node information includes a number of nodes of the cluster and an IP address corresponding to each node.
5. The method of claim 1, wherein the data structure in the node allocation table is a two-dimensional array, and the two-dimensional array records the number of allocated paths in the nodes in the cluster and the IP addresses corresponding to the nodes.
6. The method as recited in claim 1, further comprising:
and correlating the IP information of the distributed storage nodes with the mapping information of the created logical volume, and storing the IP information and the mapping information into a back-end storage cluster.
7. An apparatus for iscsi target multipath grouping, the apparatus comprising:
the acquisition module is configured to respond to the starting of the management tool of the iscsi target and acquire the node information of the back-end storage cluster;
the initialization module is configured to fill the acquired node information into a node allocation table and initialize the node allocation table;
the allocation module is configured to respond to receiving an instruction for creating the logical volume mapping, select a storage node with the minimum path number in the node allocation table for allocation based on the path number set by a user, acquire the number of paths set by the user in response to receiving the instruction for creating the logical volume mapping, arrange the number of allocated paths in the node allocation table from small to large, and select the node with the minimum path number allocated corresponding to the number of paths set by the user after arrangement for allocation;
and the updating module is configured to update the node allocation table.
8. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-6.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1-6.
CN202110809756.0A 2021-07-17 2021-07-17 Method, device, equipment and readable medium for iscsi target multipath grouping Active CN113608690B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110809756.0A CN113608690B (en) 2021-07-17 2021-07-17 Method, device, equipment and readable medium for iscsi target multipath grouping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110809756.0A CN113608690B (en) 2021-07-17 2021-07-17 Method, device, equipment and readable medium for iscsi target multipath grouping

Publications (2)

Publication Number Publication Date
CN113608690A CN113608690A (en) 2021-11-05
CN113608690B true CN113608690B (en) 2023-12-26

Family

ID=78337811

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110809756.0A Active CN113608690B (en) 2021-07-17 2021-07-17 Method, device, equipment and readable medium for iscsi target multipath grouping

Country Status (1)

Country Link
CN (1) CN113608690B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968285A (en) * 2005-11-14 2007-05-23 国际商业机器公司 Method and system to assign paths to hosts in a network
CN102970241A (en) * 2012-11-07 2013-03-13 浪潮(北京)电子信息产业有限公司 Multipath load balancing method and multipath load balancing device
US9201735B1 (en) * 2014-06-25 2015-12-01 Igneous Systems, Inc. Distributed storage data repair air via partial data rebuild within an execution path
CN105204779A (en) * 2015-09-14 2015-12-30 北京鲸鲨软件科技有限公司 Double-control-based SCSI (Small Computer System Interface) TARGET access control method and device
CN105516328A (en) * 2015-12-18 2016-04-20 浪潮(北京)电子信息产业有限公司 Dynamic load balancing method and system, and devices used for distributed storage system
CN106293533A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of based on the load-balancing method between storage multipath and system
CN106873907A (en) * 2017-01-09 2017-06-20 中国电子科技集团公司第五十二研究所 A kind of multi-controller memory array reads and writes load-balancing method and device
CN107179946A (en) * 2017-04-24 2017-09-19 合肥赛猊腾龙信息技术有限公司 A kind of multinode dispatching method of write operation SiteServer LBS
CN109474700A (en) * 2018-12-18 2019-03-15 创新科存储技术有限公司 Cut-in method, storage medium, client and the memory node of iSCSI client
US10412159B1 (en) * 2014-02-07 2019-09-10 Amazon Technologies, Inc. Direct load balancing using a multipath protocol
CN111190546A (en) * 2019-12-30 2020-05-22 深圳创新科软件技术有限公司 Distributed block storage performance optimization method based on ALUA and local cache
CN111258496A (en) * 2018-11-30 2020-06-09 爱思开海力士有限公司 Apparatus and method for dynamically allocating data paths
CN112019618A (en) * 2020-08-27 2020-12-01 苏州浪潮智能科技有限公司 Multi-path service method, system, equipment and medium in storage area network
CN112286654A (en) * 2020-10-20 2021-01-29 北京沃东天骏信息技术有限公司 Method and device for determining resource scheduling path
CN112333295A (en) * 2020-09-27 2021-02-05 苏州浪潮智能科技有限公司 Multipath connection method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10394466B2 (en) * 2017-01-26 2019-08-27 International Business Machines Corporation Supporting MPIO for logical volume backed virtual disks

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968285A (en) * 2005-11-14 2007-05-23 国际商业机器公司 Method and system to assign paths to hosts in a network
CN102970241A (en) * 2012-11-07 2013-03-13 浪潮(北京)电子信息产业有限公司 Multipath load balancing method and multipath load balancing device
US10412159B1 (en) * 2014-02-07 2019-09-10 Amazon Technologies, Inc. Direct load balancing using a multipath protocol
US9201735B1 (en) * 2014-06-25 2015-12-01 Igneous Systems, Inc. Distributed storage data repair air via partial data rebuild within an execution path
CN105204779A (en) * 2015-09-14 2015-12-30 北京鲸鲨软件科技有限公司 Double-control-based SCSI (Small Computer System Interface) TARGET access control method and device
CN105516328A (en) * 2015-12-18 2016-04-20 浪潮(北京)电子信息产业有限公司 Dynamic load balancing method and system, and devices used for distributed storage system
CN106293533A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of based on the load-balancing method between storage multipath and system
CN106873907A (en) * 2017-01-09 2017-06-20 中国电子科技集团公司第五十二研究所 A kind of multi-controller memory array reads and writes load-balancing method and device
CN107179946A (en) * 2017-04-24 2017-09-19 合肥赛猊腾龙信息技术有限公司 A kind of multinode dispatching method of write operation SiteServer LBS
CN111258496A (en) * 2018-11-30 2020-06-09 爱思开海力士有限公司 Apparatus and method for dynamically allocating data paths
CN109474700A (en) * 2018-12-18 2019-03-15 创新科存储技术有限公司 Cut-in method, storage medium, client and the memory node of iSCSI client
CN111190546A (en) * 2019-12-30 2020-05-22 深圳创新科软件技术有限公司 Distributed block storage performance optimization method based on ALUA and local cache
CN112019618A (en) * 2020-08-27 2020-12-01 苏州浪潮智能科技有限公司 Multi-path service method, system, equipment and medium in storage area network
CN112333295A (en) * 2020-09-27 2021-02-05 苏州浪潮智能科技有限公司 Multipath connection method and device, electronic equipment and storage medium
CN112286654A (en) * 2020-10-20 2021-01-29 北京沃东天骏信息技术有限公司 Method and device for determining resource scheduling path

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于ALUA的多路径存储系统;范长军;胡志成;杨佳东;;计算机系统应用(10);13-21 *
详解Linux下存储设备多路径管理;魏勇;;科技风(18);43-45 *

Also Published As

Publication number Publication date
CN113608690A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
US11314458B2 (en) Global de-duplication of virtual disks in a storage platform
US9507720B2 (en) Block storage-based data processing methods, apparatus, and systems
US8904047B1 (en) Cloud capable storage system with high perormance nosql key-value pair operating environment
US9542126B2 (en) Redundant array of independent disks systems that utilize spans with different storage device counts for a logical volume
US20070079098A1 (en) Automatic allocation of volumes in storage area networks
CN113485636B (en) Data access method, device and system
EP3076307A1 (en) Method and device for responding to a request, and distributed file system
US8001324B2 (en) Information processing apparatus and informaiton processing method
CN107229415A (en) A kind of data write method, data read method and relevant device, system
CN109445687B (en) Data storage method and protocol server
US20180364948A1 (en) Data Processing Method, Related Device, and Storage System
CN103608784A (en) Method for creating network volumes, data storage method, storage device and storage system
CN104077239A (en) IP hard disk, and memory system and data operation method thereof
CN109407975B (en) Data writing method, computing node and distributed storage system
CN109213447A (en) A kind of SAN storage volume carry, discharging method and system
US11797177B2 (en) Providing a global unique identifier for a storage volume
CN108282516B (en) Distributed storage cluster load balancing method and device based on iSCSI
JP2024506818A (en) Cache indexing using fingerprint-based data addresses
CN111475279B (en) System and method for intelligent data load balancing for backup
CN113608690B (en) Method, device, equipment and readable medium for iscsi target multipath grouping
WO2018235132A1 (en) Distributed storage system
CN111930315A (en) Data access method, data access device and storage medium
CN110502187B (en) Snapshot rollback method and device
US8468303B2 (en) Method and apparatus to allocate area to virtual volume based on object access type
CN113806076B (en) Method, device, equipment and readable medium for distributing four-control environment memory

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant