Hardware fault isolation method, device and server
By deleting hardware abstraction layer objects and setting isolation states, the problem of hardware failure spread is solved, and the virtual isolation of hardware and the normal operation of the system is achieved.
Patent Information
- Application Number
- CN202111566574.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-20
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-12-20
AI Technical Summary
When handling hardware failures, the prior art can easily cause the failure to spread to other normal hardware, affecting the normal operation of the system.
By deleting objects in the hardware abstraction layer of the hardware and setting the hardware state to an isolated state, virtual isolation of the faulty hardware is achieved to avoid failure spread.
It realizes simple and efficient isolation of the faulty hardware, avoids fault spread, and ensures that the system operates normally without interference.
Smart Images

Figure CN114237961B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fault isolation, and in particular to a hardware fault isolation method, device and server. Background Art
[0002] In the daily use of the server, its hardware may fail, for example, the hardware is in a hung state, that is, an infinite loop state. In order to avoid affecting the normal use of the server, the hardware needs to be restored to normal. In the related art, two hardware fault recovery technologies are generally used. One technology is to add an additional hardware control circuit to remotely control the power on and off of the hardware; the other technology is to send a soft delete instruction or a reset instruction to the faulty hardware. This method is highly dependent on the response of the hardware; if the hardware is in an abnormal state and cannot respond to the instruction, the soft delete or reset action will not be completed, causing the fault to spread to the process accessing the hardware or other normal hardware that shares the protocol with the hardware.
[0003] Therefore, how to simply and efficiently handle the hardware failure and avoid affecting the operation of other normal hardware is a problem that needs to be solved at present. Summary of the invention
[0004] In order to solve or partially solve the problems existing in the related art, the present application provides a hardware fault isolation method, device and server, which can simply and efficiently isolate the faulty hardware to avoid affecting the operation of other normal hardware.
[0005] The first aspect of the present application provides a hardware fault isolation method, comprising:
[0006] When it is determined that the hardware fails, deleting the object in the hardware abstraction layer corresponding to the hardware;
[0007] The state of the hardware is correspondingly set to an isolated state.
[0008] In one implementation, deleting the object in the hardware abstraction layer corresponding to the hardware includes:
[0009] When the hardware is a block device, the block device object in the block device layer is deleted and / or the hard disk object in the driver layer is deleted.
[0010] In one implementation, deleting the object in the hardware abstraction layer corresponding to the hardware includes:
[0011] The fault object of the hardware is determined by monitoring, and the corresponding fault object in the hardware abstraction layer is deleted.
[0012] In one implementation, deleting the object in the hardware abstraction layer corresponding to the hardware includes:
[0013] When the hardware is a block device, delete one or more of the following objects:
[0014] A logical volume in the logical layer, a file system in the file system layer, or a user-mode driver object in the user-mode hardware layer.
[0015] In one implementation, before deleting the abstraction layer object corresponding to the hardware, the method further includes:
[0016] Sending a reset instruction to the hardware;
[0017] If the hardware responds to the reset instruction and completes the reset within a preset time, it is determined that the hardware has returned to normal.
[0018] In one embodiment, after sending a reset instruction to the hardware, the method further includes:
[0019] If it is determined that the hardware cannot be reset within the preset time, sending a soft deletion instruction to the hardware;
[0020] If the hardware responds to the soft deletion instruction and completes the soft deletion, it is determined that the hardware soft deletion is successful;
[0021] If the hardware cannot respond to the soft delete instruction, it is determined to delete the object in the hardware abstraction layer corresponding to the hardware.
[0022] In one embodiment, after setting the state of the hardware to an isolated state, the method further includes:
[0023] If it is determined that the hardware has returned to normal after a preset number of physical offline and physical online times, the isolation state of the hardware is switched to a normal state, wherein the isolation state includes a blown state or an offline state.
[0024] A second aspect of the present application provides a hardware fault isolation device, the device comprising:
[0025] A deletion module, used for deleting the object in the hardware abstraction layer corresponding to the hardware when it is determined that the hardware fails;
[0026] The state changing module is used to set the state of the hardware to an isolated state.
[0027] A third aspect of the present application provides a server, including:
[0028] Processor; and
[0029] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0030] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of a server, the processor is caused to execute the method as described above.
[0031] The technical solution provided by this application may have the following beneficial effects:
[0032] The technical solution of the present application can virtually isolate the hardware by deleting the objects in the hardware abstraction layer of the hardware, without relying on whether the hardware can actually respond to the instructions issued by the system; at the same time, the state of the hardware is set to an isolated state, thereby avoiding the spread of the fault to other hardware in the entire system and ensuring the normal operation of the system without interference. Such a design can simply and efficiently complete the virtual isolation of the hardware.
[0033] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0035] Figure 1 It is a flowchart of a hardware fault isolation method shown in an embodiment of the present application;
[0036] Figure 2 is another flowchart of a hardware fault isolation method shown in an embodiment of the present application;
[0037] Figure 3 It is an abstract schematic diagram of the Linux operating system for a SCSI hard disk shown in an embodiment of the present application;
[0038] Figure 4 is another flowchart of a hardware fault isolation method shown in an embodiment of the present application;
[0039] Figure 5 is a structural schematic diagram of a hardware fault isolation device shown in an embodiment of the present application;
[0040] Figure 6 is another structural schematic diagram of a hardware fault isolation device shown in an embodiment of the present application;
[0041] Figure 7 It is a schematic diagram of the structure of the server shown in the embodiment of the present application. DETAILED DESCRIPTION
[0042] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0043] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0044] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0045] In the related art, if the hardware in the server cannot truly respond to the soft delete or reset action issued by the system, it is very likely to spread the fault and affect the operation of other normal hardware. In response to the above problem, the embodiment of the present application provides a hardware fault isolation method, which can simply and efficiently isolate the faulty hardware to avoid affecting the operation of other normal hardware.
[0046] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0047] Figure 1 It is a flowchart of a hardware fault isolation method shown in an embodiment of the present application.
[0048] See also Figure 1 , an embodiment of the present application provides a hardware fault isolation method, which includes:
[0049] S110: When it is determined that the hardware fails, delete the object in the hardware abstraction layer corresponding to the hardware.
[0050] Among them, hardware can be divided into types such as block devices, network devices or character devices. It can be understood that a block device is a random access device with a certain structure. The system reads and writes to this device in blocks. It uses a buffer to store temporary data. When conditions are ripe, it writes from the cache to the device at one time or reads from the device to the buffer at one time. It can be accessed randomly, and the access position of the block device must be able to move back and forth in different intervals of the medium, such as a hard disk. A network device is a device that receives data packets from the outside world asynchronously, such as a network card. A character device refers to a device that transmits in units of characters during I / O transmission, such as a keyboard, printer, etc.
[0051] Furthermore, when a hardware failure occurs, the system can send a reset instruction or a soft delete instruction to the hardware. If the hardware fails to respond or cannot complete the reset or soft delete, the object in the hardware abstraction layer corresponding to the hardware is deleted. It can be understood that the hardware abstraction layer (HAL) is an interface layer located between the operating system kernel and the hardware circuit, and its purpose is to abstract the hardware. Among them, according to different hardware types, the hardware can be abstracted and layered according to different functions. For ease of understanding, taking the abstract layering of the Linux operating system for the hardware SCSI hard disk as an example, it is layered from bottom to top into multiple hardware abstraction layers such as the SCSI driver layer, the block device layer, the virtual volume layer, the virtual file system layer, the file system layer, and the user-mode hardware layer. Among them, each hardware abstraction layer has a corresponding object. When determining the location of the failure, the object in the corresponding hardware abstraction layer can be deleted, so that the hardware forms a virtual isolation.
[0052] S120, setting the hardware status to an isolated status.
[0053] After the hardware object in the hardware abstraction layer is deleted, the hardware still physically exists in the server. In order to prevent the system from continuing to call the hardware, the hardware status is set to the isolation status, thereby preventing the fault from spreading to the entire system. The isolation status can be a blown state or an offline state.
[0054] It can be seen from this embodiment that the hardware fault isolation method of the present application can virtually isolate the hardware by deleting the objects in the hardware abstraction layer of the hardware, without relying on whether the hardware can actually respond to the instructions issued by the system; at the same time, the state of the hardware is set to an isolated state, thereby avoiding the spread of the fault to other hardware in the entire system, ensuring that the system runs normally without interference. Such a design can simply and efficiently complete the virtual isolation of the hardware.
[0055] Figure 2 It is a flowchart of a hardware fault isolation method shown in an embodiment of the present application; Figure 3 This is an abstract schematic diagram of the Linux operating system for SCSI hard disks shown in the embodiment of the present application. Figure 2 and Figure 3 The hardware fault isolation method of this application is introduced.
[0056] See also Figure 2 and Figure 3 , an embodiment of the present application provides a hardware fault isolation method, which includes:
[0057] S210, when it is determined that the hardware fails, if the hardware is a block device, delete the block device object in the block device layer and / or delete the hard disk object in the driver layer; or, determine the hardware failure object through monitoring, and delete the corresponding failure object in the hardware abstraction layer.
[0058] It can be understood that in order to better isolate the hardware-related and hardware-independent parts of program code in embedded systems, the hardware abstraction layer can be further refined into several sub-layers so that the hardware abstraction layer provides an interface that has shielded hardware differences for the upper-layer software. For example, the Linux operating system's abstraction of the hardware SCSI hard disk is layered from bottom to top into the SCSI driver layer, block device layer, virtual volume layer (optional), virtual file system layer, file system layer, and user-mode hardware layer. It can be understood that the interaction between the software and hardware at the application layer requires the operating system to abstract the hardware. The driver in the Linux operating system will abstract the hardware into classes so that the software can read and write according to standards (such as SCSI and SATA). On this basis, the Linux operating system will abstract the SCSI hard disk into a block device for unified I / O distribution and scheduling.
[0059] Furthermore, if Figure 3As shown, after the SCSI hard disk is abstracted into a block device, the SCSI driver layer and the block device layer are located at the bottom layer in the hardware abstraction layer. It can be understood that for a single block device such as a hard disk, the SCSI driver layer and the block device layer each have only one layer, thereby forming a one-to-one correspondence with the upper abstraction layer; at the same time, the SCSI driver layer provides an operation interface of the external device for the upper-level program, and implements the driver program of the device, and the block device layer implements the interface for the application program and the file system to access the storage device. Therefore, by deleting the block device object in the block device layer and / or deleting the hard disk object in the driver layer, the hardware can be made inaccessible by deleting the underlying object of the hardware abstraction layer of the hardware, thereby realizing the virtual isolation of the hardware. In other words, it is only necessary to delete the block device object in the block device layer or delete the hard disk object in the driver layer, or to delete the block device object in the device layer and delete the hard disk object in the driver layer at the same time, to realize the virtual isolation of the hardware.
[0060] See also Figure 3 It is known that there are other hardware abstraction layers above the SCSI driver layer and the block device layer. These hardware abstraction layers can be regarded as generalized abstraction layers. Deleting the upper software objects, that is, other hardware abstraction layers, can replace deleting the underlying hardware abstraction layer. It can be understood that deleting other hardware abstraction layers in the upper layer has the same effect on the upper layer application. Therefore, when the hardware fails, the fault object of the hardware can be determined by monitoring, so that the corresponding fault object in the hardware abstraction layer can be deleted in a targeted manner. It can be understood that the hard disk can be partitioned, so that each partition generates a corresponding object, and the fault object may be located in one or more partitions. In order to determine the location of the fault object, for example, the data structure in the kernel of the Linux operating system can be monitored, or the hard disk management tool can be used to query, or the block device management tool can be used to query, or the file system or partition management tool can be used to query, so as to determine the location of the fault, and then delete the corresponding fault object in the hardware abstraction layer. For example, when the hardware is a block device, delete one or more of the following objects: the logical volume in the logical layer, the file system in the file system layer, or the user-mode driver object in the user-mode hardware layer.
[0061] Furthermore, although a hard disk may have multiple partitions, which may result in multiple fault objects, the underlying block device layer and driver layer are unique. Therefore, in order to ensure that the hard disk is completely isolated, or if the specific fault object cannot be determined through monitoring, the block device object in the underlying block device layer and / or the hard disk object in the driver layer can be deleted.
[0062] S220, setting the hardware status to a blown state or an offline state.
[0063] It is understandable that after the hardware abstraction layer object of the hardware is deleted, the hardware is only virtually isolated, so the state of the hardware needs to be changed and set to a blown state or an offline state. This design puts the hardware in a non-online running state, thereby preventing the hardware from being accessed and spreading faults, and preventing the hardware from being associated with other normal hardware and sharing protocols, thus ensuring the normal operation of other normal hardware.
[0064] From this example, it can be seen that the hardware fault isolation method of the present application can achieve virtual isolation of faulty hardware by monitoring and deleting faulty objects in the hardware abstraction layer at different locations, or directly deleting the underlying hardware abstraction layer objects. In addition, the hardware status is changed so that the hardware cannot be accessed and can no longer share protocols with other hardware, thereby avoiding the spread of faults and ensuring the normal operation of the system.
[0065] Figure 4 is another flowchart of a hardware fault isolation method shown in an embodiment of the present application;
[0066] S310, detecting the hardware status according to a preset period, and sending a reset instruction to the hardware when it is determined that the hardware fails.
[0067] The preset period may be in seconds or milliseconds, for example, the hardware status is detected every 1 second. It is understood that a hardware fault is different from a hardware error, and a hardware fault needs to be recovered or isolated as soon as possible, otherwise the fault will spread and affect the normal operation of the entire system.
[0068] S320: If the hardware responds to the reset instruction and completes the reset within a preset time, it is determined that the hardware is restored to normal.
[0069] After the system sends a reset command to the hardware that has failed, it waits for the hardware to respond. If the hardware completes the reset action within the preset time and successfully responds to the system, the hardware has successfully recovered from the failure and can continue to be used normally without continuing to perform subsequent steps, and the process ends; otherwise, it is considered that the hardware has failed to recover from the failure, and the subsequent step S330 is performed.
[0070] S330: If it is determined that the hardware cannot be reset within the preset time, a soft delete instruction is sent to the hardware.
[0071] When the system determines that the hardware cannot be restored by a reset instruction, the system sends a delete instruction (delete, remove, or shutdown, etc.) to the hardware to soft-delete the hardware.
[0072] S340: If the hardware responds to the soft deletion instruction and completes the soft deletion, it is determined that the hardware soft deletion is successful.
[0073] After the system sends a soft delete instruction to the hardware that has failed, it waits for the hardware to respond. If the hardware can be successfully soft deleted, it is considered that the hardware has been successfully soft deleted, and the subsequent step S380 is executed; otherwise, if the hardware cannot respond to the soft delete instruction, step S350 is executed.
[0074] S350: If it is determined that the hardware cannot be soft-deleted, then delete the object in the hardware abstraction layer corresponding to the hardware.
[0075] According to the type of target hardware that has failed, the system deletes objects in the hardware abstraction layer in the operating system. For example, if the hardware is a block device, delete the block device object in the block device layer; if the hardware is a network device, delete the network device object in the network device layer; if the hardware is a character device, delete the character device object in the character device layer, etc.
[0076] When the hardware is a block device, delete the block device object in the block device layer and / or delete the hard disk object in the driver layer, or determine the faulty object of the hardware through monitoring, and delete the corresponding faulty object in the hardware abstraction layer. Among them, one or more of the following objects can be deleted: the logical volume in the logical layer, the file system in the file system layer, or the user-mode driver object in the user-mode hardware layer.
[0077] S360, the hardware status is set to a blown state or an offline state.
[0078] After deleting the hardware abstraction layer object, the state of the faulty hardware is changed. For example, the current state of the hardware is changed to a blown state or an offline state, so that the hardware cannot be accessed, and the hardware is clearly virtually isolated from other normal hardware to ensure that the fault cannot spread.
[0079] S370: If it is determined that the hardware has returned to normal after a preset number of physical offline and physical online operations, the isolation state of the hardware is switched to a normal state.
[0080] In this step, the hardware can be removed and installed from the server host by manually disassembling and installing the hardware, i.e. plugging and unplugging the hardware, so as to achieve physical offline and physical online. After the hardware is disassembled and installed for a preset number of times, i.e. less than N times, for example, within 3 times, if the hardware can be restored to normal, the isolation state of the hardware is switched to the normal state, i.e. the hardware can be restored to access, and there is no need to perform subsequent steps, and the process ends, otherwise, S380 is continued.
[0081] S380: If it is determined that the hardware cannot return to normal after the preset number of physical offline and physical online operations, replace the hardware with new hardware.
[0082] You can physically eliminate the fault and restore the normal operation of the server by removing the faulty hardware and replacing it with normal hardware.
[0083] It can be seen from this example that the hardware fault isolation method of the present application can first restore the faulty hardware through a reset instruction or a soft delete instruction. Under the premise that recovery is impossible, the hardware can be virtually isolated by deleting the hardware abstraction layer. Finally, the isolated hardware can be obtained by multiple plugging and unplugging or replacing the hardware to obtain hardware that can be used normally. Such a design can restore hardware failures through multiple methods, with simple and efficient operation, which improves work efficiency while ensuring the normal operation of the entire server system.
[0084] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a hardware fault isolation device, a server and corresponding embodiments.
[0085] Figure 5 It is a structural diagram of a hardware fault isolation device shown in an embodiment of the present application.
[0086] See also Figure 5 , the present application provides a hardware fault isolation device, which includes a deletion module 410 and a state change module 420. Among them:
[0087] The deletion module is used to delete the object in the hardware abstraction layer corresponding to the hardware when it is determined that the hardware fails.
[0088] The state changing module 420 is used to set the state of the hardware to an isolated state.
[0089] Furthermore, the deletion module 410 is used to delete the block device object in the block device layer and / or delete the hard disk object in the driver layer when the hardware is a block device. Or the deletion module is used to determine the faulty object of the hardware by monitoring and delete the corresponding faulty object in the hardware abstraction layer. Among them, the deletion module 410 is used to delete one or more of the following objects when the hardware is a block device: the logical volume in the logical layer, the file system in the file system layer, or the user-state driver object in the user-state hardware layer. The state change module 420 is used to set the state of the hardware to a blown state or an offline state. The state change module 420 is also used to set the isolation state switch of the hardware to a normal state if it is determined that the hardware has returned to normal after a preset number of physical offline and physical online operations.
[0090] Figure 6 It is another structural schematic diagram of the hardware fault isolation device shown in an embodiment of the present application.
[0091] See also Figure 6The present application provides a hardware fault isolation device, which includes a deletion module 410, a state change module 420 and an instruction sending module 430, wherein:
[0092] The deletion module 410 and the state change module 420 are not described in detail here. The instruction sending module 430 is used to send a reset instruction to the hardware; if the hardware responds to the soft deletion instruction and completes the soft deletion, it is determined that the hardware isolation is successful. The instruction sending module is used to send a soft deletion instruction to the hardware; if the hardware responds to the soft deletion instruction and completes the soft deletion, it is determined that the hardware soft deletion is successful.
[0093] From this example, it can be seen that the hardware fault isolation device of the present application can simply and efficiently virtually isolate the faulty hardware by deleting the hardware abstraction layer, and prevent the spread of faults by setting the isolation state. In addition, the faulty hardware can be restored by resetting, soft deleting and multiple plugging and unplugging, thereby improving the efficiency of hardware recovery.
[0094] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0095] Figure 7 It is a schematic diagram of the structure of the server shown in the embodiment of the present application.
[0096] See also Figure 7 , the server 1000 includes a memory 1010 and a processor 1020 .
[0097] The processor 1020 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0098] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0099] The memory 1010 stores executable codes, and when the executable codes are processed by the processor 1020 , the processor 1020 can execute part or all of the methods described above.
[0100] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0101] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-temporary machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of a server (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0102] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A hardware fault isolation method, characterized in that: When it is determined that the hardware fails, sending a reset instruction to the hardware; If the hardware responds to the reset instruction and completes the reset within a preset time, it is determined that the hardware has returned to normal; if it is determined that the hardware cannot be reset within the preset time, a soft delete instruction is sent to the hardware; If the hardware responds to the soft deletion instruction and completes the soft deletion, it is determined that the hardware soft deletion is successful; If the hardware cannot respond to the soft delete instruction, delete the object in the hardware abstraction layer corresponding to the hardware; when the hardware is a block device, delete the block device object in the block device layer and / or delete the hard disk object in the driver layer; or, determine the faulty object of the hardware by monitoring, and delete the corresponding faulty object in the hardware abstraction layer; wherein one or more of the following objects are deleted: a logical volume in the logical layer, a file system in the file system layer, or a user-mode driver object in the user-mode hardware layer; The state of the hardware is correspondingly set to an isolation state; the isolation state includes a blown state or an offline state.
2. The method according to claim 1, characterized in that Determining the fault object of the hardware through monitoring includes: By monitoring the data structure in the kernel of the operating system, or querying with hard disk management tools, or querying with block device management tools, or querying with file system or partition management tools, the location of the fault is determined, and then the fault object in the corresponding hardware abstraction layer is deleted.
3. The method according to claim 2, characterized in that When the hardware is a block device, if the faulty object of the hardware cannot be determined through monitoring, the block device object in the block device layer and / or the hard disk object in the driver layer are deleted.
4. The method according to any one of claims 1 to 3, characterized in that After setting the state of the hardware to an isolated state, the method further includes: If it is determined that the hardware has returned to normal after a preset number of physical offline and physical online operations, the isolation state of the hardware is switched to a normal state.
5. A hardware fault isolation device, characterized in that: The device comprises: An instruction sending module is used to send a reset instruction or a soft delete instruction to the hardware; A deletion module, configured to determine that the hardware is restored to normal if the hardware responds to the reset instruction and completes the reset within a preset time; respond to the soft deletion instruction sent by the hardware if it is determined that the hardware cannot be reset within the preset time; and determine that the hardware is successfully soft-deleted if the hardware responds to the soft deletion instruction and completes the soft deletion; When it is determined that the hardware fails, delete the object in the hardware abstraction layer corresponding to the hardware; wherein, when the hardware is a block device, delete the block device object in the block device layer and / or delete the hard disk object in the driver layer; or, determine the faulty object of the hardware by monitoring, and delete the corresponding faulty object in the hardware abstraction layer; wherein, delete one or more of the following objects: a logical volume in the logical layer, a file system in the file system layer, or a user-mode driver object in the user-mode hardware layer; The state changing module is used to determine that the state of the hardware is set to an isolation state if the hardware cannot respond to the soft deletion instruction; the isolation state includes a blown state or an offline state.
6. The device according to claim 5, characterized in that: The deletion module is used to delete the block device object in the block device layer and / or delete the hard disk object in the driver layer when the hardware is a block device; or The deletion module is used to delete one or more of the following objects when the hardware is a block device: A logical volume in the logical layer, a file system in the file system layer, or a user-mode driver object in the user-mode hardware layer.
7. A server, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 4.
8. A computer-readable storage medium having executable codes stored thereon, which, when executed by a processor of a server, causes the processor to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Hard disk failure handling method, apparatus, server, and computer-readable medium
CN109284207A
Memory fault recovery method and device, electronic equipment and storage medium
CN110727528A