Interface card management method, computer equipment, storage medium and program product

By generating a disable flag on the storage device and automatically isolating the transmission path using multipath software, the problem of low efficiency in manually isolating IO interface card paths by users is solved, achieving efficient and accurate IO interface card management and ensuring the continuity of host services.

CN120909971AActive Publication Date: 2025-11-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511440177.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2025-11-07
Estimated Expiration
2045-10-10

AI Technical Summary

Technical Problem

In existing technologies, manually isolating the paths of the I/O interface cards to be managed by users is inefficient and prone to errors, affecting the continuity of host services.

Method used

By generating a disable flag in the storage device, the host is notified of the transmission path to be isolated, and the host uses multipath software to automatically isolate the transmission path to be isolated, thereby realizing the automatic management of the IO interface card.

Benefits of technology

It improves operational efficiency and accuracy, reduces the need for users to operate on the host, and ensures the continuity of host services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909971A_ABST
    Figure CN120909971A_ABST
Patent Text Reader

Abstract

The invention discloses an interface card management method, computer equipment, a storage medium and a program product, and relates to the technical field of data centers, and the interface card management method comprises the following steps: starting a first error request processing flow according to a marked first access request, and if a forbidden identifier is equal to a first preset value, starting a second error request processing flow; and isolating the to-be-isolated transmission path by using the first error request processing flow. And the storage device determines a transmission path to be isolated and generates a forbidden identifier of the transmission path to be isolated. The problems that a user manually isolates the path of the to-be-managed IO interface card, the efficiency is low, and errors are prone to occurring can be solved. The method comprises the following steps: realizing a function of disabling an interface card in a storage device, and informing a host of the current existence of a to-be-disabled interface card and a to-be-isolated transmission path through a disabling identifier; in the host, the transmission path to be isolated is automatically isolated through multi-path software. The host efficiently isolates the to-be-isolated transmission path, and a user does not need to operate on the host, so that the operation and maintenance efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data centers, and in particular to an interface card management method, computer equipment, a storage medium and a program product. BACKGROUND

[0002] In a data center, it is a common interface card management operation to maintain an IO (Input / Output) interface card on a storage device or to replace the hardware of the IO interface card. However, the above operation may cause the IO request of a host to be unable to be timely issued to the storage device. Although multi-path software is installed on the host to enable the IO request to be issued to the storage device through other available paths, the multi-path software often needs to wait until the IO request times out on the original path before issuing the IO request to the storage device through a new path. The timeout time is often several seconds long, and there is a short IO request interruption during this period, thereby affecting the host business.

[0003] In order to reduce the impact on the host business, the user currently needs to manually isolate the paths of a storage volume corresponding to a to-be-managed IO interface card on the host through the multi-path software when the host business is not busy. Subsequently, the multi-path software will not issue an IO request through these paths, but will switch to other available paths. However, in a data center, a server maps many storage volumes, and there are many paths between each storage volume and a storage device. The user needs to manually isolate the paths corresponding to the original IO interface card and re-scan the new paths. The above method of managing the IO interface card is inefficient and prone to errors.

[0004] Therefore, the related art has the problem that the user manually isolates the paths of a to-be-managed IO interface card, which is inefficient and prone to errors. SUMMARY

[0005] Therefore, the present application provides an interface card management method, computer equipment, a storage medium and a program product to solve the problem that the user manually isolates the paths of a to-be-managed IO interface card, which is inefficient and prone to errors.

[0006] In a first aspect, the present application provides an interface card management method, which is applied to a host. The method comprises: In a case where a marked first access request and a disable identifier sent by a storage device are received, a first error request processing flow is started according to the marked first access request, wherein the marked first access request is obtained by marking the first access request as failed in a case where a transmission path corresponding to the first access request exists a disable identifier, and the disable identifier is generated by the storage device for a to-be-isolated transmission path. According to the first error request handling process, determine whether the disabled flag is equal to the first preset value; When the disable flag is equal to the first preset value, the transmission path to be isolated is determined according to the first error request handling process, and the transmission path to be isolated is isolated. The transmission path to be isolated is the transmission path of the first storage volume, and the first storage volume is the storage volume associated with the interface card to be disabled.

[0007] Secondly, this application provides an interface card management method, which is applied to a storage device, and the method includes: If there is an interface card to be disabled, determine the first storage volume associated with the interface card to be disabled; The transmission path of the first storage volume is used as the transmission path to be isolated, and a disable flag is generated for the transmission path to be isolated. Upon receiving the first access request from the host, determine whether there is a disabled flag on the transmission path corresponding to the first access request; If a disabled flag exists on the transmission path corresponding to the first access request, the first access request is marked as failed, and the marked first access request is obtained. The first access request after being marked and the disable flag are sent to the host. The first access request after being marked is used to instruct the host to start the first error request processing procedure. The first error request processing procedure is used to determine whether the disable flag is equal to the first preset value. If the disable flag is equal to the first preset value, the transmission path to be isolated is determined and the transmission path to be isolated is isolated.

[0008] Thirdly, this application provides an interface card management device, which is deployed on a host computer and includes: The process initiation module is used to initiate a first error request handling process based on the first access request after receiving the first access request after being marked and the disable flag sent by the storage device. The first access request after being marked is obtained after marking the first access request as failed when the transmission path corresponding to the first access request has a disable flag. The disable flag is generated by the storage device for the transmission path to be isolated. The first judgment module is used to determine whether the disabled flag is equal to the first preset value according to the first error request processing flow; The first path isolation module is used to determine the transmission path to be isolated according to the first error request processing flow when the disable flag is equal to the first preset value, and to isolate the transmission path to be isolated. The transmission path to be isolated is the transmission path of the first storage volume, and the first storage volume is the storage volume associated with the interface card to be disabled.

[0009] In a fourth aspect, the present application provides an interface card management apparatus, which is deployed in a storage device, and comprises: a storage volume determination module, configured to determine a first storage volume associated with the interface card to be disabled in the case that there is an interface card to be disabled; an identification generation module, configured to take a transmission path of the first storage volume as a transmission path to be isolated, and generate a disable identification of the transmission path to be isolated; a second determination module, configured to determine whether a transmission path corresponding to a first access request sent by a host exists a disable identification in the case that the first access request is received; a request marking module, configured to mark the first access request as failed in the case that the transmission path corresponding to the first access request exists the disable identification, to obtain a marked first access request; a second path isolation module, configured to send the marked first access request and the disable identification to the host, wherein the marked first access request is used to instruct the host to start a first error request processing flow, and the first error request processing flow is used to determine whether the disable identification is equal to a first preset value, and in the case that the disable identification is equal to the first preset value, determine the transmission path to be isolated, and isolate the transmission path to be isolated.

[0010] In a fifth aspect, the present application provides a computer device, comprising a memory and a processor, which are in communication connection with each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the interface card management method of the first aspect or any of the corresponding embodiments thereof, or the interface card management method of the second aspect or any of the corresponding embodiments thereof.

[0011] In a sixth aspect, the present application provides a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the interface card management method of the first aspect or any of the corresponding embodiments thereof, or the interface card management method of the second aspect or any of the corresponding embodiments thereof.

[0012] In a seventh aspect, the present application provides a computer program product, which comprises computer instructions, and the computer instructions are used to make a computer execute the interface card management method of the first aspect or any of the corresponding embodiments thereof, or the interface card management method of the second aspect or any of the corresponding embodiments thereof.

