CN107317765B - Method and device for managing path information - Google Patents

Method and device for managing path information Download PDF

Info

Publication number
CN107317765B
CN107317765B CN201610268689.5A CN201610268689A CN107317765B CN 107317765 B CN107317765 B CN 107317765B CN 201610268689 A CN201610268689 A CN 201610268689A CN 107317765 B CN107317765 B CN 107317765B
Authority
CN
China
Prior art keywords
read
write
port
host
path
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
CN201610268689.5A
Other languages
Chinese (zh)
Other versions
CN107317765A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610268689.5A priority Critical patent/CN107317765B/en
Publication of CN107317765A publication Critical patent/CN107317765A/en
Application granted granted Critical
Publication of CN107317765B publication Critical patent/CN107317765B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/10Packet switching elements characterised by the switching fabric construction
    • H04L49/103Packet switching elements characterised by the switching fabric construction using a shared central buffer; using a shared memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/15Interconnection of switching modules
    • H04L49/1507Distribute and route fabrics, e.g. sorting-routing or Batcher-Banyan
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports

Abstract

The invention discloses a method and a device for managing path information, and belongs to the technical field of computers. The method comprises the following steps: acquiring physical path information of a read-write path of each host in a Storage Area Network (SAN), wherein the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port; determining whether the read-write path of each host has a competitive relationship according to the physical path information of the read-write path of each host; and if the competition relationship exists, adjusting the read-write path with the competition relationship according to a load balancing strategy. The device comprises an acquisition module, a determination module and an adjustment module. The invention can shorten the time delay.

Description

