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

By generating a disable flag on the storage device and automatically isolating the path of the IO interface card using multi-path software, the problem of low efficiency and errors in IO interface card management in the data center is solved, achieving efficient path isolation and recovery, and ensuring the continuity of host services.

CN120909971BActive Publication Date: 2026-01-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In data centers, manually isolating the paths of I/O interface cards is inefficient and error-prone, affecting the continuity of host services.

Method used

The system generates a disable flag by using storage devices, notifies the host to isolate the transmission path to be isolated, and automatically isolates the path using multipathing software on the host, reducing manual operation.

Benefits of technology

It improved operational efficiency and accuracy, ensured the continuity of host services, and reduced the need for manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909971B_ABST
    Figure CN120909971B_ABST
Patent Text Reader

Abstract

The application 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 comprises the following steps: starting a first error request processing flow according to a marked first access request, and isolating a to-be-isolated transmission path by using the first error request processing flow if a disable identifier is equal to a first preset value. A storage device determines the to-be-isolated transmission path and generates a disable identifier of the to-be-isolated transmission path. The method can solve the problems that a user manually isolates a path of a to-be-managed IO interface card, the efficiency is low, and errors are prone to occur. The method implements the function of disabling an interface card in the storage device, and notifies a host computer that there is a to-be-disabled interface card and a to-be-isolated transmission path by using a disable identifier. In the host computer, a multi-path software is used to automatically isolate the to-be-isolated transmission path. The host computer efficiently isolates the to-be-isolated transmission path, and the user does not need to perform operations on the host computer, thereby improving operation and maintenance efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data center technology, specifically to an interface card management method, computer equipment, storage medium, and program products. Background Technology

[0002] In data centers, maintaining or replacing the I / O (Input / Output) interface cards on storage devices is a common interface card management operation. However, these operations may cause host I / O requests to be delayed in reaching the storage device. Although multipathing software installed on the host can forward I / O requests to the storage device via other available paths, this software often waits until the I / O request times out on the original path before forwarding it to the storage device via a new path. This timeout period can often be several seconds long, causing brief interruptions to I / O requests and impacting host operations.

[0003] To minimize the impact on host operations, users currently need to manually isolate the paths of the storage volumes corresponding to the managed I / O interface cards on the host using multipathing software when host operations are not busy. The multipathing software will then switch to other available paths instead of issuing I / O requests through these paths. However, in data centers, a server may map multiple storage volumes, each with numerous paths to the storage devices. Users would need to manually isolate the paths corresponding to the original I / O interface cards and rescan the disks to identify the new paths. This method of managing I / O interface cards is inefficient and prone to errors.

[0004] Therefore, the relevant technologies suffer from the problem that users have to manually isolate the paths of the I / O interface cards to be managed, which is inefficient and prone to errors. Summary of the Invention

[0005] In view of this, this application provides an interface card management method, computer device, storage medium, and program product to solve the problems of low efficiency and error-proneness in manually isolating the paths of the IO interface cards to be managed.

[0006] Firstly, this application provides an interface card management method, which is applied to a host and includes:

[0007] Upon receiving a marked first access request and a disable flag from the storage device, the first error request processing procedure is initiated based on the marked first access request. The marked first access request is obtained by 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.

[0008] According to the first error request handling process, determine whether the disabled flag is equal to the first preset value;

[0009] 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.

[0010] Secondly, this application provides an interface card management method, which is applied to a storage device, and the method includes:

[0011] If there is an interface card to be disabled, determine the first storage volume associated with the interface card to be disabled;

[0012] 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.

[0013] 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;

[0014] 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.

[0015] 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.

[0016] Thirdly, this application provides an interface card management device, which is deployed on a host computer and includes:

[0017] 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.

[0018] 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;

[0019] 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.

[0020] Fourthly, this application provides an interface card management device deployed on a storage device, the device comprising:

[0021] The storage volume determination module 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.

[0022] The identifier generation module 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.

[0023] The second judgment module 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.

[0024] The request marking module 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.

[0025] The second path isolation module is used to send the marked first access request and the disable 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 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.

[0026] Fifthly, this application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. 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 corresponding embodiment described above, or to perform the interface card management method of the second aspect or any corresponding embodiment described above.

[0027] In a sixth aspect, this application provides a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the interface card management method of the first aspect or any corresponding embodiment described above, or to execute the interface card management method of the second aspect or any corresponding embodiment described above.

[0028] In a seventh aspect, this application provides a computer program product, including computer instructions, which are used to cause a computer to execute the interface card management method of the first aspect or any corresponding embodiment described above, or to execute the interface card management method of the second aspect or any corresponding embodiment described above.

[0029] This application addresses the issue that upon receiving a tagged first access request and a disable flag from the storage device, a first error request processing procedure is initiated based on the tagged first access request. If the disable flag equals a first preset value, the first error request processing procedure is used to isolate the transmission path to be isolated. When a disableable interface card exists in the storage device, the first storage volume associated with the disableable interface card is first determined, the transmission path of the first storage volume is set as the transmission path to be isolated, and finally, a disable flag is generated for the transmission path to be isolated. This solves the problem of inefficiency and error-proneness in manually isolating paths of managed IO interface cards. This method implements the function of disabling interface cards in the storage device and notifies the host of the existence of a disableable interface card and a transmission path to be isolated through the disable flag. In the host, multipath software is used to automatically isolate the transmission path to be isolated. The host efficiently isolates the transmission path to be isolated without requiring user intervention, improving operational efficiency and accuracy. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0031] Figure 1 This is an architecture diagram of a Fibre Channel storage area network according to an embodiment of this application;

[0032] Figure 2 This is a flowchart illustrating an interface card management method applied to a host according to an embodiment of this application;

[0033] Figure 3 This is a flowchart illustrating an interface card management method for storage devices according to an embodiment of this application;