[0013] According to the application, after receiving the marked first access request and the disabling identifier sent by the storage device, the first error request processing flow is started according to the marked first access request, and if the disabling identifier is equal to the first preset value, the first error request processing flow is used to isolate the transmission path to be isolated. In the case that there is an interface card to be disabled, the storage device first determines the first storage volume associated with the interface card to be disabled, sets the transmission path of the first storage volume as the transmission path to be isolated, and finally generates the disabling identifier of the transmission path to be isolated. The problem that the user manually isolates the path of the IO interface card to be managed, which is inefficient and prone to errors, can be solved. The method realizes the function of disabling the interface card in the storage device, and notifies the host that there is an interface card to be disabled and a transmission path to be isolated through the disabling identifier; in the host, the multi-path software is used to automatically isolate the transmission path to be isolated. The host efficiently isolates the transmission path to be isolated, and does not need to be operated on the host, thereby improving the operation and maintenance efficiency and accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the specific embodiments or related art of the present application, the drawings needed to be used in the specific embodiments or related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0015] Figure 1 is an architecture diagram of a fiber channel storage area network according to an embodiment of the present application; Figure 2 is a flowchart of an interface card management method applied to a host according to an embodiment of the present application; Figure 3 is a flowchart of an interface card management method applied to a storage device according to an embodiment of the present application; Figure 4 is a structural block diagram of an interface card management device deployed in a host according to an embodiment of the present application; Figure 5 is a structural block diagram of an interface card management device deployed in a storage device according to an embodiment of the present application; Figure 6 is a hardware structure diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0016] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0018] It should be noted that, in the description of the present application, the terms "comprise", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0019] In order for those skilled in the art to better understand the present application, the following will further describe the present application with reference to the drawings and specific embodiments.

[0020] At present, FC-SAN (Fibre Channel Storage Area Network) is the preferred solution for storage network in data center, and FC-SAN is a dedicated high-speed storage network built by Fibre Channel Protocol (FCP), which aims to solve the poor scalability and bandwidth bottleneck problem of traditional direct-attached storage. Therefore, each server and storage device in the data center is configured with an IO interface card, and these IO interface cards are connected with fiber switches through fiber lines to jointly form a dedicated storage network. At the same time, the storage device provides a matching multi-path software, and the multi-path software refers to a software capable of transmitting IO requests through multiple network paths, which is different from single-path software in that single-path software can only transmit IO requests through a network path, while multi-path software can use multiple network paths simultaneously.

[0021] Users deploy multipathing software on their business hosts, and upper-layer applications use this software for read / write I / O. The multipathing software automatically identifies all physical paths pointing to the same storage volume, aggregating multiple paths for a single storage volume into a single multipathing device (vdisk). When a business host sends a read / write I / O request to this storage volume, the multipathing software automatically selects the optimal path to transmit the I / O request. Furthermore, when one or more paths become unavailable, the multipathing software can perform failover within seconds, switching the I / O request to a backup path, thus ensuring business continuity. Figure 1 As shown, the host sends I / O requests to the storage device through the Fibre Channel Storage Area Network (SDN). The host uses multipathing software to aggregate multiple paths of a storage volume into a single multipathing device. The multipathing software then transmits the I / O requests from the application through the multipathing device and multipath transfer. Additionally, the host connects to the Fibre Channel SDN via I / O interface cards such as Host Bus Adapter (HBA), including Host Bus Adapter 1 and Host Bus Adapter 2. The storage device also connects to the Fibre Channel SDN via I / O interface cards such as Bus Adapter 3 and Host Bus Adapter 4. The storage device controls Bus Adapter 3 and Host Bus Adapter 4 through Controller 1 and Controller 2, respectively.

[0022] Upgrading or replacing the I / O interface card (I / O card) on a storage device can cause I / O requests from the host to be delayed, temporarily impacting host operations – a significant drawback for customers. While multipathing software installed on the host can route I / O requests to the storage device via other available paths, this software waits until the I / O request times out on the original path before rerouting it to the new path, leading to I / O interruptions. Currently, when upgrading or replacing an I / O I / O card, users must manually isolate the path of the I / O I / O card to the corresponding storage volume on the host using multipathing software. Once a path is isolated, the multipathing software will not reroute I / O requests through that path. In data centers, many servers use the same storage device, and each server maps to multiple storage volumes. Each storage volume has numerous transmission paths to the storage device. Users must accurately identify which paths correspond to the I / O I / O cards requiring maintenance, a highly inefficient and error-prone process. Additionally, if the I / O interface card on the storage device is replaced, the path corresponding to the original interface card on the server will no longer be available. Users will need to manually delete the path corresponding to the original interface card on the server and rescan the disk to identify the new path.

[0023] Based on the above, the embodiment of the present application provides an interface card management method, which realizes the functions of disabling and enabling IO interface cards in a storage device; the storage device notifies the host of the available state of the IO interface card through an asynchronous event, and further, the storage device provides a mechanism to inform the host of the port identification of the IO interface card. In the host, the multi-path software realizes automatic isolation or recovery of all transmission paths related to the maintained interface card on the host. For the scenario that the storage device replaces the IO interface card, the multi-path software can automatically delete the old isolated transmission path and re-scan the new path. Further, the host can obtain the basic information and state of all ports of the IO interface card of the storage device through a SCSI (Small Computer System Interface) command. The multi-path software of the host automatically isolates the corresponding transmission path in the host through the negotiation mechanism with the storage device. Meanwhile, after the IO interface card is maintained or replaced, the storage device can notify the multi-path software to recover the previously isolated transmission path or delete the isolated transmission path from the host and re-scan the new path. In this way, the isolation, recovery and re-scanning of the transmission path can be efficiently completed without the need of user operation on the host, thereby improving the operation and maintenance efficiency and accuracy.

[0024] According to the embodiment of the present application, an interface card management method applied to a host is provided. It should be noted that the steps shown in the flowchart can be executed in a computer system such as a group of computer executable instructions, for example, a computer, a server, etc., and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown herein.

[0025] In the embodiment, an interface card management method applied to a host is provided, Figure 2 is a flowchart of the interface card management method according to the embodiment of the present application, as Figure 2 shown, the flow includes the following steps: Step S201, in the case of receiving the tagged first access request and the disable identification sent by the storage device, starting a first error request processing flow according to the tagged first access request, wherein the tagged first access request is obtained by tagging the first access request as failed in the case that the first access request corresponds to a transmission path with a disable identification, and the disable identification is generated by the storage device for the transmission path to be isolated.

[0026] Specifically, after a user selects an interface card to be disabled on a storage interface and clicks a disable button, the storage device determines the interface card to be disabled, for example, an IO interface card to be disabled, and the storage interface is an interface for controlling the storage device. After determining the interface card to be disabled, the storage device determines a first storage volume associated with the interface card to be disabled, and the host accesses the first storage volume by transmitting an IO request through the interface card to be disabled. The storage device sets a transmission path of the first storage volume as a transmission path to be isolated.

[0027] The storage device generates a disable identifier for the transmission path to be isolated, and the disable identifier is used to notify the host that the storage device currently has the interface card to be disabled. For example, the storage device sets a disable identifier on all transmission paths of all storage volumes, and when the host transmits an IO request through any transmission path, the disable identifier is received. The storage device generates the disable identifier only on the transmission path to be isolated. The storage device sets the disable identifier on a transmission path set in advance. The disable identifier is, for example, UA (Unit Attention) information, and a Sense Key (error type) in the UA information is a value agreed to represent that the IO interface card is disabled. In the SCSI protocol, the UA information is a mechanism for a device to report an abnormal state or an environmental change to a host, and is used to notify the host that an event that needs attention occurs. The UA information is transmitted through a SENSE DATA (detection data) field, and its format complies with the specification of the SCSI protocol. The core structure includes a three-level coding system of Sense Key (error type), ASC (additional sense code), and ASCQ (additional sense code qualifier).

