A method, apparatus, device, and storage medium for multi-path device detection.

By using a multi-factor scoring method, based on the data processing performance and processing capabilities of multi-path devices, the target path device with the highest rating is selected, which solves the problem of increased I/O request waiting time in existing technologies and achieves high-efficiency throughput optimization of storage networks.

CN115202580BActive Publication Date: 2025-11-14INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210900698.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2025-11-14
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

Existing multi-path device selection strategies fail to fully consider device performance and processing capabilities, resulting in increased I/O request wait times and making it difficult to optimize the throughput of storage networks.

Method used

Using a multi-factor scoring method, a score is calculated for each target path device based on the average time spent on data processing, the number of requests that did not perform data processing, and the number of failed operations. A table is then constructed to compare scores with ratings, and the target path device with the highest rating is selected for data processing.

Benefits of technology

Reduce I/O request latency, improve processing capacity, and enable users to adjust the storage network in a timely manner to enhance throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115202580B_ABST
    Figure CN115202580B_ABST
Patent Text Reader

Abstract

This application discloses a multipath device detection method, apparatus, device, and storage medium, relating to the field of storage network security technology. The method includes: pre-establishing multiple links between the server and the storage system; scanning and acquiring path devices corresponding to each link; aggregating target path devices carrying the same unique identifier to obtain multipath devices; performing data input / output operations on the multipath devices; selecting target path devices for data processing through a polling method; and then obtaining scores for each data processing operation of each target path device based on the weights of various standard metrics; determining the level of each target path device based on its score to achieve multipath device detection. Detecting and evaluating each target path device reduces I / O request latency, improves processing capacity, and allows users to immediately understand the performance of each target path device, enabling adjustments to the storage network and enhancing storage throughput.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of storage network security technology, and in particular to a method, apparatus, device, and storage medium for detecting multipath devices. Background Technology

[0002] With the development of modern information technology, servers and storage are increasingly working closely together, leading to higher requirements for the security and stability of storage networks during IT infrastructure operation. A single point of failure in a storage network, such as a switch or network card failure, can paralyze the entire network. To avoid single points of failure, highly reliable storage networks employ redundant designs for devices and components, and also utilize interconnection of multiple redundant paths to mitigate link failures. This redundancy design improves the overall reliability of the storage network and achieves higher performance. Meeting the high reliability and high performance requirements of storage networks through redundancy requires multipath technology. To avoid single points of failure and improve end-to-end reliability in data centers, redundant backups are needed for potential single points of failure. This redundancy should be implemented through cross-networking to achieve higher reliability, while also leveraging redundant paths for higher performance. Currently, the three main path device selection strategies in multipath software select devices based on three different dimensions. The Round-Robin algorithm prioritizes sending I / O (input / output) requests to all available path devices within the optimal path group. If no path device is available in the optimal path group, it then sends I / O requests to available path devices in non-optimal path groups. While this round-robin method ensures device balance, it doesn't consider the performance and processing capacity of each device. It's highly possible that one device has a gigabit network interface card (NIC) while others have 10 gigabit ones. The Queue Depth algorithm prioritizes sending I / O requests to the path device with the fewest outstanding I / O requests in the optimal path group. It focuses on the number of outstanding I / O requests on a path device but doesn't consider the time it takes for a path device to process an I / O request. The Service Time algorithm sends I / O to the path with the shortest service time, focusing on the time consumption of a single I / O. However, it only considers the most recent I / O and does not take into account the time consumption of all I / Os over a period of time, nor does it consider the number of I / Os that have not yet been completed on the device along that path. All three algorithms have their advantages and disadvantages, which makes it difficult for administrators to configure device selection strategies.

[0003] In summary, how to score multi-path devices based on multiple factors, detect and determine the highest-rated target path device, select the optimal target path device as much as possible when I / O occurs, reduce the waiting time of I / O requests, improve processing capacity, and enable users to grasp the performance of each target path device in a timely manner so as to adjust the storage network and enhance storage throughput is a technical problem to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a multi-path device detection method, apparatus, device, and storage medium, which can score multi-path devices based on multiple factors, detect and determine the target path device with the highest rating, and select the optimal target path device as much as possible when I / O occurs, thereby reducing the waiting time of I / O requests, improving processing capacity, and enabling users to grasp the performance of each target path device in a timely manner so as to adjust the storage network and enhance storage throughput. The specific solution is as follows:

[0005] Firstly, this application discloses a multi-path device detection method, including:

[0006] Multiple links are pre-established between the server and the storage system, and the path devices corresponding to the links are scanned and obtained;

[0007] Aggregate target path devices carrying the same unique identifier to obtain multi-path devices;

[0008] The multi-path device performs data input / output operations, and selects the target path device for data processing through a polling method. Then, based on the standard weights corresponding to the data processing, the scores corresponding to each data processing operation of each target path device are obtained.

[0009] The level of each target path device is determined based on the score of each target path device to achieve multi-path device detection.

[0010] Optionally, the aggregation of target path devices carrying the same unique identifier to obtain multi-path devices includes:

[0011] The multipath software is launched by a startup command, and target path devices carrying the same unique identifier are aggregated based on a preset path device grouping strategy to obtain multipath devices.

[0012] Optionally, before obtaining the score corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing, the method further includes:

[0013] By leveraging expert knowledge, weights are assigned to various data processing steps to generate a weight allocation table that characterizes the weights of each standard.

[0014] Optionally, obtaining the score corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing includes:

[0015] The scores for each data processing operation of each target path device are calculated based on the standard weights corresponding to the average time taken for input / output requests that have been processed, the standard weights corresponding to the input / output requests that have not been processed, and the standard weights corresponding to the number of input / output requests that failed to execute.

[0016] Optionally, the calculation of the score for each data processing operation of each target path device based on the standard weight corresponding to the average time spent on performed data processing, the standard weight corresponding to the input / output requests for which no data processing was performed, and the standard weight corresponding to the number of input / output requests for which the operation failed includes:

[0017] Obtain the number of input / output requests and the request duration of the data processing already performed, and calculate the average time score of the requests based on the number of requests and the request duration.

[0018] Optionally, before determining the level of each target path device based on the score of each target path device, the method further includes:

[0019] Construct a correlation between the scores and grades of path devices to obtain a corresponding score-grade table.

[0020] Optionally, the process of determining the level of each target path device based on the score of each target path device further includes:

[0021] The target path devices are classified into levels based on their scores and a table comparing scores with levels.

[0022] Secondly, this application discloses a multi-path device detection apparatus, comprising:

[0023] The device acquisition module is used to pre-establish multiple links between the server and the storage system, scan and acquire the path devices corresponding to the links;

[0024] The multi-device acquisition module is used to aggregate target path devices carrying the same unique identifier to obtain multi-path devices;

[0025] The score determination module is used to perform data input / output operations on the multi-path devices, select target path devices for data processing through a polling method, and then obtain the scores corresponding to each data processing operation of each target path device based on the standard weights of each data processing.

[0026] The device detection module is used to determine the level of each target path device based on the score of each target path device, so as to realize multi-path device detection.

[0027] Thirdly, this application discloses an electronic device, including:

[0028] Memory, used to store computer programs;

[0029] A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed multipath device detection method.

[0030] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed multipath device detection method.

[0031] As can be seen, this application discloses a multi-path device detection method, including: pre-establishing multiple links between the server and the storage system; scanning and acquiring path devices corresponding to the links; aggregating target path devices carrying the same unique identifier to obtain multi-path devices; performing data input / output operations on the multi-path devices, and selecting target path devices for data processing through a polling method, then obtaining scores corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing; determining the level of each target path device based on the score of each target path device, thereby realizing multi-path device detection. Thus, this application processes data by polling each target path device in the acquired multi-path devices to obtain the first batch of raw data, and then reprocesses and scores the raw data of each target path device based on the polling method and pre-set standard weights to evaluate each target path device. This allows for device selection during I / O, reducing I / O request waiting time, improving processing capacity, and enabling users to grasp the performance of each target path device immediately, so as to adjust the storage network and enhance storage throughput. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0033] Figure 1 This is a flowchart of a multi-path device detection method disclosed in this application;

[0034] Figure 2 This is a schematic diagram of a network connection between a server and a storage cluster disclosed in this application;

[0035] Figure 3 This is a flowchart of a specific multi-path device detection method disclosed in this application;

[0036] Figure 4 This is a schematic diagram of the structure of a multi-path equipment detection device disclosed in this application;

