CN119166407A - An expansion card repair method, system, device and computer-readable storage medium - Google Patents

An expansion card repair method, system, device and computer-readable storage medium Download PDF

Info

Publication number
CN119166407A
CN119166407A CN202411282790.7A CN202411282790A CN119166407A CN 119166407 A CN119166407 A CN 119166407A CN 202411282790 A CN202411282790 A CN 202411282790A CN 119166407 A CN119166407 A CN 119166407A
Authority
CN
China
Prior art keywords
expansion card
card
read
backup memory
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411282790.7A
Other languages
Chinese (zh)
Inventor
刘波
王德明
王楷元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202411282790.7A priority Critical patent/CN119166407A/en
Publication of CN119166407A publication Critical patent/CN119166407A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0727Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a storage system, e.g. in a DASD or network based storage system
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The application discloses an expansion card repairing method, an expansion card repairing system, expansion card repairing equipment and a computer readable storage medium, which relate to the technical field of storage, respond to the situation that configuration space information of an expansion card cannot be read by a driver, detect whether hardware fault information of the expansion card is read, detect whether an over-reinitialization operation is executed on the expansion card if the hardware fault information of the expansion card is read, power up and down operation is executed on the expansion card if the over-reinitialization operation is executed on the expansion card, reinitialize the expansion card if the over-reinitialization operation is not executed on the expansion card, and repair the driver if the hardware fault information of the expansion card is not read, wherein the expansion card comprises an interface card connected between a server main board and a hard disk drive. The application distinguishes the fault of the expansion card and the driving fault through the hardware fault information of the expansion card, thereby realizing the accurate identification of the fault condition of the expansion card and the accurate fault repair of the expansion card by executing the corresponding repair operation.

Description