[0028] When the host has a first access request sent to a storage volume through a certain link, the storage device checks whether the transmission path for transmitting the first access request has a disable identifier. The first access request is, for example, an IO request. If the transmission path has the disable identifier, the storage device marks the IO request as failed, and returns the disable identifier to the host along with the marked first access request.

[0029] The storage device sends the disable identifier to the host, for example, the storage device directly sends the disable identifier to the host; after receiving an IO request sent by the host, the disable identifier is added to a response message of the IO request and sent to the host; after receiving an IO request sent by the host, the IO request is marked as failed, and the disable identifier is returned to the host along with the IO.

[0030] In step S202, it is judged whether the disable identifier is equal to a first preset value according to a first error request processing flow.

[0031] Specifically, the multi-path software in the host isolates the transmission path to be isolated and makes it offline. The offline transmission path will not transmit an IO request in the future.

[0032] In a case where the host receives the marked first access request and the disable identifier sent by the storage device, the multi-path driver in the host parses the marked first access request and the disable identifier, judges whether the disable identifier is equal to a first preset value, and the first preset value is, for example, a value agreed to represent that the IO interface card is disabled in a sense key of the disable identifier. In a case where the disable identifier is equal to the first preset value, a first error request processing flow is started according to the marked first access request, and the first error request processing flow is, for example, a sub-flow of IO request error processing.

[0033] In a case where the disable identifier is equal to the first preset value, a to-be-isolated transmission path is determined according to the first error request processing flow, and the to-be-isolated transmission path is isolated, wherein the to-be-isolated transmission path is a transmission path of a first storage volume associated with the to-be-disabled interface card.

[0034] Specifically, after the host receives the disable identifier, it is determined that there is a to-be-disabled interface card in the current storage device. According to the first error request processing flow, a to-be-isolated transmission path is determined, for example, the host obtains all port information of the to-be-disabled interface card by using the first error request processing flow, and judges whether each transmission path in the multi-path device contains the port information in turn, and sets the transmission path containing the port information as the to-be-isolated transmission path. The to-be-isolated transmission path is isolated and offline. The offline transmission path will not transmit IO requests in the future.

[0035] The interface card management method provided in the embodiment includes the following steps: after receiving the marked first access request and the disable identifier sent by the storage device, a first error request processing flow is started according to the marked first access request; if the disable identifier is equal to a first preset value, the to-be-isolated transmission path is isolated by using the first error request processing flow. The storage device first determines a first storage volume associated with the to-be-disabled interface card, sets a transmission path of the first storage volume as the to-be-isolated transmission path, and finally generates a disable identifier of the to-be-isolated transmission path. The method realizes the function of disabling the interface card in the storage device, and notifies the host that there is a to-be-disabled interface card and a to-be-isolated transmission path through the disable identifier; in the host, the to-be-isolated transmission path is automatically isolated by using the multi-path software. The host efficiently isolates the to-be-isolated transmission path without the need for user operation on the host, thereby improving the operation and maintenance efficiency and accuracy. The problem that the user manually isolates the path of the to-be-managed IO interface card, which is inefficient and prone to errors, is solved.

[0036] As an optional embodiment, determining the to-be-isolated transmission path according to the first error request processing flow includes: According to the first error request processing procedure, a first port information query instruction is generated and sent to the storage device, wherein the first port information query instruction is used to obtain the first port identifier of the interface card to be disabled from the storage device. The associated transmission path of the host is obtained, and the associated transmission path corresponding to the port identifier is taken as the to-be-isolated transmission path.

[0037] Specifically, in the first error request processing procedure, the host generates a first port information query instruction, for example, a SCSI instruction, by using the multi-path software, and sends the first port information query instruction to the storage device to obtain the first port identifier of the interface card to be disabled, for example, the WWPN (World Wide Port Name) value of all ports on the disabled IO interface card, and stores the first port identifier in a list, denoted as list_1. The WWPN is a globally unique identifier of a Fibre Channel (FC) port.

[0038] The command descriptor of the SCSI instruction can adopt a 16-byte extended CDB (Container Database) structure, as shown in Table 1.

[0039] Table 1 Command descriptor of SCSI instruction

[0040] After receiving the first port information query instruction, the storage device returns IO interface card state information. The format of the IO interface card state information of the storage device adopts a hierarchical structure, including global information (fixed 12 bytes) + port information list (22 bytes for each port). The structure of the global information of the IO interface card state information is shown in Table 2, and the structure of the port information list is shown in Table 3. The host determines the first port identifier according to the returned IO interface card state information.

[0041] Table 2 Global information

[0042] Table 3 Port information list

[0043] The host traverses all the multipath devices on the host by using the multipath software, traverses all the associated transmission paths of each multipath device, obtains the associated transmission path corresponding to the port identifier as the first port identifier from the associated transmission path, and takes the associated transmission path as the transmission path to be isolated, for example, if the value of the WWPN of the associated transmission path is within the range of the list_1 list, the path is determined as the associated path of the disabled IO interface card on the storage, that is, the transmission path to be isolated. The host isolates the transmission path to be isolated by using the multipath software, and the offline path will not bear IO in the future.

[0044] In addition, the multipath software switches the first access request marked last to other available paths and reissues the first access request to the storage device.

[0045] In the embodiment, the corresponding path of the storage IO interface on the host is automatically isolated through the storage and the function enhancement of the multipath software, and through the negotiation mechanism of the multipath software and the storage. The entire process does not require manual operation on the host, reduces the workload of the operation and maintenance personnel, improves the operation and maintenance efficiency, and also guarantees the continuity of the host business.

[0046] As an optional embodiment, the method further includes: In the case where the enable identifier sent by the storage device is received, the transmission path to be recovered is determined according to the enable identifier, the transmission path to be recovered is the transmission path of the second storage volume, and the enable identifier is generated by the storage device for the transmission path to be recovered. The second storage volume is determined in the storage device in the case where the interface card to be enabled exists; The isolation of the transmission path to be isolated is released, and the transmission path to be recovered is enabled.

[0047] Specifically, after the user selects the interface card to be enabled on the storage interface and clicks the “enable” button, the storage device determines the interface card to be enabled, for example, the IO interface card that needs to be enabled. After determining the interface card to be enabled, the storage device determines the second storage volume associated with the interface card to be enabled in the storage device, for example, the storage volume that needs to transmit data through the interface card to be enabled. The storage device sets the transmission path of the second storage volume as the transmission path to be recovered.

[0048] The storage device generates an enable identifier for the transmission path to be recovered. The enable identifier is used to notify the host that the storage device currently has the interface card to be enabled, for example, the storage device sets an enable identifier on all transmission paths of all storage volumes. When the host transmits an IO request through any transmission path, the enable identifier is received. The storage device generates the enable identifier on all transmission paths except the transmission path to be recovered. The enable identifier is, for example, a device attention information, and the error type information in the attention information is a value agreed for enabling the IO interface card of the storage.

[0049] The storage device sends the enable identifier to the host, for example: the storage device directly sends the enable identifier to the host; after receiving the IO request sent by the host, the enable identifier is added in the response message of the IO request and sent to the host; after receiving the IO request sent by the host, the IO request is marked as failed, and the enable identifier is returned to the host along with the IO request.