[0037] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0039] With the development of modern information technology, servers and storage are increasingly working closely together, leading to higher requirements for the security and stability of storage networks during IT infrastructure operation. In a storage network, a failure at any point, such as a switch or network card malfunction, can paralyze the entire network; this is called a single point of failure. To avoid single points of failure, highly reliable storage networks not only incorporate redundant designs for devices and components but also utilize interconnection of multiple redundant paths to mitigate link failures. This redundancy design improves the overall reliability of the storage network and achieves higher performance. Meeting the high reliability and high performance requirements of storage networks through redundancy requires multipath technology. To avoid single points of failure and improve end-to-end reliability in data centers, redundant backups are needed for potential single points of failure. This redundancy should be implemented through cross-networking to achieve higher reliability, while also leveraging redundant paths for higher performance. Currently, three mainstream path device selection strategies in multipath software select devices based on three different dimensions. The Round-Robin algorithm prioritizes polling all valid path devices within the optimal path group to send I / O. If no available path devices exist within the optimal path group, I / O is sent in a round-robin fashion to available path devices within non-optimal path groups. While this round-robin method ensures device balance, it doesn't consider the performance and processing capacity of each device. It's highly possible that one device has a gigabit network interface card (NIC) while others have 10 gigabit ones. The Queue Depth algorithm prioritizes sending I / O to the path device with the fewest pending I / O requests in the optimal path group, focusing on the number of pending I / O requests on a path device but neglecting the processing time of a single I / O. The Service Time algorithm sends I / O to the path with the shortest service time, emphasizing the time of a single I / O, but only considering the most recent I / O, not the time of all I / O requests over a period of time, nor the number of pending I / O requests on that path device. All three algorithms have their advantages and disadvantages, making it difficult for administrators to configure device selection strategies.

[0040] To this end, this application provides a multi-path device detection scheme that can score multi-path devices based on multiple factors, detect and determine the target path device with the highest rating, and select the optimal target path device as much as possible when I / O occurs, thereby reducing the waiting time of I / O requests, improving processing capacity, and enabling users to grasp the performance of each target path device in a timely manner so as to adjust the storage network and enhance storage throughput.

[0041] Reference Figure 1 As shown, this embodiment of the invention discloses a multi-path device detection method, including:

[0042] Step S11: Establish multiple links between the server and the storage system in advance, and scan and obtain the path devices corresponding to the links.

[0043] In this embodiment, refer to Figure 2 As shown, to avoid single points of failure during redundant backups, a cross-networking approach is used between application servers and storage devices to achieve higher reliability. For example, application server A and application server B access Inspur storage devices through different paths, thus forming a multi-path communication method. Due to the multi-path software, more than one physical path is used to access the storage device, and through fault tolerance, I / O traffic load balancing, and even finer-grained I / O scheduling strategies, higher availability and performance advantages are provided to the storage system. In a multi-path storage network environment, applications send I / O down to disk devices, and these I / Os can be distributed to different paths according to the physical topology of the storage network, allowing these paths to perform disk I / O operations simultaneously, thereby improving the I / O throughput of the storage network. Simultaneously, the multi-path software can handle various failure scenarios such as HBA card failure, link failure, and storage controller failure. In multi-path devices, the appropriate path device is selected based on the current I / O request.

[0044] In this embodiment, log in to the storage system and create hosts and volumes via command line or visual interface. Note that "host" here refers to a concept within the storage system, corresponding one-to-one with a real server. For iSCSI links, the server's IQN information must be filled in when creating a host. For FC links, the server's WWPN information must be filled in. Assume the link type is iSCSI protocol. Log in to the server and establish links with the storage system using the iscsadm command. There are typically multiple links. First, discover the target on the storage system using iscsadm –m discovery -t sendtargets -p ${target_ip}:${port}. The specific iscsadm command code for establishing a link with the storage system is as follows:

[0045] [root@openstackqueens~]#

[0046] [root@openstackqueens~]#iscsiadm–mdiscovery-t sendtargets–p100.7.46.45:3260

[0047] 100.7.46.45:3260,1iqn.2004-12.com.inspur:mcs.cluster100.7.46.165.node1

[0048] 172.16.2.2:3260.1iqn.2004-12.com.inspur:mcs.cluster100.7.46.165.node1

[0049] [root@openstackqueens~]#

[0050] [root@openstackqueens~]#

[0051] [root@openstackqueens~]#

[0052] Log in to the target using iscsiadm -m node-T${target_iqn}-p${target_ip}--login. The login code is as follows:

[0053] [root@openstackqueens~]#

[0054] [root@openstackqueens~]#iscsiad-m node–T iqn.2004-12.com.inspur:mcs.cluster 100.7.46.165.node1-p 100.7.46.45--login

[0055] Logging in to[iface:default,target:iqn.2004-12.cominspur:cs.cluster100.7.46.165.node,portal:100.7.46.45,3260](multiple)

[0056] Login to[iface:default,target:iqn.2004-12.com.inspur:mcs.cluster100.7.46.165.node1,portal:100.7.46.45,3260]successful.

[0057] [root@openstackqutens~]#

[0058] [root@openstackqueens~]#

[0059] The `iscsiadm-m session` command can be used to view established connections. The code for viewing connections is as follows:

[0060] [root@openstackqueens~]#

[0061] [root@openstackqueens~]#iscsiadm-m session

[0062] tcp:[5]100.7.46.45:3260,1iqn.2004-12.com.inspur:mcs.cluster100.7.46.165.node1(non-flash)

[0063] tcp:[6]100.7.46.36:3260,1iqn.2004-12.com.inspur:mcs.cluster100.7.46.165.node2(non-flash)

[0064] [root@openstackqueens~]#

[0065] [root@openstackqueens~]#

[0066] Step S12: Aggregate target path devices carrying the same unique identifier to obtain multi-path devices.

[0067] In this embodiment, after logging into the server, the command `echo '---'> / sys / class / scsi_host / ${hostName} / device / scsi_host / ${hostName} / scan` scans the directory ` / dev / disk / by-path / ` and discovers path devices. Assuming there are n links between the server and storage, after each volume on the storage is mapped to the server, n devices can be seen on the server, typically named `sdX`. Here, `sdX` path devices refer to each link mapping the volume to a path device after it is mapped to the host, for example, ` / dev / sdb`. Multipathing software aggregates these n devices into a single multipath device, typically named `dm-X`. Here, `dm-X` multipath device refers to DM-multipath aggregating multiple path devices into one multipath device, for example, ` / dev / dm-0`. If there are four links, then each volume corresponds to four path devices, for example, ` / dev / sdb`, ` / dev / sdc`, ` / dev / sdd`, and ` / dev / sde`. Multipathing software aggregates path devices while also grouping them for easier management and selection. Windows platform multipathing software does not allow configuring grouping policies and defaults to grouping according to the ALUA protocol. ALUA (Asymmetric Logical Unit Access) is a multipathing mode that includes explicit ALUA (EALUA) and implicit ALUA (IALUA). ALUA is a subset of the Target Port Group Support (TPGS) access model specified in the SPC3 (SCSI Primary commands-3) protocol, and can be used to handle multi-port access management of A / AA (Active / Active-Asymmetric) and A / P (Active / Passive) arrays. Linux platform multipathing software supports the following five grouping policies: failover, multibus, group_by_serial, group_by_prio, and group_by_node_name. Failover: Each path device is in a separate path group. Multibus: All path devices are in the same path group. `group_by_serial`: Groups devices by their serial number. `group_by_prio`: Groups devices by their priority. `group_by_node_name`: Groups devices by their target name.

[0068] In this embodiment, the multipath software is started via a startup command. Based on a preset path device grouping strategy, target path devices carrying the same unique identifier are aggregated to obtain multipath devices. It can be understood that, then, after logging into the server and starting the multipath software via the command `systemctl start multipathd`, multipathd will automatically aggregate devices with the same wwid into a single multipath device, for example: ` / dev / dm-0`. The path devices and multipath devices are shown in Table 1 below:

[0069] Table 1

[0070]

[0071] Step S13: Perform data input / output operations on the multi-path device, select the target path device for data processing through polling, and then obtain the score corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing.

[0072] In this embodiment, scores for each data processing operation of each target path device are calculated based on the standard weights corresponding to the average time spent on input / output requests that have undergone data processing, the standard weights corresponding to input / output requests that have not undergone data processing, and the standard weights corresponding to the number of input / output requests that have failed. This means obtaining the number of input / output requests and their time spent on the completed data processing, and calculating the average time spent as a score based on these data. The number of incomplete requests and the number of failed requests are counted, and scores are calculated based on the weight ratios of the incomplete requests and the failed requests to obtain the scores for the corresponding data processing operations. For example, the command `dd if= / dev / zero of= / dev / dm-0bs=1k count=100000` simulates I / O operations to / dev / dm-0, writing 1k of data each time for a total of 100,000 writes. Then, the scores for each factor are calculated in real time, and a round-robin method is used to select the path device to obtain the first batch of raw data. The number of I / O operations processed and the time taken for each path device are counted, and the average time is calculated. Assuming each path device executes 10 I / O requests, the time taken for each I / O request, the average time taken, and the weighted score are shown in Table 2 below:

[0073] Table 2

[0074]

[0075] The average time is calculated using a formula, which is as follows:

[0076]

[0077] Where i represents the i-th path device, with a value ranging from 1 to 4. k represents the k-th sample, with a value ranging from 1 to 10, and N represents the total number of samples, i.e., 10.

[0078] The average time spent corresponds to a score obtained through the time-score calculation formula, which is shown below:

[0079]

[0080] Where i represents the i-th path device. This represents the maximum average time taken over all time periods. This represents the minimum average time taken at all times.

[0081] In this embodiment, the score corresponding to the number of incomplete I / Os is calculated by the number of incomplete I / Os and the corresponding weight ratio. The number of incomplete I / Os and the score of incomplete I / Os on each path device are shown in Table 3 below:

[0082] Table 3

[0083]

[0084] The score corresponding to the number of incomplete I / O operations is obtained using the incomplete score calculation formula, as follows:

[0085]

[0086] Where i represents the i-th path device, y i This indicates the number of incomplete I / O operations at the current moment. This represents the maximum number of incomplete I / O operations at all times. This represents the minimum number of incomplete I / O operations at any given time.

[0087] In this embodiment, the score corresponding to the number of failed I / O operations is calculated by the number of failed I / O operations and the corresponding weight ratio. The number of failed I / O operations and the score of failed I / O operations on each path device are shown in Table 4 below:

[0088] Table 4

[0089]

[0090]

[0091] The score corresponding to the number of failed I / O operations is obtained using the formula for calculating the failure score, as follows:

[0092]

[0093] Where i represents the i-th path device, z i This indicates the number of I / O failures in the past hour. This represents the maximum number of I / O failures per hour. This represents the minimum number of I / O failures per hour.

[0094] In this embodiment, the total score for each target path device is calculated based on the average time obtained from the above steps, the score corresponding to the number of incomplete I / O operations, the score corresponding to the number of failed I / O operations, and the pre-set standard weights. The formula for calculating the total score is as follows:

[0095] F i =w1*F 1,i +w2*F 2,i +w3*F 3,i ;

[0096] Here, w1, w2, and w3 represent the pre-set standard weights corresponding to each individual factor. Once the individual factor scores of each target path device are determined, the total score of the current target path device can be calculated using the pre-set standard weights.

[0097] In this embodiment, before obtaining the scores corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing, the method further includes: allocating weights to each data processing operation using expert knowledge to generate a weight allocation table representing the standard weights. It is understood that when designing the factor weight allocation table, an expert group can be invited to conduct a thorough and objective weight allocation of each factor by distributing questionnaires to obtain the most realistic data possible. Then, the data is processed to obtain the weight of each factor. It should be noted that the total weight of each expert column is 100, meaning that experts need to allocate 100 to each factor; a larger number indicates a greater weight for that factor, and vice versa. The weight calculation formula is: Weight = Average / 100. After evaluation, the weight of factor 1 is 35%, the weight of factor 2 is 25%, and the weight of factor 3 is 40%. The factor weight table is shown in Table 5.

[0098] Table 5

[0099]

[0100]

[0101] Step S14: Determine the level of each target path device based on the score of each target path device to achieve multi-path device detection.

[0102] In this embodiment, after determining the score of the target path device, the level of each target path device is then determined, so as to understand the performance of each target path device in real time. This allows for the selection of a suitable target path device to handle new data requests based on the current target path device level.

[0103] As can be seen, this application discloses a multi-path device detection method, including: pre-establishing multiple links between the server and the storage system; scanning and acquiring path devices corresponding to the links; aggregating target path devices carrying the same unique identifier to obtain multi-path devices; performing data input / output operations on the multi-path devices, and selecting target path devices for data processing through a polling method, then obtaining scores corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing; determining the level of each target path device based on the score of each target path device, thereby realizing multi-path device detection. Thus, this application processes data by polling each target path device in the acquired multi-path devices to obtain the first batch of raw data, and then reprocesses and scores the raw data of each target path device based on the polling method and pre-set standard weights to evaluate each target path device. This allows for device selection during I / O, reducing I / O request waiting time, improving processing capacity, and enabling users to grasp the performance of each target path device immediately, so as to adjust the storage network and enhance storage throughput.