Expansion card repairing method, system, equipment and computer readable storage medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to an expansion card repair method, system, device, and computer readable storage medium.
Background
Currently, an expansion card is connected between a server motherboard and a hard disk drive to provide better storage performance and data protection for the server system through the expansion card. However, in the running process of the server, the expansion card is inevitably failed, and the service is stopped, so that the stable running of the storage service is affected.
In summary, how to accurately perform fault repair on the expansion card is a problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide an expansion card repairing method which can solve the technical problem of how to accurately repair faults of an expansion card to a certain extent. The application also provides an expansion card repair system, electronic equipment and a computer readable storage medium.
In order to achieve the above object, the present application provides the following technical solutions:
An expansion card repair method, comprising:
responding to the fact that the driver cannot read configuration space information of the expansion card, and detecting whether hardware fault information of the expansion card is read or not;
If the hardware fault information of the expansion card is read, detecting whether the operation of re-initializing the expansion card is executed;
if the extension card is subjected to the re-initialization operation, powering up and powering down the extension card;
If the re-initialization operation is not executed on the expansion card, the re-initialization operation is executed on the expansion card;
if the hardware fault information of the expansion card is not read, repairing the driver;
the expansion card comprises an interface card connected between the server main board and the hard disk drive.
In an exemplary embodiment, before the powering up and powering down the expansion card, the method further includes:
Detecting whether the expansion card supports power-on and power-off;
if the expansion card supports power-on and power-off, performing power-on and power-off operation on the expansion card;
If the expansion card does not support power-on and power-off, the expansion card is isolated, and prompt information for carrying out reinsertion operation on the expansion card is generated.
In an exemplary embodiment, in response to the driver failing to read configuration space information of the expansion card, detecting whether hardware failure information of the expansion card is read further includes:
updating the fault time value of the expansion card;
detecting whether the fault sub-value exceeds a set threshold;
if the failure frequency value exceeds the set threshold value, isolating the expansion card, releasing the resources used by the expansion card, and generating prompt information for replacing the expansion card.
In an exemplary embodiment, further comprising:
Acquiring in-place information of the expansion card from a baseboard management controller in response to the loss of the expansion card caused by abnormal link;
Analyzing the presence information, and if the presence information represents that the expansion card is in place, powering up and powering down the expansion card.
In an exemplary embodiment, further comprising:
and responding to the abnormal register value of the drive read expansion card, and performing power-on and power-off operation on the expansion card.
In an exemplary embodiment, the repairing the drive includes:
determining a first backup memory mapped by a configuration space address of the expansion card;
Removing isolation of the first backup memory, and taking the mapping relation between the configuration space address and the first backup memory as a configuration space address mapping result of the drive;
determining a second backup memory mapped by the BAR space address of the expansion card;
Removing isolation of the second backup memory, and taking the mapping relation between the BAR space address and the second backup memory as the mapping result of the BAR space address of the drive;
Determining a third backup memory mapped by a register address of the expansion card;
Releasing the isolation of the third backup memory, and taking the mapping relation between the register address and the third backup memory as the register address mapping result of the drive;
determining a fourth backup memory of the drive application;
removing isolation of the fourth backup memory, and taking the fourth backup memory as a DMA address of the drive;
migrating the driven IO instruction to the DMA address;
And mapping new memories for the configuration space address, the BAR space address and the register address respectively, and isolating the new memories.
In an exemplary embodiment, before repairing the drive, the method further includes:
mapping the configuration space address to two memories in the process of initializing the expansion card by the driver, and isolating one of the memories as the first backup memory;
Mapping the BAR space address to two memories, and isolating one of the memories as the second backup memory;
Mapping the register address to two memories, and isolating one of the memories as the third backup memory;
applying for the drive two continuous memories, and isolating one of the two continuous memories as the fourth backup memory.
An expansion card repair system comprising:
The first detection module is used for detecting whether hardware fault information of the expansion card is read or not in response to the fact that the configuration space information of the expansion card cannot be read by a driver;
The second detection module is used for detecting whether the extended card is subjected to the re-initialization operation or not if the hardware fault information of the extended card is read, and carrying out the power-on and power-off operation on the extended card if the extended card is subjected to the re-initialization operation;
the first repair module is used for repairing the driver if the hardware fault information of the expansion card is not read;
the expansion card comprises an interface card connected between the server main board and the hard disk drive.
An electronic device, comprising:
a memory for storing a computer program;
And a processor for implementing the steps of the expansion card repair method as described in any one of the above when executing the computer program.
A computer readable storage medium having stored therein a computer program which when executed by a processor performs the steps of the expansion card repair method of any of the above.
The application provides an expansion card repairing method, which is used for detecting whether hardware fault information of an expansion card is read or not in response to the fact that a driver cannot read configuration space information of the expansion card, detecting whether the hardware fault information of the expansion card is read or not, carrying out power-on and power-off operation on the expansion card if the hardware fault information of the expansion card is read, carrying out reinitializing operation on the expansion card if the reinitializing operation is carried out on the expansion card, and repairing the driver if the hardware fault information of the expansion card is not read. The application distinguishes the fault of the expansion card and the driving fault by detecting whether the hardware fault information of the expansion card is read or not under the condition that the configuration space information of the expansion card cannot be read by the driving, improves the identification accuracy of the fault condition of the expansion card, repairs the fault of the expansion card by reinitializing the expansion card and then powering on and off the expansion card under the condition of the fault of the expansion card, improves the success rate of repairing the fault, repairs the driving under the condition that the expansion card has no fault, ensures that the driving can normally operate the expansion card, and realizes the accurate identification of the fault condition of the expansion card and the accurate fault repair of the expansion card by executing the corresponding repair operation. The application provides an expansion card repairing system the electronic device and the computer-readable storage medium solve the corresponding technical problems.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an expansion card repairing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of hot plug fault card isolation;
FIG. 3 is a schematic diagram of node restart fault card isolation;
FIG. 4 is a schematic diagram of a drive repair;
FIG. 5 is a schematic diagram of the creation of a backup memory;
FIG. 6 is a schematic structural diagram of an expansion card repair system according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another architecture of an expansion card repair system according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a repair system for performing a card loss repair on a SAS card;
FIG. 9 is a schematic diagram of a repair system performing register value exception repair on a SAS card;
FIG. 10 is a schematic diagram of a repair system for configuration space exception repair of SAS cards
FIG. 11 is a flow chart of an application of the data storage device;
Fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 13 is another schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flowchart of an expansion card repairing method according to an embodiment of the application.
The method for repairing the expansion card provided by the embodiment of the application can comprise the following steps:
step S101, detecting whether the hardware fault information of the expansion card is read or not in response to the fact that the driver cannot read the configuration space information of the expansion card, executing step S102 if the hardware fault information of the expansion card is read, and executing step S105 if the hardware fault information of the expansion card is not read.
In practical application, the fault types of the expansion card are various, when the fault of the expansion card is represented as configuration idle information of the expansion card which cannot be read by a driver, the fault may be a fault of the expansion card itself or a driving fault of the expansion card, in order to accurately analyze the fault reason, whether hardware fault information of the expansion card is read is further detected, specifically, the fault information of the expansion card is considered to be stored in a fault register, so that the fault register of the expansion card can be read, if the fault register is empty, it is determined that the hardware fault information of the expansion card is not read, at the moment, the driving abnormality of the expansion card can be determined, and correspondingly, if the fault register is not empty, it is determined that the hardware fault information of the expansion card is read, at the moment, the abnormality of the expansion card itself can be determined.
The expansion card of the present application refers to an interface card connected between a server motherboard and a hard disk drive, and may specifically be an SAS (SERIAL ATTACHED SCSI, serial communication technology-based storage interface standard) card or the like.
In practical application, the fault performance of the expansion card may be that the expansion card is lost due to link abnormality, for example, when the expansion card is lost due to PCI link abnormality, or the like, at this time, the in-place information of the expansion card may be obtained from the baseboard management controller (Baseboard Management Controller), the BMC), the in-place information is analyzed, if the in-place information characterizes the expansion card in place, the expansion card is powered on and powered off, so as to repair the expansion card in a hard repair manner.
In practical application, the fault performance of the expansion card may be that the register value of the drive read expansion card is abnormal, and at this time, the expansion card may be powered on and powered off to repair the expansion card in a hard repair manner.
It should be noted that the SAS card driver mainly includes two parts, a kernel driver and a user state driver, where the kernel driver is mainly used for mapping registers, configuration spaces and BAR (Base ADDRESS REGISTER, base register) spaces, and the user state driver mainly implements IO operations, and when a node is started and detects a card, the driver performs backup mapping on key resources during initialization. And the configuration space is a set of registers in the PCIe device for controlling the operation and properties of the device, including device ID, vendor ID, interrupt number, etc., by configuring these registers, control and setting of the device can be achieved. The BAR space is allocated and managed by the PCIe configuration space, each PCIe device has its own configuration space containing a set of BAR registers that inform the operating system and other devices of the resources required by the device, such as memory address ranges or I/O (Input/Output) port address ranges, the operating system, upon initializing the PCIe device, reads the values of the BAR registers and maps the corresponding resources into the system address space so that applications can communicate with the device by accessing these addresses.
Step S102, detecting whether the re-initialization operation is executed on the expansion card, if yes, executing step S103, and if not, executing step S104.
And step S103, performing power-on and power-off operation on the expansion card.
Step S104, reinitializing the expansion card.
In practical application, after reading hardware fault information of an expansion card, determining that the expansion card is abnormal, repairing the expansion card, in the process, detecting whether the expansion card is subjected to soft repair or not, namely detecting whether the expansion card is subjected to soft repair or not, if so, directly performing hard repair on the expansion card, namely directly performing power-on and power-off operation on the expansion card, and if not, performing soft repair and hard repair combined mode to perform fault repair on the expansion card, thereby ensuring repair success rate. It should be noted that, after the reinitialization operation is performed on the expansion card, the effective duration of the reinitialization operation may be flexibly adjusted according to the application scenario, and the application is not limited herein.
In a specific application scene, before the power-on and power-off operation is performed on the expansion card, whether the expansion card supports the power-on and power-off operation can be detected, if the expansion card supports the power-on and power-off operation is performed on the expansion card, if the expansion card does not support the power-on and power-off operation, the expansion card is isolated, and prompt information for performing the reinsertion operation on the expansion card is generated, so that fault repair is performed on the expansion card in a reinsertion manner.
In a specific application scenario, if the expansion card frequently fails, adverse effects are caused on the server, in order to avoid the situation, in response to the fact that the configuration space information of the expansion card cannot be read by a driver, after detecting whether hardware failure information of the expansion card is read, specifically, after performing power-on and power-off operation or reinitialization operation on the expansion card, updating a failure time value of the expansion card, detecting whether the failure time value exceeds a set threshold value, wherein the set threshold value can be flexibly determined according to actual needs, isolating the expansion card if the failure time value exceeds the set threshold value, releasing resources used by the expansion card, and generating prompt information for replacing the expansion card, so that the expansion card which is easy to fail is prevented from being reused in a mode of replacing the expansion card, and the performance stability of the server is ensured.
It should be noted that, the failure time value of the expansion card refers to the accumulated time value of the failure of the expansion card, and the accumulated time length of the failure time value of the expansion card can be determined according to actual needs. In a specific application scenario, when the number of the expansion cards on the server is large, the Serial Numbers (SN) and the failure time values of the expansion cards can be correspondingly stored, so that the failure time values of the corresponding expansion cards can be quickly and accurately searched through the serial numbers. In addition, after the configuration space information of the expansion card cannot be read in response to the drive, the failure time value of the expansion card may be updated first, and if the failure time value does not exceed the set threshold value, an operation of detecting whether the hardware failure information of the expansion card is read or not is performed.
The method for isolating the expansion card according to the fault sub-value can be applied to a scene of isolating the hot plug fault card, as shown in fig. 2, and can comprise the steps of inserting an expansion card into a server, driving to obtain a serial number of a current expansion card through a BMC, obtaining the fault sub-value of the current expansion card according to the serial number, detecting whether the fault sub-value is obtained, initializing the current expansion card normally if the fault sub-value is not obtained, detecting whether the fault sub-value exceeds a set threshold value if the fault sub-value is not obtained, isolating and prohibiting the use of the current expansion card if the fault sub-value exceeds the set threshold value, releasing resources used by the current expansion card, reporting a police, suggesting replacement of a new expansion card, and initializing the current expansion card normally if the fault sub-value is not exceeded the set threshold value.
Of course, the scheme of isolating the expansion card according to the failure time value can be applied to a scene of restarting the failure card isolation of the server node, as shown in fig. 3, the method comprises the following steps of starting service after restarting the node, driving to find the expansion card, executing driving initialization, driving to obtain the serial number of the current expansion card through the BMC, obtaining the failure time value of the current expansion card according to the serial number, detecting whether the failure time value is obtained, if not, initializing the current expansion card normally, if yes, detecting whether the failure time value exceeds a set threshold, if yes, isolating, prohibiting using the current expansion card, releasing resources used by the current expansion card, reporting police, suggesting to replace a new expansion card, and if not, initializing the current expansion card normally.
In a specific application scene, in the process of detecting whether the re-initialization operation is executed on the expansion card, real-time secondary values which are driven and cannot read configuration space information of the expansion card can be accumulated, in a set time length queue, real-time secondary values of preset time lengths are obtained from the head, the obtained real-time secondary values of preset time lengths are added to obtain target time lengths, whether the re-initialization operation is executed on the expansion card in the target time length before the current moment is detected, if yes, the re-initialization operation is judged to be executed on the expansion card, if no, the re-initialization operation is judged not to be executed on the expansion card, and in the set time length queue, the preset time length after the position is shorter.
According to the method, a time length queue is set, the preset time length after the position is located in the time length queue is shorter, after the real-time secondary value of configuration space information of the expansion card cannot be read by the driving is accumulated, the real-time secondary value preset time lengths are obtained from the head in the set time length queue, the obtained real-time secondary value preset time lengths are added to obtain the target time length, although the target time length is increased along with the increase of the real-time secondary value, the increase of the target time length is smaller and smaller, the target time length tends to be stable, the influence of the real-time secondary value on the target time length is lower, the rationality of the target time length is guaranteed, the real-time secondary value of the configuration space information of the expansion card cannot be read by the driving is detected, the fact that the real-time secondary value excessively influences a detection result is avoided, the process of whether the expansion card is subjected to the re-initialization operation is executed by the re-initialization operation is more reasonable is detected, and the rationality and effectiveness of repairing the expansion card by the re-initialization operation is improved.
Step S105, repairing the drive.
In practical application, after hardware fault information of the expansion card is not read, driving abnormality of the expansion card can be considered, and the expansion card can work normally by repairing driving of the expansion card.
In practical application, as shown in fig. 4, in the process of repairing the drive, the first backup memory mapped by the configuration space address of the expansion card can be determined, the isolation of the first backup memory is removed, the mapping relation between the configuration space address and the first backup memory is used as the configuration space address mapping result of the drive, the second backup memory mapped by the BAR space address of the expansion card is determined, the isolation of the second backup memory is removed, the mapping relation between the BAR space address and the second backup memory is used as the BAR space address mapping result of the drive, the third backup memory mapped by the register address of the expansion card is determined, the isolation of the third backup memory is removed, the mapping relation between the register address and the third backup memory is used as the register address mapping result of the drive, the fourth backup memory is determined, the fourth backup memory is used as the DMA (Direct Memory Access, direct access memory) address of the drive is used as the DMA (Direct Memory Access) of the drive, the drive is used for directly sending data to the corresponding to the address without using a central processing unit, after that the migration of the corresponding to the address is completed, the normal operation of driving the DMA address is performed, and the normal operation of the driver is performed to the address of the new IO address is ensured, and the I/O address is continuously mapped to the address of the drive and the new memory is performed.
According to the implementation process, the application considers that the essence of the drive initialization expansion card is to establish the mapping relation between the memory and the configuration space address, the BAR space address, the register address and the DMA address, so that corresponding backup memories are respectively set and isolated for the configuration space address, the BAR space address, the register address and the DMA address, when the drive is normal, the expansion card can be operated through the currently used memory, when the drive is abnormal, the isolation of the backup memories can be released, so that the backup memories can be normally applied, the backup memories are respectively used as the mapping result of the corresponding addresses of the expansion card, and the IO instruction of the drive is migrated to the DMA address, so that the drive can normally operate the expansion card through the backup memories, and the abnormal condition that the drive cannot read the configuration space information of the expansion card is relieved. On the basis, the configuration space address, the BAR space address and the register address are respectively mapped to new memories, and the new memories are isolated, so that the driver is ensured to have backup memories which can be replaced, and the next abnormal repair of the driver is facilitated. In addition, compared with the original scheme for initializing the expansion card, the original scheme for initializing the expansion card can stop related IO operation, namely the running IO operation returns to failure, which can cause short interruption of service, and by the scheme, after the problem occurs in driving, the remapping memory is directly used, the IO is directly switched into the new DMA memory, the initialization of the drive is not needed, the related IO operation is not needed to be stopped, the problem of IO interruption is avoided, and the repair of the drive fault can be realized under the condition that a user has no sense.
In a specific application scenario, in the process of initializing the expansion card by the driver, a corresponding backup memory can be created for the expansion card, as shown in fig. 5, i.e. before repairing the driver, the configuration space address can be mapped to two memories in the process of initializing the expansion card by the driver, one of the memories is isolated as a first backup memory, the other memory is used as a current used memory for driving to operate the configuration space address, the BAR space address is mapped to two memories, one of the memories is isolated as a second backup memory, the other memory is used for driving the current used memory to operate the BAR space address, the register address is mapped to two memories, one of the memories is isolated as a third backup memory, the other memory is used for driving the current used memory to operate the register address, and in order to drive two continuous memories, one of the memories is isolated as a fourth backup memory, and the other memory is used as a current used address for driving to process IO. In other words, in the process of driving the initial initialization expansion card, the corresponding address can be mapped to two memories to obtain the backup memory, and after the initialization is completed, the new memory can be directly mapped for the corresponding address to obtain the backup memory.
The application provides an expansion card repairing method, which is used for detecting whether hardware fault information of an expansion card is read or not in response to the fact that a driver cannot read configuration space information of the expansion card, detecting whether the hardware fault information of the expansion card is read or not, carrying out power-on and power-off operation on the expansion card if the hardware fault information of the expansion card is read, carrying out reinitializing operation on the expansion card if the reinitializing operation is carried out on the expansion card, and repairing the driver if the hardware fault information of the expansion card is not read. The application distinguishes the fault of the expansion card and the driving fault by detecting whether the hardware fault information of the expansion card is read or not under the condition that the configuration space information of the expansion card cannot be read by the driving, improves the identification accuracy of the fault condition of the expansion card, repairs the fault of the expansion card by reinitializing the expansion card and then powering on and off the expansion card under the condition of the fault of the expansion card, improves the success rate of repairing the fault, repairs the driving under the condition that the expansion card has no fault, ensures that the driving can normally operate the expansion card, and realizes the accurate identification of the fault condition of the expansion card and the accurate fault repair of the expansion card by executing the corresponding repair operation.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an expansion card repair system according to an embodiment of the application.
The expansion card repair system provided by the embodiment of the application can comprise:
a first detection module 101, configured to detect whether hardware failure information of the expansion card is read in response to the failure of the drive to read configuration space information of the expansion card;
The second detection module 102 is configured to detect whether an over-reset initialization operation is performed on the expansion card if the hardware failure information of the expansion card is read; if the expansion card is not subjected to the re-initialization operation, the expansion card is subjected to the re-initialization operation;
The first repair module 103 is configured to repair the driver if the hardware failure information of the expansion card is not read;
Wherein the expansion card comprises an interface card connected between the server motherboard and the hard disk drive.
The second detection module can also detect whether the expansion card supports power-on and power-off before the power-on and power-off operation is performed on the expansion card, if the expansion card supports power-on and power-off, the power-on and power-off operation is performed on the expansion card, and if the expansion card does not support power-on and power-off, the expansion card is isolated, and prompt information for performing reinsertion and extraction operation on the expansion card is generated.
The system for repairing the expansion card provided by the embodiment of the application can further comprise:
The first updating module is used for updating the fault secondary value of the expansion card after detecting whether the hardware fault information of the expansion card is read or not in response to the fact that the configuration space information of the expansion card cannot be read by the first detection module;
And if the failure number value exceeds the set threshold, isolating the expansion card, releasing the resources used by the expansion card and generating prompt information for replacing the expansion card.
The system for repairing the expansion card provided by the embodiment of the application can further comprise:
the second repair module is used for responding to the loss of the expansion card caused by the abnormal link, acquiring the in-place information of the expansion card from the baseboard management controller, analyzing the in-place information, and performing power-on and power-off operations on the expansion card if the in-place information characterizes the in-place expansion card.
The system for repairing the expansion card provided by the embodiment of the application can further comprise:
And the third repair module is used for responding to the abnormal register value of the drive read expansion card and performing power-on and power-off operation on the expansion card.
The first repair module of the expansion card repair system provided by the embodiment of the application may include:
the first determining unit is used for determining a first backup memory mapped by the configuration space address of the expansion card;
the first processing unit is used for removing isolation of the first backup memory and taking the mapping relation between the configuration space address and the first backup memory as a configuration space address mapping result of the drive;
a second determining unit, configured to determine a second backup memory mapped by the BAR space address of the expansion card;
the second processing unit is used for removing isolation of the second backup memory and taking the mapping relation between the BAR space address and the second backup memory as a driving BAR space address mapping result;
The third determining unit is used for determining a third backup memory mapped by the register address of the expansion card;
the third processing unit is used for removing isolation of the third backup memory and taking the mapping relation between the register address and the third backup memory as a register address mapping result of the drive;
The fourth determining unit is used for determining a fourth backup memory of the driving application;
The fourth processing unit is used for removing isolation of the fourth backup memory and taking the fourth backup memory as a DMA address of the drive;
The first migration unit is used for migrating the driven IO instruction to the DMA address;
and the first mapping unit is used for mapping the new memory for the configuration space address, the BAR space address and the register address respectively and isolating the new memory.
The system for repairing the expansion card provided by the embodiment of the application can further comprise:
The first mapping module is used for mapping the configuration space address to two memories and isolating one of the memories as a first backup memory in the process of initializing the expansion card by driving before the first repairing module repairs the drive;
The second mapping module is used for mapping the BAR space address to two memories and isolating one of the memories as a second backup memory;
the third mapping module is used for mapping the register address to two memories and isolating one of the memories as a third backup memory;
the first application module is used for applying for two continuous memories for the drive and isolating one of the two continuous memories as a fourth backup memory.
It should be noted that, the structure of the expansion card repair system in the application can be flexibly adjusted according to actual needs, taking an expansion card as an SAS card as an example, the repair system can be shown in fig. 7, and comprises a fault detection device, a fault alarm device, a fault repair device, a data storage device and a device isolation device, wherein the fault detection device is used for detecting the running state of the SAS card and judging whether the current SAS card has a fault, the fault alarm device is used for reporting the fault alarm of the SAS card when the fault of the SAS card occurs or the service is started, the fault repair device is used for executing soft repair or hard repair according to the fault type of the SAS card, the data storage device is used for storing the serial number and the fault number of the current SAS card, and the device isolation device is used for isolating and disabling the SAS card and releasing all resources used by the SAS card when the fault repair of the SAS card exceeds the threshold.
In a specific application scenario, as shown in fig. 8, 9 and 10, a process of repairing an SAS card by the repairing system may be that the failure detecting device detects that the SAS card is lost, the failure alarming device reports a failure alarm, the failure detecting device obtains whether the SAS card is in place from the BMC, detects whether the SAS card is in place, if yes, sends a hard repairing signal to the failure repairing module, and if yes, the failure repairing module detects whether the SAS card supports power-on and power-off, and if yes, the failure repairing device performs power-on and power-off repairing on the SAS card. Or the fault detection device reads the register value of the SAS card, discovers that the SAS card fails, sends a hard repair signal to the fault repair module, reports a fault alarm by the fault alarm device, and detects whether the SAS card supports power-on and power-off or not by the fault repair module, if so, the fault repair device performs power-on and power-off repair on the SAS card, and if not, the card is disabled in isolation. Or the fault detection device finds that the configuration space information of the SAS card cannot be read, the fault alarm device reports fault alarm, the fault detection device sends a soft repair signal, the fault repair module receives the soft repair signal and detects whether the SAS card is subjected to soft repair, if not, the fault repair module performs soft repair, detects whether the problem is repaired, if not, the fault detection device performs the step after finding that the configuration space information of the SAS card cannot be read, if so, the fault detection device detects whether the SAS card supports power-on and power-off, if so, the fault repair device performs power-on and power-off repair on the card, if not, the fault repair module isolates and disables the card, and reports that the card cannot repair alarm normally.
In a specific application scenario, as shown in fig. 11, the application of the data storage device may be that the failure detection device detects a failure of the SAS card, sends a repair signal to the failure repair device, and notifies the data storage device to update the failure number of the card after the failure repair device detects the repair signal, after the data storage device receives the signal, acquires the serial number of the current card through the BMC, traverses the data storage pool, acquires the failure number of the current card from the data storage pool according to the serial number of the current card, detects whether the failure number of the current card is acquired, adds 1 to the failure number of the card if the failure number of the current card is acquired, and updates the failure number of the card to the data storage pool, and if the failure number of the current card is not acquired, sets the failure number of the serial number of the card to 1 and updates the failure number of the card to the data storage pool.
The application also provides electronic equipment and a computer readable storage medium, which have the corresponding effects of the expansion card repairing method provided by the embodiment of the application. Referring to fig. 12, fig. 12 is a schematic structural diagram of an electronic device according to an embodiment of the application.
An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202, where the memory 201 stores a computer program, and the processor 202 implements the steps of the expansion card repair method described in any of the above embodiments when executing the computer program.
Referring to fig. 13, another electronic device provided in an embodiment of the present application may further include an input port 203 connected to the processor 202 and configured to transmit an external input command to the processor 202, a display unit 204 connected to the processor 202 and configured to display a processing result of the processor 202 to the outside, and a communication module 205 connected to the processor 202 and configured to implement communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanning display, etc., and the communication mode adopted by the communication module 205 includes, but is not limited to, mobile High-Definition Link (MHL), universal serial bus (Universal Serial Bus, USB), high-Definition multimedia interface (High-Definition Multimedia Interface, HDMI), wireless connection, wireless fidelity technology (WIRELESS FIDELITY, WIFI), bluetooth communication technology, bluetooth low energy communication technology, and ieee802.11s based communication technology.
The embodiment of the application provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and when the computer program is executed by a processor, the steps of the expansion card repairing method described in any embodiment are realized.
The computer readable storage medium to which the present application relates includes random access Memory (Random Access Memory, RAM), memory, read-Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium known in the art.
A computer program product according to an embodiment of the present application includes a computer program/instruction which, when executed by a processor, implements the steps of the expansion card repair method described in any of the above embodiments.
The description of the relevant parts in the expansion card repair system, the electronic device, the computer readable storage medium and the computer program product provided by the embodiment of the application is referred to in detail of the corresponding parts in the expansion card repair method provided by the embodiment of the application, and is not repeated here. In addition, the parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of the corresponding technical solutions in the prior art, are not described in detail, so that redundant descriptions are avoided.
It is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An expansion card repair method, comprising:
responding to the fact that the driver cannot read configuration space information of the expansion card, and detecting whether hardware fault information of the expansion card is read or not;
If the hardware fault information of the expansion card is read, detecting whether the operation of re-initializing the expansion card is executed;
if the extension card is subjected to the re-initialization operation, powering up and powering down the extension card;
If the re-initialization operation is not executed on the expansion card, the re-initialization operation is executed on the expansion card;
if the hardware fault information of the expansion card is not read, repairing the driver;
the expansion card comprises an interface card connected between the server main board and the hard disk drive.
2. The method of claim 1, wherein prior to powering up and down the expansion card, further comprising:
Detecting whether the expansion card supports power-on and power-off;
if the expansion card supports power-on and power-off, performing power-on and power-off operation on the expansion card;
If the expansion card does not support power-on and power-off, the expansion card is isolated, and prompt information for carrying out reinsertion operation on the expansion card is generated.
3. The method of claim 1, wherein in response to the driver failing to read configuration space information of the expansion card, detecting whether hardware failure information of the expansion card is read, further comprising:
updating the fault time value of the expansion card;
detecting whether the fault sub-value exceeds a set threshold;
if the failure frequency value exceeds the set threshold value, isolating the expansion card, releasing the resources used by the expansion card, and generating prompt information for replacing the expansion card.
4. The method as recited in claim 1, further comprising:
Acquiring in-place information of the expansion card from a baseboard management controller in response to the loss of the expansion card caused by abnormal link;
Analyzing the presence information, and if the presence information represents that the expansion card is in place, powering up and powering down the expansion card.
5. The method as recited in claim 1, further comprising:
and responding to the abnormal register value of the drive read expansion card, and performing power-on and power-off operation on the expansion card.
6. The method of claim 1, wherein repairing the drive comprises:
determining a first backup memory mapped by a configuration space address of the expansion card;
Removing isolation of the first backup memory, and taking the mapping relation between the configuration space address and the first backup memory as a configuration space address mapping result of the drive;
determining a second backup memory mapped by the BAR space address of the expansion card;
Removing isolation of the second backup memory, and taking the mapping relation between the BAR space address and the second backup memory as the mapping result of the BAR space address of the drive;
Determining a third backup memory mapped by a register address of the expansion card;
Releasing the isolation of the third backup memory, and taking the mapping relation between the register address and the third backup memory as the register address mapping result of the drive;
determining a fourth backup memory of the drive application;
removing isolation of the fourth backup memory, and taking the fourth backup memory as a DMA address of the drive;
migrating the driven IO instruction to the DMA address;
And mapping new memories for the configuration space address, the BAR space address and the register address respectively, and isolating the new memories.
7. The method of claim 6, wherein prior to repairing the drive, further comprising:
mapping the configuration space address to two memories in the process of initializing the expansion card by the driver, and isolating one of the memories as the first backup memory;
Mapping the BAR space address to two memories, and isolating one of the memories as the second backup memory;
Mapping the register address to two memories, and isolating one of the memories as the third backup memory;
applying for the drive two continuous memories, and isolating one of the two continuous memories as the fourth backup memory.
8. An expansion card repair system, comprising:
The first detection module is used for detecting whether hardware fault information of the expansion card is read or not in response to the fact that the configuration space information of the expansion card cannot be read by a driver;
The second detection module is used for detecting whether the extended card is subjected to the re-initialization operation or not if the hardware fault information of the extended card is read, and carrying out the power-on and power-off operation on the extended card if the extended card is subjected to the re-initialization operation;
the first repair module is used for repairing the driver if the hardware fault information of the expansion card is not read;
the expansion card comprises an interface card connected between the server main board and the hard disk drive.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the expansion card repair method according to any one of claims 1 to 7 when executing said computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the steps of the expansion card repair method of any of claims 1 to 7.
CN202411282790.7A 2024-09-13 2024-09-13 An expansion card repair method, system, device and computer-readable storage medium Pending CN119166407A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411282790.7A CN119166407A (en) 2024-09-13 2024-09-13 An expansion card repair method, system, device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411282790.7A CN119166407A (en) 2024-09-13 2024-09-13 An expansion card repair method, system, device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN119166407A true CN119166407A (en) 2024-12-20