[0050] After the host receives the enable identifier, it is determined that there is a to-be-enabled interface card in the current storage device. The to-be-recovered transmission path is determined according to the enable identifier, for example: the host obtains all port information of the to-be-enabled interface card, and sequentially judges whether each transmission path in the multi-path device contains the above-mentioned port information, and sets the transmission path containing the above-mentioned port information as the to-be-recovered transmission path. The multi-path software will unseal the path and restore it online.

[0051] In the embodiment, the multi-path software in the host is used to automatically isolate or restore all transmission paths related to the maintained interface card on the host. At the same time, after the IO interface card is maintained or replaced, the storage device can notify the multi-path software to restore the previously isolated transmission path. The transmission path is efficiently restored without the need for user operation on the host.

[0052] As an optional embodiment, the to-be-recovered transmission path is determined according to the enable identifier, comprising: In the case of receiving the marked second access request and the enable identifier sent by the storage device, it is judged whether the enable identifier is equal to the second preset value; In the case that the enable identifier is equal to the second preset value, a second error request processing flow is started according to the marked second access request; According to the second error request processing flow, a second port information query instruction is generated, and the second port information query instruction is sent to the storage device, wherein the second port information query instruction is used to obtain a second port identifier of the to-be-enabled interface card from the storage device; Obtain the isolated transmission path of the host, and set the transmission path corresponding to the second port identifier in the isolated transmission path as the to-be-recovered transmission path.

[0053] Specifically, when the second access request, for example: IO request, is sent to the storage volume through a certain link on the host, the storage device checks whether the transmission path for transmitting the first access request has an enable identifier. If the transmission path has an enable identifier, the storage device will mark the IO request as failed, and return the enable identifier to the host along with the marked second access request.

[0054] The host receives the marked second access request and the enable identification sent by the storage device, and the multi-path driver in the host parses the marked second access request and the enable identification, judges whether the enable identification is equal to a second preset value, and the second preset value is, for example, a value of a sense key of the enable identification agreed by the storage enable IO interface card. In the case where the enable identification is equal to the second preset value, a second error request processing flow is started according to the marked second access request, and the second error request processing flow is, for example, a sub-flow of the IO request error processing.

[0055] In the second error request processing flow, the host generates a second port information query instruction, for example, a SCSI instruction, by using the multi-path software, and sends the second port information query instruction to the storage device to obtain the second port identification of the interface card to be enabled from the storage device, for example, the WWPN value of all ports of the enabled IO interface card, and stores the second port identification in a list, which is recorded as list_2.

[0056] After receiving the second port information query instruction, the storage device returns the IO interface card state information. The format of the IO interface card state information of the storage device adopts a hierarchical structure, which includes global information (fixed 12 bytes) + port information list (22 bytes for each port). The host determines the second port identification according to the returned IO interface card state information.

[0057] The host traverses all multi-path devices on the host by using the multi-path software, and for each multi-path device, traverses all isolated transmission paths thereof, and takes the transmission path corresponding to the second port identification in the isolated transmission path as a transmission path to be recovered, for example, if the value of the WWPN of the isolated transmission path is within the range of the list_2 list, the isolated transmission path is determined as the associated path of the enabled IO interface card on the storage, that is, the transmission path to be recovered. The host uses the multi-path software to unisolate the path and restore it online.

[0058] In addition, the multi-path software switches the previous marked second access request to other available paths and sends it to the storage device again.

[0059] In the embodiment, the multi-path software in the host is used to automatically isolate or recover all transmission paths related to the maintained interface card on the host. At the same time, after the IO interface card is maintained or replaced, the storage device can notify the multi-path software to recover the previously isolated transmission path. The recovery of the transmission path is completed efficiently without the need for user operation on the host.

[0060] As an optional embodiment, after the isolated transmission path of the host is obtained, the method further includes: In the case that there is no transmission path corresponding to the second port identifier in the isolated transmission path, the isolated transmission path is deleted. Perform a disk scanning operation, obtain a current transmission path between the interface card to be enabled and the host according to the disk scanning operation, and enable the current transmission path.

[0061] Specifically, in the case that there is no transmission path corresponding to the second port identifier in the isolated transmission path, for example, the values of the WWPNs of the isolated transmission path are all not within the range of the list_2 list. It is indicated that the storage device side replaces a new IO interface card, and the multipath software deletes the isolated transmission path from the host side. The multipath software in the host calls an operating system command, performs a disk scanning operation, obtains a current transmission path between the interface card to be enabled and the host according to the disk scanning operation, and enables the current transmission path.

[0062] In this embodiment, for the scenario of replacing the IO interface card of the storage, the host multipath can automatically delete the isolated path from the host and rescan the new path. The entire process does not need to be manually operated on the host, reduces the workload of the operation and maintenance personnel, improves the operation and maintenance efficiency, and also guarantees the continuity of the host service.

[0063] As an optional embodiment, performing a disk scanning operation, obtaining a current transmission path between the interface card to be enabled and the host according to the disk scanning operation, and enabling the current transmission path, comprising: obtaining a first port associated with the switch for the interface card to be enabled, and obtaining a second port associated with the switch for the host; determining the current transmission path according to the first port and the second port; performing a simulated line pulling operation, generating a transmission path fault, and obtaining a first path quantity of the transmission path with a connection interruption in the case of the transmission path fault; performing a simulated line insertion operation, repairing the transmission path fault, and obtaining a second path quantity of the transmission path with a connection recovery after the transmission path fault is repaired; in the case that the first path quantity is less than a first preset threshold and the second path quantity is greater than a second preset threshold, enabling the current transmission path.

[0064] Specifically, a first port associated with the switch for the interface card to be enabled is obtained, and a second port associated with the switch for the host is obtained. The switch is, for example, a fiber switch. The first port is, for example, an interface of an interface card with a transmission path between the switch. The second port is, for example, an interface of the host with a transmission path between the switch.

[0065] The current transmission path is determined according to the first port and the second port, for example: the current transmission path is determined according to the number of the first port and the number of the second port, in combination with a fixed path number calculation algorithm and an active port set intersection algorithm, the number of the first port is S, the number of the second port is H, and the path number of the current transmission path is SxH. The simulation line pulling operation is performed, the transmission path fault is generated, and the first path number of the transmission path with the connection interruption in the presence of the transmission path fault is obtained; the simulation line insertion operation is performed, the transmission path fault is repaired, and the second path number of the transmission path with the connection recovery after the transmission path fault is repaired is obtained.

[0066] The first preset threshold is, for example: 10%, 15% or other number of the total number of transmission paths. The first preset threshold is, for example: 90%, 95% or other number of the total number of transmission paths. In the case that the first path number is less than the first preset threshold and the second path number is greater than the second preset threshold, the current transmission path is enabled.

[0067] In the embodiment, the current transmission path is automatically verified, the state, the strategy, the number and other core functions of the switching card are checked, the test efficiency is greatly improved, and the test quality is also improved, the path number is accurately calculated, and the state and the strategy of each path are checked.

[0068] As an optional embodiment, the host also performs multi-path abnormality detection by using multi-path software, which can include steps A1 to A4.

[0069] In step A1, when the storage volume is mapped to the host, the host obtains the storage volume and the wwid (WorldWide Identifier, global unique hardware identifier) identification information corresponding to the storage volume.

[0070] In step A2, when the host triggers the corresponding drive device to perform the disk scanning operation so as to scan the new disk device, the target disk device corresponding to the storage volume is generated, wherein the number of the target disk device is multiple, and the target disk device corresponds to the path of the storage volume one by one.

[0071] In step A3, the disk wwid information corresponding to the target disk device is obtained, and compared with the wwid identification information.

[0072] In step A4, when the disk wwid information is inconsistent with the wwid identification information, it is determined that the multi-path information of the storage volume is abnormal, and the mounting process of the storage volume is terminated.

[0073] Specifically, when the storage volume is mapped to the host, the host can obtain the storage volume and the wwid identification information corresponding to the storage volume. The wwid identification information of the storage volume can be obtained by checking a specific directory, or the wwid can be generated using the SCSI_id command. The host uses multi-path software for multi-path integration. When the host obtains the storage volume and the corresponding wwid identification information, the target disk device is not automatically generated on the host. The host needs to actively send instructions to trigger the device scanning of the SCSI drive. If there is a new device, the SCSI drive will trigger an event to inform the host to generate the target disk device corresponding to the storage volume. After scanning, the corresponding disk can be seen on the host, and the generated path is, for example, controller 1-host bus adapter 3, controller 2-host bus adapter 4, and each path corresponds to a dev_wwid (device wwid).

[0074] The multi-path software always listens to the changes of the disk device. When a new disk device is added, an event will notify the host. The multipathd service will aggregate the disk devices into a multi-path block device according to the configuration rules, for example, the newly added disk devices sdb, sdc, sdd and sde are aggregated into a multi-path block device. By comparing the wwid of the storage volume with the disk wwid information corresponding to the four disk devices sdb, sdc, sdd and sde, when the wwid of the storage volume matches the disk wwid information of the four disk devices, it indicates that there is no wwid inconsistency exception; when the wwid of the storage volume does not match any dev_wwid of the four disk devices, it indicates that there is a multi-path wwid inconsistency exception. Since the number of target disks is multiple, the disk wwid information of multiple target disks can be compared with the wwid identification information at the same time, or they can be compared one by one.

[0075] In this embodiment, the detection of the multi-path is integrated into the storage mounting process, and the multi-path wwid consistency detection is performed in the storage mounting process. When the wwid inconsistency is detected, the current mounting process is terminated. The existing abnormality detection is performed after the mounting process is completed. If an abnormality is detected, the mounting fails and even causes serious impact on the storage work. At the same time, the time difference between mounting the storage and detecting the multi-path abnormality is shortened, and the separate consumption of manpower for maintaining and monitoring the multi-path wwid abnormality detection tool is avoided, and the stability and accuracy of the abnormality detection are improved.

[0076] According to the embodiments of the present application, a kind of interface card management method for storage device is provided, it needs to be explained that storage device is, for example: solid state disk, hard disk etc., and although logical sequence is shown in flow chart, in some cases, the steps shown or described can be executed in different order from here.

[0077] In the embodiment, an interface card management method applied to a storage device is provided, Figure 3 is a flowchart of the interface card management method applied to the storage device according to the embodiment of the application, as shown in the figure, the flowchart comprises the following steps: Figure 3 S301, determining a first storage volume associated with a to-be-disabled interface card in a case where the to-be-disabled interface card exists. S301, determining a first storage volume associated with a to-be-disabled interface card in a case where the to-be-disabled interface card exists.

[0078] Specifically, after a user selects a to-be-disabled interface card on a storage interface and clicks a “disable” button, the storage device determines the to-be-disabled interface card, for example, an IO interface card that needs to be disabled, and the storage interface is an interface for controlling the storage device. After determining the to-be-disabled interface card, the storage device determines a first storage volume associated with the to-be-disabled interface card, and the host accesses the first storage volume by transmitting an IO request through the to-be-disabled interface card. The storage device sets a transmission path of the first storage volume as a to-be-isolated transmission path.

[0079] S302, setting the transmission path of the first storage volume as the to-be-isolated transmission path, and generating a disable identifier of the to-be-isolated transmission path.

[0080] Specifically, the storage device generates a disable identifier for the to-be-isolated transmission path, and the disable identifier is used to notify the host that there is a to-be-disabled interface card in the current storage device, for example, the storage device sets a disable identifier on all transmission paths of all storage volumes, and when the host transmits an IO request through any transmission path, the disable identifier is received; the storage device generates the disable identifier only on the to-be-isolated transmission path; the storage device sets the disable identifier on a pre-set transmission path. The disable identifier is, for example, UA (Unit Attention, device attention) information, and a Sense Key (error type) in the UA information is a value agreed to represent that the IO interface card is disabled.

[0081] S303, in a case where a first access request sent by the host is received, judging whether a transmission path corresponding to the first access request has the disable identifier.

[0082] S304, in a case where the transmission path corresponding to the first access request has the disable identifier, marking the first access request as failed, to obtain a marked first access request. Specifically, when the host has a first access request sent to a storage volume through a certain link, the storage device checks whether a transmission path for transmitting the first access request has a disable identifier, and the first access request is, for example, an IO request. If the transmission path has the disable identifier, the storage device marks the IO request as failed, and returns the disable identifier to the host together with the marked first access request.

[0083] Step S305, the marked first access request and the disable identifier are sent to the host, wherein the marked first access request is used to instruct the host to start a first error request processing flow, and the first error request processing flow is used to determine whether the disable identifier is equal to a first preset value, and in the case where the disable identifier is equal to the first preset value, a to-be-isolated transmission path is determined and the to-be-isolated transmission path is isolated.

[0084] Specifically, the marked first access request and the disable identifier are sent to the host. In the case where the host receives the marked first access request and the disable identifier sent by the storage device, the multi-path driver in the host parses the marked first access request and the disable identifier, determines whether the disable identifier is equal to a first preset value, and the first preset value is, for example, a value of the Sense key of the disable identifier agreed to represent that the IO interface card is disabled. In the case where the disable identifier is equal to the first preset value, a first error request processing flow is started according to the marked first access request, and the first error request processing flow is, for example, a sub-flow of the IO request error processing. The first error request processing flow determines a to-be-isolated transmission path and isolates the to-be-isolated transmission path, for example, the host obtains all port information of the to-be-disabled interface card, and determines whether each transmission path in the multi-path device contains the port information in turn, and sets the transmission path containing the port information as the to-be-isolated transmission path. The multi-path software in the host isolates the to-be-isolated transmission path and makes it offline. The offline transmission path will not transmit IO requests in the future.

[0085] The interface card management method provided in this embodiment determines a first storage volume associated with the to-be-disabled interface card in the case where the to-be-disabled interface card exists, sets a transmission path of the first storage volume as a to-be-isolated transmission path, and finally generates a disable identifier of the to-be-isolated transmission path. The disable identifier is transmitted to the host, and the host determines the to-be-isolated transmission path according to the disable identifier and isolates the to-be-isolated transmission path. This method realizes the function of disabling the interface card in the storage device, and notifies the host that there is a to-be-disabled interface card and a to-be-isolated transmission path through the disable identifier; in the host, the multi-path software is used to automatically isolate the to-be-isolated transmission path. The host efficiently isolates the to-be-isolated transmission path without the need for user operation on the host, thereby improving the operation and maintenance efficiency and accuracy. The problem that the user manually isolates the path of the to-be-managed IO interface card, which is inefficient and prone to errors, is solved.

