Hard disk management method and computing device

By displaying the slot distribution and hard disk positioning interface in the computing device, visual management and uninstallation of NVMe hard disks are achieved, and the problems of complex hot-swap operations and high technical thresholds in the existing technology are solved, and the efficiency of hard disk plugging is improved and configuration correctness.

CN117931069BActive Publication Date: 2025-02-21HENAN KUNLUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311826949.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2025-02-21
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

In the prior art, the hot-swap operation of NVMe hard disks is complicated, requiring users to be familiar with operating system commands, have high technical thresholds, and are prone to errors.

Method used

Through the interface where the management controller displays the slot distribution and hard disk position in the computing device, users can choose to unload the hard disk through interface operations, and the management controller performs related uninstall operations to realize visual management and uninstallation of the hard disk.

Benefits of technology

It lowers the user threshold, reduces manual configuration time, improves hard disk plug-in and unplug efficiency, ensures the correctness of configuration, and reduces configuration errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931069B_ABST
    Figure CN117931069B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a hard disk management method and computing device, which relates to the technical field of computing devices and can improve the portability of hard disk plugging and unplugging. The method is applied to a computing device, which includes a processor, a management controller, a CPLD and at least one slot; at least one slot can support plugging in a hard disk; the method includes: the management controller displays a first interface; the first interface includes the distribution of at least one slot on the computing device, and the presence of the hard disk in each slot; in response to the operation of the first slot in the first interface, a second interface is displayed; the first slot is a slot in at least one slot that has a hard disk plugged in; the second interface includes a first control; the first control is used to uninstall the hard disk on the first slot; in response to the operation of the first control, the CPLD is controlled to power off the first operation and the processor is controlled to uninstall the hard disk drive, and then a first prompt message is output; the first prompt message is used to prompt that the hard disk on the first slot can be unplugged.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the technical field of computing devices, and in particular, to a hard disk management method and a computing device. Background Art

[0002] Non-volatile memory express (NVMe) hard drives are storage devices that comply with the new generation of protocols. Compared with traditional hard drives, they have faster reading speeds and higher transmission efficiency, and are therefore gradually being widely used.

[0003] Hot-swapping storage devices is often a frequent operation during the hardware maintenance of computing devices. Currently, for NVMe hard drives, a notification-based hot-swapping solution is required. That is, before unplugging the NVMe hard drive, the user needs to first send a command to the operating system to uninstall the NVMe hard drive before manually unplugging it. However, this command-issuing solution is relatively complex and prone to errors, requiring users to be familiar with operating system commands, so it has a high technical threshold requirement. Summary of the invention

[0004] The embodiments of the present application provide a hard disk management method and a computing device, which can improve the portability of plugging and unplugging the hard disk and lower the usage threshold for users.

[0005] In a first aspect, an embodiment of the present application provides a hard disk management method, which is applied to a computing device, wherein the computing device includes a processor, a management controller, a complex programmable logic device (CPLD), and at least one slot; at least one slot can support the insertion of a hard disk; the method includes: displaying a first interface through the management controller; the first interface includes the distribution of at least one slot on the computing device, and the presence of the hard disk in each slot; the management controller displays a second interface in response to an operation on a first slot in the first interface; the first slot is a slot in which a hard disk has been inserted among at least one slot; the second interface includes a first control; the first control is used to indicate the unloading of the hard disk on the first slot; the management controller outputs a first prompt message after controlling the CPLD to power off the first slot and controlling the processor to unload the hard disk drive in response to the operation on the first control; the first prompt message is used to prompt that the hard disk on the first slot can be unplugged.

[0006] An embodiment of the present application provides a hard disk management method, which displays the distribution of at least one slot in the computing device and the presence of the hard disk in each slot through the BMC. The user can clearly determine the location of the hard disk to be uninstalled through the interface display. Further, the user can select the slot where the hard disk to be uninstalled is located through interface operation. According to the slot specified by the user, the management controller can perform relevant uninstall operations on the hard disk in the slot, thereby realizing the uninstallation of the hard disk. This method of visual operation through the interface does not require the user to issue commands step by step, which can not only lower the user's usage threshold, but also reduce the time of manual configuration and improve the efficiency of hard disk plugging and unplugging. In addition, by replacing manual configuration, the correctness of the configuration can be guaranteed and the occurrence of configuration errors can be reduced.

[0007] In a possible implementation, the second interface further includes: a slot identifier of the first slot and relevant information of the hard disk in the first slot.

[0008] In another possible implementation, the relevant information includes at least one of the following: health status, disk type, capacity, manufacturer, wear rate, and estimated lifespan.

[0009] In another possible implementation, controlling the CPLD to power off the first slot includes: the management controller sends a first instruction to the CPLD; the first instruction includes a slot identifier of the first slot; and the CPLD responds to the first instruction and powers off the first slot according to the slot identifier.

[0010] In another possible implementation, controlling the processor to uninstall the hard disk drive includes: the management controller sends a second instruction to the processor; the second instruction includes a slot identifier of the first slot; the processor responds to the second instruction and uninstalls the hard disk drive according to the slot identifier. It should be understood that by powering off and uninstalling the drive, it can be ensured that the hard disk is disconnected after the working state ends, which can extend the life of the hard disk and avoid data loss.

[0011] In another possible implementation, the method further includes: detecting whether the operating system running on the processor enables the interrupt allocation service; when the operating system enables the interrupt allocation service, the management controller controls the operating system running on the operating system processor through the BMC to restart the interrupt allocation service. It should be understood that by restarting the interrupt allocation service, the computing device can reallocate interrupt resources according to the new hardware environment, ensuring full utilization of the computing performance of the computing device.