Method and device for managing path information
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for managing path information.
Background
A Storage Area Network (SAN) currently includes a Storage array, a plurality of hosts, and one or more switches, where the Storage array includes a plurality of Storage ports, each host in the plurality of hosts includes a plurality of read/write ports, and the one or more switches include a plurality of switching ports; one read-write port, one switch port and one storage port can form one read-write path, so that one host can comprise a plurality of read-write paths.
When a host in the SAN performs read/write operations in the storage array, the host needs to select one read/write path from multiple read/write paths included in the host for the read/write request, and the specific selection process may be: the host determines a target read-write port and a target storage port, counts the queue number of the read-write operation of each read-write path passing through the target read-write port and the target storage port, and selects a read-write path with the minimum queue number according to the queue number of each read-write path.
The prior art has at least the following problems:
because a plurality of hosts share a plurality of switching ports of the switch, and the host can only know the queuing number of the read-write operations of the host on each read-write path, the selected read-write path may have a large number of read-write operations of other hosts in the SAN except the host, which results in a large delay of the read-write operation through the selected read-write path.
Disclosure of Invention
In order to solve the problems of the prior art, the invention provides a method and a device for managing path information. The technical scheme is as follows:
in a first aspect, the present invention provides a method for managing path information, the method comprising:
acquiring physical path information of a read-write path of each host in a Storage Area Network (SAN), wherein the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port;
determining whether the read-write path of each host has a competitive relationship according to the physical path information of the read-write path of each host;
and if the competition relationship exists, adjusting the read-write path with the competition relationship according to a load balancing strategy.
In the embodiment of the invention, because the read-write path with the competitive relationship is adjusted, and the adjusted read-write path does not have the competitive relationship, the read-write operation is carried out by the adjusted read-write path with less time delay, and therefore, the time delay can be shortened by the invention.
In one possible design, the obtaining physical path information of a read-write path of each host in the storage area network SAN includes:
acquiring a read-write port of each host in the SAN and a storage port of a storage array in the SAN;
and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
In the embodiment of the invention, the physical path information of the read-write path of each host is obtained from the corresponding relationship among the storage read-write ports, the storage ports and the physical path information, so that the physical path information of the read-write path of each host can be obtained according to the read-write ports of each host and the storage ports of the storage array, the physical path information can well describe networking information under multi-host networking, and the port competition relationship of multi-host networking can be identified from the physical path information.
In another possible design, the determining whether the read-write path of each host has a contention relationship according to the physical path information of the read-write path of each host includes:
determining an exchanger identifier and an exchanger target port corresponding to the read-write path of each host according to the physical path information of the read-write path of each host;
determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identifier and the switch target port corresponding to the read-write path of each host;
and if a plurality of read-write paths pass through the same switch port, determining that the read-write path of each host has a competition relationship.
In the embodiment of the invention, whether read-write path competition relationships exist between different hosts can be equivalently identified by judging whether the switch identifiers in different physical path information are the same as the target ports of the switch.
In another possible design, the adjusting the read-write path having a contention relationship according to the load balancing policy includes:
acquiring a plurality of read-write paths with competitive relations;
and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
In the embodiment of the invention, the end designs a single-port load algorithm, which not only ensures that the load IO path on the host computer monopolizes the port of the switch, thereby eliminating the competition relationship,
in another possible design, the adjusting the read-write path having a contention relationship according to the load balancing policy includes:
acquiring a quality parameter of each read-write path in a plurality of read-write paths with a competitive relationship;
selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from the plurality of read-write paths according to the quality parameter of each read-write path;
and adjusting the selected read-write path according to a load balancing strategy.
In the embodiment of the present invention, the control terminal may start to perform the policy adjustment not only when there is a competitive relationship, but also when the quality parameter of the read/write path having the competitive relationship does not satisfy the preset quality condition, that is, the following second implementation manner may not perform the policy adjustment temporarily in a scenario where the performance requirement is not high, so as to reduce the burden of the control terminal.
In a second aspect, the present invention provides an apparatus for managing path information, the apparatus comprising:
the system comprises an acquisition module, a Storage Area Network (SAN) acquisition module and a switching module, wherein the acquisition module is used for acquiring physical path information of a read-write path of each host in the SAN, and the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port;
a determining module, configured to determine whether a contention relationship exists in the read-write path of each host according to the physical path information of the read-write path of each host;
and the adjusting module is used for adjusting the read-write path with the competition relationship according to the load balancing strategy if the competition relationship exists.
In a possible design, the obtaining module is further configured to obtain a read/write port of each host in the SAN and a storage port of a storage array in the SAN; and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
In another possible design, the determining module is further configured to determine, according to the physical path information of the read-write path of each host, a switch identifier and a switch target port corresponding to the read-write path of each host; determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identifier and the switch target port corresponding to the read-write path of each host; and if a plurality of read-write paths pass through the same switch port, determining that the read-write path of each host has a competition relationship.
In another possible design, the adjusting module is further configured to obtain a plurality of read-write paths having a contention relationship; and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
In another possible design, the adjusting module is further configured to obtain a quality parameter of each of the plurality of read-write paths having a contention relationship; selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from the plurality of read-write paths according to the quality parameter of each read-write path; and adjusting the selected read-write path according to a load balancing strategy.
In a third aspect, the present invention provides an apparatus for managing path information, the apparatus comprising: a processor and a memory;
the memory is for storing program code for managing path information and data generated by the processor;
the processor is used for acquiring physical path information of a read-write path of each host in the storage area network SAN, wherein the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port;
the processor is further configured to determine whether a contention relationship exists between the read-write paths of each host according to the physical path information of the read-write paths of each host;
and the processor is also used for adjusting the read-write path with the competition relationship according to the load balancing strategy if the competition relationship exists.
In one possible design, the processor is further configured to obtain a read/write port of each host in the SAN and a storage port of the storage array in the SAN; and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
In another possible design, the processor is further configured to determine, according to the physical path information of the read-write path of each host, a switch identifier and a switch target port corresponding to the read-write path of each host; determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identifier and the switch target port corresponding to the read-write path of each host; and if a plurality of read-write paths pass through the same switch port, determining that the read-write path of each host has a competition relationship.
In another possible design, the processor is further configured to obtain a plurality of read-write paths having a contention relationship; and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
In another possible design, the processor is further configured to obtain a quality parameter of each of the plurality of read-write paths having a contention relationship; selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from the plurality of read-write paths according to the quality parameter of each read-write path; and adjusting the selected read-write path according to a load balancing strategy.
In the embodiment of the invention, the physical path information of the read-write path of each host in the SAN is obtained, and the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port; determining whether the read-write path of each host has a competitive relationship according to the physical path information of the read-write path of each host; and if the competition relationship exists, adjusting the read-write path with the competition relationship according to a load balancing strategy. Because the read-write path with the competitive relationship is adjusted, the read-write path after adjustment has no competitive relationship, and the read-write operation is carried out by the read-write path after adjustment with less time delay, the invention can shorten the time delay.
Drawings
FIG. 1 is a schematic structural diagram of a SAN according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a control terminal according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for managing path information according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for managing path information according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a SAN, where the SAN includes one or more storage arrays 101, a control terminal 102, a plurality of hosts 103, and one or more switches 104, where each host 103 in the plurality of hosts includes a plurality of read/write ports; one or more of the switches 104 includes a plurality of switch ports and the storage array 101 includes a plurality of storage ports.
One read/write port, one switch 104 port, and one storage port may constitute one read/write path, and thus one host 103 may include a plurality of read/write paths.
In the embodiment of the present invention, a control terminal 102 is newly added, where the control terminal 102 is configured to periodically obtain physical path information of each read-write path included in each host 103 in the SAN, where the physical path information includes a target read-write port, a target storage port, an identifier of a switch 104, and a target port of the switch 104.
The control terminal 102 is further configured to uniquely determine a switch port through which each read-write path passes according to the switch 104 identifier in the physical path information of each read-write path and the target port of the switch 104.
The control terminal 102 is further configured to determine whether at least two read-write paths pass through the same switch port according to the switch port through which each read-write path passes, determine that the at least two read-write paths have a competitive relationship if it is determined that the at least two read-write paths pass through the same switch port, and then adjust the at least two read-write paths according to a load balancing policy.
The host 103 is configured to receive a read-write request and select one read-write path from a plurality of read-write paths adjusted by the host 103; and performs read and write operations in the memory array 101 through the switch port through which the selected read and write path passes. When the host 103 selects the read-write path, it follows the load balancing principle, that is, the host 103 selects a read-write path with the minimum current queue number for the read-write request from the adjusted read-write paths.
The switch 104 is configured to send data included in the read/write request to the storage array 101.
The memory array 101 is used to store data.
It should be noted that the control terminal 102 may be independent from the host 103, the switch 104, and the storage array 101, or may be disposed in the host 103, the switch 104, or the storage array 101. The deployment position of the control terminal 102 is not particularly limited in the embodiment of the present invention.
In the embodiment of the invention, because the adjusted read-write path has no competition relation, the read-write operation is carried out by the adjusted read-write path with less time delay, and therefore, the invention can shorten the time delay.
Referring to fig. 2, fig. 2 is a block diagram of a control terminal according to an embodiment of the present invention, which may have a relatively large difference due to different configurations or performances, and may include one or more processors 201 and a memory 202.
The memory 202 is used for storing program codes for managing path information and data generated by the processor 301;
the processor 201 is configured to acquire physical path information of a read-write path of each host in a storage area network SAN, where the physical path information includes a target read-write port, a target storage port, a switch identifier, and a switch target port;
the processor 201 is further configured to determine whether a contention relationship exists in the read-write path of each host according to the physical path information of the read-write path of each host;
the processor 201 is further configured to, if a contention relationship exists, adjust the read-write path having the contention relationship according to a load balancing policy.
Optionally, the control terminal may include other components besides the processor 201 and the memory 202. For example, one or more storage media 205 (e.g., one or more mass storage devices) may also be included that store the application programs 203 or data 204. The memory 202 and storage medium 205 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 205 may include one or more modules (not shown), each of which may include a sequence of instruction operations in a device for power distribution. Further, the processor 201 may be configured to communicate with the storage medium 205 to execute a series of instruction operations in the storage medium 205 on the control terminal.
The control terminal may also include one or more power supplies 206, one or more wired or wireless network interfaces 207, one or more input-output interfaces 208, one or more keyboards 209, and/or one or more operating systems 210, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The control terminal including the processor 201 in the present invention may also have the following functions:
the processor 201 is further configured to obtain a read/write port of each host in the SAN and a storage port of a storage array in the SAN; and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
The processor 201 is further configured to determine, according to the physical path information of the read-write path of each host, an switch identifier and a switch target port corresponding to the read-write path of each host; determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identification and the switch target port corresponding to the read-write path of each host; and if a plurality of read-write paths pass through the same switch port, determining that the read-write path of each host has a competitive relationship.
The processor 201 is further configured to obtain a plurality of read-write paths having a contention relationship; and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
The processor 201 is further configured to obtain a quality parameter of each of the plurality of read-write paths having a contention relationship; selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from a plurality of read-write paths according to the quality parameter of each read-write path; and adjusting the selected read-write path according to the load balancing strategy.
In the embodiment of the invention, the physical path information of the read-write path of each host in the SAN is obtained, and the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port; determining whether the read-write path of each host has a competitive relationship according to the physical path information of the read-write path of each host; and if the competition relationship exists, adjusting the read-write path with the competition relationship according to a load balancing strategy. Because the read-write path with the competitive relationship is adjusted, the read-write path after adjustment has no competitive relationship, and the read-write operation is carried out by the read-write path after adjustment with less time delay, the invention can shorten the time delay.
Referring to fig. 3, an execution subject of the method may be a control terminal, or any device that deploys the control terminal, for example, a host that deploys the control terminal, or a switch that deploys the control terminal, or a storage array that deploys the control terminal, and the like. In the embodiment of the present invention, an execution subject is taken as an example of a control terminal. Wherein, the method comprises the following steps:
step 301: the control terminal acquires physical path information of a read-write path of each host in the SAN.
The SAN comprises a plurality of hosts, each host in the hosts comprises a plurality of reading and writing paths, and the control terminal acquires physical path information of each reading and writing path included by each host every preset time interval, wherein the physical path information comprises a target reading and writing port, a target storage port, a switch identifier and a switch target port.
In the embodiment of the present invention, a new physical path description mechanism is defined, where physical path information described by an original I (Initiator ID, port identifier of a Target read-write port) -T (Target ID, port identifier of a Target storage port) is modified into physical path information described by an I-S-ST (Switch Target ID, Switch identifier) -T (Target ID, port identifier of a Target port of a Switch), and a description method of the I-S-ST-T well interprets physical abstraction in a real host environment. And whether read-write path competition relationships exist among different hosts can be equivalently identified by judging whether the S-ST-T in different physical path information are the same or not.
This step can be realized by the following steps (1) and (2), including:
(1): the control terminal acquires a read-write port of each host in the SAN and a storage port of a storage array in the SAN;
the control terminal obtains the read-write port currently used by each host in the SAN and the storage port of the storage array currently used by the host in the SAN.
(2): and the control terminal acquires the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
In this step, the control terminal stores the corresponding relationship between the read/write port, the storage port, and the physical path information, and then the control terminal obtains the physical path information of the read/write path of each host from the stored storage port and the corresponding relationship between the read/write port, the storage port, and the physical path information according to the read/write port of each host and the storage port of the storage array. Alternatively, the first and second electrodes may be,
the corresponding relation among the read-write port, the storage port and the physical path information is stored in the switch, and the control terminal acquires the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information stored in the switch.
A Switch Agent module is newly added in the Switch, the Switch Agent module is used for being responsible for the analysis processing of the command, the Switch maintains the Zone domain information, the routing data from the read-write port to the Switch target port is maintained in the Zone domain, namely the corresponding relation of the read-write port, the storage port and the physical path information is stored in the Zone domain.
Then this step may be:
the control terminal sends an inquiry command to the switch, wherein the inquiry command carries the read-write port of each host and the storage port of the storage array; the switch receives an inquiry command sent by the control terminal, acquires a read-write port of each host and a storage port of the storage array from the inquiry command, acquires physical path information of a read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information, and sends the physical path information of the read-write path of each host to the control terminal; and the control terminal receives the physical path information of the read-write path of each host sent by the switch.
For example, the SAN includes two hosts, namely Host1 and Host2, and Host1 includes 4 read-write ports, namely Path1, Path2, Path3 and Path 4; the Host2 comprises four read-write ports, namely Path1, Path2, Path3 and Path 4; the control terminal obtains the physical path information of the read-write path of each port of each host as follows:
Host1:Path1:I-S-ST-T(0-0-0-0)
Host1:Path2:I-S-ST-T(0-0-1-1)
Host1:Path3:I-S-ST-T(1-1-0-0)
Host1:Path4:I-S-ST-T(1-1-1-1)
Host2:Path1:I-S-ST-T(2-1-0-0)
Host2:Path2:I-S-ST-T(2-1-1-1)
Host2:Path3:I-S-ST-T(1-0-0-0)
Host2:Path4:I-S-ST-T(1-0-1-1)
the preset duration can be set and changed as required, and the preset duration is not specifically limited in the embodiment of the invention; for example, the preset time period is 10s, etc.
Step 302: and the control terminal determines the switch identification and the switch target port corresponding to the read-write path of each host according to the physical path information of the read-write path of each host.
For the physical path information of any read-write path, the control terminal may obtain the switch identifier and the switch target port corresponding to the read-write path from the physical path information of the read-write path.
For example, if the physical path information of one read-write path is I-S-ST-T (1-0-1-1), the control terminal obtains the switch identifier corresponding to the read-write path from the physical path information as S (0), and the switch destination port is ST (1).
Step 303: and the control terminal determines whether a plurality of read-write paths pass through the same switch port or not according to the switch identification and the switch target port corresponding to the read-write path of each host.
The control terminal determines the switch port through which the read-write path of each host passes according to the switch identifier and the switch target port corresponding to the read-write path of each host; and determining whether a plurality of read-write paths pass through the same switch port or not according to the switch port through which the read-write path of each host passes.
It should be noted that, in this step, there may be multiple groups of read-write paths that pass through the same switch port, and each of the multiple groups of read-write paths that pass through the same switch port includes at least two read-write paths, and the two read-write paths belong to different hosts respectively. That is, the step may be:
and the control terminal determines whether the read-write paths of a plurality of hosts pass through the same switch port or not according to the switch identification and the switch target port corresponding to the read-write path of each host.
In this step, the control terminal may also determine whether there are multiple read-write paths passing through the same switch port directly according to whether S-STs corresponding to each read-write path included in the SAN are the same; and if the S-ST corresponding to any two read-write paths is the same, determining that the any two read-write paths pass through the same switch port.
And if the S-ST corresponding to any two read-write paths are different, the control terminal determines that a plurality of read-write paths do not pass through the same switch port.
It should be noted that, in this step, the control terminal may also determine whether multiple read-write paths pass through the same storage port; or, the control terminal may also determine whether multiple read-write paths pass through the same switch port and the same storage port.
The step of determining whether multiple read-write paths pass through the same storage port by the control terminal may be:
the control terminal acquires a storage port through which each read-write path passes according to the physical path information of each read-write path in the plurality of read-write paths, and determines whether a plurality of read-write paths pass through the same storage port according to the storage port through which each read-write path passes.
For example, as the S-ST-T corresponding to the Host1Path1 and the Host2Path3 are the same, the S-ST-T corresponding to the Host1Path2 and the S-ST-T corresponding to the Host2Path4 are the same, the S-ST-T corresponding to the Host1Path3 and the Host2Path1 are the same, and the S-ST-T corresponding to the Host1Path4 and the Host2Path2 are the same, it is determined that the Host1Path1 and the Host2Path3 pass through the same switch port, the Host1Path2 and the Host2Path4 pass through the same switch port, the Host1Path3 and the Host2Path1 pass through the same switch port, and the Host1Path4 and the Host2Path2 pass through the same switch port.
In the embodiment of the invention, a new physical path abstract information description structure is provided, the related information of the switch is added in the structure, the networking information under the multi-host networking can be well described through the structure, and thus the port competition relationship of the multi-host networking can be identified from the physical path information.
Step 304: if a plurality of read-write paths pass through the same switch port, the control terminal determines that the read-write paths of each host have a competitive relationship.
If the read-write paths of at least two hosts in the SAN pass through the same switch port, the control terminal determines that the read-write paths of the at least two hosts have a competition relationship.
Further, if a plurality of read-write paths do not pass through the same switch port, the control terminal determines that the read-write paths of each host do not have a competitive relationship.
For example, since the Host1Path1 and the Host2Path3, the Host1Path2 and the Host2Path4, the Host1Path3 and the Host2Path1, and the Host1Path4 and the Host2Path2 respectively pass through the same switch port, the control terminal determines that the Host1Path1 and the Host2Path3 have a competitive relationship, the Host1Path2 and the Host2Path4 have a competitive relationship, the Host1Path3 and the Host2Path1 have a competitive relationship, and the Host1Path4 and the Host2Path2 have a competitive relationship.
Step 305: and the control terminal adjusts the read-write path with the competition relation according to the load balancing strategy.
The control terminal designs a single-port load algorithm, which not only ensures that the path of load IO on the host computer monopolizes the switch port, thereby eliminating the competition relationship, but also is the following first implementation mode; the control terminal may also start to implement the policy adjustment when the quality parameter of the read-write path having the competitive relationship does not satisfy the preset quality condition, instead of starting to implement the adjustment as long as there is the competitive relationship, that is, the following second implementation manner, where the second implementation manner may not temporarily perform the policy adjustment in a scenario where the performance requirement is not high, so as to reduce the burden of the control terminal.
For the first implementation, the step may be:
acquiring a plurality of read-write paths with competitive relations; and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
For example, there are multiple sets of competing read/write paths, a part of the read/write paths are selected from each of the competing read/write paths, the part of the read/write paths selected from each set of competing read/write paths is set to be in an unavailable state, and unselected read/write paths except for the selected read/write path in each set of competing read/write paths are still in an available state.
For example, if a group of read/write paths having a contention relationship includes 2 read/write paths, one of the read/write paths may be set to be in an unavailable state, and the other of the 2 read/write paths is still in an available state.
For another example, if a group of read/write paths having a contention relationship includes 3 read/write paths, 1 (or 2) of the read/write paths may be set to be in an unavailable state, and the other 2 (or 1) of the 3 read/write paths are still in an available state.
For example, in step 304, the control terminal determines that there are competing relationships between Host1Path1 and Host2Path3, between Host1Path2 and Host2Path4, between Host1Path3 and Host2Path1, and between Host1Path4 and Host2Path2, respectively. The S-ST-T (0-0-0) port is provided for use by the HostPath1 load, the S-ST-T (0-1-1) port is provided for use by the Host1Path2 load, the S-ST-T (1-0-0) port is provided for use by the Host2Path1 load, and the S-ST-T (0-1-1) port is provided for use by the Host2Path2 load.
In this way, Host1 loads IO on paths 1 and 2, Host2 loads IO on paths 1 and 2, and respective exclusive ports are guaranteed, so that contention is avoided, taking Host1 as an example, because Path1 and Path2 exclusively occupy the ports and queue depth data of the load is accurate, true load balancing can be achieved, and if the rate of one port is 8G, Host1 can utilize bandwidth of 8G 2 — 16G.
For the second implementation, this step may be implemented by the following steps (1) to (3), including:
(1): acquiring a quality parameter of each read-write path in a plurality of read-write paths with a competitive relationship;
if a plurality of groups of read-write paths with competition relationship exist, acquiring the quality parameter of each read-write path in the group of read-write paths with storage competition relationship for each group of read-write paths with storage competition relationship in the plurality of groups of read-write paths with storage competition relationship.
The quality parameter may be bandwidth utilization and/or fluctuation rate size.
(2): selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from a plurality of read-write paths according to the quality parameter of each read-write path;
and if a plurality of groups of read-write paths with competition relationship exist, selecting one or more groups of read-write paths with competition relationship, the quality parameters of which do not meet the preset quality condition, from the plurality of groups of read-write paths with competition relationship.
The preset quality parameter condition may be that the bandwidth utilization rate is not less than a preset utilization rate and/or the fluctuation rate is not greater than a preset fluctuation rate.
The preset utilization rate and the preset fluctuation rate can be set and changed according to needs, and in the embodiment of the invention, the preset utilization rate and the preset fluctuation rate are not specifically limited; for example, the preset utilization rate is 20%, the preset fluctuation rate may be 70%, and the like.
(3): and adjusting the selected read-write path according to the load balancing strategy.
And setting part of the selected read-write paths to be in an unavailable state according to the load balancing strategy.
Further, when the host receives a read-write request, the host selects a read-write path with the minimum queued data (the lightest load) from the read-write paths which pass through the target read-write port and the target storage port and are in the available state according to the target read-write port and the target storage port of the read-write request, and performs read-write operation on the read-write request through the selected read-write path.
In the embodiment of the invention, the physical path information of the read-write path of each host in the SAN is obtained, and the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port; determining whether the read-write path of each host has a competitive relationship according to the physical path information of the read-write path of each host; and if the competition relationship exists, adjusting the read-write path with the competition relationship according to a load balancing strategy. Because the read-write path with the competitive relationship is adjusted, the read-write path after adjustment has no competitive relationship, and the read-write operation is carried out by the read-write path after adjustment with less time delay, the invention can shorten the time delay.
An embodiment of the present invention provides a device for managing path information, where the device is applied in a control terminal, see fig. 4, where the device includes: an obtaining module 401, a determining module 402 and an adjusting module 403.
An obtaining module 401, configured to obtain physical path information of a read-write path of each host in a storage area network SAN, where the physical path information includes a target read-write port, a target storage port, a switch identifier, and a switch target port;
a determining module 402, configured to determine whether a contention relationship exists in the read-write path of each host according to the physical path information of the read-write path of each host;
an adjusting module 403, configured to adjust, if a contention relationship exists, the read-write path having the contention relationship according to a load balancing policy.
Optionally, the obtaining module 401 is further configured to obtain a read/write port of each host in the SAN and a storage port of a storage array in the SAN; and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
Optionally, the determining module 402 is further configured to determine, according to the physical path information of the read-write path of each host, a switch identifier and a switch target port corresponding to the read-write path of each host; determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identification and the switch target port corresponding to the read-write path of each host; and if a plurality of read-write paths pass through the same switch port, determining that the read-write path of each host has a competitive relationship.
Optionally, the adjusting module 403 is further configured to obtain a plurality of read-write paths having a competitive relationship; and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
Optionally, the adjusting module 403 is further configured to obtain a quality parameter of each of the plurality of read-write paths having a competitive relationship; selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from a plurality of read-write paths according to the quality parameter of each read-write path; and adjusting the selected read-write path according to the load balancing strategy.
In the embodiment of the invention, the physical path information of the read-write path of each host in the SAN is obtained, and the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port; determining whether the read-write path of each host has a competitive relationship according to the physical path information of the read-write path of each host; and if the competition relationship exists, adjusting the read-write path with the competition relationship according to a load balancing strategy. Because the read-write path with the competitive relationship is adjusted, the read-write path after adjustment has no competitive relationship, and the read-write operation is carried out by the read-write path after adjustment with less time delay, the invention can shorten the time delay.
It should be noted that: the apparatus for managing path information provided in the above embodiments is only illustrated by the above division of each functional module when managing path information, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions. In addition, the apparatus for managing path information and the method for managing path information provided by the foregoing embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
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 instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (12)