[0086] As an optional embodiment, the first storage volume associated with the to-be-disabled interface card is determined by comprising: The first preset number of storage volumes in the storage device are taken as the first storage volume; Or, a target storage volume in the storage device is taken as the first storage volume, where the target storage volume is a storage volume for data transmission through the interface card to be disabled.

[0087] Specifically, a first preset number of storage volumes in the storage device are taken as the first storage volume, for example, all storage volumes in the storage device, storage volumes corresponding to the interface card to be disabled, and part of the storage volumes other than the storage volumes corresponding to the interface card to be disabled. The specific storage volume can be set according to actual needs. A target storage volume in the storage device is taken as the first storage volume, where the target storage volume is a storage volume for data transmission through the interface card to be disabled, for example, a storage volume for which an IO request needs to be transmitted through the interface card to be disabled for data interaction with the host.

[0088] As an optional embodiment, the method further comprises: In the case where the interface card to be enabled exists, determining a second preset number of second storage volumes contained in the storage device; Taking the transmission path of the second storage volume as the transmission path to be recovered, and generating an enabling identifier of the transmission path to be recovered; Sending the enabling identifier to the host, so that the host enables the transmission path to be recovered according to the enabling identifier.

[0089] Specifically, after a user selects the interface card to be enabled on a storage interface and clicks an “enable” button, the storage device determines the interface card to be enabled, for example, an IO interface card that needs to be enabled. After determining the interface card to be enabled, the storage device determines a second storage volume associated with the interface card to be enabled in the storage device, for example, a storage volume that needs to transmit data through the interface card to be enabled. The storage device sets the transmission path of the second storage volume as the transmission path to be recovered.

[0090] The storage device generates an enabling identifier for the transmission path to be recovered, and the enabling identifier is used to notify the host that there is an interface card to be enabled in the current storage device, for example, the storage device sets an enabling identifier on all transmission paths of all storage volumes, and when the host transmits an IO request through any transmission path, the enabling identifier is received. The storage device generates the enabling identifier on all transmission paths other than the transmission path to be recovered. The enabling identifier is, for example, a device attention information, and the error type information in the attention information is a value agreed for enabling an IO interface card.

[0091] The storage device sends the enabling identifier to the host, for example, the storage device directly sends the enabling identifier to the host; after receiving an IO request sent by the host, the enabling identifier is added in a response message of the IO request and sent to the host together; after receiving an IO request sent by the host, the IO request is marked as failed, and the enabling identifier is returned to the host together with the IO request.

[0092] In the embodiment, the automatic isolation or recovery of all transmission paths related to the maintained interface card on the host is realized by the multi-path software in the host. Meanwhile, after the IO interface card is maintained or replaced, the storage device can inform the multi-path software to recover the previously isolated transmission path. The recovery of the transmission path is efficiently completed without the need for the user to operate on the host.

[0093] As an optional embodiment, the enabling identifier is sent to the host, including: In the case of receiving the second access request sent by the host, it is judged whether the transmission path corresponding to the second access request exists the enabling identifier; In the case that the transmission path corresponding to the second access request exists the enabling identifier, the second access request is marked as failed, and the marked second access request is obtained; The marked second access request and the enabling identifier are sent to the host, wherein the marked second access request is used to instruct the host to start the second error request processing flow, and the second error request processing flow is used to cancel the isolation of the transmission path to be isolated according to the enabling identifier, and enable the transmission path to be recovered.

[0094] Specifically, when there is a second access request sent to the storage volume through a certain link on the host, the storage device checks whether the transmission path for transmitting the first access request has the enabling identifier, and the second access request is, for example, an IO request. If the transmission path has the enabling identifier, the storage device marks the IO request as failed, and returns the enabling identifier to the host with the marked second access request.

[0095] In the case that the host receives the marked second access request and the enabling identifier sent by the storage device, the multi-path driver in the host parses the marked second access request and the enabling identifier, judges whether the enabling identifier is equal to the second preset value, and the second preset value is, for example, the Sense key of the enabling identifier is the value agreed by the storage to enable the IO interface card. In the case that the enabling identifier is equal to the second preset value, according to the marked second access request, the second error request processing flow is started, and the second error request processing flow is, for example, the sub-flow of the IO request error processing.

[0096] In the second error request processing procedure, the host generates a second port information query instruction, such as a SCSI instruction, by using the multi-path software, and sends the second port information query instruction to the storage device to obtain the second port identifiers of the interface cards to be enabled, such as the WWPN values of all ports on the enabled IO interface cards, and stores the second port identifiers in a list, denoted as list_2. The transmission path corresponding to the second port identifiers in the isolated transmission path is taken as the transmission path to be recovered. The host uses the multi-path software to un-isolate the path and restore it online.

[0097] As an optional embodiment, the method further comprises: In a case where the first port information query instruction sent by the host is received, the first port identifiers of the interface cards to be disabled are obtained, and the first port identifiers are sent to the host, wherein the first port information query instruction is generated by the host according to the first error request processing procedure, and the first error request processing procedure is started by the host in a case where the disable identifier is equal to the first preset value; In a case where the second port information query instruction sent by the host is received, the second port identifiers of the interface cards to be enabled are obtained, and the second port identifiers are sent to the host, wherein the second port information query instruction is generated by the host according to the second error request processing procedure, and the second error request processing procedure is started by the host in a case where the enable identifier is equal to the second preset value.

[0098] Specifically, after receiving the first port information query instruction, the storage device returns IO interface card status information. The format of the IO interface card status information of the storage device adopts a hierarchical structure, including global information (fixed 12 bytes) + port information list (22 bytes per port). The structure of the global information of the IO interface card status information is shown in Table 2, and the structure of the port information list is shown in Table 3. The host determines the first port identifiers according to the returned IO interface card status information.

[0099] After receiving the second port information query instruction, the storage device returns IO interface card status information. The format of the IO interface card status information of the storage device adopts a hierarchical structure, including global information (fixed 12 bytes) + port information list (22 bytes per port). The host determines the second port identifiers according to the returned IO interface card status information.

[0100] As an optional embodiment, sending the first port identifiers to the host comprises: obtaining the total number of ports, the port data byte number, and the interface card identifier of the interface cards to be disabled; generating global information according to the total number of ports, the port data byte number, the interface card identifier, and a first preset offset; generating port information according to the first port identifiers and a second preset offset; According to the global information and the port information, interface card status information is generated, and the interface card status information is sent to the host.

[0101] Specifically, the total number of ports of the interface card to be disabled, the port data byte number, and the interface card identifier are obtained, for example, as shown in Table 2, the total number of ports is TOTAL_PORTS, the port data byte number is DATA_LENGTH, and the interface card identifier is HBA_WWN. The second preset offset is, for example, as shown in Table 2, the offset of TOTAL_PORTS is 0-3, the offset of DATA_LENGTH is 4-7, and the offset of HBA_WWN is 8-11. According to the total number of ports, the port data byte number, the interface card identifier, and the first preset offset, the global information is generated.

[0102] The first port identifier is, for example, as shown in Table 3, the first port identifier is PORT_WWPN, and the corresponding second preset offset is 0-7. According to the first port identifier and the second preset offset, the port information is generated.

[0103] The global information and the port information are spliced into the interface card status information, for example, IO interface card status information = global information (fixed 12 bytes) + port information list (22 bytes per port). The interface card status information is sent to the host.

[0104] The embodiment also provides an interface card management device, which is used for implementing the above-mentioned embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.