[0034] Figure 4 This is a structural block diagram of an interface card management device deployed on a host according to an embodiment of this application;

[0035] Figure 5 This is a structural block diagram of an interface card management device deployed on a storage device according to an embodiment of this application;

[0036] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

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

[0039] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0040] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0041] Currently, FC-SAN (Fibre Channel Storage Area Network) is the preferred storage network solution in data centers. FC-SAN is a dedicated high-speed storage network built using the Fibre Channel Protocol (FCP), designed to solve the poor scalability and bandwidth bottlenecks of traditional direct-attached storage. Therefore, every server and storage device in the data center is equipped with an I / O interface card. These I / O interface cards are connected to fiber optic switches via fiber optic cables, forming a dedicated storage network. Simultaneously, the storage devices provide accompanying multipathing software. Multipathing software refers to software that can transmit I / O requests through multiple network paths. The difference between multipathing software and single-pathing software is that single-pathing software can only transmit I / O requests through one network path, while multipathing software can use multiple network paths simultaneously.

[0042] 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.

[0043] 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.

[0044] Based on the above, this application provides an interface card management method that enables the disabling and enabling of I / O interface cards in a storage device. The storage device notifies the host of the available status of the I / O interface cards via asynchronous events. Additionally, the storage device provides a mechanism to inform the host of the port identifier of the I / O interface cards. In the host, multipathing software automatically isolates or restores all transmission paths related to the maintained interface card. In scenarios where the storage device has replaced its I / O interface card, the multipathing software can automatically delete the old isolated transmission paths and rescan the disk to identify new paths. Furthermore, the host can use SCSI (Small Computer System Interface) commands to access the basic information and status of all ports on the storage device's I / O interface card. The host's multipathing software automatically isolates the corresponding transmission paths in the host through a negotiation mechanism with the storage device. Simultaneously, after the I / O interface card is maintained or replaced, the storage device can notify the multipathing software to restore the previously isolated transmission paths, or delete the isolated transmission paths from the host and rescan for new paths. This achieves efficient isolation, restoration, and rescanning of transmission paths without user intervention on the host, improving operational efficiency and accuracy.

[0045] According to an embodiment of this application, an embodiment of an interface card management method for a host is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, for example, a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0046] This embodiment provides a method for managing interface cards applied to a host computer. Figure 2 This is a flowchart of an interface card management method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0047] Step S201: Upon receiving the first access request with a flag and a disable flag sent by the storage device, the first error request processing procedure is initiated based on the first access request with a flag. The first access request with a flag is obtained by 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.

[0048] Specifically, after the user selects the interface card to be disabled on the storage interface and clicks the "Disable" button, the storage device determines the interface card to be disabled. This interface card may be, for example, an I / O interface card that needs to be disabled. The storage interface is the interface used to control the storage device. After determining the interface card to be disabled, the storage device determines the first storage volume associated with it. Host access to the first storage volume requires transmitting I / O requests through the interface card to be disabled. The storage device then sets the transmission path of the first storage volume to the transmission path to be isolated.

[0049] The storage device generates a disable flag for the transmission path to be isolated. This flag notifies the host that a disabled interface card exists on the storage device. For example, the storage device sets a disable flag on all transmission paths of all storage volumes; when the host transmits an I / O request through any transmission path, it will receive the disable flag. Alternatively, the storage device can generate disable flags only on the transmission path to be isolated, or it can set disable flags on pre-configured transmission paths. The disable flag can be, for example, a Unit Attention (UA) message, where the Sense Key (error type) is a pre-defined value representing that the I / O interface card is disabled. In the SCSI protocol, UA information is a mechanism for devices to report abnormal states or environmental changes to the host, notifying the host that an event requiring attention has occurred. UA information is transmitted through the SENSE DATA field, and its format conforms to the SCSI protocol specification. The core structure includes a three-level encoding system: Sense Key (error type), ASC (Additional Sensing Code), and ASCQ (Additional Sensing Code Qualifier).

[0050] When the host sends the first access request to the storage volume via a link, the storage device checks if the transmission path used to transmit the first access request has a disabled flag. For example, an I / O request might be disabled. If the transmission path has a disabled flag, the storage device marks the I / O request as failed and returns the disabled flag to the host along with the marked first access request.

[0051] The storage device sends a disable flag to the host, for example: the storage device sends the disable flag directly to the host; after receiving an IO request from the host, it adds the disable flag to the response message of the IO request and sends it to the host together; after receiving an IO request from the host, it marks the IO request as failed and returns the disable flag to the host along with the IO request.

[0052] Step S202: According to the first error request processing flow, determine whether the disabled flag is equal to the first preset value.

[0053] Specifically, the multipathing software on the host isolates the transmission path to be isolated, taking it offline. The offline transmission path will no longer transmit I / O requests.

[0054] Upon receiving a tagged first access request and a disable flag from the storage device, the host's multipath driver parses the tagged first access request and the disable flag, determining whether the disable flag equals a first preset value. The first preset value, for example, is a pre-defined value representing that the I / O interface card is disabled, where the disable flag's Sense key is an agreed-upon value. If the disable flag equals the first preset value, a first error request handling process is initiated based on the tagged first access request. This first error request handling process is, for example, a sub-process for handling I / O request errors.

[0055] Step S203: When the disable flag is equal to the first preset value, determine the transmission path to be isolated according to the first error request processing flow, and 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.

[0056] Specifically, after receiving the disable flag, the host determines that there is an interface card to be disabled in the current storage device. According to the first error request handling procedure, the host determines the transmission path to be isolated. For example, the host uses the first error request handling procedure to obtain all port information of the interface card to be disabled, and sequentially checks whether each transmission path in the multipath device contains the aforementioned port information. The transmission path containing the aforementioned port information is set as the transmission path to be isolated. The transmission path to be isolated is then isolated and taken offline. The offline transmission path will no longer transmit IO requests.