1. A method of managing path information, the method comprising:
acquiring physical path information of a read-write path of each host in a Storage Area Network (SAN), wherein the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port;
determining an exchanger identifier and an exchanger target port corresponding to the read-write path of each host according to the physical path information of the read-write path of each host;
determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identifier and the switch target port corresponding to the read-write path of each host;
if a plurality of read-write paths pass through the same switch port, determining that the read-write paths of each host have a competitive relationship;
and if the competition relationship exists, adjusting the read-write path with the competition relationship according to a load balancing strategy.
2. The method of claim 1, wherein the obtaining physical path information of a read-write path of each host in a Storage Area Network (SAN) comprises:
acquiring a read-write port of each host in the SAN and a storage port of a storage array in the SAN;
and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
3. The method of claim 1, wherein the adjusting the read/write paths having a competitive relationship according to the load balancing policy comprises:
acquiring a plurality of read-write paths with competitive relations;
and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
4. The method of claim 1, wherein the adjusting the read/write paths having a competitive relationship according to the load balancing policy comprises:
acquiring a quality parameter of each read-write path in a plurality of read-write paths with a competitive relationship;
selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from the plurality of read-write paths according to the quality parameter of each read-write path;
and adjusting the selected read-write path according to a load balancing strategy.
5. An apparatus for managing path information, the apparatus comprising:
the system comprises an acquisition module, a Storage Area Network (SAN) acquisition module and a switching module, wherein the acquisition module is used for acquiring physical path information of a read-write path of each host in the SAN, and the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port;
the determining module is used for determining the switch identifier and the switch target port corresponding to the read-write path of each host according to the physical path information of the read-write path of each host; determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identifier and the switch target port corresponding to the read-write path of each host; if a plurality of read-write paths pass through the same switch port, determining that the read-write paths of each host have a competitive relationship;
and the adjusting module is used for adjusting the read-write path with the competition relationship according to the load balancing strategy if the competition relationship exists.
6. The apparatus of claim 5,
the acquisition module is further used for acquiring a read-write port of each host in the SAN and a storage port of a storage array in the SAN; and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
7. The apparatus of claim 5,
the adjusting module is further configured to obtain a plurality of read-write paths having a contention relationship; and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
8. The apparatus of claim 5,
the adjusting module is further configured to obtain a quality parameter of each of the plurality of read-write paths having a contention relationship; selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from the plurality of read-write paths according to the quality parameter of each read-write path; and adjusting the selected read-write path according to a load balancing strategy.
9. An apparatus for managing path information, the apparatus comprising: a processor and a memory;
the memory is for storing program code for managing path information and data generated by the processor;
the processor is used for acquiring physical path information of a read-write path of each host in the storage area network SAN, wherein the physical path information comprises a target read-write port, a target storage port, a switch identifier and a switch target port;
the processor is further configured to determine, according to the physical path information of the read-write path of each host, an switch identifier and a switch target port corresponding to the read-write path of each host; determining whether a plurality of read-write paths pass through the same switch port or not according to the switch identifier and the switch target port corresponding to the read-write path of each host; if a plurality of read-write paths pass through the same switch port, determining that the read-write paths of each host have a competitive relationship;
and the processor is also used for adjusting the read-write path with the competition relationship according to the load balancing strategy if the competition relationship exists.
10. The apparatus of claim 9,
the processor is further configured to acquire a read-write port of each host in the SAN and a storage port of the storage array in the SAN; and acquiring the physical path information of the read-write path of each host from the corresponding relation among the read-write port, the storage port and the physical path information according to the read-write port of each host and the storage port of the storage array.
11. The apparatus of claim 9,
the processor is further configured to acquire a plurality of read-write paths having a contention relationship; and selecting a part of read-write paths from the plurality of read-write paths, and setting the part of read-write paths to be in an unavailable state.
12. The apparatus of claim 9,
the processor is further configured to obtain a quality parameter of each of the plurality of read-write paths having a contention relationship; selecting a read-write path with the quality parameter not meeting the preset quality parameter condition from the plurality of read-write paths according to the quality parameter of each read-write path; and adjusting the selected read-write path according to a load balancing strategy.
CN201610268689.5A 2016-04-26 2016-04-26 Method and device for managing path information Active CN107317765B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610268689.5A CN107317765B (en) 2016-04-26 2016-04-26 Method and device for managing path information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610268689.5A CN107317765B (en) 2016-04-26 2016-04-26 Method and device for managing path information