[0105] The embodiment provides an interface card management device deployed in a host, as shown in Figure 4 The device comprises: A flow starting module 401 is configured to, in a case where a marked first access request and a disable identifier sent by a storage device are received, start a first error request processing flow according to the marked first access request, wherein the marked first access request is obtained by marking the first access request as failed in a case where a disable identifier exists in a transmission path corresponding to the first access request, and the disable identifier is generated by the storage device for a transmission path to be isolated. A first judgment module 402 is configured to judge whether the disable identifier is equal to a first preset value according to the first error request processing flow. The first path isolation module 403 is configured to, when the disable identifier is equal to the first preset value, determine a to-be-isolated transmission path according to a first error request processing procedure, and isolate the to-be-isolated transmission path, wherein the to-be-isolated transmission path is a transmission path of a first storage volume, and the first storage volume is a storage volume associated with the to-be-disabled interface card.

[0106] In some optional embodiments, the first path isolation module 403 includes: The instruction sending unit is configured to generate a first port information query instruction according to the first error request processing procedure, and send the first port information query instruction to the storage device, wherein the first port information query instruction is used to obtain a first port identifier of the to-be-disabled interface card from the storage device. The first path obtaining unit is configured to obtain an associated transmission path of the host, and take the associated transmission path with the first port identifier as the to-be-isolated transmission path.

[0107] In some optional embodiments, the apparatus further includes: The first determining module is configured to, when the enable identifier is received from the storage device, determine a to-be-resumed transmission path according to the enable identifier, wherein the to-be-resumed transmission path is a transmission path of a second storage volume, the enable identifier is generated by the storage device for the to-be-resumed transmission path, and the second storage volume is determined in the storage device when the to-be-enabled interface card exists. The isolation release module is configured to release the isolation of the to-be-isolated transmission path, and enable the to-be-resumed transmission path.

[0108] In some optional embodiments, the first determining module includes: The first judging unit is configured to, when the marked second access request and the enable identifier are received from the storage device, judge whether the enable identifier is equal to a second preset value. The starting unit is configured to, when the enable identifier is equal to the second preset value, start a second error request processing procedure according to the marked second access request. The first generating unit is configured to generate a second port information query instruction according to the second error request processing procedure, and send the second port information query instruction to the storage device, wherein the second port information query instruction is used to obtain a second port identifier of the to-be-enabled interface card from the storage device. The second path obtaining unit is configured to obtain an isolated transmission path of the host, and take a transmission path corresponding to the second port identifier in the isolated transmission path as the to-be-resumed transmission path.

[0109] In some optional embodiments, the first determining module further includes: The path deletion unit is used to delete the isolated transmission path when there is no transmission path corresponding to the second port identifier in the isolated transmission path; The path activation unit is used to perform a disk scan operation, obtain the current transmission path between the interface card to be activated and the host based on the disk scan operation, and activate the current transmission path.

[0110] In some optional implementations, the path enabling unit includes: The first acquisition submodule is used to acquire the first port associated with the switch by the interface card to be enabled, and to acquire the second port associated with the host by the switch; The determination submodule is used to determine the current transmission path based on the first port and the second port; The second acquisition submodule is used to perform a simulated disconnection operation, generate a transmission path fault, and obtain the first number of transmission paths where the connection is interrupted in the presence of a transmission path fault. The third acquisition submodule is used to perform simulated wiring operations, repair transmission path faults, and obtain the second number of transmission paths that have been restored after the transmission path faults have been repaired. The enable submodule is used to enable the current transmission path when the number of first paths is less than a first preset threshold and the number of second paths is greater than a second preset threshold.

[0111] This embodiment provides an interface card management device deployed on a storage device, such as... Figure 5 As shown, it includes: The storage volume determination module 501 is used to determine the first storage volume associated with the interface card to be disabled when there is an interface card to be disabled. The identifier generation module 502 is used to take the transmission path of the first storage volume as the transmission path to be isolated and generate a disable identifier for the transmission path to be isolated. The second judgment module 503 is used to determine whether there is a disabled flag in the transmission path corresponding to the first access request when the first access request is received from the host. The request marking module 504 is used to mark the first access request as failed if there is a disabled flag in the transmission path corresponding to the first access request, so as to obtain the marked first access request. The second path isolation module 505 is used to send the marked first access request and the disabled flag to the host. The marked first access request is used to instruct the host to start the first error request processing procedure. The first error request processing procedure is used to determine whether the disabled flag is equal to the first preset value. If the disabled flag is equal to the first preset value, the transmission path to be isolated is determined and the transmission path to be isolated is isolated.

[0112] In some optional embodiments, the storage volume determination module 501 comprises: a first setting unit, configured to set a first preset number of storage volumes in the storage device as first storage volumes; a second setting unit, configured to set a target storage volume in the storage device as a first storage volume, where the target storage volume is a storage volume used for data transmission through the interface card to be disabled.

[0113] In some optional embodiments, the apparatus further comprises: a second determination module, configured to determine, in a case where there is an interface card to be enabled, that the storage device contains a second preset number of second storage volumes; a generation module, configured to set a transmission path of the second storage volume as a transmission path to be recovered, and generate an enabling identifier of the transmission path to be recovered; a sending module, configured to send the enabling identifier to the host, so that the host enables the transmission path to be recovered according to the enabling identifier.

[0114] In some optional embodiments, the sending module comprises: a second judgment unit, configured to, in a case where the second access request sent by the host is received, judge whether the transmission path corresponding to the second access request has an enabling identifier; a second marking unit, configured to, in a case where the transmission path corresponding to the second access request has the enabling identifier, mark the second access request as failed, to obtain a marked second access request; a second sending unit, configured to send the marked second access request and the enabling identifier to the host, where the marked second access request is used to instruct the host to start a second error request processing procedure, and the second error request processing procedure is used to cancel isolation of the transmission path to be isolated according to the enabling identifier, and enable the transmission path to be recovered.

[0115] In some optional embodiments, the apparatus further comprises: a first identifier sending module, configured to, in a case where a first port information query instruction sent by the host is received, acquire a first port identifier of the interface card to be disabled, and send the first port identifier to the host, where the first port information query instruction is generated by the host according to a first error request processing procedure, and the first error request processing procedure is started by the host in a case where the disabling identifier is equal to a first preset value; a second identifier sending module, configured to, in a case where a second port information query instruction sent by the host is received, acquire a second port identifier of the interface card to be enabled, and send the second port identifier to the host, where the second port information query instruction is generated by the host according to a second error request processing procedure, and the second error request processing procedure is started by the host in a case where the enabling identifier is equal to a second preset value.

[0116] In some alternative implementations, the first identifier sending module includes: The acquisition unit is used to acquire the total number of ports, the number of bytes of port data, and the interface card identifier of the interface card to be disabled; The second generation unit is used to generate global information based on the total number of ports, the number of port data bytes, the interface card identifier, and the first preset offset. The third generation unit is used to generate port information based on the first port identifier and the second preset offset; The third sending unit is used to generate interface card status information based on global information and port information, and send the interface card status information to the host.

[0117] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0118] In this embodiment, the interface card management device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0119] This application also provides a computer device having the above-described features. Figure 4 and Figure 5 The interface card management device shown.

[0120] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.

[0121] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include an integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a programmable array logic, or any combination thereof.

[0122] The memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods illustrated by the above embodiments.

[0123] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function, and the like. The data storage area can store data created according to the use of the computer device, and the like. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory such as at least one disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some alternative embodiments, the memory 20 can optionally include a memory disposed remotely from the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0124] The memory 20 can include a volatile memory such as a random access memory, and can also include a non-volatile memory such as a flash memory, a hard disk, or a solid state disk. The memory 20 can further include a combination of the above-mentioned types of memories.