[0057] This embodiment provides an interface card management method. Upon receiving a tagged first access request and a disable flag from a storage device, a first error request processing procedure is initiated based on the tagged first access request. If the disable flag equals a first preset value, the first error request processing procedure is used to isolate the transmission path to be isolated. 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 a disable flag for the transmission path to be isolated. This method implements the function of disabling interface cards in the storage device and notifies the host of the existence of an interface card to be disabled and a transmission path to be isolated through the disable flag. In the host, the transmission path to be isolated is automatically isolated through multipath software. The host efficiently isolates the transmission path to be isolated without requiring user operation on the host, improving operational efficiency and accuracy. It solves the problem of low efficiency and error-proneness in manually isolating the paths of managed IO interface cards.

[0058] As an optional embodiment, determining the transmission path to be isolated according to the first error request handling process includes:

[0059] According to the first error request processing flow, a first port information query instruction is generated and sent to the storage device. 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.

[0060] Obtain the associated transmission path of the host, and use the associated transmission path with the corresponding port identifier as the first port identifier as the transmission path to be isolated.

[0061] Specifically, in the first error request handling process, the host uses multipath software to generate a first port information query command, such as a SCSI command. This command is then sent 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 I / O interface card. This first port identifier is stored in a list, denoted as list_1. WWPN is a globally unique identifier for Fibre Channel (FC) ports.

[0062] The command descriptor for SCSI commands can use a 16-byte extended CDB (Container Database) structure, as shown in Table 1.

[0063] Table 1 Command descriptors for SCSI commands

[0064]

[0065] After receiving the first port information query command, the storage device returns I / O interface card status information. The I / O interface card status information of the storage device adopts a hierarchical structure, containing global information (fixed 12 bytes) + a port information list (22 bytes per port). The structure of the global information of the I / O 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 identifier based on the returned I / O interface card status information.

[0066] Table 2 Global Information

[0067]

[0068] Table 3 Port Information List

[0069]

[0070] The host uses multipathing software to traverse all multipathing devices on the host. For each multipathing device, it iterates through all its associated transmission paths and retrieves the associated transmission path whose port identifier is the first port identifier. This path is then designated as the transmission path to be isolated. For example, if the WWPN value of an associated transmission path is within the range of list_1, then that path is identified as the associated path of the storage's disabled I / O interface card, i.e., the transmission path to be isolated. The host then uses the multipathing software to isolate the transmission path to be isolated, taking it offline. Offline paths will no longer handle I / O.

[0071] In addition, the multipath software will switch the first access request after the previous tag to another available path and resend it to the storage device.

[0072] In this embodiment, through enhanced storage and multipath software functionality, and via a negotiation mechanism between the multipath software and storage, the corresponding paths on the host for the storage I / O interfaces are automatically isolated. The entire process requires no manual intervention on the host, reducing the workload of maintenance personnel, improving operational efficiency, and ensuring the continuity of host services.

[0073] As an optional embodiment, the method further includes:

[0074] Upon receiving an enable identifier from the storage device, the transmission path to be restored is determined based on the enable identifier. The transmission path to be restored is the transmission path of the second storage volume. The enable identifier is generated by the storage device for the transmission path to be restored. The second storage volume is determined in the storage device if an interface card to be enabled exists.

[0075] Release the isolation of the transmission path to be isolated and enable the transmission path to be restored.

[0076] 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, such as the I / O 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, such as the storage volume that needs to transfer data through the interface card. The storage device then sets the transfer path of the second storage volume as the transfer path to be restored.

[0077] The storage device generates an enable flag for the transmission path to be recovered. This flag notifies the host that a new interface card (I / O card) is available on the storage device. For example, the storage device sets an enable flag on all transmission paths across all storage volumes. When the host transmits an I / O request through any transmission path, it will receive the enable flag. The storage device also generates enable flags on all transmission paths other than the path to be recovered. The enable flag may include device concern information, where the error type information is a pre-defined value for the storage's enabled I / O interface card.

[0078] The storage device sends an enable flag to the host, for example: the storage device sends the enable flag directly to the host; after receiving an IO request from the host, it adds the enable flag to the response message of the IO request and sends it to the host together; after receiving an IO request from the host, it marks the IO request as failed and returns the enable flag to the host along with the IO request.

[0079] After receiving the enable flag, the host determines that an interface card to be enabled exists in the current storage device. Based on the enable flag, it determines the transmission path to be restored. For example, the host obtains all port information of the interface card to be enabled, and sequentially checks whether each transmission path in the multipath device contains the aforementioned port information. The transmission path containing the aforementioned port information is set as the transmission path to be restored. The multipath software then de-isolates this path and restores it to online status.

[0080] In this embodiment, multipath software in the host computer automatically isolates or restores all transmission paths on the host computer associated with the interface card being maintained. Simultaneously, after the I / O interface card is maintained or replaced, the storage device can instruct the multipath software to restore the previously isolated transmission paths. This efficiently restores the transmission paths without requiring user intervention on the host computer.

[0081] As an optional embodiment, determining the transmission path to be restored based on the enable identifier includes:

[0082] Upon receiving a second access request with a tag sent by the storage device and an enable flag, determine whether the enable flag is equal to a second preset value;

[0083] If the enabled flag is equal to the second preset value, the second error request handling process is initiated based on the second access request after the flag.

[0084] According to the second error request processing flow, a second port information query instruction is generated and sent to the storage device. The second port information query instruction is used to obtain the second port identifier of the interface card to be enabled from the storage device.

[0085] Obtain the isolated transmission path of the host, and take the transmission path corresponding to the second port identifier in the isolated transmission path as the transmission path to be restored.

[0086] Specifically, when a second access request is sent from the host to the storage volume via a certain link, the storage device checks whether the transmission path used to transmit the first access request has an enable flag. The second access request is, for example, an I / O request. If the transmission path has an enable flag, the storage device marks the I / O request as failed and returns the enable flag to the host along with the marked second access request.

[0087] Upon receiving a tagged second access request and an enable flag from the storage device, the host's multipath driver parses the tagged second access request and enable flag, determining whether the enable flag equals a second preset value. The second preset value, for example, is the agreed-upon storage I / O interface card value for the enable flag's Sense key. If the enable flag equals the second preset value, a second error request handling process is initiated based on the tagged second access request. This second error request handling process is, for example, a sub-process for handling I / O request errors.

[0088] In the second error request handling process, the host uses multipath software to generate a second port information query command, such as a SCSI command. This command is then sent to the storage device to obtain the second port identifier of the interface card to be enabled, for example, the WWPN values ​​of all ports on the enabled IO interface card. The second port identifier is then stored in a list, denoted as list_2.

[0089] After receiving the second port information query command, the storage device returns I / O interface card status information. The storage device's I / O interface card status information uses a hierarchical structure, containing global information (fixed 12 bytes) and a port information list (22 bytes per port). The host determines the second port identifier based on the returned I / O interface card status information.

[0090] The host uses multipathing software to traverse all multipathing devices on the host. For each multipathing device, it traverses all its isolated transmission paths and identifies the transmission path corresponding to the second port identifier as the transmission path to be restored. For example, if the WWPN value of an isolated transmission path is within the range of list_2, then that isolated transmission path is identified as the associated path of the enabled I / O interface card on the storage, i.e., the transmission path to be restored. The host then uses the multipathing software to deisolate this path and restore it to online status.

[0091] In addition, the multipath software will switch the second access request after the previous one to another available path and resend it to the storage device.

[0092] In this embodiment, multipath software in the host computer automatically isolates or restores all transmission paths on the host computer associated with the interface card being maintained. Simultaneously, after the I / O interface card is maintained or replaced, the storage device can instruct the multipath software to restore the previously isolated transmission paths. This efficiently restores the transmission paths without requiring user intervention on the host computer.

[0093] As an optional embodiment, after obtaining the isolated transmission path of the host, the method further includes:

[0094] If there is no transmission path corresponding to the second port identifier in the isolated transmission path, delete the isolated transmission path;

[0095] Perform a disk scan operation, obtain the current transmission path between the interface card to be enabled and the host based on the disk scan operation, and enable the current transmission path.

[0096] Specifically, if no transmission path corresponding to the second port identifier exists in the isolated transmission paths, for example, if the WWPN values ​​of the isolated transmission paths are not within the range of list_2, it indicates that a new IO interface card has been replaced on the storage device side, and the multipath software has removed the isolated transmission path from the host side. The multipath software on the host calls operating system commands to perform a disk scan operation, obtains the current transmission path between the interface card to be enabled and the host based on the disk scan operation, and enables the current transmission path.

[0097] In this embodiment, for scenarios involving storage I / O interface card replacement, host multipathing can automatically delete isolated paths from the host and rescan for new paths. The entire process requires no manual intervention on the host, reducing the workload of maintenance personnel, improving operational efficiency, and ensuring the continuity of host services.

[0098] As an optional embodiment, a disk scan operation is performed to obtain the current transmission path between the interface card to be enabled and the host, and the current transmission path is enabled, including:

[0099] Obtain the first port associated with the switch for the interface card to be enabled, and obtain the second port associated with the switch for the host;

[0100] The current transmission path is determined based on the first port and the second port;

[0101] Perform a simulated disconnection operation to generate a transmission path fault, and obtain the first number of transmission paths that are interrupted when a transmission path fault exists.

[0102] Perform a simulated patching operation to repair transmission path faults and obtain the number of second paths of the restored transmission path after the transmission path faults are repaired.

[0103] If 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, the current transmission path is enabled.

[0104] Specifically, obtain the first port associated with the interface card to be enabled and the switch, and obtain the second port associated with the host and the switch. The switch is, for example, a fiber optic switch. The first port is, for example, the interface of the interface card that has a transmission path to the switch. The second port is, for example, the interface of the host that has a transmission path to the switch.

[0105] The current transmission path is determined based on the first and second ports. For example, based on the number of first and second ports, combined with a fixed path count algorithm and an active port set intersection algorithm, the current transmission path is determined. The number of first ports is S, the number of second ports is H, and the number of current transmission paths is S × H. A simulated disconnection operation is performed to generate a transmission path fault, and the number of first paths in the case of a transmission path fault is obtained. A simulated reconnection operation is performed to repair the transmission path fault, and the number of second paths in the case of a restored connection is obtained.

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

[0107] In this embodiment, the current transmission path is automatically verified, enabling the validation of core functions such as the status, policy, and quantity of the switching card. This significantly improves testing efficiency and quality, accurately calculates the number of paths, and validates the status and policy of each path.

[0108] As an optional embodiment, the host may also utilize multipath software to perform multipath anomaly detection, which may include steps A1 to A4.

[0109] Step A1: When a storage volume is mapped to a host, the host obtains the storage volume and its corresponding WWID (World Wide Identifier) ​​information.

[0110] Step A2 triggers the corresponding drive device of the host to perform a disk scan operation so that when a new disk device is detected, a target disk device corresponding to the storage volume is generated. There are multiple target disk devices, and each one corresponds to a path of the storage volume.

[0111] Step A3: Obtain the disk wwid information corresponding to the target disk device and compare it with the wwid identifier information.

[0112] Step A4: If the disk wwid information is inconsistent with the wwid identifier information, it is determined that there is an anomaly in the multipath information of the storage volume, and the mounting process of the storage volume is terminated.

[0113] Specifically, when a storage volume is mapped to the host, the host can obtain the storage volume and its corresponding wwid (widget ID). The wwid of a storage volume can be obtained by viewing a specific directory, or it can be generated using the SCSI_id command. The host uses multipathing software for multipath consolidation. Upon obtaining the storage volume and its corresponding wwid, the host does not automatically generate the target disk device. The host needs to actively send a command to trigger a device scan by the SCSI driver. If a new device is found, the SCSI driver will trigger an event, informing the host to generate the target disk device corresponding to the storage volume. After scanning, the corresponding disk can be seen on the host, with generated paths such as: controller 1 - host bus adapter 3, controller 2 - host bus adapter 4. Each path corresponds to a dev_wwid (device wwid).

[0114] Multipathing software continuously monitors disk device changes, notifying the host when a new disk device is added. The multipathd service aggregates disk devices into a single multipath block device based on configuration rules; for example, it aggregates newly added disk devices sdb, sdc, sdd, and sde into a single multipath block device. This is done by comparing the storage volume's wwid with the corresponding disk wwids for the four disk devices sdb, sdc, sdd, and sde. If the storage volume's wwid matches all four disk devices' wwids, there is no wwid inconsistency; if the storage volume's wwid does not match any of the four disk devices' dev_wwids, a multipath wwid inconsistency is detected. Since there are multiple target disks, the wwid information for multiple target disks can be compared simultaneously with the wwid identifier information, or they can be compared one by one.

[0115] In this embodiment, multipath detection is integrated into the storage mounting process, with multipath wwid consistency checks performed during the mounting process. If a wwid inconsistency is detected, the current mounting process is terminated. This avoids the problem of existing anomaly detection methods that perform after the mounting process is complete, which could lead to mounting failure or even serious impact on storage operations if an anomaly is detected. It also shortens the time lag between mounting storage and detecting multipath anomalies, and avoids the need for separate manpower to maintain and monitor multipath wwid anomaly detection tools, thus improving the stability and accuracy of anomaly detection.

[0116] According to an embodiment of this application, an embodiment of an interface card management method for storage devices is provided. It should be noted that the storage devices include, for example, solid-state drives and hard disk drives. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0117] This embodiment provides a method for managing interface cards applied to storage devices. Figure 3 This is a flowchart of an interface card management method applied to a storage device according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps:

[0118] Step S301: If there is an interface card to be disabled, determine the first storage volume associated with the interface card to be disabled.

[0119] Specifically, after the user selects the interface card to be disabled on the storage interface and clicks the "Disable" button, the storage device determines the interface card to be disabled. This interface card may be, for example, an I / O interface card that needs to be disabled. The storage interface is the interface used to control the storage device. After determining the interface card to be disabled, the storage device determines the first storage volume associated with it. Host access to the first storage volume requires transmitting I / O requests through the interface card to be disabled. The storage device then sets the transmission path of the first storage volume to the transmission path to be isolated.

[0120] Step S302: 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.

[0121] Specifically, the storage device generates a disable flag for the transmission path to be isolated. This flag notifies the host that a disabled interface card exists on the storage device. For example, the storage device sets a disable flag on all transmission paths of all storage volumes, so the host receives the flag whenever it transmits an I / O request through any transmission path. Alternatively, the storage device can generate disable flags only on the transmission path to be isolated, or it can set them on pre-configured transmission paths. The disable flag may be a Unit Attention (UA) message, where the Sense Key (error type) is a pre-defined value representing that the I / O interface card is disabled.

[0122] Step S303: Upon receiving a first access request from the host, determine whether there is a disabled flag on the transmission path corresponding to the first access request.

[0123] Step S304: If a disabled flag exists in the transmission path corresponding to the first access request, mark the first access request as failed to obtain the marked first access request.

[0124] Specifically, when a host sends a first access request to a storage volume via a certain link, the storage device checks whether the transmission path used to transmit the first access request has a disabled flag. The first access request is, for example, an I / O request. If the transmission path has a disabled flag, the storage device marks the I / O request as failed and returns the disabled flag to the host along with the marked first access request.

[0125] Step S305: 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, determine the transmission path to be isolated and isolate the transmission path to be isolated.

[0126] Specifically, the marked first access request and disable flag are sent to the host. Upon receiving the marked first access request and disable flag from the storage device, the multipath driver in the host parses the marked first access request and disable flag, determining whether the disable flag is equal to a first preset value. The first preset value is, for example, a pre-defined value representing that the I / O interface card is disabled, where the disable flag's Sense key is an agreed-upon value. If the disable flag equals the first preset value, a first error request handling process is initiated based on the marked first access request. This first error request handling process is, for example, a sub-process for handling I / O request errors. The first error request handling process determines the transmission path to be isolated and isolates it. For example, the host obtains all port information of the interface card to be disabled, sequentially determines whether each transmission path in the multipath device contains the aforementioned port information, and sets the transmission path containing the aforementioned port information as the transmission path to be isolated. The multipath software in the host isolates the transmission path to be isolated, taking it offline. The offline transmission path will no longer transmit I / O requests.

[0127] This embodiment provides an interface card management method. When an interface card to be disabled exists in a storage device, the first storage volume associated with the interface card to be disabled is determined, the transmission path of the first storage volume is set as the transmission path to be isolated, and finally a disabling identifier for the transmission path to be isolated is generated. The disabling identifier is transmitted to the host, which determines the transmission path to be isolated based on the disabling identifier and isolates the transmission path. This method implements the function of disabling interface cards in the storage device and notifies the host of the existence of an interface card to be disabled and a transmission path to be isolated through the disabling identifier. In the host, multi-path software is used to automatically isolate the transmission path to be isolated. The host efficiently isolates the transmission path to be isolated without requiring user operation on the host, improving operational efficiency and accuracy. It solves the problem of low efficiency and error-proneness in manually isolating the paths of managed IO interface cards.

[0128] As an optional embodiment, determining the first storage volume associated with the interface card to be disabled includes:

[0129] The first preset number of storage volumes in the storage device are designated as the first storage volume;

[0130] Alternatively, the target storage volume in the storage device can be used as the first storage volume, where the target storage volume is a storage volume used for data transfer through the interface card to be disabled.

[0131] Specifically, a first preset number of storage volumes in the storage device are designated as the first storage volumes. These first preset number of storage volumes may include: all storage volumes in the storage device, the storage volume corresponding to the interface card to be disabled, and a subset of storage volumes other than the one corresponding to the interface card to be disabled. The specific storage volumes can be set according to actual needs. A target storage volume in the storage device is designated as the first storage volume. The target storage volume is the storage volume used for data transmission through the interface card to be disabled. For example, the target storage volume may be the storage volume that requires the transmission of IO requests through the interface card to be disabled for data interaction with the host.

[0132] As an optional embodiment, the method further includes:

[0133] In the presence of an interface card to be enabled, determine the second preset number of second storage volumes contained in the storage device;

[0134] The transfer path of the second storage volume is used as the transfer path to be recovered, and an enable identifier for the transfer path to be recovered is generated.

[0135] An enable flag is sent to the host so that the host can enable the transport path to be restored based on the enable flag.

[0136] 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, such as the I / O 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, such as the storage volume that needs to transfer data through the interface card. The storage device then sets the transfer path of the second storage volume as the transfer path to be restored.

[0137] The storage device generates an enable flag for the transmission path to be recovered. This flag notifies the host that a new interface card (I / O card) is available on the storage device. For example, the storage device sets an enable flag on all transmission paths across all storage volumes. When the host transmits an I / O request through any transmission path, it will receive the enable flag. The storage device also generates enable flags on all transmission paths other than the path to be recovered. The enable flag may include device concern information, where the error type information is a pre-defined value for the storage's enabled I / O interface card.

[0138] The storage device sends an enable flag to the host, for example: the storage device sends the enable flag directly to the host; after receiving an IO request from the host, it adds the enable flag to the response message of the IO request and sends it to the host together; after receiving an IO request from the host, it marks the IO request as failed and returns the enable flag to the host along with the IO request.

[0139] In this embodiment, multipath software in the host computer automatically isolates or restores all transmission paths on the host computer associated with the interface card being maintained. Simultaneously, after the I / O interface card is maintained or replaced, the storage device can instruct the multipath software to restore the previously isolated transmission paths. This efficiently restores the transmission paths without requiring user intervention on the host computer.

[0140] As an optional embodiment, sending the enable identifier to the host includes:

[0141] Upon receiving a second access request from the host, determine whether an enable flag exists on the transmission path corresponding to the second access request;

[0142] If an enable flag exists in the transmission path corresponding to the second access request, the second access request is marked as failed, and the marked second access request is obtained.

[0143] The marked second access request and the enable flag are sent to the host. The marked second access request is used to instruct the host to start the second error request handling process. The second error request handling process is used to release the isolation of the transmission path to be isolated and enable the transmission path to be restored according to the enable flag.

[0144] Specifically, when a second access request is sent from the host to the storage volume via a certain link, the storage device checks whether the transmission path used to transmit the first access request has an enable flag. The second access request is, for example, an I / O request. If the transmission path has an enable flag, the storage device marks the I / O request as failed and returns the enable flag to the host along with the marked second access request.

[0145] Upon receiving a tagged second access request and an enable flag from the storage device, the host's multipath driver parses the tagged second access request and enable flag, determining whether the enable flag equals a second preset value. The second preset value, for example, is the agreed-upon storage I / O interface card value for the enable flag's Sense key. If the enable flag equals the second preset value, a second error request handling process is initiated based on the tagged second access request. This second error request handling process is, for example, a sub-process for handling I / O request errors.

[0146] In the second error request handling process, the host uses multipathing software to generate a second port information query command, such as a SCSI command. This command is then sent to the storage device to obtain the second port identifiers of the interface cards to be enabled, for example, the WWPN values ​​of all ports on the enabled I / O interface card. These second port identifiers are stored in a list, denoted as list_2. The transmission path corresponding to the second port identifier in the isolated transmission path is designated as the transmission path to be restored. The host then uses the multipathing software to de-isolate this path and restore it to online status.

[0147] As an optional embodiment, the method further includes:

[0148] Upon receiving a first port information query instruction from the host, the first port identifier of the interface card to be disabled is obtained and sent to the host. The first port information query instruction is generated by the host according to the first error request handling process, which is initiated by the host when the disable identifier is equal to a first preset value.

[0149] Upon receiving a second port information query instruction from the host, the second port identifier of the interface card to be enabled is obtained and sent to the host. The second port information query instruction is generated by the host according to the second error request handling process, which is initiated by the host when the enable identifier is equal to the second preset value.

[0150] Specifically, after receiving the first port information query command, the storage device returns I / O interface card status information. The I / O interface card status information of the storage device adopts a hierarchical structure, containing global information (fixed 12 bytes) + a port information list (22 bytes per port). The structure of the global information of the I / O 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 identifier based on the returned I / O interface card status information.

[0151] After receiving the second port information query command, the storage device returns I / O interface card status information. The storage device's I / O interface card status information uses a hierarchical structure, containing global information (fixed 12 bytes) and a port information list (22 bytes per port). The host determines the second port identifier based on the returned I / O interface card status information.

[0152] As an optional embodiment, sending the first port identifier to the host includes:

[0153] Get the total number of ports, the number of bytes of port data, and the interface card identifier of the interface card to be disabled;

[0154] Global information is generated based on the total number of ports, the number of bytes of port data, the interface card identifier, and the first preset offset;

[0155] Port information is generated based on the first port identifier and the second preset offset;

[0156] Based on global and port information, interface card status information is generated and sent to the host.

[0157] Specifically, the total number of ports, the number of port data bytes, and the interface card identifier of the interface card to be disabled are obtained. For example, as shown in Table 2, the total number of ports is TOTAL_PORTS, the number of port data bytes 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 for TOTAL_PORTS is 0-3, the offset for DATA_LENGTH is 4-7, and the offset for HBA_WWN is 8-11. Global information is generated based on the total number of ports, the number of port data bytes, the interface card identifier, and the first preset offset.

[0158] For example, as shown in Table 3, the first port identifier is PORT_WWPN, and the corresponding second preset offset is 0-7. Port information is generated based on the first port identifier and the second preset offset.

[0159] The global information and port information are concatenated to form 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 then sent to the host.

[0160] This embodiment also provides an interface card management device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0161] This embodiment provides an interface card management device deployed on a host, such as... Figure 4 As shown, it includes:

[0162] The process initiation module 401 is used to initiate a first error request processing process based on the first access request after receiving the first access request after being marked and the first access request after being disabled 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 disabled flag. The disabled flag is generated by the storage device for the transmission path to be isolated.

[0163] The first judgment module 402 is used to determine whether the disabled flag is equal to the first preset value according to the first error request processing flow;

[0164] The first path isolation module 403 is used to determine the transmission path to be isolated according to the first error request processing flow when the disable identifier 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.

[0165] In some alternative implementations, the first path isolation module 403 includes:

[0166] The instruction sending unit is used to generate a first port information query instruction according to the first error request processing flow, and send the first port information query instruction 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;

[0167] The first path acquisition unit is used to acquire the associated transmission path of the host and take the associated transmission path with the corresponding port identifier as the first port identifier as the transmission path to be isolated.

[0168] In some alternative embodiments, the device further includes:

[0169] The first determining module is used to determine the transmission path to be restored based on the enabling identifier sent by the storage device when it receives the enabling identifier. The transmission path to be restored is the transmission path of the second storage volume. The enabling identifier is generated by the storage device for the transmission path to be restored. The second storage volume is determined in the storage device when there is an interface card to be enabled.

[0170] The isolation release module is used to release the isolation of the transmission path to be isolated and enable the transmission path to be restored.

[0171] In some alternative implementations, the first determining module includes:

[0172] The first judgment unit is used to determine whether the enable flag is equal to a second preset value when it receives a second access request and an enable flag sent by the storage device after receiving a tag;

[0173] The startup unit is used to initiate a second error request processing flow based on the marked second access request when the enable flag is equal to a second preset value.

[0174] The first generation unit is used to generate a second port information query instruction according to the second error request processing flow, and send the second port information query instruction to the storage device, wherein the second port information query instruction is used to obtain the second port identifier of the interface card to be enabled from the storage device;

[0175] The second path acquisition unit is used to acquire the isolated transmission path of the host and take the transmission path corresponding to the second port identifier in the isolated transmission path as the transmission path to be restored.

[0176] In some optional implementations, the first determining module further includes:

[0177] 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;

[0178] 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.

[0179] In some optional implementations, the path enabling unit includes:

[0180] 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;

[0181] The determination submodule is used to determine the current transmission path based on the first port and the second port;

[0182] 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.

[0183] 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.

[0184] 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.

[0185] This embodiment provides an interface card management device deployed on a storage device, such as... Figure 5 As shown, it includes:

[0186] 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.

[0187] 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.

[0188] 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.

[0189] 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.

[0190] 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.

[0191] In some alternative implementations, the storage volume determination module 501 includes:

[0192] The first setting unit is used to designate a first preset number of storage volumes in the storage device as the first storage volume;

[0193] The second setting unit is used to designate 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 transfer through the interface card to be disabled.

[0194] In some alternative embodiments, the device further includes:

[0195] The second determining module is used to determine, in the case of an interface card to be enabled, a second preset number of second storage volumes contained in the storage device;

[0196] The generation module is used to take the transfer path of the second storage volume as the transfer path to be recovered and generate an enable identifier for the transfer path to be recovered.

[0197] The sending module is used to send an enable flag to the host so that the host can enable the transmission path to be restored based on the enable flag.

[0198] In some alternative implementations, the sending module includes:

[0199] The second judgment unit is used to determine whether an enable flag exists in the transmission path corresponding to the second access request when a second access request is received from the host.

[0200] The second marking unit is used to mark the second access request as failed if an enable flag exists in the transmission path corresponding to the second access request, thereby obtaining the marked second access request.

[0201] The second sending unit is used to send the marked second access request and the enable flag to the host. The marked second access request is used to instruct the host to start the second error request processing procedure. The second error request processing procedure is used to release the isolation of the transmission path to be isolated according to the enable flag and enable the transmission path to be restored.

[0202] In some alternative embodiments, the device further includes:

[0203] The first identifier sending module is used to obtain the first port identifier of the interface card to be disabled when it receives the first port information query instruction sent by the host, and send the first port identifier to the host. The first port information query instruction is generated by the host according to the first error request processing procedure, which is started by the host when the disable identifier is equal to the first preset value.

[0204] The second identifier sending module is used to obtain the second port identifier of the interface card to be enabled when it receives the second port information query instruction sent by the host, and send the second port identifier to the host. The second port information query instruction is generated by the host according to the second error request processing procedure, which is started by the host when the enable identifier is equal to the second preset value.

[0205] In some alternative implementations, the first identifier sending module includes:

[0206] 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;

[0207] 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.

[0208] The third generation unit is used to generate port information based on the first port identifier and the second preset offset;

[0209] 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.

[0210] 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.

[0211] 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.

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

[0213] 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.

[0214] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include an integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.

[0215] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.

[0216] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0217] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0218] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0219] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0220] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0221] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and such modifications and variations all fall within the scope defined by this application.

Claims