[0012] In another possible implementation, the method also includes: the management controller displays a third interface in response to an operation on a second slot in the first interface; the second slot is a slot in which no hard disk is inserted among at least one slot; the third interface includes a second control; the second control is used to install a hard disk in the second slot; the management controller outputs a second prompt message in response to the operation on the second control; the second prompt message is used to indicate that a hard disk can be inserted in the second slot.

[0013] In another possible implementation, before the management controller displays the first interface, the method further includes:

[0014] The management controller displays a fourth interface; the fourth interface includes a switch status of a volume management device VMD function;

[0015] Displaying a first interface by the management controller includes:

[0016] When the VMD function is in a closed state, the management controller displays the first interface.

[0017] In another possible implementation, the computing device further includes a basic input and output system BIOS chip, and the fourth interface further includes a third control; the third control is used to enable the VMD function; the method further includes: when the switch state of the VMD function is in the off state, the management controller responds to the operation of the third control, configures the first configuration parameter of the BIOS chip, and restarts the computing device; the first configuration parameter is used to indicate that the VMD function is in the on state; outputs a third prompt message; the third prompt message is used to prompt that the computing device can support hot plugging of hard disks. It should be understood that enabling the VMD function through interface operation can simplify the operation process and improve efficiency.

[0018] In another possible implementation, configuring the first configuration parameter of the BIOS chip includes: the management controller sends a third instruction to the processor; the processor responds to the third instruction and runs the BIOS to obtain the first configuration parameter from the management controller; the processor runs the BIOS and modifies the target option of the BIOS chip to the first configuration parameter; the target option is the on / off state of the VMD function.

[0019] In another possible implementation, the computing device further includes a BIOS chip, the fourth interface further includes a fourth control, and the fourth control is used to turn off the VMD function; the method further includes: when the switch state of the VMD function is in the on state, the management controller responds to the operation of the fourth control, configures the second configuration parameter of the BIOS chip through the BMC, and restarts the computing device; the second configuration parameter is used to indicate that the VMD function is in the off state; and the switch state of the VMD function in the fourth interface is updated to the off state. It should be understood that turning off the VMD function through interface operation can simplify the operation process and improve efficiency.

[0020] In another possible implementation, configuring the second configuration parameter of the BIOS chip includes: the management controller sends a fourth instruction to the processor; the processor responds to the fourth instruction and runs the BIOS to obtain the second configuration parameter from the management controller; the processor runs the BIOS and modifies the target option of the BIOS chip to the second configuration parameter; the target option is the on / off state of the VMD function.

[0021] In another possible implementation, the method further includes: the management controller configures kernel parameters of an operating system running on the processor; the kernel parameters are used to support normal operation of the hard disk on the operating system; and restarting the computing device.

[0022] In another possible implementation, the management controller configures kernel parameters of an operating system run by a processor, including: the management controller sends a fifth instruction to the processor; and the processor executes a preset script to configure the kernel parameters of the operating system in response to the fifth instruction.

[0023] In a second aspect, an embodiment of the present application provides a computing device, which includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions, and the computer instructions are loaded and executed by the processor to enable the computing device to implement the method of the first aspect above.

[0024] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which includes: computer software instructions; when the computer software instructions are executed in a computing device, the computing device implements the method of the first aspect above.

[0025] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computing device, the computing device executes the steps of the related method described in the first aspect above to implement the method of the first aspect above.

[0026] In a fifth aspect, an embodiment of the present application provides a computing device, comprising a processor, a management controller, a complex programmable logic device (CPLD), and at least one slot; the at least one slot can support the insertion of a hard disk; the management controller is used to display a first interface; the first interface includes the distribution of the at least one slot on the computing device, and the presence of the hard disk in each slot;

[0027] The management controller is used to display a second interface in response to an operation on a first slot in the first interface; the first slot is a slot in the at least one slot in which the hard disk is plugged; the second interface includes a first control; the first control is used to indicate uninstalling the hard disk in the first slot;

[0028] The management controller is used to control the CPLD to power off the first slot and control the processor to uninstall the hard disk drive in response to the operation of the first control, and then output a first prompt message; the first prompt message is used to prompt that the hard disk on the first slot can be unplugged.

[0029] The beneficial effects of the second to fifth aspects mentioned above can be referred to the corresponding description of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of the architecture of a computing device provided in an embodiment of the present application;

[0031] Figure 2 A flowchart of a hard disk management method provided in an embodiment of the present application;

[0032] Figure 3 A schematic diagram of a first interface provided in an embodiment of the present application;

[0033] Figure 4 A schematic diagram of a second interface provided in an embodiment of the present application;

[0034] Figure 5 A flowchart of another hard disk management method provided in an embodiment of the present application;

[0035] Figure 6 A flowchart of another hard disk management method provided in an embodiment of the present application;

[0036] Figure 7 A flowchart of another hard disk management method provided in an embodiment of the present application;

[0037] Figure 8 A schematic diagram of a third interface provided in an embodiment of the present application;

[0038] Fig. 9 A flowchart of another hard disk management method provided in an embodiment of the present application;

[0039] Fig.10 A schematic diagram of a fourth interface provided in an embodiment of the present application;

[0040] Fig.11 A schematic diagram of a process for enabling the VMD function provided in an embodiment of the present application;

[0041] Fig.12 A schematic diagram of a process for disabling the VMD function provided in an embodiment of the present application;

[0042] Fig.13 A schematic diagram of a kernel parameter modification process provided in an embodiment of the present application;

[0043] Fig.14 A management flow chart provided for an embodiment of the present application;

[0044] Fig.15 A schematic diagram of the composition of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] It should be noted that, in the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0047] In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical items or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order.