[0125] The computer device further includes a communication interface 30 for communication of the computer device with other devices or communication networks.

[0126] The embodiments of the present application also provide a computer readable storage medium. The above-mentioned methods according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium by original computer code downloaded through a network and stored in a local storage medium, so that the methods described herein can be processed by such software on a storage medium using a general-purpose computer, a special-purpose processor, or programmable or special-purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can further include a combination of the above-mentioned types of memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, which, when accessed and executed by the computer, the processor, or the hardware, implements the methods illustrated by the above embodiments.

[0127] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0128] Although the embodiments of the present application are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the present application.

Claims

1. A method for managing interface cards, the method comprising: The method is applied to a host, and the method comprises: In a case where a marked first access request and a disable identifier sent by a storage device are received, starting a first error request processing procedure according to the marked first access request, wherein the marked first access request is obtained by marking the first access request as failed in a case where a disable identifier exists in a transmission path corresponding to the first access request, and the disable identifier is generated by the storage device for a to-be-isolated transmission path; According to the first error request processing procedure, determining whether the disable identifier is equal to a first preset value; In a case where the disable identifier is equal to the first preset value, determining a to-be-isolated transmission path according to the first error request processing procedure, and isolating the to-be-isolated transmission path, wherein the to-be-isolated transmission path is a transmission path of a first storage volume, and the first storage volume is a storage volume associated with a to-be-disabled interface card.

2. The method of claim 1, wherein, The method further comprises: In a case where an enable identifier sent by the storage device is received, determining a to-be-resumed transmission path according to the enable identifier, wherein the to-be-resumed transmission path is a transmission path of a second storage volume, the enable identifier is generated by the storage device for the to-be-resumed transmission path, and the second storage volume is determined in the storage device in a case where a to-be-enabled interface card exists; Removing the isolation of the to-be-isolated transmission path and enabling the to-be-resumed transmission path.

3. The method of claim 1, wherein, The method further comprises: In a case where a marked second access request and the enable identifier sent by the storage device are received, determining whether the enable identifier is equal to a second preset value; In a case where the enable identifier is equal to the second preset value, starting a second error request processing procedure according to the marked second access request; 4. The method of claim 3, wherein, According to the second error request processing procedure, generating a second port information query instruction and sending the second port information query instruction to the storage device, wherein the second port information query instruction is used to obtain a second port identifier of the to-be-enabled interface card from the storage device; Obtaining isolated transmission paths of the host, and taking a transmission path corresponding to the second port identifier in the isolated transmission paths as the to-be-resumed transmission path. After the isolated transmission paths of the host are obtained, the method further comprises: In a case where no transmission path corresponding to the second port identifier exists in the isolated transmission paths, deleting the isolated transmission paths; ​ 5. The method of claim 4, wherein, ​ ​ Perform a sweep operation, obtain a current transmission path between the interface card to be enabled and the host according to the sweep operation, and enable the current transmission path.

6. The method of claim 5, wherein, The performing of the sweep operation, the obtaining of the current transmission path between the interface card to be enabled and the host according to the sweep operation, and the enabling of the current transmission path comprise: Obtaining a first port associated with a switch of the interface card to be enabled and a second port associated with the switch of the host; Determining the current transmission path according to the first port and the second port; Performing a simulated line pulling operation to generate a transmission path fault, and obtaining a first path quantity of transmission paths that are disconnected in the presence of the transmission path fault; Performing a simulated line insertion operation to repair the transmission path fault, and obtaining a second path quantity of transmission paths that are connected after the transmission path fault is repaired; Enabling the current transmission path in a case where the first path quantity is less than a first preset threshold and the second path quantity is greater than a second preset threshold.

7. A method for managing interface cards, the method comprising: The method is applied to a storage device, and the method comprises: In a case where there is an interface card to be disabled, determining a first storage volume associated with the interface card to be disabled; Taking a transmission path of the first storage volume as a to-be-isolated transmission path, and generating a disable identifier of the to-be-isolated transmission path; In a case where a first access request sent by a host is received, judging whether a transmission path corresponding to the first access request exists the disable identifier; In a case where the transmission path corresponding to the first access request exists the disable identifier, marking the first access request as failed to obtain a marked first access request; Sending the marked first access request and the disable identifier to the host, wherein the marked first access request is used to instruct the host to start a first error request processing process, and the first error request processing process is used to judge whether the disable identifier is equal to a first preset value, and in a case where the disable identifier is equal to the first preset value, a to-be-isolated transmission path is determined, and the to-be-isolated transmission path is isolated.

8. The method of claim 7, wherein, The determining of the first storage volume associated with the interface card to be disabled comprises: Taking a first preset quantity of storage volumes in the storage device as the first storage volume; Or, taking a target storage volume in the storage device as the first storage volume, wherein the target storage volume is a storage volume used for data transmission through the interface card to be disabled.

9. The method of claim 7, wherein, The method further comprises: In a case where there is an interface card to be enabled, determining a second preset quantity of second storage volumes contained in a storage device; Taking a transmission path of the second storage volume as a to-be-recovered transmission path, and generating an enable identifier of the to-be-recovered transmission path; Sending the enable identifier to the host, so that the host enables the to-be-recovered transmission path according to the enable identifier.

10. The method of claim 9, wherein, The sending of the enable identifier to the host comprises: In a case where a second access request sent by a host is received, judging whether a transmission path corresponding to the second access request exists the enable identifier; In a case where the enabling identifier exists in the transmission path corresponding to the second access request, marking the second access request as failed to obtain a marked second access request; sending the marked second access request and the enabling identifier to the host, where the marked second access request is used to instruct the host to start a second error request processing procedure, and the second error request processing procedure is used to cancel isolation of the to-be-isolated transmission path and enable the to-be-resumed transmission path according to the enabling identifier.

11. The method of claim 9, wherein, The method further includes: In a case where a first port information query instruction sent by the host is received, obtaining a first port identifier of the to-be-disabled interface card, and sending the first port identifier to the host, where the first port information query instruction is generated by the host according to a first error request processing procedure, and the first error request processing procedure is started by the host in a case where the disabling identifier is equal to a first preset value; In a case where a second port information query instruction sent by the host is received, obtaining a second port identifier of the to-be-enabled interface card, and sending the second port identifier to the host, where the second port information query instruction is generated by the host according to a second error request processing procedure, and the second error request processing procedure is started by the host in a case where the enabling identifier is equal to a second preset value.

12. The method of claim 11, wherein, The sending of the first port identifier to the host includes: obtaining a total number of ports, a port data byte number, and an interface card identifier of the to-be-disabled interface card; generating global information according to the total number of ports, the port data byte number, the interface card identifier, and a first preset offset; generating port information according to the first port identifier and a second preset offset; generating interface card state information according to the global information and the port information, and sending the interface card state information to the host.

13. A computer device, comprising: includes: a memory and a processor, which are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the interface card management method in any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the interface card management method in any one of claims 1 to 12.

15. A computer program product, characterised in that, includes computer instructions, and the computer instructions are used to make a computer execute the interface card management method in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Path disabling method and system

    CN113886291A

  • Access control method and device of storage peripheral, electronic equipment and storage medium

    CN118708114A

  • Data access method and device and electronic equipment

    CN118797704A

  • Memory isolation method and device for embedded system and medium

    CN119576814A

  • Non-volatile memory switch with host isolation

    CN120256193A