Publications (2)

Publication Number Publication Date
CN107317765A CN107317765A (en) 2017-11-03
CN107317765B true CN107317765B (en) 2021-02-12

Family

ID=60184455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610268689.5A Active CN107317765B (en) 2016-04-26 2016-04-26 Method and device for managing path information

Country Status (1)

Country Link
CN (1) CN107317765B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407466B (en) * 2021-08-18 2021-11-09 苏州浪潮智能科技有限公司 IO path determination method, device, equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263807A (en) * 2010-05-31 2011-11-30 国际商业机器公司 Method for keeping communication path smooth in storage area network and storage area network
CN105210316A (en) * 2013-05-10 2015-12-30 华为技术有限公司 System and method for photonic switching

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153905A1 (en) * 2009-12-23 2011-06-23 Hitachi, Ltd. Method and apparatus for i/o path switching

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263807A (en) * 2010-05-31 2011-11-30 国际商业机器公司 Method for keeping communication path smooth in storage area network and storage area network
CN105210316A (en) * 2013-05-10 2015-12-30 华为技术有限公司 System and method for photonic switching

Also Published As

Publication number Publication date
CN107317765A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
EP3605347B1 (en) Systems and methods for i/o prioritization in nvme-compliant storage devices
US20190065412A1 (en) Method and apparatus for establishing connection in non-volatile memory system
CN105573839B (en) Method and apparatus for cost-based load balancing for port selection
EP3554009A1 (en) Method and device for service deployment
US20110271070A1 (en) Memory usage scanning
WO2014128910A1 (en) Storage system, management computer, and virtual logical volume management method
JPH05204679A (en) Method of recognizing i/o interruption subclass
US10552068B2 (en) Access method and device for random access memories, control chip and storage medium
US20130268738A1 (en) Method, apparatus and system for controlling quality of service of storage system
WO2008009510A1 (en) An apparatus for managing power-consumption
EP3514690A1 (en) Non-volatile memory persistence method and computing device
US6622177B1 (en) Dynamic management of addresses to an input/output (I/O) device
US9229762B2 (en) Host providing system and host providing method
US9740404B2 (en) Control apparatus and control method
WO2016082078A1 (en) Path management system, device and method
US20080133810A1 (en) Dynamic path partitioning to multipath storage devices
CN106851758A (en) Communication network changing method and terminal device
CN107317765B (en) Method and device for managing path information
CN110515564B (en) Method and device for determining input/output (I/O) path
CN107220124B (en) Path selection method and device
JP6848278B2 (en) Storage management device, performance adjustment method and performance adjustment program
US20190102091A1 (en) Modifying accesibility based on memory access patterns
CN108897494A (en) The processing method and relevant apparatus of data manipulation in block storage system
EP2946300B1 (en) Sata initiator addressing and storage device slicing
CN116185649A (en) Storage control method, storage controller, storage chip, network card, and readable medium

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