[0048] First, the relevant terms involved in the embodiments of the present application are explained.

[0049] 1. Hot plug: refers to the insertion and removal of external devices such as boards, daughter cards, hard disks, etc. in computing devices without resetting or powering off the computing devices, but it does not affect the normal operation of the computing devices, thus achieving a plug-and-play effect.

[0050] 2. NVMe: Non-volatile memory express is a new generation of logic device interface specification. NVMe hard disk is a storage device that complies with the NVMe protocol. It can communicate directly with the processor through the high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIe) bus with high communication efficiency.

[0051] As described in the background technology, the hard disk is one of the most common and important accessories in computing devices. During the operation and maintenance of computing devices, it is often necessary to hot-swap NVMe hard disks under power. The current hot-swap solutions for NVMe hard disks mainly include violent hot-swap and notification hot-swap. Violent hot-swap requires the support of the volume management device (VMD) function. VMD is a deployment solution launched for storage devices. This solution supports hot upgrades and replacements of NVMe hard disks from the PCIe bus (replacement may include insertion and removal) without shutting down the computing device. At the same time, it standardizes the process of lighting up the hard disk, which can help users identify the working status of NMVe hard disks more quickly. However, the VMD function requires users to pay to use, and requires a specific model of operating system to use the VMD function.

[0052] Notification hot-plugging does not require the support of the VMD function, but before unplugging the hard disk, the user needs to send a command to the operating system to execute the hard disk uninstallation before unplugging it. This command-issuing solution is complex and error-prone, so the user needs to be familiar with the operating system commands to ensure the correct input of the commands. In addition, in the process of issuing commands, the user needs to clearly identify the slot IDentity of the hard disk to be uninstalled on the operating system so that the operating system can uninstall the hard disk in a targeted manner. However, the corresponding relationship between slot IDs of different models is different, and the user needs to query the corresponding relationship, which further increases the complexity of the operation.

[0053] Based on this, an embodiment of the present application provides a hard disk management method, in which a management controller displays the distribution of at least one slot in the computing device and the presence of the hard disk in each slot. The user can clearly determine the location of the hard disk to be uninstalled through the interface display. Further, the user can select the slot where the hard disk to be uninstalled is located through interface operation. According to the slot specified by the user, the management controller can perform relevant uninstall operations on the hard disk in the slot, thereby realizing the uninstallation of the hard disk. This method of visual operation through the interface does not require the user to issue commands step by step, which can not only lower the user's usage threshold, but also reduce the time of manual configuration and improve the efficiency of hard disk plugging and unplugging. In addition, by replacing manual configuration, the correctness of the configuration can be guaranteed and the occurrence of configuration errors can be reduced.

[0054] It should be understood that the hard disk management method provided in the embodiment of the present application can be applicable to NVMe hard disks, and can also be applicable to other hard disks that require command unloading. The embodiment of the present application is described using NVMe hard disks as an example.

[0055] The embodiments provided in this application are described in detail below in conjunction with the accompanying drawings.

[0056] The technical solution provided in the embodiments of the present application can be applied to a computing device, which may specifically be a blade server, a high-density server, a rack server, or a high-performance server. Figure 1 is a schematic diagram of the system architecture of a computing device, such as Figure 1 As shown, the computing device includes a processor, a basic input output system (BIOS) chip, a management controller, at least one slot and a complex programmable logic device (CPLD). The processor, the BIOS chip and the management controller can be deployed on the motherboard, and the CPLD and at least one slot can be deployed on the backplane. The processor is connected to the BIOS chip, the management controller and the CPLD respectively, the management controller is connected to the CPLD on the backplane, and the CPLD is connected to at least one slot.

[0057] The processor runs an operating system (OS), and the processor can call and run the BIOS in the BIOS chip.

[0058] The management controller is a non-business management unit. For example, the management controller can remotely maintain and manage the computing device through a dedicated data channel. The management controller is completely independent of the operating system of the computing device and can communicate with the BIOS and the operating system through the out-of-band management interface of the computing device. The processor may include a central processing unit (CPU), which includes one or more CPU cores, and the CPU's data processing operations are all performed by the CPU cores. The more CPU cores included in the CPU, the faster the data processing speed.

[0059] CPLD can manage the power on and off of each slot, and each slot can support the insertion of a hard disk.

[0060] BIOS is a set of programs that are fixed to the BIOS chip on the motherboard of a computing device. The main function of BIOS is to provide the lowest-level and most direct hardware settings and controls for computing devices. It can be used to initialize and detect various hardware devices during the startup process of computing devices. The BIOS program is stored in the BIOS chip on the motherboard.

[0061] An operating system is a computer program that manages and controls the hardware and software resources of a computing device. Any other software must be supported by the operating system to run. After the server is powered on, the processor calls the BIOS program to start a series of operations such as self-test and initialization, and then guides the operating system to start, so that users can use the computing device normally.

[0062] Exemplarily, the management controller may include a management unit in a standby state of a computer, a management system in a management chip outside a processor, a baseboard management controller (BMC) of a computing device, a system management module (SMM), etc. It should be noted that the embodiments of the present application do not limit the specific form of the management controller, and the above is only an exemplary description. In the following embodiments, only the management controller is a BMC as an example for description.

[0063] BMC is an independent system. It does not rely on other hardware (such as CPU, memory, etc.) on the computing device, nor does it rely on BIOS, operating system, etc. However, BMC can interact with BIOS or operating system to manage the computing device. In addition, BMC also provides remote operation function. Users can access the BMC operation interface through the network, understand the operating status of the computing device through the operation interface, and issue commands to the computing device through the operation interface.

[0064] It should be noted that different companies have different names for BMC in their servers, for example, some companies call it BMC, some companies call it iLO, and another company calls it iDRAC. Regardless of whether it is called BMC, iLO or iDRAC, it can be understood as the BMC in the embodiment of the present invention.

[0065] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0066] like Figure 2 As shown, an embodiment of the present application provides a hard disk management method, which may include the following steps:

[0067] S201: The management controller displays a first interface.

[0068] The first interface includes the distribution of at least one slot on the computing device and the presence of a hard disk in each slot.

[0069] In an embodiment of the present application, a user can view the operating status of a computing device or control the computing device by accessing the management controller of the computing device. The management controller can display a first interface to show the user the slot distribution of the computing device and the presence status of the hard disk (i.e., whether it is plugged in).

[0070] For example, Figure 3 This is a schematic diagram of a first interface provided in an embodiment of the present application. Figure 3 As shown, the first interface includes a main view of the computing device, which shows six slots, namely slot 1 to slot 6. Among them, hard disks are inserted in slots 1 to slot 5 (i.e., in place), and no hard disk is inserted in slot 6 (i.e., not in place).

[0071] S202: The management controller displays a second interface in response to an operation on a first slot in the first interface.

[0072] The first slot is a slot in which a hard disk is inserted among the at least one slot, and the second interface includes a first control. The first control is used to uninstall the hard disk in the first slot.

[0073] It can be seen that the management controller allows the user to intuitively determine the number, distribution and in-place status of the slots by displaying the first interface. In an embodiment of the present application, if the user needs to unplug the hard disk in a certain slot (the first slot), a click operation can be performed on the first slot on the first interface. In response to the operation, the computing device further displays a second interface. The second interface includes a first control for uninstalling the hard disk in the slot.

[0074] In one implementation, the second interface further includes: a slot ID of the first slot and related information of the hard disk in the first slot, wherein the related information may include at least one of the following: health status, disk type, capacity, manufacturer, wear rate, and estimated lifespan.

[0075] It should be understood that during operation, the computing device can read the operation status of the hard disk and display it to the user through the management controller to facilitate user management. In addition, the slot IDs corresponding to different slots can also be configured in the BMC in advance and displayed when the second interface is displayed, so as to facilitate user maintenance of the computing device.

[0076] For example, Figure 4 A schematic diagram of a second interface provided in an embodiment of the present application. Figure 3 ,like Figure 4 As shown, the hard disk in slot 3 is what the user needs to remove, so after the user clicks slot 3 in the first interface, the display Figure 4The second interface in the operating system shows the slot identifier of slot 3 and the information of the hard disk in the slot. For example, the location is slot 10, the health status is normal, the disk type is NVMe SSD, the capacity is 1.92T, the manufacturer is xFusion, the wear rate is 0%, and the estimated life is 60 months. At the same time, the second interface also includes the first control (i.e., the control for removing the hard disk in the figure).

[0077] It should be understood that the second interface can be displayed on the first interface in the form of a floating window, or it can be a separate interface, and the present application embodiment does not make specific restrictions on this. Figure 4 The second interface is shown as a floating window as an example.

[0078] S203: In response to the operation on the first control, the management controller controls the CPLD to power off the first slot and controls the processor to uninstall the hard disk drive, and then outputs a first prompt message.

[0079] The first prompt information is used to prompt that the hard disk in the first slot can be removed.

[0080] In an embodiment of the present application, when the user clicks on the first control in the second interface, the management controller can respond to the click operation by, on the one hand, controlling the CPLD to power off the first slot, and on the other hand, controlling the processor to uninstall the hard disk driver to perform the uninstall operation, completing the uninstall process before the hard disk is unplugged, and then outputting the first upgrade information to inform the user that the hard disk on the first slot can be unplugged.

[0081] The output of the first prompt information mentioned here can be directly displaying the prompt information on the display interface of the BMC to indicate to the user that the hard disk can be unplugged, or it can be indicating to the user that the hard disk can be unplugged by controlling the lighting of the light on the backplane, or it can be a combination of the two methods. The embodiment of the present application does not make specific restrictions on this. For example, the user can observe the status of the hard disk indicator light. If the green indicator light is off and the yellow indicator light is flashing (0.5Hz), it means that the hard disk has been unloaded and the user can now slowly unplug the hard disk.

[0082] It should be understood that if the hard disk is directly unplugged while it is in the process of reading or writing, it may cause damage to the hard disk. Therefore, before uninstalling, power off the hard disk and uninstall the driver, and unplug it after the working state is finished. This can effectively extend the service life of the hard disk and avoid data loss.

[0083] In some implementations, such as Figure 5 As shown, controlling the CPLD to power off the first slot in the above S203 can be implemented as follows:

[0084] S501: The management controller sends a first instruction to the CPLD, wherein the first instruction includes a slot identifier of a first slot.

[0085] S502: In response to the first instruction, the CPLD powers off the first slot according to the slot identifier.

[0086] With respect to the above S501-S502, after the user clicks the first control, the management controller of the computing device can determine the slot identifier of the slot clicked by the user in response to the user's click operation, and send a first instruction including the slot identifier to the CPLD to instruct the CPLD to power off the first slot. Accordingly, the CPLD responds to the first instruction and stops the power supply to the first slot according to the slot identifier, completing the power-off process. In addition, the CPLD can feedback a response to the management controller, indicating that the power-off is completed.

[0087] In some implementations, such as Figure 6 As shown, the control processor in the above S203 to unload the hard disk driver can be implemented as follows:

[0088] S601: The management controller sends a second instruction to the processor, wherein the second instruction includes a slot identifier of a first slot.