[0104] Reference Figure 3 As shown, this embodiment of the invention discloses a specific method for detecting multi-path devices. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:

[0105] Step S21: Establish multiple links between the server and the storage system in advance, and scan and obtain the path devices corresponding to the links.

[0106] Step S22: Aggregate target path devices carrying the same unique identifier to obtain multi-path devices.

[0107] Step S23: Perform data input / output operations on the multi-path device, select the target path device for data processing through polling, and then obtain the score corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing.

[0108] For more detailed processing procedures in steps S21, S22, and S23, please refer to the aforementioned disclosed embodiments; they will not be repeated here.

[0109] Step S24: Construct a correspondence between the scores of path devices and the levels of path devices to obtain a corresponding score-level correspondence table.

[0110] In this embodiment, the score for each device is calculated in real time based on three factors and weights. A table mapping scores to levels needs to be established; a higher level indicates higher priority, and vice versa. The score-level mapping table is shown in Table 6.

[0111] Table 6

[0112] Fraction grade [0,20) 1 [20,40) 2 [40,60) 3 [60,80) 4 [80,100] 5

[0113] As shown in the table, the total score of the path device is set with corresponding levels according to the rules in the table. It can be understood that the higher the score, the higher the level, which means that the current target path device has a stronger ability to process requests. In other words, when a new data request is added, the new data request will be assigned to the target path device with a high level detected by the multi-path device detection method.

[0114] Step S25: Based on the score of each target path device and the lookup table, classify the target path devices into levels and determine the level of each target path device to achieve multi-path device detection.

[0115] In this embodiment, it can be understood that after the scores of each factor for target path device B, target path device C, target path device D, and target path device E are determined, the total score of each target path device is calculated based on the scores of each factor and the assigned weights. For example, the total score of target path device B is F1 = 25% * 75.6 + 40% * 83.3 + 35% * 81.7 = 80.82; the total score of target path device C is F2 = 25% * 66.7 + 40% * 50 + 35% * 56.3 = 56.38; and the total score of target path device D is... Score F3 = 25% * 75.4 + 40% * 16.6 + 35% * 33.3 = 31.15; Total score of target path device E F4 = 25% * 42 + 40% * 33.3 + 35% * 12.5 = 28.20; Therefore, according to the relationship table between score and grade, the grade of F1 is 5, the grade of F2 is 3, the grade of F3 is 2, and the grade of F4 is 2. When a new I / O occurs, the device with the highest grade is selected to issue the I / O, that is, the path device A is selected at the current moment. In summary, the real-time rating of the device and the selection of the optimal path device are completed.

[0116] Therefore, this embodiment scores and rates path devices based on multiple factors, including average I / O latency, number of incomplete I / O operations, and number of I / O failures. First, a questionnaire is used to survey the importance of these three factors and evaluate the weight of each factor. Second, the I / O latency, number of incomplete I / O operations, and number of I / O failures on each device are statistically analyzed in real time, and the average I / O latency is calculated. Then, the devices are scored and rated based on the values ​​and weights of the three factors. Finally, when selecting a device, the device with the highest rating is prioritized to maximize the selection of the optimal device when I / O occurs, reducing the waiting time for I / O requests and improving processing capacity.

[0117] Reference Figure 4 As shown, an embodiment of the present invention discloses a multi-path device detection apparatus, comprising:

[0118] The device acquisition module 11 is used to pre-establish multiple links between the server and the storage system, scan and acquire the path devices corresponding to the links;

[0119] The multi-device acquisition module 12 is used to aggregate target path devices carrying the same unique identifier to acquire multi-path devices.

[0120] The score determination module 13 is used to perform data input / output operations on the multi-path device, select the target path device for data processing through a polling method, and then obtain the score corresponding to each data processing operation of each target path device based on the standard weights of each data processing.

[0121] The device detection module 14 is used to determine the level of each target path device based on the score of each target path device, so as to realize multi-path device detection.

