CN115098022A - Path selection method, device, equipment and storage medium - Google Patents

Path selection method, device, equipment and storage medium Download PDF

Info

Publication number
CN115098022A
CN115098022A CN202210714269.0A CN202210714269A CN115098022A CN 115098022 A CN115098022 A CN 115098022A CN 202210714269 A CN202210714269 A CN 202210714269A CN 115098022 A CN115098022 A CN 115098022A
Authority
CN
China
Prior art keywords
read
path
write request
information
identification number
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.)
Pending
Application number
CN202210714269.0A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210714269.0A priority Critical patent/CN115098022A/en
Publication of CN115098022A publication Critical patent/CN115098022A/en
Pending legal-status Critical Current

Links

Images

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/061Improving I/O performance
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • 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/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • 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/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD

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 application relates to a path selection method, a path selection device, a path selection equipment and a storage medium. The main technical scheme comprises: after a volume of a storage array is mapped to a host server, an array type inquiry flow is started, the type of the storage array is determined, read-write request information for reading and writing data from the host server to the storage array is obtained, and a first controller identity identification number and transmission time information corresponding to all paths between the host server and the storage array are obtained, wherein the read-write request information comprises a read-write request address, a second controller identity identification number corresponding to the read-write request address is determined according to the read-write request address and the type of the storage array, and based on the first controller identity identification number, the second controller identity identification number and the transmission time information, an optimal path for processing the read-write request information can be accurately selected, and the read-write performance of the storage is effectively improved.

Description