[0089] S602: The processor responds to the second instruction and uninstalls the hard disk drive according to the slot identifier.

[0090] In response to the above S501-S502, the management controller can send a second instruction including a slot identifier to the processor. Accordingly, in response to the second instruction, the processor runs the operating system to execute the following command: echo n> / sys / bus / pci / slots / slot ID / power to complete the driver uninstallation of the hard disk in the first slot. The slot ID is the slot identifier of the first slot.

[0091] As a possible implementation, the processor can complete the uninstallation of the hard disk drive under the control of the CPLD. After the CPLD completes the power-off operation on the first slot, the CPLD can send an interrupt signal to the processor through its own interrupt controller, and the interrupt signal is used to instruct the processor to run the operating system to uninstall the hard disk drive. Further, the processor will respond to the interrupt signal and run the operating system to uninstall the driver. In addition, the processor can feedback a response to the management controller to indicate that the driver uninstallation is completed.

[0092] In some scenarios, the operating system will start the interrupt allocation service (irqbalance service) to optimize interrupt allocation. This service allows the computing device to distribute interrupts evenly to each CPU to improve the performance of the computing device. In the scenario of hard disk plugging and unplugging, the hard disk will generate interrupt signals during normal use, and the computing device needs to reasonably distribute these interrupt signals to each CPU for processing. When the hard disk is unplugged, the hardware environment of the computing device will change, which may cause uneven distribution of interrupt resources. Therefore, it is necessary to restart the interrupt allocation service so that the computing device can reallocate interrupt resources according to the new hardware environment to ensure full utilization of the computing performance of the computing device.

[0093] Therefore, the hard disk management method provided in the embodiment of the present application further includes the following steps ab:

[0094] Step a: Detect whether the operating system running on the processor starts the interrupt allocation service.

[0095] Step b: When the operating system enables the interrupt allocation service, the management controller controls the operating system running on the processor to restart the interrupt allocation service.

[0096] For the above steps a and b, the management controller may send instructions to the processor, so that the processor runs the operating system to detect whether the operating system currently starts the interrupt allocation service. If it is enabled, it means that the service needs to be restarted. That is, the processor runs the operating system to restart the interrupt allocation service to ensure the correct allocation of interrupt resources.

[0097] It should be understood that the embodiment of the present application does not make any specific detailed restrictions on the execution sequence of the above-mentioned power-off process, driver uninstallation process and interrupt allocation service restart process, which can be executed sequentially or simultaneously.

[0098] In some scenarios, after the above S201, such as Figure 7 As shown, the hard disk management method provided in the embodiment of the present application also includes the following S701-S702.

[0099] S701: The management controller displays a third interface in response to an operation on a second slot in a first interface.

[0100] The second slot is a slot in which no hard disk is inserted among the at least one slot, and the third interface includes a second control, and the second control is used to install a hard disk in the second slot.

[0101] S702: In response to a triggering operation on a second control, output second prompt information.

[0102] The second prompt information is used to indicate that a hard disk can be inserted into the second slot.

[0103] With respect to the above S701-S702, if the user needs to insert a hard disk in a certain slot (the second slot), a click operation can be performed on the second slot on the first interface. In response to the operation, the computing device further displays a third interface. The third interface includes a second control for installing a hard disk in the slot. Further, when the user clicks the second control, the computing device can determine that the user needs to install a hard disk in the slot, and then outputs a second prompt message to instruct the user to insert the hard disk.

[0104] For example, Figure 8 A schematic diagram of a third interface provided in an embodiment of the present application, such as Figure 8 As shown, there is no hard disk inserted in slot 6. When the user clicks slot 6 in the first interface, the display Figure 8 The third interface in the operating system shows the slot identifier corresponding to slot 3 and the third control (control for installing a hard disk).

[0105] Furthermore, after the user inserts the hard disk, the computing device can detect the status of the hard disk and output a prompt message to prompt the user of the status of the hard disk. For example, by lighting a prompt, the green indicator light is constant and the yellow indicator light is off, indicating that the hard disk is in place and has no faults, and the user can use the hard disk normally. Or the CPLD informs the management controller that a hard disk has been plugged into the second slot, and the management controller prompts the user that the hard disk is in place through the display interface (i.e., updates the above-mentioned first interface).

[0106] In some scenarios, the user may need to switch the on / off state of the VMD function. In the related art, if the user needs to turn on the VMD function, it is necessary to operate the computing device to enter the BIOS interface, find the configuration parameters of the VMD function through step-by-step inquiries, set the VMD function to enable (enable), save the configuration and restart the computing device to make the configuration effective. Similarly, if the user needs to turn off the VMD function, it is necessary to operate the computing device to enter the BIOS interface, find the configuration parameters of the VMD function through step-by-step inquiries, set the VMD function to disable (disabled), save the configuration and restart the computing device to make the configuration effective.

[0107] In addition, when the VMD function is turned off, the user needs to configure kernel parameters to ensure the correct operation of the hard disk on the operating system. The process of configuring kernel parameters requires the user to log in to the operating system, find the corresponding configuration file, add configuration commands to the content of the configuration file, save it and restart the computing device to make the changes take effect. It can be seen that this manual configuration operation is extremely inconvenient and affects the maintenance efficiency of the computing device. Moreover, manual configuration is bound to make mistakes, which will cause abnormal operation of the computing device.

[0108] Based on this, the hard disk management method provided in the embodiment of the present application can also realize the convenient switching of the on / off state of the VMD function, which is specifically described as follows:

[0109] Before S201, Fig. 9 As shown, the hard disk management method further includes: S901, the management controller displays the fourth interface. The fourth interface includes the switch status of the VMD function. It should be understood that when the VMD function is turned off, the hard disk does not support violent hot plugging, and the user needs to uninstall the hard disk through a command. Therefore, when S901 is executed, the above S201 specifically includes: when the VMD function is turned off, the management controller displays the first interface. This facilitates the user to select the hard disk to be uninstalled through the first interface without manually issuing commands.

[0110] The fourth interface may include a third control and / or a fourth control. The third control is used to turn on the VMD function. The fourth control is used to turn off the VMD function. It should be understood that the BIOS configuration parameters are generally stored in the BIOS chip, and the BMC can access the memory through the I2C bus to read the switch state of the VMD function in the current BIOS. When the VMD function is turned off, the user can click the third control to turn it on, and when the VMD function is turned on, the user can click the third control to turn it off.

[0111] For example, Fig.10 This is a schematic diagram of a fourth interface provided in an embodiment of the present application. Fig.10 As shown, the switch state of the current VMD function of the computing device is displayed as being off (in the default configuration). At the same time, it also includes a prompt message "The current configuration allows the installation of a hard disk, please confirm whether VMD needs to be enabled", as well as a control for turning on VMD (the third control) and a control for turning off VMD (the fourth control). It should be understood that when the VMD function is on, the fourth interface may not display the third control, or display the third control but the user cannot click on it. Similarly, when the VMD function is off, the fourth interface may not display the fourth control, or display the fourth control but the user cannot click on it. The embodiments of the present application do not limit this specific display method.

[0112] Fig.11 A schematic diagram of a process for enabling the VMD function provided in an embodiment of the present application. Fig.11 As shown, after S901, the following steps are included:

[0113] S1101: When the switch state of the VMD function is off, the management controller configures a first configuration parameter of the BIOS chip in response to an operation on a third control, and restarts the computing device.

[0114] The first configuration parameter is used to indicate that the VMD function is enabled.

[0115] S1102: Output third prompt information.

[0116] The third prompt information is used to prompt that the computing device can support hot plugging of the hard disk.

[0117] For the above S1101-S1102, when the user needs to turn on the VMD function, click the third control in the fourth interface. In response to this operation, the management controller executes as follows: 1. The management controller sends a third instruction to the processor; 2. The processor responds to the third instruction and runs the BIOS to obtain the first configuration parameter from the management controller; 3. The processor runs the BIOS and modifies the target option of the BIOS chip to the first configuration parameter; the target option is the switch state of the VMD function. After the modification is completed, the processor informs the management controller, and the management controller controls the computing device to restart so that the first configuration parameter takes effect. After the management controller confirms that the effectiveness is completed (the management controller reads the new BIOS parameters after restarting to confirm whether it is effective), a third prompt message is output on the display interface to prompt the user that the VMD function has been turned on and can support plug-and-play of hard disks.

[0118] That is, when the user clicks on the third control, the management controller generates the first configuration parameter corresponding to the third control, and sends an instruction to notify the processor. Further, the processor runs the BIOS to send an IPMI command to the management controller through the intelligent platform management interface (IPMI), and the management controller responds to the command and sends the first configuration parameter to the BIOS chip through the communication channel between the management controller and the BIOS chip (configured by BT over eSPI), and then the processor runs the BIOS and modifies the first configuration parameter to enable the VMD function.

[0119] Among them, IPMI is an open standard, a platform management interface for managing and monitoring server hardware. BIOS can obtain some information of BMC through IPMI, such as system status, hardware configuration, sensor information, etc. BT over eSPI is a setting of BIOS in computing devices, which can be used to start Bluetooth (BT) and communicate through serial peripheral interface (eSPI), which is used to connect BIOS chip with external devices.

[0120] Fig.12 A schematic diagram of a process for disabling the VMD function provided in an embodiment of the present application. Fig.12 As shown, the following steps are included:

[0121] S1201: When the VMD function is turned on, the management controller configures a second configuration parameter of the BIOS chip in response to an operation on a fourth control, and restarts the computing device.

[0122] The second configuration parameter is used to indicate that the VMD function is in a disabled state.

[0123] S1202: Update the switch state of the VMD function in the fourth interface to a closed state.

[0124] For the above S1201-S1202, when the user needs to turn off the VMD function, click the fourth control in the fourth interface. In response to this operation, the management controller executes as follows: 1. The management controller sends a fourth instruction to the processor; 2. The processor responds to the fourth instruction and runs the BIOS to obtain the first configuration parameter from the management controller; 3. The processor runs the BIOS and modifies the target option of the BIOS chip to the second configuration parameter; the target option is the switch state of the VMD function. After the modification is completed, the processor informs the management controller, and the management controller controls the computing device to restart so that the second configuration parameter takes effect. After the management controller confirms that the effectiveness is completed (the management controller reads the new BIOS parameters after restarting to confirm whether it is effective), the VMD function is updated to the closed state on the fourth interface, indicating to the user that the current computing device does not support violent hot plugging.

[0125] The process of obtaining and modifying the second configuration parameter can be found in Fig.11 The corresponding description will not be repeated again.

[0126] As mentioned above, disabling the VMD function requires reconfiguring kernel parameters to ensure the normal operation of the hard disk. Fig.13 A flowchart of configuring kernel parameters provided in an embodiment of the present application is shown below. Fig.13 As shown, the technical solution of the embodiment of the present application can be configured through the following steps:

[0127] S1301. The management controller configures kernel parameters of an operating system running on a processor.

[0128] Among them, kernel parameters are used to support the normal operation of the hard disk on the operating system.

[0129] S1302. Restart the computing device.

[0130] With respect to the above S1301-S1302, the management controller may execute as follows: 1. The management controller sends a fifth instruction to the processor. 2. The processor executes a preset script in response to the fifth instruction to configure the kernel parameters of the operating system. The preset script may be stored in a target location of the memory. The kernel parameters may include enabling a high-performance transmission mode of a PCIe device, and starting a performance optimization mode of a PCIe bus. The management controller may send instructions to the processor so that the processor runs the operating system to complete the modification of the kernel parameters, and then restarts the computing device to make the modified content take effect.

[0131] As an example, the preset script may include the following steps: 1. Open the " / etc / default / grub" file. 2. Enter the edit mode, find "GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel / rootrd.lvm.lv=rhel / swap rhgb quiet", and enter pciehp.pciehp_force=1pci=pcie_bus_perf behind it (there is a space between the added content and the above, and there is no line break). 3. Save the changes. 4. Execute the command to make the changes take effect. The effective commands in different modes are as follows:

[0132] Legacy mode: grub2-mkconfig-o / boot / grub2 / grub.cfg;

[0133] UEFI mode: grub2-mkconfig-o / boot / efi / EFI / redhat / grub.cfg;

[0134] 5. After the modification is completed, restart the computing device.

[0135] It should be understood that the restart of the computing device mentioned here is that one way is that the processor instructs the restart after the modification is completed, and confirms the modification is completed by reading the kernel parameters after the restart is completed, and informs the management controller. Alternatively, the processor informs the management controller after the modification is completed, and the management controller instructs the restart, and after the restart is completed, the management controller re-reads the kernel parameters to confirm whether it is effective, and if it is not effective, the above S1301-S1302 is re-executed. The embodiment of the present application does not limit this specific implementation.

[0136] Fig.14 A management flow chart provided in the embodiment of the present application, combined with Fig.14Detailed description. Start, 1. The management controller reads the switch status of VMD, 2. Determines whether VMD needs to be turned on. If it needs to be turned on (corresponding to the user clicking the third control mentioned above), then 3. The VMD function of the computing device configuration BIOS is turned on. 4. The management controller controls the computing device to restart. 5. Determine whether VMD is turned on. If so, 6. Remind that violent hot plugging is allowed, and end. If not, re-execute the above step 3.

[0137] If the user does not need to turn on VMD (corresponding to the aforementioned user clicking the fourth control), 7. The management controller configures the kernel parameters of the operating system, 8. The management controller controls the computing device to restart. 9. Determine whether the kernel parameters are configured correctly (that is, the computing device detects whether the above-mentioned high-performance transmission mode, etc. is turned on). If not, return to step 7. If correct, then 10. Display the first interface to indicate whether the hard disk is in place. When the user needs to uninstall the hard disk (corresponding to the aforementioned user clicking the first control), 11. The management controller controls power-off and uninstallation of the driver, 12. The computing device prompts that the uninstallation is complete, and the process ends. When the user needs to install a hard disk (corresponding to the aforementioned user clicking the second control), 13. Prompt the user to enter and exit the hard disk, 14. After the hard disk is inserted, prompt that the hard disk is in place and running normally, and the process ends.

[0138] The technical solution provided by the above-mentioned embodiment brings at least the following beneficial effects: the hard disk management method provided by the embodiment of the present application displays the distribution of at least one slot in the computing device and the presence of the hard disk in each slot through the BMC. The user can clearly determine the location of the hard disk to be uninstalled through the interface display. Further, the user can select the slot where the hard disk to be uninstalled is located through interface operation. According to the slot specified by the user, the management controller can perform relevant uninstall operations on the hard disk in the slot, thereby realizing the uninstallation of the hard disk. This method of visual operation through the interface does not require the user to issue commands step by step, which can not only lower the user's usage threshold, but also reduce the time of manual configuration and improve the efficiency of hard disk plugging and unplugging. In addition, by replacing manual configuration, the correctness of the configuration can be guaranteed and the occurrence of configuration errors can be reduced.

[0139] Furthermore, the interface operation replaces the cumbersome switching of VMD function states, further improving the convenience of operation and meeting various needs of users. In this solution, the management controller implements the issuance of commands and logic execution during the hard disk plugging and unplugging process, lowering the usage threshold and contributing to the further promotion of computing devices in the market.

[0140] It can be seen that the above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, the embodiment of the present application provides a hardware structure and / or software module corresponding to each function. It should be easily appreciated by those skilled in the art that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed herein, the embodiment of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0141] In an exemplary embodiment, the present application also provides a computing device. Fig.15 A schematic diagram of the composition of a computing device provided in an embodiment of the present application. Fig.15 As shown, the computing device may include: a processor 1501 and a memory 1502; the memory 1502 stores instructions executable by the processor 1501; when the processor 1501 is configured to execute the instructions, the computing device implements the method described in the aforementioned method embodiment.

[0142] The embodiment of the present application provides a computing device, including a processor, a management controller, a complex programmable logic device (CPLD), and at least one slot; the at least one slot can support the insertion of a hard disk; the management controller is used to display a first interface; the first interface includes the distribution of the at least one slot on the computing device, and the presence of the hard disk in each slot;

[0143] The management controller is used to display a second interface in response to an operation on a first slot in the first interface; the first slot is a slot in the at least one slot in which the hard disk is plugged; the second interface includes a first control; the first control is used to indicate uninstalling the hard disk in the first slot;

[0144] The management controller is used to control the CPLD to power off the first slot and control the processor to uninstall the hard disk drive in response to the operation of the first control, and then output a first prompt message; the first prompt message is used to prompt that the hard disk in the first slot can be unplugged. The management controller is also used to implement the method described in the above management method embodiment.

[0145] The present application embodiment also provides a computer-readable storage medium. All or part of the processes in the above method embodiment can be completed by computer instructions to indicate the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it may include the processes of the above method embodiments. The computer-readable storage medium can be any of the above embodiments or memory. The above computer-readable storage medium can also be an external storage device of the above management device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above management device. Further, the above computer-readable storage medium can also include both the internal storage unit of the above management device and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above management device. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.

[0146] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute any one of the hard disk management methods provided in the above embodiments.

[0147] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other changes to the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.

[0148] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the spirit and scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, those skilled in the art may make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0149] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A hard disk management method, applied to a computing device, wherein the computing device comprises a processor, a management controller, a complex programmable logic device (CPLD), a basic input and output system (BIOS) chip, and at least one slot; the at least one slot can support the insertion of a hard disk; characterized in that: The method comprises: The management controller displays a fourth interface; the fourth interface includes the switch status of the volume management device VMD function, and the fourth interface also includes a fourth control, and the fourth control is used to turn off the VMD function; When the switch state of the VMD function is in the on state, the management controller sends a fourth instruction to the processor in response to the operation of the fourth control, so that the processor responds to the fourth instruction, runs the BIOS to obtain a second configuration parameter from the management controller, runs the BIOS, modifies the target option of the BIOS chip to the second configuration parameter, and restarts the computing device; the target option is the switch state of the VMD function, and the second configuration parameter is used to indicate that the VMD function is in the off state; Updating the switch state of the VMD function in the fourth interface to a closed state; When the VMD function is in a closed state, the management controller displays a first interface; the first interface includes the distribution of the at least one slot on the computing device and the presence of the hard disk in each slot; The management controller displays a second interface in response to an operation on a first slot in the first interface; the first slot is a slot in the at least one slot in which the hard disk is plugged; the second interface includes a first control; the first control is used to indicate uninstalling the hard disk in the first slot; In response to the operation on the first control, the management controller controls the CPLD to power off the first slot and controls the processor to uninstall the hard disk drive, and then outputs a first prompt message; the first prompt message is used to prompt that the hard disk on the first slot can be unplugged.

2. The method according to claim 1, characterized in that The controlling the CPLD to power off the first slot includes: The management controller sends a first instruction to the CPLD; the first instruction includes a slot identifier of the first slot; The CPLD, in response to the first instruction, powers off the first slot according to the slot identifier.

3. The method according to claim 1, characterized in that The controlling the processor to unload the hard disk drive includes: The management controller sends a second instruction to the processor; the second instruction includes a slot identifier of the first slot; The processor uninstalls the hard disk drive according to the slot identifier in response to the second instruction.

4. The method according to claim 1, characterized in that: The method further comprises: Detecting whether the operating system running on the processor enables an interrupt allocation service; In a case where the operating system enables the interrupt distribution service, the management controller controls the operating system executed by the processor to restart the interrupt distribution service.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The management controller displays a third interface in response to an operation on a second slot in the first interface; the second slot is a slot in the at least one slot that is not plugged with the hard disk; the third interface includes a second control; the second control is used to install the hard disk in the second slot; The management controller outputs second prompt information in response to an operation on the second control; the second prompt information is used to indicate that the hard disk can be inserted into the second slot.

6. The method according to claim 1, characterized in that The computing device further includes a basic input and output system BIOS chip, the fourth interface further includes a third control; the third control is used to enable the VMD function; the method further includes: When the switch state of the VMD function is in the off state, the management controller configures a first configuration parameter of the BIOS chip in response to the operation of the third control, and restarts the computing device; the first configuration parameter is used to indicate that the VMD function is in the on state; Output a third prompt message; the third prompt message is used to prompt that the computing device can support hot plugging of hard disks.

7. The method according to claim 6, characterized in that The first configuration parameter of configuring the BIOS chip includes: The management controller sends a third instruction to the processor; In response to the third instruction, the processor executes the BIOS to obtain the first configuration parameter from the management controller; The processor runs BIOS and modifies a target option of the BIOS chip to be the first configuration parameter; the target option is a switch state of the VMD function.

8. A computing device, characterized in that The computing device comprises a processor, a management controller, a complex programmable logic device (CPLD), a BIOS chip and at least one slot; the at least one slot can support the insertion of a hard disk; the management controller is used to display a first interface; the first interface includes the distribution of the at least one slot on the computing device and the presence of the hard disk in each slot; The management controller is used to display a fourth interface; the fourth interface includes the switch status of the volume management device VMD function, and the fourth interface also includes a fourth control, and the fourth control is used to turn off the VMD function; When the switch state of the VMD function is in the on state, the management controller is used to send a fourth instruction to the processor in response to the operation of the fourth control, so that the processor responds to the fourth instruction, runs the BIOS to obtain a second configuration parameter from the management controller, runs the BIOS, modifies the target option of the BIOS chip to the second configuration parameter, and restarts the computing device; the target option is the switch state of the VMD function, and the second configuration parameter is used to indicate that the VMD function is in the off state; The management controller is further used to update the switch state of the VMD function in the fourth interface to a closed state; When the VMD function is in a closed state, the management controller is used to display a second interface in response to an operation on a first slot in the first interface; the first slot is a slot in the at least one slot in which the hard disk is plugged; the second interface includes a first control; the first control is used to indicate to uninstall the hard disk in the first slot; The management controller is used to control the CPLD to power off the first slot and control the processor to uninstall the hard disk drive in response to the operation of the first control, and then output a first prompt message; the first prompt message is used to prompt that the hard disk on the first slot can be unplugged.

Citation Information

Patent Citations

  • Method for managing external equipment of computer

    CN101957725A

  • Hot plug method of NVME storage device, backboard and computing device

    CN116150064A