[0122] As can be seen, this application discloses a multi-path device detection method, including: pre-establishing multiple links between the server and the storage system; scanning and acquiring path devices corresponding to the links; aggregating target path devices carrying the same unique identifier to obtain multi-path devices; performing data input / output operations on the multi-path devices, and selecting target path devices for data processing through a polling method, then obtaining scores corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing; determining the level of each target path device based on the score of each target path device, thereby realizing multi-path device detection. Thus, this application processes data by polling each target path device in the acquired multi-path devices to obtain the first batch of raw data, and then reprocesses and scores the raw data of each target path device based on the polling method and pre-set standard weights to evaluate each target path device. This allows for device selection during I / O, reducing I / O request waiting time, improving processing capacity, and enabling users to grasp the performance of each target path device immediately, so as to adjust the storage network and enhance storage throughput.

[0123] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0124] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the multipath device detection method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0125] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0126] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0127] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0128] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the multipath device detection method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0129] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned multipath device detection method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0130] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0131] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can implement the described functions using different methods for each specific application, but such implementation should not be considered beyond the scope of this application. The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. Software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.

[0132] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0133] The foregoing has provided a detailed description of a multipath device detection method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for detecting multi-path devices, characterized in that, include: Multiple links are pre-established between the server and the storage system, and the path devices corresponding to the links are scanned and obtained; Aggregate target path devices carrying the same unique identifier to obtain multi-path devices; The multi-path device performs data input / output operations, and selects the target path device for data processing through a polling method. Then, based on the standard weights corresponding to the data processing, the scores corresponding to each data processing operation of each target path device are obtained. The level of each target path device is determined based on the score of each target path device to achieve multi-path device detection; Before obtaining the scores corresponding to each data processing operation of each target path device based on the standard weights corresponding to the data processing, the method further includes: By leveraging expert knowledge, weights are assigned to various data processing methods to generate a weight allocation table that represents the weights of each standard. The score for each data processing operation of each target path device is obtained based on the standard weights corresponding to the data processing, including: The scores for each data processing operation of each target path device are calculated based on the standard weights corresponding to the average time of input / output requests that have been processed, the standard weights corresponding to input / output requests that have not been processed, and the standard weights corresponding to the number of input / output requests that failed to execute.

2. The multi-path device detection method according to claim 1, characterized in that, The aggregation of target path devices carrying the same unique identifier to obtain multi-path devices includes: The multipath software is launched by a startup command, and target path devices carrying the same unique identifier are aggregated based on a preset path device grouping strategy to obtain multipath devices.

3. The multi-path device detection method according to claim 1, characterized in that, The score for each data processing operation of each target path device is calculated based on the standard weight corresponding to the average time of executed data processing, the standard weight corresponding to the input / output requests for which data processing was not executed, and the standard weight corresponding to the number of input / output requests for which the operations failed. This includes: Obtain the number of input / output requests and the request duration of the data processing already performed, and calculate the average time score of the requests based on the number of requests and the request duration.

4. The multi-path device detection method according to claim 1, characterized in that, Before determining the level of each target path device based on the score of each target path device, the method further includes: Construct a correlation between the scores and grades of path devices to obtain a corresponding score-grade table.

5. The multi-path device detection method according to any one of claims 1 to 4, characterized in that, The process of determining the level of each target path device based on the score of each target path device also includes: The target path devices are classified into levels based on their scores and a table comparing scores with levels.

6. A multi-path equipment detection device, characterized in that, include: The device acquisition module is used to pre-establish multiple links between the server and the storage system, scan and acquire the path devices corresponding to the links; The multi-device acquisition module is used to aggregate target path devices carrying the same unique identifier to obtain multi-path devices; The score determination module is used to perform data input / output operations on the multi-path devices, select target path devices for data processing through a polling method, and then obtain the scores corresponding to each data processing operation of each target path device based on the standard weights of each data processing. The device detection module is used to determine the level of each target path device based on the score of each target path device, so as to realize multi-path device detection; The multi-path device detection device is also used to allocate weights to various data processing tasks using expert knowledge, so as to generate a weight allocation table to characterize the weights of various standards. The score determination module is specifically used to calculate the score corresponding to each data processing operation of each target path device based on the standard weight corresponding to the average time of input / output requests that have performed data processing, the standard weight corresponding to input / output requests that have not performed data processing, and the standard weight corresponding to the number of input / output requests that have failed to perform operations.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the multipath device detection method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the multipath device detection method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method, device and equipment for judging grade of repaired solid state disk, and readable medium

    CN112506725A

  • Path replacement method and device

    CN112650440A