1. An interface card management method, characterized in that, The method is applied to a host, and the method includes: Upon receiving a marked first access request and a disable flag sent by the storage device, a first error request processing procedure is initiated based on the marked first access request. The marked first access request is obtained by marking the first access request as failed when a disable flag exists on the transmission path corresponding to the first access request. The disable flag is generated by the storage device for the transmission path to be isolated. According to the first error request handling process, it is determined whether the disabled flag is equal to the first preset value; When the disabled identifier 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, wherein 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; The step of determining the transmission path to be isolated according to the first error request handling process includes: generating a first port information query instruction according to the first error request handling process, and sending the first port information query instruction 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; obtaining the associated transmission path of the host, and taking the associated transmission path with the corresponding port identifier as the first port identifier as the transmission path to be isolated.

2. The method according to claim 1, characterized in that, The method further includes: Upon receiving an enable identifier sent by the storage device, a transmission path to be restored is determined based on the enable identifier, wherein the transmission path to be restored is the transmission path of the second storage volume, the enable identifier is generated by the storage device for the transmission path to be restored, and the second storage volume is determined in the storage device in the presence of an interface card to be enabled; Release the isolation of the transmission path to be isolated and enable the transmission path to be restored.

3. The method according to claim 2, characterized in that, The step of determining the transmission path to be restored based on the activation identifier includes: Upon receiving a second access request with a tag sent by the storage device and the enable identifier, determine whether the enable identifier is equal to a second preset value; If the enabled identifier is equal to the second preset value, the second error request processing flow is initiated according to the second access request after the tag. According to the second error request handling process, a second port information query instruction is generated and sent to the storage device, wherein the second port information query instruction is used to obtain the second port identifier of the interface card to be enabled from the storage device; Obtain the isolated transmission path of the host, and take the transmission path corresponding to the second port identifier in the isolated transmission path as the transmission path to be restored.

4. The method according to claim 3, characterized in that, After obtaining the isolated transmission path of the host, the method further includes: If there is no transmission path corresponding to the second port identifier in the isolated transmission path, delete the isolated transmission path; Perform a disk scan operation, obtain the current transmission path between the interface card to be enabled and the host according to the disk scan operation, and enable the current transmission path.

5. The method according to claim 4, characterized in that, The step of performing a disk scan operation, obtaining the current transmission path between the interface card to be enabled and the host based on the disk scan operation, and enabling the current transmission path includes: Obtain the first port associated with the switch for the interface card to be enabled, and obtain the second port associated with the switch for the host; The current transmission path is determined based on the first port and the second port; Perform a simulated disconnection operation to generate a transmission path fault, and obtain the first number of transmission paths that are interrupted when the transmission path fault exists. Perform a simulated plug-in operation to repair the transmission path fault, and obtain the number of second paths of the transmission path that have been restored after the transmission path fault is repaired; If the number of the first path is less than a first preset threshold and the number of the second path is greater than a second preset threshold, the current transmission path is activated.

6. An interface card management method, characterized in that, The method is applied to a storage device, and the method includes: In the case of 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 identifier for the transmission path to be isolated is generated. Upon receiving a first access request from the host, determine whether the transmission path corresponding to the first access request contains the disabled identifier; If the disabled flag exists in 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 the tag and the disable identifier are sent to the host, wherein the first access request after the tag is used to instruct the host to start a first error request processing procedure, the first error request processing procedure is used to determine whether the disable identifier is equal to a first preset value, and if the disable identifier is equal to the first preset value, to determine the transmission path to be isolated and to isolate the transmission path to be isolated. Upon receiving a first port information query instruction from the host, the host obtains the first port identifier of the interface card to be disabled and sends the first port identifier to the host. The first port information query instruction is generated by the host according to a first error request handling process. The first error request handling process is initiated by the host when the disable identifier is equal to a first preset value. The first error request handling process is also used to obtain the associated transmission path of the host and use the associated transmission path with the corresponding port identifier as the first port identifier as the transmission path to be isolated.

7. The method according to claim 6, characterized in that, The step of determining the first storage volume associated with the interface card to be disabled includes: The first preset number of storage volumes in the storage device are designated as the first storage volume; Alternatively, the target storage volume in the storage device may be used as the first storage volume, wherein the target storage volume is a storage volume used for data transfer through the interface card to be disabled.

8. The method according to claim 6, characterized in that, The method further includes: In the presence of an interface card to be enabled, determine the second preset number of second storage volumes contained in the storage device; The transmission path of the second storage volume is used as the transmission path to be restored, and an enable identifier for the transmission path to be restored is generated. The enable identifier is sent to the host so that the host enables the transmission path to be restored based on the enable identifier.

9. The method according to claim 8, characterized in that, Sending the enable identifier to the host includes: Upon receiving a second access request from the host, determine whether the enable identifier exists in the transmission path corresponding to the second access request; If the enable identifier exists in the transmission path corresponding to the second access request, the second access request is marked as failed, and the marked second access request is obtained. The marked second access request and the enable identifier are sent to the host, wherein 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 release the isolation of the transmission path to be isolated and enable the transmission path to be restored according to the enable identifier.

10. The method according to claim 8, characterized in that, The method further includes: Upon receiving a second port information query instruction from the host, the host obtains the second port identifier of the interface card to be enabled and sends the second port identifier to the host. The second port information query instruction is generated by the host according to the second error request handling process, which is initiated by the host when the enable identifier is equal to a second preset value.

11. The method according to claim 10, characterized in that, Sending the first port identifier to the host includes: Obtain the total number of ports, the number of port data bytes, and the interface card identifier of the interface card to be disabled; Global information is generated based on the total number of ports, the number of bytes of port data, the interface card identifier, and the first preset offset. Port information is generated based on the first port identifier and the second preset offset; Based on the global information and the port information, interface card status information is generated and sent to the host.

12. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the interface card management method according to any one of claims 1 to 11 by executing the computer instructions.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the interface card management method according to any one of claims 1 to 11.

14. A computer program product, characterized in that, It includes computer instructions for causing a computer to execute the interface card management method according to any one of claims 1 to 11.

Citation Information

Patent Citations

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

    CN118708114A

  • Storage volume management method, electronic equipment, storage medium and product

    CN120371220A