Path selection method, device, equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for path selection.
Background
In an enterprise production environment, host servers and storage arrays are connected through ethernet switches or fiber switches to form a SAN network. When the host server uses the volume in the storage array, after the volume in the storage array is mapped to the host server, a plurality of device drive symbols are found at the host server side, and each device drive symbol corresponds to a link from the host server to the storage array.
And if the host server reads and writes data to the volume of the storage array, selecting a proper path to process the read and write request through the multi-path software. However, existing multipath software differs in the ability to select links for different types of storage arrays. For example, the multi-path software adopting the round-robin algorithm selects a proper path only when an Asymmetric Logical Unit Access (ALUA) array is docked, and cannot find a proper path when an adaptive (systematic Active/Active, AA) array is docked, so that the storage cannot achieve the best performance. Therefore, when a plurality of paths connect different types of storage arrays, the multi-path software cannot accurately select a proper path to process a read-write request, which affects the storage to exert the maximum performance.
Disclosure of Invention
Therefore, the application provides a path selection method, a path selection device, path selection equipment and a storage medium, so that a proper path can be accurately selected to process a read-write request, and the storage can be guaranteed to exert the maximum performance.
In a first aspect, a method for selecting a path is provided, where the method includes:
after the volume of the storage array is mapped to the host server, starting an array type inquiry process to determine the type of the storage array;
acquiring read-write request information of reading and writing data from a host server to a storage array, and first controller identity identifiers and transmission time information corresponding to all paths between the host server and the storage array, wherein the read-write request information comprises read-write request addresses;
determining a second controller identity identification number corresponding to the read-write request address according to the read-write request address and the type of the storage array;
and selecting a path for processing the read-write request information based on the first controller identity identification number, the second controller identity identification number and the transmission time information.
According to one implementation manner of the embodiment of the present application, initiating an array type query process to determine the type of the storage array includes:
sending an inquiry instruction to the storage array;
receiving a field value fed back by the storage array according to the inquiry instruction;
based on the field value, the type of the storage array is determined.
According to one implementable manner of an embodiment of the present application, the type of storage array comprises an adaptive array; determining a second controller identity identification number corresponding to the read-write request address according to the read-write request address and the type of the storage array, wherein the method comprises the following steps:
when the type of the storage array is an adaptive array, acquiring a corresponding relation between an identity identification number and a read-write address of an adaptive array controller pre-stored in an associated container structure;
and determining the second controller identity identification number corresponding to the read-write request address according to the read-write request address and the corresponding relation.
According to an implementable manner in an embodiment of the present application, the associated container structure is generated by:
sending an acquisition instruction to the adaptive array;
receiving the corresponding relation fed back by the adaptive array according to the acquisition instruction;
and filling the corresponding relation into the related container structure.
According to an implementation manner in the embodiment of the present application, selecting a path for processing read/write request information based on a first controller id, a second controller id, and transmission time information includes:
determining the similarity and difference information of the first controller identity identification number and the second controller identity identification number and the time limit information of a path corresponding to the first controller identity identification number based on the first controller identity identification number, the second controller identity identification number and the transmission time information;
determining the path type of the read-write request address according to the dissimilarity information and the time limit information;
and selecting a path for processing the read-write request information from at least one path corresponding to the path type.
According to an implementation manner in the embodiment of the present application, selecting a path for processing read/write request information from at least one path corresponding to a path type includes:
acquiring preset weight, historical transmission information and state information corresponding to at least one path;
determining the continuous processing times of the optimal path for processing the previous read-write request information in at least one path according to the historical transmission information;
and selecting a path for processing the read-write request information according to the state information, the continuous processing times, the preset weight and the similarity and dissimilarity information of the preferred path.
According to an implementation manner in the embodiment of the present application, the state information includes an available state, and the identity information includes that the controller id numbers are the same; selecting a path for processing the read-write request information according to the state information, the continuous processing times, the preset weight and the different and identical information, wherein the path comprises the following steps:
and when the state information of the preferred path is in an available state and the continuous processing times are less than the preset weight, and the first controller identification number and the second controller identification number of the preferred path are the same, selecting the preferred path as a path for processing the read-write request information.
In a second aspect, there is provided a path selection apparatus, the apparatus comprising:
the determining module is used for starting an array type inquiry process after the volume of the storage array is mapped to the host server, and determining the type of the storage array;
the system comprises an acquisition module, a storage array and a control module, wherein the acquisition module is used for acquiring read-write request information of data read-write to the storage array by a host server, and first controller identity identification numbers and transmission time information corresponding to all paths between the host server and the storage array, wherein the read-write request information comprises read-write request addresses;
the determining module is further used for determining a second controller identity identification number corresponding to the read-write request address according to the read-write request address and the type of the storage array;
and the selection module is used for selecting a path for processing the read-write request information based on the first controller identity identification number, the second controller identity identification number and the transmission time information.
In a third aspect, a computer device is provided, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer instructions executable by the at least one processor to enable the at least one processor to perform the method referred to in the first aspect above.
In a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored, wherein the computer instructions are configured to cause a computer to perform the method according to the first aspect.
According to the technical content provided by the embodiment of the application, after a volume of a storage array is mapped to a host server, an array type inquiry flow is started, the type of the storage array is determined, read-write request information for reading and writing data from and to the storage array by the host server is obtained, and a first controller identity identification number and transmission time information corresponding to all paths between the host server and the storage array are obtained, wherein the read-write request information comprises a read-write request address, a second controller identity identification number corresponding to the read-write request address is determined according to the read-write request address and the type of the storage array, and based on the first controller identity identification number, the second controller identity identification number and the transmission time information, an optimal path for processing the read-write request information can be accurately selected, and the read-write performance of storage is effectively improved.
Drawings
FIG. 1 is a flow diagram illustrating a method for routing in one embodiment;
FIG. 2 is a flow diagram illustrating a method for selecting a path for processing read and write request information, according to an embodiment;
FIG. 3 is a flowchart illustrating a method for selecting an optimal path for processing read and write request information according to an embodiment;
FIG. 4 is a block diagram of a path selection device in one embodiment;
FIG. 5 is a schematic block diagram of a computer apparatus in one embodiment.
Detailed Description
The present application will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
When a host server reads and writes data to a volume of a storage array, a proper path is selected to process a read and write request through multi-path software. The multipath software mainly has the following functions:
A. load balancing: when the multi-path software processes the read-write request, the read-write request can be reasonably distributed to each link, and all the read-write requests are prevented from being issued through one link, so that the throughput of the system is improved.
B. Failover/recovery: when one link fails, the multi-path software can automatically select other links to re-send the read-write request, and the failure of the upper layer service is caused by the failure of the link. When one link is recovered to normal, the multi-path software can automatically sense failure recovery and redistribute a read-write request for the link.
C. Path management: each link corresponds to a path device (disk) in the host. The multipath software can automatically aggregate these path devices to form a multipath device. The user only needs to use the multipath device. The multipath software shields the details of the path equipment, and facilitates the use of the application on the host.
The centralized storage array is divided according to a controller multipath mechanism, and is mainly divided into two types: ALUA arrays and AA arrays. The differences are as follows:
ALUA array: in this type of disk array, a volume in storage has been assigned to which controller in the array it belongs at the time of creation. Only the path in this controller belongs to the optimal path and all paths in the other controllers belong to non-optimal paths. When the multi-path software of the host server side issues the read-write request at the selected path, the read-write request is processed by preferentially using the optimal path. The read and write requests are processed using the non-optimal paths only if all optimal paths are unavailable.
AA array: in this type of disk array, a Logical Unit Number (LUN) is no longer attributed to a controller. Instead, LUNs are divided into specific granularity, each part belonging to a controller. For example, an AA array has four controllers, and a 1G volume is created first, and split at a granularity of 32M. Then 0-32M in the volume are attributed to controller 1, 32M-64M to controller 2, 64M-96M to controller 3, 96M-128M to controller 4, 128M-160M to controller 1, and so on.
Currently, each storage manufacturer develops its own multi-path software. Each manufacturer can optimize the multipath software aiming at the own storage product, so that the multipath software can exert the maximum performance when being docked with the own storage.
In essence, in order to improve the read-write performance of the memory, it is necessary to ensure that the controller corresponding to the path for processing the read-write request is consistent with the memory controller corresponding to the read-write address of the read-write request as much as possible. Therefore, the multi-path selection algorithm is particularly important, and most storage manufacturers optimize the path selection algorithm of own multi-path software, so that the storage read-write performance is improved.
The path selection algorithms provided by multipath software of different storage manufacturers are different, and the common path selection algorithms include the following ones:
round-robin algorithm: and circularly using the paths in the optimal path group to process the read-write request.
Failover algorithm: and fixedly processing the read-write request by using one path in the optimal path group. Only if the path is unavailable, other paths are selected to process the read-write request.
Load balancing balance algorithm: and preferentially selecting the path with the lowest load to process the read-write request by calculating the load of each path.
For the existing round-robin algorithm, the performance can only be better played in the ALUA array. If the storage array is an AA array, the controller corresponding to the read-write address of the read-write request cannot be accurately found according to the existing algorithm logic, so that the optimal path cannot be accurately found, and the storage cannot achieve the optimal performance.
In addition, the round-robin algorithm needs to reselect a path before processing a read-write request every time, and frequent path selection increases the load of multipath software, thereby indirectly affecting the storage performance.
In order to solve the problem of the prior art, embodiments of the present application provide a path selection method, apparatus, device, and computer storage medium. First, a path selection method provided in an embodiment of the present application is described below.
Fig. 1 shows a flowchart of a path selection method according to an embodiment of the present application. As shown in fig. 1, the method may include the steps of:
s110, after the volume of the storage array is mapped to the host server, an array type inquiry process is started, and the type of the storage array is determined.
After the volumes of the array on the storage are mapped to the host server, the device discovery interface of the multipath software is triggered by scanning the disk on the host. The multipath software allocates memory for the multipath device discovered by the interface and initializes the multipath device, and stores a structure corresponding to the multipath device in a kernel, wherein the structure comprises a newly added field for identifying the storage array type of the multipath device. The multipath device is a device where the storage array is located.
In the process of initializing the multipath equipment, the multipath software starts an array type inquiry flow, and the type of the storage array is determined according to the feedback result of the array type inquiry flow. The types of storage arrays include ALUA arrays and AA arrays.
The multi-path software in the embodiment of the application can simultaneously support the ALUA array and the AA array, and selects the optimal path for different types of storage arrays.
S120, acquiring read-write request information of the host server for reading and writing data to the storage array, and first controller identity identification numbers and transmission time information corresponding to all paths between the host server and the storage array, wherein the read-write request information comprises read-write request addresses.
The read-write request information may include device name, request address, identification field, etc. The transmission time information may include a time field and its corresponding assignment.
Traversing all paths between the host server and the storage array, acquiring the first controller identity identification numbers and transmission time information corresponding to the paths, and providing a data basis for grouping the paths according to a specific strategy in a round-robin algorithm.
S130, determining a second controller identity identification number corresponding to the read-write request address according to the read-write request address and the type of the storage array.
Because the round-robin algorithm can play a better role in selecting a path for the ALUA array, when the type of the storage array is the ALUA array, the second control identity identification number corresponding to the read-write address can be determined according to the existing method.
And when the type of the storage array is an AA array, determining a second control identity identification number corresponding to the read-write address based on an improved round-robin algorithm. The specific determination method will be described in detail below.
And determining the second control identification number corresponding to the read-write address by adopting different methods according to the type of the storage array, so that different types of storage arrays can be considered well, and the accurate second control identification number can be obtained by any type of storage array through round-robin algorithm.
And S140, selecting a path for processing the read-write request information based on the first controller identity identification number, the second controller identity identification number and the transmission time information.
All paths between the host server and the storage array are grouped by adopting a round-robin algorithm based on the first controller identity identification number, the second controller identity identification number and the transmission time information, and the path for processing the read-write request information is selected according to the group priority, so that the storage read-write capability can be effectively improved.
It can be seen that, in the embodiment of the present application, after a volume of a storage array is mapped to a host server, an array type query process is started, a type of the storage array is determined, read-write request information for reading and writing data from and to the storage array by the host server is acquired, and a first controller identity identifier and transmission time information corresponding to all paths between the host server and the storage array are acquired, where the read-write request information includes a read-write request address, a second controller identity identifier corresponding to the read-write request address is determined according to the read-write request address and the type of the storage array, and based on the first controller identity identifier, the second controller identity identifier and the transmission time information, an optimal path for processing the read-write request information can be accurately selected, so that the read-write performance of storage is effectively improved.
The steps in the above-described process flow are described in detail below. First, the above step S110, i.e., "after the volume of the storage array is mapped to the host server, the array type query process is started to determine the type of the storage array" is described in detail with reference to the embodiment.
As an implementation mode, after starting an array type inquiry flow, sending an inquiry instruction to a storage array;
receiving a field value fed back by the storage array according to the inquiry instruction;
based on the field value, the type of the storage array is determined.
The inquiry instruction is an inquiry sci instruction with a page code of 0x 83. The corresponding relationship between the field value and the type of the storage array is predefined, the field value may be 0 and 1, or may be other assignments, and is not limited herein.
The method comprises the steps of sending an INQUIRY scsi instruction with the page code of 0x83 to a server of the storage array, and receiving Extended INQUIRY Data fed back by the server of the storage array according to the INQUIRY scsi instruction. The R _ SUP field value in Extended INQUIRY Data is parsed. And determining the type of the storage array according to the predefined corresponding relation. For example, a field value of 1 indicates that the storage array type on the multipath device is an AA array, and a field value of 0 indicates that the storage array type on the multipath device is an ALUA array.
The following describes the above-mentioned S130 in detail, that is, "determining the second controller id corresponding to the read-write request address according to the read-write request address and the type of the storage array" with reference to an embodiment.
As an implementation manner, when the type of the storage array is an AA array, before the second controller id number corresponding to the read-write request address is determined, the association container structure is generated in advance by adopting the following method:
sending an acquisition instruction to the adaptive array;
receiving the corresponding relation fed back by the adaptive array according to the acquisition instruction;
and filling the corresponding relation into the related container structure.
When the type of the storage array is an AA array, an associated container structure body is additionally arranged in a system kernel and used for recording the controller identity identification number of the AA array and the corresponding relation of the controller identity identification number and the read-write address field which can be processed. Wherein the related container structure is a map structure.
The fetch instruction is the REFERRALS SCSI instruction. And sending REFERRALS SCSI instructions constructed according to actual requirements to the AA array, and obtaining the corresponding relation by the AA array server according to REFERRALS SCSI instructions and feeding back the corresponding relation to the multipath software. And the multipath software analyzes the corresponding relation according to the information fed back by the AA array server, fills the map structure body and stores the map structure body into a system kernel.
As an implementation manner, when the type of the storage array is an adaptive array, acquiring a corresponding relation between an identification number and a read-write address of an adaptive array controller pre-stored in an associated container structure;
and determining the second controller identity identification number corresponding to the read-write request address according to the read-write request address and the corresponding relation.
And when the type of the storage array is determined to be the AA array, acquiring the map structure body from the system kernel, and further obtaining the corresponding relation between the controller identification number and the read-write address in the AA array. And searching the controller identity identification number corresponding to the read-write address which is the same as the read-write request address from the corresponding relation, and determining the controller identity identification number as a second controller identity identification number corresponding to the read-write request address.
The above-mentioned S140, that is, "selecting a path for processing the read/write request information based on the first controller id, the second controller id and the transmission time information" is described in detail below with reference to the embodiment.
As an implementation manner, a method for selecting a path for processing read/write request information is shown in fig. 2, and specifically includes:
and S141, determining the similarity information of the first controller identification number and the second controller identification number and the time limit information of the path corresponding to the first controller identification number based on the first controller identification number, the second controller identification number and the transmission time information.
The dissimilarity information comprises that the first controller identification number is consistent with the second controller identification number, and the first controller identification number is inconsistent with the second controller identification number.
And when the first controller identification number is the same as the second controller identification number, determining that the first controller identification number is consistent with the second controller identification number. When the first controller identification number is consistent with the second controller identification number, if the read-write request information is processed by adopting the path corresponding to the first controller identification number, the read-write performance of the storage array can be improved.
And when the first controller identification number is different from the second controller identification number, determining that the first controller identification number is inconsistent with the second controller identification number.
The time limit information comprises overtime issuing read-write requests and punctually issuing read-write requests. And determining time limit information of the path corresponding to the first controller identity identification number according to the time field in the transmission time information and the assignment corresponding to the time field. For example, when the assignment corresponding to the time field is 1, the read-write request is issued overtime, and when the assignment corresponding to the time field is 0, the read-write request is issued on time.
And S142, determining the path type of the read-write request address according to the dissimilarity information and the time limit information.
The path types include: a equal path Good _ path, B equal path Alter _ path, third equal path Degraded _ path, D equal path Degraded _ alternate path. The selected priority is Good _ path > Alter _ path > Degraded _ alternate path.
And if the first controller identity identification number is consistent with the second controller identity identification number and the first controller identity identification number corresponds to the path, issuing the read-write request at the same time, and determining the path type of the read-write request address as Good _ path.
And if the first controller identity identification number is inconsistent with the second controller identity identification number and the path corresponding to the first controller identity identification number is consistent with the path, issuing the read-write request, and determining that the path type of the read-write request address is the Alter _ path.
And if the first controller identification number is consistent with the second controller identification number and the route corresponding to the first controller identification number is overtime, issuing a read-write request, and determining the route type of the read-write request address as the Degraded _ allowed path.
And if the first controller identity identification number is inconsistent with the second controller identity identification number and the path corresponding to the first controller identity identification number is overtime, issuing a read-write request, and determining the path type of the read-write request address as Degraded _ allowed path.
S143, selecting a path for processing the read-write request information from at least one path corresponding to the path type.
When the read-write request address is in the Degraded _ alternate path or the Degraded _ alternate path, it indicates that none of the paths capable of processing the read-write request information is the optimal path, and which path is adopted has little influence on the best performance of the memory array, and one path can be arbitrarily selected from at least one path corresponding to the Degraded _ alternate path or the Degraded _ alternate path to process the read-write request information. Or setting a corresponding screening strategy according to the requirement of the user, selecting a relatively optimal path from the Degraded _ alternate path or at least one path corresponding to the Degraded _ alternate path to issue a read-write request, and transmitting read-write data.
When the path type of the read-write request address is Good _ path or Alter _ path, it indicates that an optimal path exists in the paths capable of processing the read-write request information. In order to avoid the need to reselect a path each time a read/write request is processed and reduce the storage performance attenuation caused by frequently selecting a path, as an implementable manner, a method for selecting an optimal path for processing read/write request information is shown in fig. 3, and specifically includes:
and S1, acquiring the preset weight, the historical transmission information and the state information corresponding to at least one path.
And adding an attribute value weight in a path structure body of the multipath equipment in the kernel, wherein the weight represents a weight which represents a threshold value of the number of times that the path continuously processes the read-write request. The higher the weight, the more times the path continuously processes read and write requests. A command line can be added in a command line tool of multi-path software, and a user presets the weight of each path through the command line to increase the configurability of the user.
The historical transmission information may include the number of times transmitted and the time of transmission, and the status information may include an available status and an unavailable status.
And acquiring preset weight, historical transmission information and state information corresponding to at least one path, and judging whether to use the last path to process the read-write request.
And S2, determining the continuous processing times of the preferred path for processing the previous read-write request information in at least one path according to the historical transmission information.
And determining the optimal path for processing the last read-write request information according to the transmission time. Because the preferred path is selected when processing the last read-write request information, it is indicated that the preferred path may be the optimal path among all paths corresponding to the path type where the preferred path is located. Therefore, the preferred path is taken as the path for processing the read-write request information at this time, so that the selection of a proper path again can be avoided, and the frequency of path selection is reduced.
The number of consecutive processes of the preferred path is determined based on the number of transmitted times. If the number of times of continuous processing of a path reaches the upper limit, the performance of the storage array is affected by processing the read-write request information by using the path again.
And S3, selecting the path for processing the read-write request information according to the state information, the continuous processing times, the preset weight and the similarity and dissimilarity information of the preferred path.
After determining the continuous processing times of the preferred path, it is further required to select a path for finally processing the read-write request information in combination with whether the path is available, whether the continuous processing times reaches an upper limit, whether the path belongs to a Good _ path or an all _ path, and the like.
Specifically, when the state information of the preferred path is in the available state and the continuous processing times are less than the preset weight, and the first controller id and the second controller id of the preferred path are the same, the preferred path is selected as the path for processing the read-write request information.
When the state information of the preferred path is an available state, the continuous processing times are smaller than the preset weight, and the first controller identification number and the second controller identification number of the preferred path are the same, the preferred path is available, the continuous processing times do not reach the upper limit, the capacity of processing the read-write request information is still achieved, meanwhile, the path belongs to the path type of Good _ path or Alter _ path, and the optimal performance of the storage array can be exerted by adopting the preferred path to process the read-write request information. Otherwise, other paths are switched.
By the method, the frequency of reselecting the path can be reduced, the efficiency of processing read-write request information by multi-path software is improved, and the read-write capability of the storage array is indirectly improved.
It should be understood that although the various steps in the flow charts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in a strict order unless explicitly stated in the application, and may be performed in other orders. Moreover, at least some of the steps in fig. 1-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 4 is a schematic structural diagram of a path selection device according to an embodiment of the present application, where the path selection device may include: the determining module 410, the obtaining module 420 and the selecting module 430 may further include: and generating a module. The main functions of each component module are as follows:
a determining module 410, configured to start an array type query procedure after a volume of a storage array is mapped to a host server, and determine a type of the storage array;
an obtaining module 420, configured to obtain read-write request information for reading and writing data from and to a storage array by a host server, and first controller identity identifiers and transmission time information corresponding to all paths between the host server and the storage array, where the read-write request information includes a read-write request address;
the determining module 410 is further configured to determine, according to the read-write request address and the type of the storage array, a second controller id number corresponding to the read-write request address;
and a selecting module 430, configured to select a path for processing the read-write request information based on the first controller identity identifier, the second controller identity identifier, and the transmission time information.
As an implementation manner, the determining module 410 is specifically configured to send an inquiry instruction to the storage array;
receiving a field value fed back by the storage array according to the inquiry instruction;
based on the field value, the type of the storage array is determined.
As one implementation, the type of storage array includes an adaptive array; a determining module 410, configured to, when the type of the storage array is an adaptive array, obtain a correspondence between an identifier and a read/write address of an adaptive array controller that is pre-stored in the associated container structure;
and determining the second controller identity identification number corresponding to the read-write request address according to the read-write request address and the corresponding relation.
As an implementation manner, the apparatus further includes a generating module, configured to send a get instruction to the adaptive array;
receiving the corresponding relation fed back by the adaptive array according to the acquisition instruction;
and filling the corresponding relation into the related container structure.
As an implementation manner, the selecting module 430 is specifically configured to determine, based on the first controller identification number, the second controller identification number, and the transmission time information, the identity information of the first controller identification number and the second controller identification number, where the first controller identification number corresponds to the time limit information of the path;
determining the path type of the read-write request address according to the dissimilarity information and the time limit information;
and selecting a path for processing the read-write request information from at least one path corresponding to the path type.
As an implementation manner, the selecting module 430 is specifically configured to obtain a preset weight, historical transmission information, and state information corresponding to at least one path;
determining the continuous processing times of the optimal path for processing the previous read-write request information in at least one path according to the historical transmission information;
and selecting a path for processing the read-write request information according to the state information, the continuous processing times, the preset weight and the similarity and difference information of the preferred path.
As an implementation manner, the state information includes an available state, and the identity information includes that the controller identification numbers are the same; the selecting module 430 is specifically configured to select the preferred path as the path for processing the read-write request information when the state information of the preferred path is the available state, the consecutive processing times are smaller than the preset weight, and the first controller id and the second controller id of the preferred path are the same.
It will be understood that it is not necessary for any method or article of manufacture to achieve all of the above-described advantages in connection with the practice of the present application
The same and similar parts among the various embodiments described above can be referred to each other, and each embodiment is described with emphasis on differences from other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
According to an embodiment of the present application, a computer device and a computer-readable storage medium are also provided.
As shown in fig. 5, a block diagram of a computer device according to an embodiment of the present application is shown. Computer apparatus is intended to represent various forms of digital computers or mobile devices. Which may include desktop computers, laptop computers, workstations, personal digital assistants, servers, mainframe computers, and other suitable computers. Mobile devices may include tablet computers, smart phones, wearable devices, and the like.
As shown in fig. 5, the apparatus 500 includes a calculation unit 501, a ROM 502, a RAM 503, a bus 504, and an input/output (I/O) interface 505, and the calculation unit 501, the ROM 502, and the RAM 503 are connected to each other through the bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The calculation unit 501 may perform various processes in the method embodiments of the present application according to computer instructions stored in a Read Only Memory (ROM)502 or computer instructions loaded from a storage unit 508 into a Random Access Memory (RAM) 503. The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. The computing unit 501 may include, but is not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. In some embodiments, the methods provided by the embodiments of the present application may be implemented as a computer software program tangibly embodied in a computer-readable storage medium, such as storage unit 508.
The RAM 503 may also store various programs and data required for operation of the device 500. Part or all of the computer program may be loaded and/or installed on the device 500 via the ROM 802 and/or the communication unit 509.
An input unit 506, an output unit 507, a storage unit 508 and a communication unit 509 in the device 500 may be connected to the I/O interface 505. The input unit 506 may be, for example, a keyboard, a mouse, a touch screen, a microphone, or the like; the output unit 507 may be, for example, a display, a speaker, an indicator lamp, or the like. The device 500 can exchange information, data, and the like with other devices through the communication unit 509.
It should be noted that the device may also include other components necessary to achieve proper operation. It may also contain only the components necessary to implement the solution of the present application and not necessarily all of the components shown in the figures.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof.
Computer instructions for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 501 such that the computer instructions, when executed by the computing unit 501 such as a processor, cause the steps involved in embodiments of the method of the present application to be performed.
The computer-readable storage medium provided herein may be a tangible medium that may contain, or store, computer instructions for performing the steps involved in the method embodiments of the present application. The computer readable storage medium may include, but is not limited to, storage media in the form of electronic, magnetic, optical, electromagnetic, and the like.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for path selection, the method comprising:
after the volume of the storage array is mapped to the host server, starting an array type inquiry process to determine the type of the storage array;
acquiring read-write request information of reading and writing data from a host server to a storage array, and first controller identity identifiers and transmission time information corresponding to all paths between the host server and the storage array, wherein the read-write request information comprises a read-write request address;
determining a second controller identity identification number corresponding to the read-write request address according to the read-write request address and the type of the storage array;
and selecting a path for processing the read-write request information based on the first controller identity identification number, the second controller identity identification number and the transmission time information.
2. The method of claim 1, wherein said initiating an array type query process to determine the type of said storage array comprises:
sending an inquiry instruction to the storage array;
receiving a field value fed back by the storage array according to the inquiry instruction;
and determining the type of the storage array according to the field value.
3. The method of claim 1, wherein the type of storage array comprises an adaptive array; the determining the second controller identity identification number corresponding to the read-write request address according to the read-write request address and the type of the storage array includes:
when the type of the storage array is an adaptive array, acquiring a corresponding relation between an identity identification number and a read-write address of the controller in the adaptive array, which is pre-stored in an associated container structure;
and determining a second controller identity identification number corresponding to the read-write request address according to the read-write request address and the corresponding relation.
4. The method of claim 3, wherein the associated container structure is produced by:
sending an acquisition instruction to the adaptive array;
receiving the corresponding relation fed back by the adaptive array according to the acquisition instruction;
and filling the corresponding relation into the related container structure.
5. The method of claim 1, wherein selecting a path for processing the read/write request information based on the first controller identity identifier, the second controller identity identifier and the transmission time information comprises:
determining the similarity and difference information of the first controller identity identification number and the second controller identity identification number and the time limit information of the path corresponding to the first controller identity identification number based on the first controller identity identification number, the second controller identity identification number and the transmission time information;
determining the path type of the read-write request address according to the dissimilarity information and the time limit information;
and selecting a path for processing the read-write request information from at least one path corresponding to the path type.
6. The method according to claim 5, wherein selecting a path for processing the read/write request information from the at least one path corresponding to the path type includes:
acquiring preset weight, historical transmission information and state information corresponding to the at least one path;
determining the continuous processing times of the optimal path for processing the previous read-write request information in the at least one path according to the historical transmission information;
and selecting a path for processing the read-write request information according to the state information, the continuous processing times, the preset weight and the similarity and dissimilarity information of the preferred path.
7. The method of claim 6, wherein the status information comprises an available status, and the peer information comprises controller ID numbers being the same; the selecting a path for processing the read-write request information according to the state information, the continuous processing times, the preset weight and the similarity and dissimilarity information includes:
and when the state information of the preferred path is in an available state and the continuous processing times are less than the preset weight, and the first controller identity identification number and the second controller identity identification number of the preferred path are the same, selecting the preferred path as a path for processing the read-write request information.
8. A path selection device, the device comprising:
the determining module is used for starting an array type inquiry process after the volume of the storage array is mapped to the host server, and determining the type of the storage array;
the system comprises an acquisition module, a storage array and a control module, wherein the acquisition module is used for acquiring read-write request information of data read-write from a host server to the storage array, and first controller identity identifiers and transmission time information corresponding to all paths between the host server and the storage array, wherein the read-write request information comprises a read-write request address;
the determining module is further configured to determine a second controller identity identifier corresponding to the read-write request address according to the read-write request address and the type of the storage array;
and the selection module is used for selecting a path for processing the read-write request information based on the first controller identity identification number, the second controller identity identification number and the transmission time information.
9. A computer device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer-readable storage medium having computer instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 7.
CN202210714269.0A 2022-06-22 2022-06-22 Path selection method, device, equipment and storage medium Pending CN115098022A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210714269.0A CN115098022A (en) 2022-06-22 2022-06-22 Path selection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210714269.0A CN115098022A (en) 2022-06-22 2022-06-22 Path selection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115098022A true CN115098022A (en) 2022-09-23

Family

ID=83293318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210714269.0A Pending CN115098022A (en) 2022-06-22 2022-06-22 Path selection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115098022A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617278A (en) * 2022-11-29 2023-01-17 苏州浪潮智能科技有限公司 Path equipment selection method and device, electronic equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617278A (en) * 2022-11-29 2023-01-17 苏州浪潮智能科技有限公司 Path equipment selection method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10496668B1 (en) Optimized tender processing of hash-based replicated data
US10642704B2 (en) Storage controller failover system
CN107807794B (en) Data storage method and device
US20190310925A1 (en) Information processing system and path management method
US9026766B2 (en) Memory management method, memory management apparatus and NUMA system
US11128535B2 (en) Computer system and data management method
CN103534688B (en) Data reconstruction method, memory device and storage system
GB2514810A (en) Rebuilding data of a storage system
US9971527B2 (en) Apparatus and method for managing storage for placing backup data into data blocks based on frequency information
US6886074B1 (en) Method and apparatus for raid load balancing
CN115098022A (en) Path selection method, device, equipment and storage medium
CN109840051B (en) Data storage method and device of storage system
US8972613B2 (en) System and method for increasing input/output throughput in a data storage system
AU2021269916B2 (en) Write sort management in data storage system
US7600074B2 (en) Controller of redundant arrays of independent disks and operation method thereof
US20100057989A1 (en) Method of moving data in logical volume, storage system, and administrative computer
CN107145306B (en) Distributed data storage method and system
US20150269098A1 (en) Information processing apparatus, information processing method, storage, storage control method, and storage medium
US9110823B2 (en) Adaptive and prioritized replication scheduling in storage clusters
US6754727B2 (en) Data processing system and storage control device used therefor
US11693577B2 (en) Storage operation processing during data migration using migrated indicator from source storage
US11334292B2 (en) Autonomous RAID data storage system
US11422740B2 (en) Raid storage-device-assisted data update system
US8990523B1 (en) Storage apparatus and its data processing method
US10726046B2 (en) Object storage system with ordered parallel replication

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