Storage resource access method, device, equipment and readable storage medium
By setting path selection parameters in the storage resource access method and using polling selection method, the problem of poor performance of storage multipath systems under high load is solved, and path balanced use and system performance improvement is achieved.
Patent Information
- Application Number
- CN202211032629.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-08-26
AI Technical Summary
In the prior art, when the traffic volume is relatively large, the default configuration of storage multipath leads to lower performance of the IO processing process system.
By setting the path selection parameters in advance, using polling selection method, selecting the target path from the path center to ensure balanced use of the path and avoiding frequent calls to specific paths.
Improves system performance, reduces path failure rate, saves failover time, and optimizes I/O processing time.
Smart Images

Figure CN115390762B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a storage resource access method, device, equipment and computer-readable storage medium. Background Art
[0002] Storage Multipathing (SMP) refers to the concurrent access of storage resources by multiple storage hosts within a SAN (Storage Area Network) network architecture. Multiple I / O (input / output) data flow storage paths are established between each storage host and the LUN (Logical Unit Number) of the storage device, effectively creating multiple paths for each LUN. This allows for fault switching and recovery, bandwidth aggregation, I / O flow control, and automatic path management. The advantages of storage multipathing are primarily based on hardware redundancy, LUN-oriented storage, intelligent storage devices, and corresponding intelligent software support.
[0003] Storage multipathing is typically implemented in conjunction with specific disk array storage devices and requires corresponding multipathing software, such as RDAC (Redundant Disk Array Controller), SDD (Subsystem Device Driver), SDDPCM (Subsystem Device Driver Path Control Module), and host multipathing software. These commercial multipathing software packages are targeted at specific disk array storage devices and are expensive. DM (Device Mapper) Multipath is an open-source multipathing software that offers support for mainstream mid-range and high-end disk array storage devices and is widely used. However, DM Multipath's default parameter configuration is suitable for general multipath storage. The default configuration re-routes I / O paths and path groups and supports error redundancy. When traffic volume is high, this default configuration can become a bottleneck, resulting in low system performance during I / O processing.
[0004] In summary, how to effectively solve the problem that when the business volume is relatively large, the default configuration becomes a bottleneck, resulting in low system performance in the IO processing process, etc., is an issue that technicians in this field urgently need to solve. Summary of the Invention
[0005] The object of the present invention is to provide a storage resource access method, which enables balanced use of each path in a path set, avoids frequent calls to a specific path when the business volume is relatively large, and improves system performance; another object of the present invention is to provide a storage resource access device, equipment and computer-readable storage medium.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] A storage resource access method, comprising:
[0008] Receive a target IO request to access a target storage resource;
[0009] Get the preset path selection parameters;
[0010] When the path selection mode is determined to be round-robin selection of paths in the path set according to the path selection parameters, a target path is obtained by round-robin selection from the path set;
[0011] The target IO request is sent to the target storage resource using the target path to access the target storage resource.
[0012] In a specific embodiment of the present invention, polling and selecting a target path from the path set includes:
[0013] The target path is obtained by polling and selecting from the path set according to the load balancing strategy.
[0014] In a specific embodiment of the present invention, polling and selecting a target path from the path set includes:
[0015] Determining whether there is an available path in the optimal path group of the path set;
[0016] If yes, the target path is selected from the optimal path group through polling.
[0017] In a specific embodiment of the present invention, when it is determined that there is no available path in the optimal path group of the path set, the method further includes:
[0018] The target path is obtained by polling and selecting from the non-optimal path group of the path set.
[0019] In a specific embodiment of the present invention, obtaining preset path selection parameters includes:
[0020] Find the parameter module in the parameter configuration file;
[0021] When the number of existing parameter modules is greater than 1, obtaining the priority corresponding to each of the parameter modules;
[0022] Performing a sorting operation on each of the priorities to obtain a sorting result;
[0023] Select the parameter module with the highest priority according to the sorting result;
[0024] Get the preset path selection parameters from the parameter module with the highest priority.
[0025] In a specific embodiment of the present invention, obtaining preset path selection parameters includes:
[0026] Gets the path selection parameters that take effect after a service restart or refresh command.
[0027] In a specific embodiment of the present invention, it also includes:
[0028] When it is determined according to the path selection parameters that the path selection mode is to select a designated path in the path set, a preset target path is selected from the path set.
[0029] A storage resource access device, comprising:
[0030] A request receiving unit, configured to receive a target IO request for accessing a target storage resource;
[0031] A parameter acquisition unit, used to acquire preset path selection parameters;
[0032] a path selection unit configured to, when it is determined according to the path selection parameter that the path selection mode is to perform round-robin selection on the paths in the path set, select a target path from the path set by polling;
[0033] The resource access unit is configured to send the target IO request to the target storage resource by using the target path, so as to access the target storage resource.
[0034] A storage resource access device, comprising:
[0035] memory for storing computer programs;
[0036] The processor is configured to implement the steps of the storage resource access method described above when executing the computer program.
[0037] A computer-readable storage medium stores a computer program, which implements the steps of the storage resource access method described above when executed by a processor.
[0038] The storage resource access method provided by the present invention receives a target IO request for accessing a target storage resource; obtains preset path selection parameters; when it is determined based on the path selection parameters that the path selection method is to poll each path in a path set, selects a target path from the path set by polling; and uses the target path to send the target IO request to the target storage resource to access the target storage resource.
[0039] As can be seen from the above technical solution, by presetting path selection parameters that indicate the path selection method, when the path selection method is determined to be round-robin selection among the paths in the path set based on the path selection parameters, the target path is selected from the path set in round-robin fashion, and the target I / O request is sent to the target storage resource using the target path. This ensures balanced use of the paths in the path set, avoids frequent calls to a specific path when traffic is high, and improves system performance.
[0040] Correspondingly, the present invention also provides a storage resource access device, equipment and computer-readable storage medium corresponding to the above-mentioned storage resource access method, which have the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 A flowchart of a method for accessing storage resources according to an embodiment of the present invention;
[0043] Figure 2 Another implementation flow chart of the storage resource access method in an embodiment of the present invention;
[0044] Figure 3 Another implementation flow chart of the storage resource access method in an embodiment of the present invention;
[0045] Figure 4 This is a structural block diagram of a storage resource access device according to an embodiment of the present invention;
[0046] Figure 5 This is a structural block diagram of a storage resource access device according to an embodiment of the present invention;
[0047] Figure 6 This is a schematic diagram of the specific structure of a storage resource access device provided in this embodiment. DETAILED DESCRIPTION
[0048] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0049] See also Figure 1 , Figure 1 This is a flowchart of an implementation method of a storage resource access method in an embodiment of the present invention. The method may include the following steps:
[0050] S101: Receive a target IO request for accessing a target storage resource.
[0051] When a storage host needs to access a target storage resource, it generates a target IO request and sends the target IO request to the resource access management center. The resource access management center receives the target IO request for accessing the target storage resource.
[0052] The target storage resource can be a disk, a storage device plugged into the computer, a volume, etc.
[0053] The target IO request may be any IO request that needs to access the target storage resource.
[0054] The resource access management center may be a controller, a processor, etc. that manages target storage resources.
[0055] S102: Obtain preset path selection parameters.
[0056] Preset path selection parameters are used to select the path required to forward IO requests. For example, this parameter specifies a specific path as the path for forwarding IO requests, or round-robinly selects each path in a path set containing a large number of paths, using each path to poll received IO requests. After receiving a target IO request to access the target storage resource, the preset path selection parameters are retrieved.
[0057] In a specific embodiment of the present invention, step S102 may include the following steps:
[0058] Gets the path selection parameters that take effect after a service restart or refresh command.
[0059] Pre-set the path selection parameter validation mode, and use the service restart systemctl restartmultipathd or refresh command multipath-r to make the path selection parameters effective. Get the path selection parameters that are effective through service restart or refresh command.
[0060] S103: When the path selection mode is determined to be round-robin selection of paths in the path set according to the path selection parameters, a target path is obtained by polling and selecting from the path set.
[0061] After obtaining the preset path selection parameters, a path selection method is determined based on the path selection parameters. The path selection method may include selecting a specific path from a path set containing a large number of paths as the I / O request forwarding path, or may include round-robin selection of paths from the path set containing a large number of paths. When the path selection method is determined based on the path selection parameters to be round-robin selection of paths in the path set, the target path is selected from the path set through round-robin selection.
[0062] In a specific embodiment of the present invention, obtaining a target path by polling from a path set may include the following steps:
[0063] The target path is selected from the path set according to the load balancing strategy.
[0064] The pre-set principle for round-robin selection of paths within a path set is load balancing. When the path selection parameters determine that the path selection method is round-robin, the target path is selected from the path set according to the load balancing strategy. By round-robin selection of paths within the path set according to the load balancing principle, excessive load on any one path in the path set is avoided. This ensures that the load on each path remains relatively constant over a period of time during the round-robin process, reducing the path failure rate, shortening failover time, optimizing I / O processing time, and improving system performance.
[0065] S104: Send the target IO request to the target storage resource using the target path to access the target storage resource.
[0066] After round-robin selection of the target path from the path set, the target I / O request is sent to the target storage resource using the target path, enabling the storage host to access the target storage resource. By presetting path selection parameters that indicate the path selection method, when the path selection parameters determine that the path selection method is round-robin selection of the paths in the path set, the target path is selected from the path set and the target I / O request is sent to the target storage resource using the target path. This ensures balanced utilization of all paths in the path set, avoiding frequent calls to a specific path during periods of high traffic volume, and improving system performance.
[0067] In a specific embodiment of the present invention, the method may further comprise the following steps:
[0068] When the path selection mode is determined to be selecting a designated path in the path set according to the path selection parameters, a preset target path is selected from the path set.
[0069] Path selection parameters can be used to select instruction paths within a path set. For example, a specific path with a larger bandwidth can be designated as the target path for forwarding I / O requests based on its bandwidth. When the path selection parameter determines that the path selection method is to select a specific path within the path set, a pre-set target path is selected from the path set. For example, setting the path_grouping_policy value to "failover" can determine that the path selection method is to select a specific path within the path set.
[0070] The storage resource access method provided by the present invention receives a target IO request for accessing a target storage resource; obtains preset path selection parameters; when the path selection method is determined to be a round-robin selection of each path in a path set according to the path selection parameters, the target path is selected from the path set by polling; and the target IO request is sent to the target storage resource using the target path to access the target storage resource. By presetting the path selection parameters indicating the path selection method, when the path selection method is determined to be a round-robin selection of each path in the path set according to the path selection parameters, the target path is selected from the path set by polling, and the target IO request is sent to the target storage resource using the target path. This allows for balanced use of the paths in the path set, avoids frequent calls to a specific path when the business volume is relatively large, and improves system performance.
[0071] It should be noted that, based on the above embodiment, the embodiment of the present invention also provides corresponding improved solutions. In subsequent embodiments, the same steps or corresponding steps as those in the above embodiment can be referenced to each other, and the corresponding beneficial effects can also be referenced to each other, and will not be described in detail in the following improved embodiments.
[0072] See also Figure 2 , Figure 2 This is another implementation flow chart of a storage resource access method according to an embodiment of the present invention. The method may include the following steps:
[0073] S201: Receive a target IO request for accessing a target storage resource.
[0074] When a storage host needs to access a target storage resource, it generates a target IO request and sends the target IO request to the resource access management center. The resource access management center receives the target IO request for accessing the target storage resource.
[0075] S202: Obtain preset path selection parameters.
[0076] Preset path selection parameters are used to select the path required to forward IO requests. For example, this parameter specifies a specific path as the path for forwarding IO requests, or round-robinly selects each path in a path set containing a large number of paths, using each path to poll received IO requests. After receiving a target IO request to access the target storage resource, the preset path selection parameters are retrieved.
[0077] S203: When the path selection method is determined to be round-robin selection of the paths in the path set according to the path selection parameters, it is determined whether there is an available path in the optimal path group of the path set. If yes, step S204 is executed; if not, step S205 is executed.
[0078] A storage resource has a corresponding optimal controller. All paths through the optimal controller with the same path priority are assigned to a priority group, thus forming the optimal path group. After obtaining the preset path selection parameters, if the path selection method is determined to be round-robin selection of the paths in the path set based on the path selection parameters, a determination is made as to whether there are available paths in the optimal path group of the path set. If so, a path from the optimal path group is preferentially selected, and step S204 is executed. If not, it indicates that additional paths outside the optimal path group need to be searched for to send the target I / O request, and step S205 is executed.
[0079] S204: Poll and select a target path from the optimal path group.
[0080] When it is determined that there are available paths within the optimal path group of the path set, the path from the optimal path group is selected first, and the target path is selected from the optimal path group in a round-robin manner. This ensures that the optimal path in the optimal path group is preferentially selected, improving the reliability of I / O request forwarding.
[0081] S205: polling and selecting a target path from the non-optimal path group in the path set.
[0082] Storage resources also have corresponding non-optimal controllers. All paths through the non-optimal controller have the same path priority and are assigned to a different priority group, forming a non-optimal path group. When it is determined that no available paths exist within the optimal path group of the path set, it is necessary to search for paths other than those in the optimal path group to send the target I / O request. The target path is then round-robin selected from the non-optimal path group of the path set. By setting up a non-optimal path group, the target I / O request can still be successfully sent even if no available paths exist in the optimal path group.
[0083] When processing I / O requests, multipath devices are configured to load-balance all paths within the optimal path group. If a path fails, I / O requests can still be processed as long as there are always available paths within the optimal path group. Only when all paths within the optimal path group fail will I / O requests be processed by paths within non-optimal path groups. This improves I / O request forwarding reliability and ensures the smooth delivery of targeted I / O requests.
[0084] S206: Send the target IO request to the target storage resource using the target path to access the target storage resource.
[0085] After polling and selecting the target path from the path set, the target IO request is sent to the target storage resource using the target path. For example, when the target path is polled and selected from the optimal path group, the target IO request is sent using the target path selected from the optimal path group, thereby enabling the storage host to access the target storage resource. When the target path is polled and selected from the non-optimal path group of the path set, the target IO request is sent using the target path selected from the non-optimal path group, thereby enabling the storage host to access the target storage resource.
[0086] See also Figure 3 , Figure 3 This is another implementation flow chart of a storage resource access method according to an embodiment of the present invention. The method may include the following steps:
[0087] S301: Receive a target IO request for accessing a target storage resource.
[0088] When a storage host needs to access a target storage resource, it generates a target IO request and sends the target IO request to the resource access management center. The resource access management center receives the target IO request for accessing the target storage resource.
[0089] S302: Searching for a parameter module in a parameter configuration file.
[0090] Pre-configure parameter modules in the tool software's multiipath.con configuration file. For example, you can set one or more of the default parameter module, the multipaths parameter module, and the devices parameter module. Upon receiving an I / O request to access the target storage resource, the tool searches for the parameter module in the configuration file.
[0091] S303: When the number of existing parameter modules is greater than 1, obtain the priority corresponding to each parameter module.
[0092] Priorities are pre-set for each parameter module in the parameter configuration file. For example, if the parameter configuration file contains the default parameter module, the multipath parameter module, and the devices parameter module, the multipath parameter module is given the highest priority, the devices parameter module is given the second highest priority, and the default parameter module is given the lowest priority. After finding the parameter modules in the parameter configuration file, if there are more than one parameter module, the priority of each parameter module is determined.
[0093] S304: Perform a sorting operation on each priority level to obtain a sorting result.
[0094] After determining that the number of existing parameter modules is greater than 1 and obtaining the priorities corresponding to the respective parameter modules, a sorting operation is performed on the priorities to obtain a sorting result.
[0095] Continuing with the above example, the default parameter module, the multipaths parameter module, and the devices parameter module are prioritized in descending order: multipaths parameter module, devices parameter module, and default parameter module.
[0096] S305: Select the parameter module with the highest priority according to the sorting result.
[0097] After sorting the priorities and obtaining the sorting results, the parameter module with the highest priority is selected according to the sorting results.
[0098] Continuing with the above example, if the parameter configuration file contains the default parameter module, the multipaths parameter module, and the devices parameter module, the multipaths parameter module with the highest priority is selected.
[0099] S306: Obtaining preset path selection parameters from the parameter module with the highest priority.
[0100] After selecting the parameter module with the highest priority according to the sorting results, the preset path selection parameters are obtained from the parameter module with the highest priority, thereby ensuring the orderly execution of path selection.
[0101] If the configuration file contains only the default parameter module, set the path_grouping_policy value to group_by_prio and the path_selector parameter value to round-robin 0.
[0102] If the multipaths parameter module is included in the configuration file, set the path_grouping_policy parameter to group_by_prio and the path_selector parameter to round-robin 0.
[0103] If the configuration file does not contain the multipaths parameter module but contains the devices parameter module, set the path_grouping_policy parameter to group_by_prio and the path_selector parameter to round-robin0.
[0104] A path_grouping_policy value of "group_by_prio" indicates that the path selection method is round-robin selection of all paths in the path set. A path_selector value of "round-robin 0" indicates that this path selection method is in effect. This embodiment of the present invention optimizes the combined values of the path_grouping_policy and path_selector parameters to achieve optimal system performance and efficiency.
[0105] S307: When the path selection mode is determined to be round-robin selection of paths in the path set according to the path selection parameters, a target path is obtained by polling and selecting from the path set.
[0106] After obtaining the preset path selection parameters from the parameter module with the highest priority, when the path selection mode is determined to be round-robin selection of paths in the path set according to the path selection parameters, the target path is obtained by polling from the path set.
[0107] In addition, when it is necessary to delete paths in the path set, the paths to be deleted can be identified and all the paths to be deleted can be deleted in a unified manner according to the identification information.
[0108] S308: Send the target IO request to the target storage resource using the target path to access the target storage resource.
[0109] Corresponding to the above method embodiment, the present invention further provides a storage resource access device. The storage resource access device described below and the storage resource access method described above can refer to each other.
[0110] See also Figure 4 , Figure 4 This is a structural block diagram of a storage resource access device according to an embodiment of the present invention. The device may include:
[0111] A request receiving unit 41 is configured to receive a target IO request for accessing a target storage resource;
[0112] The parameter acquisition unit 42 is used to acquire preset path selection parameters;
[0113] A path selection unit 43 is configured to select a target path from the path set by polling when the path selection mode is determined to be round-robin selection of the paths in the path set according to the path selection parameters;
[0114] The resource access unit 44 is configured to send a target IO request to a target storage resource using a target path, so as to access the target storage resource.
[0115] The storage resource access device provided by the present invention receives a target IO request for accessing a target storage resource; obtains preset path selection parameters; when the path selection method is determined to be a round-robin selection of each path in a path set according to the path selection parameters, the target path is selected from the path set by polling; and the target IO request is sent to the target storage resource using the target path to access the target storage resource. By presetting the path selection parameters indicating the path selection method, when the path selection method is determined to be a round-robin selection of each path in the path set according to the path selection parameters, the target path is selected from the path set by polling, and the target IO request is sent to the target storage resource using the target path. This allows for balanced use of the paths in the path set, avoids frequent calls to a specific path when the business volume is relatively large, and improves system performance.
[0116] In a specific embodiment of the present invention, the path selection unit 43 is specifically a module that selects a target path from a set of paths by polling according to a load balancing strategy.
[0117] In a specific embodiment of the present invention, the path selection unit 43 includes:
[0118] A judgment subunit, used to judge whether there is an available path in the optimal path group of the path set;
[0119] The path selection subunit is used to select a target path from the optimal path group by polling when it is determined that there are available paths in the optimal path group of the path set.
[0120] In a specific embodiment of the present invention, the path selection unit 43 is further configured to, when it is determined that no available path exists in the optimal path group of the path set, select a target path from the non-optimal path group of the path set by polling.
[0121] In a specific embodiment of the present invention, the parameter acquisition unit 42 includes:
[0122] The parameter module search subunit is used to search for the parameter module existing in the parameter configuration file;
[0123] The priority acquisition subunit is used to obtain the priority corresponding to each parameter module when the number of existing parameter modules is greater than 1;
[0124] The sorting result obtaining subunit is used to perform sorting operations on each priority level to obtain a sorting result;
[0125] The parameter module selection subunit is used to select the parameter module with the highest priority according to the sorting result;
[0126] The parameter acquisition subunit is used to obtain the preset path selection parameters from the parameter module with the highest priority.
[0127] In a specific embodiment of the present invention, the parameter acquisition unit 42 is specifically a unit for acquiring the path selection parameters that are effective through a service restart or refresh command.
[0128] In a specific embodiment of the present invention, the path selection unit 43 is further configured to select a preset target path from the path set when the path selection mode is determined to be selecting a designated path in the path set according to the path selection parameters.
[0129] Corresponding to the above method embodiment, see Figure 5 , Figure 5 This is a schematic diagram of a storage resource access device provided by the present invention, which may include:
[0130] Memory 332, for storing computer programs;
[0131] The processor 322 is configured to implement the steps of the storage resource access method of the above method embodiment when executing a computer program.
[0132] For details, please refer to Figure 6 , Figure 6A schematic diagram of the specific structure of a storage resource access device provided for this embodiment, which may vary greatly due to different configurations or performance, may include a processor (central processing unit, CPU) 322 (for example, one or more processors) and a memory 332, wherein the memory 332 stores one or more computer applications 342 or data 344. The memory 332 may be a temporary storage or a permanent storage. The program stored in the memory 332 may include one or more modules (not shown in the figure), each of which may include a series of instruction operations in the data processing device. Furthermore, the processor 322 may be configured to communicate with the memory 332 to execute a series of instruction operations in the memory 332 on the storage resource access device 301.
[0133] The storage resource access device 301 may further include one or more power supplies 326 , one or more wired or wireless network interfaces 350 , one or more input and output interfaces 358 , and / or one or more operating systems 341 .
[0134] The steps in the storage resource access method described above can be implemented by the structure of a storage resource access device.
[0135] Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:
[0136] Receive a target IO request for accessing a target storage resource; obtain preset path selection parameters; when the path selection method is determined to be polling selection of each path in the path set based on the path selection parameters, select the target path from the path set by polling; use the target path to send the target IO request to the target storage resource to access the target storage resource.
[0137] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which can store program codes.
[0138] For an introduction to the computer-readable storage medium provided by the present invention, please refer to the above method embodiment, and the present invention will not elaborate on it here.
[0139] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. References to the same or similar parts between the various embodiments are sufficient. The devices, apparatuses, and computer-readable storage media disclosed in the embodiments are described briefly because they correspond to the methods disclosed in the embodiments. For relevant details, refer to the description of the methods.
[0140] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the technical solutions and core concepts of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from the principles of the present invention, and such improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A storage resource access method, characterized in that: include: Receive a target IO request to access a target storage resource; Get the preset path selection parameters; The target path is selected from the path set according to the load balancing strategy; Sending the target IO request to the target storage resource using the target path to access the target storage resource; Determining whether there is an available path in the optimal path group of the path set; If so, poll and select the target path from the optimal path group; When it is determined that there is no available path in the optimal path group of the path set, the method further includes: A target path is obtained by round-robin selection from a non-optimal path group of the path set; Get the preset path selection parameters, including: Find the parameter module in the parameter configuration file; When the number of existing parameter modules is greater than 1, obtaining the priority corresponding to each of the parameter modules; Performing a sorting operation on each of the priorities to obtain a sorting result; Select the parameter module with the highest priority according to the sorting result; Get the preset path selection parameters from the parameter module with the highest priority.
2. The storage resource access method according to claim 1, wherein: Get the preset path selection parameters, including: Gets the path selection parameters that take effect after a service restart or refresh command.
3. A storage resource access device, characterized in that: The storage resource access method according to claim 1 comprises: A request receiving unit, configured to receive a target IO request for accessing a target storage resource; A parameter acquisition unit, used to acquire preset path selection parameters; A path selection unit is used to select a target path from the path set according to the load balancing strategy; A resource access unit, configured to send the target IO request to the target storage resource by using the target path, so as to access the target storage resource; The path selection unit includes: A judgment subunit, used to judge whether there is an available path in the optimal path group of the path set; A path selection subunit is used to select a target path from the optimal path group in a round-robin manner when it is determined that there is an available path in the optimal path group of the path set; The path selection unit is further configured to, when it is determined that no available path exists in the optimal path group of the path set, select a target path from the non-optimal path group of the path set in a round-robin manner; The parameter acquisition unit includes: The parameter module search subunit is used to search for the parameter module existing in the parameter configuration file; The priority acquisition subunit is used to obtain the priority corresponding to each parameter module when the number of existing parameter modules is greater than 1; The sorting result obtaining subunit is used to perform sorting operations on each priority level to obtain a sorting result; The parameter module selection subunit is used to select the parameter module with the highest priority according to the sorting result; The parameter acquisition subunit is used to obtain the preset path selection parameters from the parameter module with the highest priority.
4. A storage resource access device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the storage resource access method according to any one of claims 1 to 2 when executing the computer program.
5. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the storage resource access method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Method and system for accessing asynchronous logic unit
CN107340973A
Input / output I / O path determination method and device
CN110515564A