Family

ID=93883401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411282790.7A Pending CN119166407A (en) 2024-09-13 2024-09-13 An expansion card repair method, system, device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN119166407A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120429202A (en) * 2025-07-08 2025-08-05 苏州元脑智能科技有限公司 Expansion card monitoring method, device, electronic device and storage medium
CN120492211A (en) * 2025-07-15 2025-08-15 苏州元脑智能科技有限公司 Repairing method and device for extended chip, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120429202A (en) * 2025-07-08 2025-08-05 苏州元脑智能科技有限公司 Expansion card monitoring method, device, electronic device and storage medium
CN120492211A (en) * 2025-07-15 2025-08-15 苏州元脑智能科技有限公司 Repairing method and device for extended chip, electronic equipment and storage medium
CN120492211B (en) * 2025-07-15 2025-09-19 苏州元脑智能科技有限公司 Method, device, electronic device and storage medium for repairing expansion chips

Similar Documents

Publication Publication Date Title
CN119166407A (en) An expansion card repair method, system, device and computer-readable storage medium
US11144416B2 (en) Device fault processing method, apparatus, and system
CN106990958B (en) Expansion assembly, electronic equipment and starting method
CN106648958B (en) Basic input output system reply management system, method and program product thereof
CN103136012B (en) Computer system and update method of basic input-output system thereof
CN112199240B (en) Method for switching nodes during node failure and related equipment
US12001285B2 (en) System booting method and apparatus, node device, and computer-readable storage medium
US11314665B2 (en) Information processing system, information processing device, BIOS updating method for information processing device, and BIOS updating program for information processing device
CN108304282B (en) A dual BIOS control method and related device
CN101364193A (en) Method for automatically recovering BIOS and computer and system using the same
KR20170040734A (en) Electronic system with update control mechanism and method of operation thereof
CN101373433A (en) Method for updating BIOS and computer and system using the method
US20260003639A1 (en) Method and Apparatus for Obtaining Boot Logs, and Method for Transferring Boot Logs
TWI808362B (en) Computer system and method capable of self-monitoring and restoring an operation of operating system
WO2017080225A1 (en) Data partition recovery method and apparatus and terminal
WO2025123628A1 (en) Hot-swap method for storage device and device
CN113641537A (en) A server startup system, method and medium
CN117170921A (en) Equipment correctable error handling methods, devices, computer equipment and storage media
WO2026066494A1 (en) Memory management method and apparatus, computer device and storage medium
CN120255970A (en) Baseboard management controller startup method, computer equipment, medium and product
CN119046051A (en) Fault processing method and product of computer system
CN113900843B (en) Detection repair method, device, equipment and readable storage medium
CN116400972A (en) Starting method, device and medium of baseboard management controller
WO2024000535A1 (en) Partition table update method and apparatus, and electronic device and storage medium
CN116483664A (en) A network card operating method, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination