Storage device control method and device, storage medium and electronic device

By deploying a second controller in the power supply line of the storage device of the multi-node server, and using the first controller to detect the server connection status to generate a control signal, the problem of power waste and shortened hard disk life caused by the non-independent power supply of the hard disk is solved, and storage is realized. Efficient control of equipment and improved server reliability.

CN119356504APending Publication Date: 2025-01-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411487592.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In existing multi-node servers, the power supply of the hard disk is not independent, which causes the hard disk to be still in a live state during node failure or maintenance, resulting in waste of power and shortened hard disk life. Hot-swap operation may damage the hard disk, affecting the normal business processing of other nodes. and overall server availability.

Method used

By deploying the second controller in the power supply line of the storage device, the connection state of the server device is used to use the first controller to generate a matching control signal, control the power supply status of the storage device in the second controller, and realize the automatic power -on and lower part of the lower power power -on and lower part. electricity.

Benefits of technology

It improves the control efficiency of storage devices, avoids unnecessary power consumption, extends the life of hard disks, and improves the overall availability of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356504A_ABST
    Figure CN119356504A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a control method and device of a storage device, a storage medium and an electronic device.The method comprises the steps that the target connection state of target server equipment in server equipment is detected; screening a target storage device corresponding to the target server device from the storage devices, and generating a target control signal matched with the target connection state according to the target connection state; and sending the target control signal to a second controller on the target power supply line. By means of the method and device, the problem that the control efficiency of the storage device is low is solved, and the effect of improving the control efficiency of the storage device is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of storage devices, and more specifically, to a storage device control method and apparatus, a storage medium, and an electronic device. Background Art

[0002] A multi-node server can be, but is not limited to, integrating multiple independent computing nodes into the same system. Each node occupies a corresponding storage device (e.g., hard disk). Different nodes of a multi-node server share a backplane, and the backplane and each node establish communication and control through a middle backplane. For example, a four-node server has an 8-port backplane. Each node on the server can establish communication with the 8-port backplane through the middle backplane. Each node occupies 2 hard disks in the 8-port backplane, and each node and the corresponding hard disk are independent of each other in data management and communication.

[0003] In the related art, the power supply of the hard disks on each node is not independent, but is controlled by a server backplane. When a node needs to be shut down or maintained due to a fault, the hard disk on the node is still in a powered working state, which may cause power waste and shorten the life of the hard disk. In addition, hot-swap operations may cause damage to the hard disk, seriously affecting the normal business processing of other nodes and the overall availability of the server. Summary of the invention

[0004] The embodiments of the present application provide a storage device control method and apparatus, a storage medium, and an electronic device to at least solve the problem of low control efficiency of storage devices in related technologies.

[0005] According to an embodiment of the present application, a storage device control method is provided, which is applied to a first controller, wherein the first controller is respectively connected to a server device, a storage device, and a second controller, and the second controller is deployed in a power supply line corresponding to the storage device, and the power supply line is used to power the corresponding storage device. The method includes: detecting a target connection state of a target server device in the server device, wherein the target connection state is used to indicate a connection status between the target server device and the first controller; screening a target storage device corresponding to the target server device from the storage device, and generating a target control signal matching the target connection state according to the target connection state, wherein the target control signal is used to adjust the power supply state of a target power supply line corresponding to the target storage device to match the target connection state; and sending the target control signal to the second controller on the target power supply line, wherein the second controller on the target power supply line is used to control the target power supply line according to the target control signal.

[0006] In an exemplary embodiment, a control device is deployed on the target server device, the control device is connected to the first controller, the control device is used to control the target server device to be turned on and off, and the detection of the target connection state of the target server device in the server device includes: receiving an initial control signal generated by the target server device in response to a target control operation performed on the control device, wherein the target control operation is used to control the target server device to be turned on or to be turned off; and detecting the target connection state according to the initial control signal.

[0007] In an exemplary embodiment, detecting the target connection status based on the initial control signal includes: when the initial control signal is at a high level, determining that the target connection status is used to indicate that the connection between the target server device and the first controller is normal; when the initial control signal is at a low level, determining that the target connection status is used to indicate that the connection between the target server device and the first controller is abnormal.

[0008] In an exemplary embodiment, server devices and storage devices with corresponding relationships are stored in the first controller, and screening the target storage device corresponding to the target server device from the storage devices includes: searching for the target storage device corresponding to the target server device from the server devices and storage devices with corresponding relationships; generating a target control signal matching the target connection status according to the target connection status includes: generating a high-level first control signal when the target connection status is used to indicate that the connection between the target server device and the first controller is normal, and generating a low-level second control signal when the target connection status is used to indicate that the connection between the target server device and the first controller is abnormal, wherein the target control signal includes the first control signal and the second control signal.

[0009] In an exemplary embodiment, a signal pin is disposed on the second controller, and the signal pin is connected to the first controller. The sending of the target control signal to the second controller on the target power supply line includes: when the target connection state is used to indicate that the connection between the target server device and the first controller is normal, sending a high-level first control signal to the signal pin; when the target connection state is used to indicate that the connection between the target server device and the first controller is abnormal, sending a low-level second control signal to the signal pin; wherein the target control signal includes the first control signal and the second control signal.

[0010] In an exemplary embodiment, a power supply is deployed in the target power supply line, the power supply is connected to the second controller, an output pin and a signal pin are deployed on the second controller, the signal pin is connected to the first controller, the output pin is connected to the target storage device, and the output pin is used to output the power supply voltage of the target storage device according to the voltage provided by the power supply. The method also includes: extracting the target control signal sent by the first controller and received by the signal pin; and controlling the power supply voltage output by the output pin through the second controller according to the target control signal, wherein the target control signal is used to adjust the power supply voltage output by the output pin to match the target connection state, and the target power supply state includes whether the output pin outputs the power supply voltage corresponding to the target storage device.

[0011] In an exemplary embodiment, the control of the power supply voltage output by the output pin by the second controller according to the target control signal comprises: when the output pin includes M pins, the control of the power supply voltage output by the M pins by the second controller according to the target control signal by performing the following steps, wherein M is a positive integer: when the target control signal is at a high level, the M pins are controlled by the second controller to output the target power supply voltage corresponding to the target storage device; when the target control signal is at a low level, the M pins are controlled by the second controller to stop outputting the power supply voltage; wherein the control of the M pins by the second controller to output the target storage device The corresponding target power supply voltage includes: generating an enable signal through a second controller, sending the enable signal to the M pins through the second controller, wherein the M pins are configured to output the target power supply voltage in an output mode indicated by the enable signal when receiving the enable signal, wherein the output mode is used to indicate the power supply voltage output by each of the M pins; controlling the M pins to stop outputting the power supply voltage through the second controller includes: generating a disable signal through the second controller, sending the disable signal to the M pins through the second controller, wherein the M pins stop outputting the power supply voltage when receiving the disable signal.

[0012] According to another embodiment of the present application, a control device for a storage device is provided, which is applied to a first controller, wherein the first controller is respectively connected to a server device, a storage device, and a second controller, and the second controller is deployed in a power supply line corresponding to the storage device, and the power supply line is used to power the corresponding storage device. The device includes: a detection module, which is used to detect a target connection state of a target server device in the server device, wherein the target connection state is used to indicate a connection status between the target server device and the first controller; a processing module, which is used to screen a target storage device corresponding to the target server device from the storage device, and generate a target control signal matching the target connection state according to the target connection state, wherein the target control signal is used to adjust the power supply state of the target power supply line corresponding to the target storage device to match the target connection state; and a sending module, which is used to send the target control signal to the second controller on the target power supply line, wherein the second controller on the target power supply line is used to control the target power supply line according to the target control signal.

[0013] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0014] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0015] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0016] Through the present application, the first controller can generate a control signal matching the connection state according to the detected connection state of the server device, and control the power supply line corresponding to the storage device through the control signal to realize automatic control of powering on and off the storage device. In this way, when the connection state of the server device changes, the storage device is automatically controlled to power on or off according to the actual connection state of the server device, thereby solving the problem of low control efficiency of the storage device and achieving the effect of improving the control efficiency of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1It is a hardware structure block diagram of a server device of a storage device control method according to an embodiment of the present application;

[0018] Figure 2 is a flow chart of a method for controlling a storage device according to an embodiment of the present application;

[0019] Figure 3 is a schematic diagram of an optional control architecture of a storage device according to an embodiment of the present application Figure 1 ;

[0020] Figure 4 is a schematic diagram of an optional control architecture of a storage device according to an embodiment of the present application Figure 2 ;

[0021] Figure 5 is a schematic diagram of a switching device and a control device deployed on an optional server device according to an embodiment of the present application;

[0022] Figure 6 is a schematic diagram of an optional power supply circuit according to an embodiment of the present application;

[0023] Figure 7 It is a structural block diagram of a control device of a storage device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0026] First, the terms designed in the embodiments of the present application are explained as follows:

[0027] BMC: Baseboard Management Controller, baseboard management controller.

[0028] CPLD: Complex Programmable Logic Device, a digital integrated circuit with logic functions that users can construct according to their own needs. Its basic design method is to use the integrated development software platform, schematic diagram, hardware description language and other methods to generate the corresponding target file, and transmit the code to the target chip through the download cable ("in-system" programming) to realize the designed digital system.

[0029] eFuse: Electrically Programmable Fuse, also known as electronic fuse, is an integrated circuit that can replace large conventional fuses or other protection devices such as resettable polymer fuses. They use small plastic packages (such as DFN and flip-chip packages), integrate control circuits and low on-resistance power switches, and connect input ports and loads.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a storage device control method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a control method of a storage device in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to a server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0033] In this embodiment, a control method for a storage device is provided, which is applied to a first controller, wherein the first controller is respectively connected to a server device, a storage device, and a second controller, and the second controller is deployed in a power supply line corresponding to the storage device, and the power supply line is used to supply power to the corresponding storage device. Figure 2 is a flow chart of a method for controlling a storage device according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0034] Step S202, detecting a target connection state of a target server device in the server device, wherein the target connection state is used to indicate a connection status between the target server device and the first controller;

[0035] Step S204, screening a target storage device corresponding to the target server device from the storage devices, and generating a target control signal matching the target connection state according to the target connection state, wherein the target control signal is used to adjust the power supply state of the target power supply line corresponding to the target storage device to match the target connection state;

[0036] Step S206: Send the target control signal to the second controller on the target power supply line, wherein the second controller on the target power supply line is used to control the target power supply line according to the target control signal.

[0037] Optionally, in this embodiment, when the connection between multiple server devices and the first controller is abnormal (for example, shutdown), a low-level control signal can be sent in parallel to the second controller deployed in the power supply lines corresponding to the multiple server devices, but is not limited to, to achieve batch control of powering off the storage devices corresponding to the multiple server devices.

[0038] Optionally, in this embodiment, when the connection between multiple server devices and the first controller is normal (for example, powered on), a high-level control signal can be sent in parallel to the second controller deployed in the power supply lines corresponding to the multiple server devices, but is not limited to, to achieve batch control of powering on the storage devices corresponding to the multiple server devices.

[0039] Through the above steps, the first controller can generate a control signal matching the connection state according to the detected connection state of the server device, and control the power supply line corresponding to the storage device through the control signal to realize automatic control of powering on and off the storage device. In this way, when the connection state of the server device changes, the storage device is automatically controlled to power on or off according to the actual connection state of the server device, thereby solving the problem of low control efficiency of the storage device and achieving the effect of improving the control efficiency of the storage device.

[0040] In the technical solution provided in the above step S202, the server device may include but is not limited to a separate server device, or a server device deployed with multiple nodes. For example, multiple sets of processing devices are deployed in the server device, and each set of processing devices may include but is not limited to corresponding CPU (Central Processing Unit) and GPU (Graphics Processing Unit) and other devices. In this case, a complete set of processing devices may be but is not limited to being used as a node.

[0041] Optionally, in this embodiment, the server device may, but is not limited to, perform read operations or write operations on data stored in the storage device through the first controller, etc. For example, the storage device may, but is not limited to, include a hard disk, or a raid, etc. This application does not impose any restrictions on this. Each storage device may, but is not limited to, have a corresponding power supply line.

[0042] Optionally, in this embodiment, the connection status may be, but is not limited to, used to indicate that the connection between the target server device and the first controller is normal or that the connection between the target server device and the first controller is abnormal.

[0043] Figure 3 is a schematic diagram of an optional control architecture of a storage device according to an embodiment of the present application Figure 1 ,like Figure 3 As shown, the server device can be but is not limited to being connected to a first controller, and the first controller can be but is not limited to being connected to a second controller, wherein the target control signal output by the first controller is used as the input of the second controller, and the second controller is used to control the corresponding power supply line according to the received target control signal.

[0044] Optionally, in this embodiment, the first controller may include, but is not limited to, a control device such as a CPLD (Complex Programmable Logic Device), an FPGA (Field-Programmable Gate Array), or a microcontroller.

[0045] Optionally, in this embodiment, the second controller may be, but is not limited to, used to control a power supply line corresponding to the storage device. For example, the second controller may be, but is not limited to, include a TPS259260 chip.

[0046] Figure 4 is a schematic diagram of an optional control architecture of a storage device according to an embodiment of the present application Figure 2 ,like Figure 4 As shown, it can be but not limited to taking the example that server nodes 0 to server nodes 3 are deployed on the server device, the first controller is deployed on the mid-backplane S2, and slots Slot0-1, Slot2-3, Slot4-5 and Slot6-7 are deployed on the hard disk backplane, where one node is equivalent to one server device, and one slot is used to connect one storage device (for example, a hard disk).

[0047] The S1 server node can, but is not limited to, establish communication with an 8-port HDD (Hard Disk Drive) backplane through the midplane, and each node occupies 2 hard disks. The 8-port backplane and the midplane Midplane establish communication through relevant data lines, wherein the midplane Midplane integrates a first controller (for example, a CPLD programmable controller), and establishes a logical relationship in advance in the programmable controller CPLD, that is, after the node Node0 is shut down, a trigger signal is given to the midplane Midplane, and the midplane sends a signal (equivalent to the second control signal) to the 8-port backplane through the logical relationship set by the programmable control 4-node 8-port backplane server CPLD, and issues a power-off instruction to the hard disk on the 8-port backplane slot0-1 associated with the node Node0; conversely, after the midplane Midplane receives the power-on signal of the node Node0, the midplane sends a signal (equivalent to the first control signal) to the 8-port backplane through the logical relationship set by the programmable control 4-node 8-port backplane server CPLD, and issues a power-on instruction to the 8-port backplane slot0-1 hard disk associated with the node Node0 according to the CPLD logic setting.

[0048] The S3 backplane can be designed to obtain power from the S2 middle backplane. When any server node is powered on, the S2 middle backplane will be powered, so that the S3 backplane can be powered. However, which hard disk slots of the S3 backplane are powered on is subject to the power-on and power-off status of each node. For example, a logical relationship as shown in Table 1 can be established in the CPLD programmable controller.

[0049] Table 1

[0050]

[0051] In an exemplary embodiment, a control device may be deployed on the target server device but is not limited to being connected to the first controller, the control device being used to control the target server device to be turned on and off, and the target connection state of the target server device in the server device is detected by: receiving an initial control signal generated by the target server device in response to a target control operation performed on the control device, wherein the target control operation is used to control the target server device to be turned on or turned off; and detecting the target connection state according to the initial control signal.

[0052] Optionally, in this embodiment, the control device may be, but is not limited to, a device for controlling the target server device to be turned on and off, such as controlling the target server device to be turned on or controlling the target server device to be turned off.

[0053] As an optional example, a switching device may be but is not limited to being deployed on the target server device, the switching device is connected to the control device, and the switching device is used to switch the server device to be controlled. The target server device is deployed with a switching device, the switching device is connected to the control device, and the switching device is used to switch the server device to be controlled. The method comprises: detecting a target switching operation performed on the switching device, and switching the server device to be controlled to the target server device in response to the target switching operation.

[0054] Figure 5 is a schematic diagram of a switching device and a control device deployed on an optional server device according to an embodiment of the present application, combined with Figure 4 and Figure 5 As shown, each node of the S1 server can switch different nodes N0 / N1 / N2 / N3 through the server front control panel to perform independent power on and off control of the nodes. That is, after pressing the Node switch key (equivalent to the switching device), it will switch between nodes N0 / N1 / N2 / N3. When switching to N0, pressing the "power on and off key" (equivalent to the control device) can turn on and off the node N0.

[0055] In this way, the user can switch the server device to be controlled by triggering the switching device, which reduces the complexity of the process of switching the server device and improves the efficiency of the user switching the server device to be controlled.

[0056] In an exemplary embodiment, the target connection status can be detected based on, but not limited to, the initial control signal: when the initial control signal is at a high level, the target connection status is determined to indicate that the connection between the target server device and the first controller is normal; when the initial control signal is at a low level, the target connection status is determined to indicate that the connection between the target server device and the first controller is abnormal.

[0057] Optionally, in this embodiment, the low level and the high level may include but are not limited to logic levels. As an optional example, the low level may be but are not limited to being used to indicate that the voltage is less than a voltage threshold, and the high level may be but are not limited to being used to indicate that the voltage is greater than or equal to the voltage threshold. For example, the high level may be identified by 1 and the low level may be identified by 0.

[0058] Optionally, in this embodiment, a normal connection between the target server device and the first controller may include but is not limited to the server device being powered on or operating normally, etc.; an abnormal connection between the target server device and the first controller may include but is not limited to the server device being powered off or the server device being disassembled, etc.

[0059] Through the embodiments of the present application, when the server device is turned off, a low-level signal will be automatically triggered, and when the server device is turned on or operating normally, a high-level signal will be automatically triggered. In this way, the first controller can automatically detect the connection status between the server device and the first controller by receiving the initial control signal triggered by the server device, thereby improving the timeliness of detecting the connection status between the server device and the first controller.

[0060] In the technical solution provided in the above step S204, different server devices may have but are not limited to corresponding storage devices. It can be understood that the storage devices corresponding to different server devices may be but are not limited to being different, and the target storage device corresponding to the target server device may be searched for from the storage device first but is not limited to being searched for first.

[0061] Optionally, in this embodiment, the power supply status of the target power supply line may be, but is not limited to, used to indicate that the target power supply line supplies power to the target storage device, or that the target power supply line stops supplying power to the target storage device.

[0062] In an exemplary embodiment, it is possible but not limited to storing server devices and storage devices with corresponding relationships in the first controller, and the target storage device corresponding to the target server device is screened from the storage devices: the target storage device corresponding to the target server device is searched from the server devices and storage devices with corresponding relationships; a target control signal matching the target connection status is generated according to the target connection status: when the target connection status is used to indicate that the connection between the target server device and the first controller is normal, a high-level first control signal is generated; when the target connection status is used to indicate that the connection between the target server device and the first controller is abnormal, a low-level second control signal is generated, wherein the target control signal includes the first control signal and the second control signal.

[0063] Optionally, in this embodiment, the first controller stores server devices and storage devices with corresponding relationships. When the first controller receives an initial control signal sent by the target server device, it can, but is not limited to, search for the target storage device corresponding to the target server device from the server devices and storage devices with corresponding relationships.

[0064] In this way, the first controller generates a corresponding control signal for controlling the line corresponding to the storage device based on the initial control signal generated by the received target server device, thereby reducing the complexity of controlling the power supply line corresponding to the storage device and improving the efficiency of controlling the power supply line corresponding to the storage device.

[0065] In the technical solution provided in the above step S206, the second controller can be but is not limited to being used to control the target power supply circuit to output the target power supply voltage required by the target storage device or stop outputting the power supply voltage according to the target control signal. As an optional example, the target power supply voltage can be but is not limited to including the rated voltage of the target storage device or the voltage required for the actual operation of the target storage device.

[0066] As an optional example, after sending the target control signal to the second controller on the target power supply line, the method further includes: detecting an update connection status of the target server device in the server device, wherein the update connection status is used to indicate an update connection status between the target server device and the first controller; generating an update control signal matching the update connection status according to the update connection status, wherein the update control signal is used to adjust the power supply status of the target power supply line corresponding to the target storage device to match the update connection status; and sending the update control signal to the second controller on the target power supply line, wherein the second controller on the target power supply line is used to control the target power supply line according to the update control signal.

[0067] In this way, after the server device is shut down, if the server device is restarted, in this case, the power supply voltage output by the power supply line corresponding to the server device will be automatically controlled, and the corresponding storage device will be automatically controlled to be powered on and off according to the connection status of the server device, thereby improving the control efficiency of the storage device.

[0068] In an exemplary embodiment, a signal pin may be deployed on the second controller but is not limited to being connected to the first controller, and the target control signal is sent to the second controller on the target power supply line: when the target connection state is used to indicate that the connection between the target server device and the first controller is normal, a high-level first control signal is sent to the signal pin; when the target connection state is used to indicate that the connection between the target server device and the first controller is abnormal, a low-level second control signal is sent to the signal pin; wherein the target control signal includes the first control signal and the second control signal.

[0069] Optionally, in this embodiment, the second controller may include, but is not limited to, a TPS25926 chip as an example, and the signal pin may include, but is not limited to, an EN / UVL0 pin on the TPS25926 chip, and the TPS25926 chip may receive, but is not limited to, the target control signal sent by the first controller through the EN / UVL0 pin.

[0070] In this way, communication between the first controller and the second controller is achieved through the signal pins on the second controller, so that the first controller and the second controller can transmit control signals, thereby improving the efficiency of communication between the first controller and the second controller.

[0071] In an exemplary embodiment, a power supply may be deployed in the target power supply line but is not limited to the power supply being connected to the second controller. The second controller is provided with an output pin and a signal pin, the signal pin is connected to the first controller, the output pin is connected to the target storage device, and the output pin is used to output the power supply voltage of the target storage device according to the voltage provided by the power supply: extracting the target control signal sent by the first controller received by the signal pin; and controlling the power supply voltage output by the output pin through the second controller according to the target control signal, wherein the target control signal is used to adjust the power supply voltage output by the output pin to match the target connection state, and the target power supply state includes whether the output pin outputs the power supply voltage corresponding to the target storage device.

[0072] Optionally, in this embodiment, the second controller may include, but is not limited to, a TPS25926 chip as an example, the signal pin may include, but is not limited to, the EN / UVL0 pin on the TPS25926 chip, the output pin may include, but is not limited to, the Out (output) pin on the TPS25926 chip, and the TPS25926 chip may control, but is not limited to, the power supply voltage output by the power supply circuit by controlling the Out pin.

[0073] Optionally, in this embodiment, the power supply may be, but is not limited to, providing a power supply voltage for the target storage device. For example, the power supply may be, but is not limited to, allowing 12V and 5V voltages to be provided to the storage device.

[0074] In an exemplary embodiment, the power supply voltage output by the output pin can be controlled by the second controller according to the target control signal, but is not limited to: when the output pin includes M pins, the power supply voltage output by the M pins is controlled by the second controller according to the target control signal by performing the following steps, wherein M is a positive integer: when the target control signal is at a high level, the M pins are controlled by the second controller to output the target power supply voltage corresponding to the target storage device; when the target control signal is at a low level, the M pins are controlled by the second controller to stop outputting the power supply voltage; wherein the control of the M pins by the second controller to output the target storage device The target power supply voltage corresponding to the device includes: generating an enable signal through a second controller, sending the enable signal to the M pins through the second controller, wherein the M pins are configured to output the target power supply voltage in an output mode indicated by the enable signal when receiving the enable signal, wherein the output mode is used to indicate the power supply voltage output by each of the M pins; controlling the M pins to stop outputting the power supply voltage through the second controller: generating a disable signal through the second controller, sending the disable signal to the M pins through the second controller, wherein the M pins stop outputting the power supply voltage when receiving the disable signal.

[0075] Optionally, in this embodiment, when the M pins receive a disable signal, the M pins may, but are not limited to, all stop outputting the supply voltage to power off the corresponding storage device.

[0076] Optionally, in this embodiment, the output method can be but is not limited to indicating the average output target supply voltage of M pins. For example, when the target supply voltage is 6V and the output pins are 3 pins, each pin can but is not limited to outputting a voltage of 2V.

[0077] In order to better understand the control process of the control method of the storage device in the embodiment of the present application, the control process of the control method of the storage device in the embodiment of the present application is explained and illustrated in combination with optional embodiments below, which can be applicable to but not limited to the embodiment of the present application.

[0078] The explanation may be, but is not limited to, that the first controller includes a CPLD, the storage device includes a hard disk, and the second controller includes a TPS25926 chip. Figure 6 is a schematic diagram of an optional power supply circuit according to an embodiment of the present application, combined with Figure 4 , Figure 6As shown, the power supply of each storage device needs to have a controlled EFUSE circuit. Taking the TPS25926 chip setting EFUSE control circuit as an example, the TPS25926 chip is used to control the power supply of the hard disk on the backplane. After receiving the control signal, it can turn on or off the power supply to the hard disk.

[0079] The EFUSE circuit is equipped with a TPS25926 chip. The TPS25926 chip is equipped with pins "EN / UVLO" (equivalent to a signal pin) and out 0 to out3 (out 0 to out3 are equivalent to output pins). The TPS25926 chip is also equipped with VIN1 pin 3 to VIN pin 3, which are connected to a power supply (e.g., P12V_Out1). The TPS25926 chip is also equipped with an ILIM pin, which may include, but is not limited to, a current limiting pin for limiting current. For example, the current threshold may be limited to, but is not limited to, (0.7+3*R / 100000)=3.85A.

[0080] It should be noted that Figure 6 The device also includes capacitors C621, C623, and C625, resistors R286, R287, and R375. The functions of capacitors C621, C623, and C625, resistors R286, R287, and R375 are the same as those in the related art, and will not be described in detail in this application.

[0081] The hard disk backplane is usually designed to be powered by 12V and 5V. When the node Node0 is powered off, a low-level signal is transmitted to the CPLD. After the CPLD makes a judgment, it sends a low-level signal "HDD_12V_EN <0> ” (equivalent to the second control signal) transmits information to pin “EN / UVLO” (equivalent to the signal pin) to disable the Out pin (equivalent to the output pin), that is, the TPS25926 chip controls the EFUSE circuit not to output voltage, thereby realizing the power-off of the corresponding backplane slot, that is, turning off the corresponding HDD0 power supply.

[0082] When the node Node0 is powered on, a high-level signal is transmitted to the CPLD, and the CPLD sends a high-level signal "HDD_12V_EN" after judgment. <0> ” (equivalent to the first control signal) transmits information to pin “EN / UVLO” (equivalent to the signal pin), enabling the Out pin (equivalent to the output pin), that is, the TPS25926 chip controls the EFUSE circuit to output the power supply voltage required by the hard disk, thereby realizing the power-on of the corresponding backplane slot, that is, realizing the corresponding HDD0 power supply.

[0083] For example, taking the server node Node0 as an example, when the user needs to perform maintenance operations on Node0, the user can, but is not limited to, select Node0 as the node to be controlled through the "Node switch key" on the server front control panel, and then trigger the "power key" to shut down Node0, and automatically send a low-level signal to the CPLD deployed in the midplane. The CPLD sends a low-level signal to the second controller (for example, TPS25926 chip) in the power supply line corresponding to Node0. After the second controller (for example, TPS25926 chip) receives the low-level signal sent by the CPLD, it stops outputting voltage, so that the hard disk corresponding to Node0 is automatically powered off.

[0084] When the maintenance work is completed, Node0 is restarted, and Node0 automatically triggers a high-level signal. The CPLD receives the high-level signal and automatically sends a high-level signal to the CPLD deployed in the midplane. The CPLD sends a high-level signal to the second controller (for example, TPS25926 chip) in the power supply line corresponding to Node0. After the second controller (for example, TPS25926 chip) receives the high-level signal sent by the CPLD, it outputs the required voltage, so that the hard disk corresponding to Node0 is automatically powered on. The whole process is automated and efficient, ensuring the stable operation of the server and the safe maintenance of the hard disk.

[0085] Through the embodiment of the present application, when a multi-node server performs maintenance on a certain node, the hard disk of the node being maintained is automatically powered off, saving unnecessary power consumption, and at the same time putting the hard disk in a stopped working state, reducing the hard disk life decay. In addition, it is beneficial to the maintenance of the multi-node server, whether it is reducing a node in a fully configured node or adding a node in a non-fully configured node, the corresponding node hard disk can be automatically powered on and off with the node, without affecting the services of other nodes.

[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0087] In the present embodiment, a control device for a storage device is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the descriptions that have been made are not repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceivable.

[0088] Figure 7 1 is a structural block diagram of a control device for a storage device according to an embodiment of the present application, which is applied to a first controller, wherein the first controller is respectively connected to a server device, a storage device, and a second controller, and the second controller is deployed in a power supply line corresponding to the storage device, and the power supply line is used to supply power to the corresponding storage device, such as Figure 7 As shown, the device comprises:

[0089] A detection module 702, configured to detect a target connection state of a target server device in the server device, wherein the target connection state is used to indicate a connection status between the target server device and the first controller;

[0090] The processing module 704 is used to select a target storage device corresponding to the target server device from the storage devices, and generate a target control signal matching the target connection state according to the target connection state, wherein the target control signal is used to adjust the power supply state of the target power supply line corresponding to the target storage device to match the target connection state;

[0091] The sending module 706 is used to send the target control signal to the second controller on the target power supply line, wherein the second controller on the target power supply line is used to control the target power supply line according to the target control signal.

[0092] Through the above device, the first controller can generate a control signal matching the connection state according to the detected connection state of the server device, and control the power supply line corresponding to the storage device through the control signal to realize automatic control of powering on and off the storage device. In this way, when the connection state of the server device changes, the storage device is automatically controlled to power on or off according to the actual connection state of the server device, thereby solving the problem of low control efficiency of the storage device and achieving the effect of improving the control efficiency of the storage device.

[0093] In an exemplary embodiment, a control device is deployed on the target server device, the control device is connected to the first controller, and the control device is used to control the opening and closing of the target server device. The detection module includes:

[0094] A receiving unit, configured to receive an initial control signal generated by the target server device in response to a target control operation performed on the control device, wherein the target control operation is used to control the target server device to turn on or turn off;

[0095] A detection unit is used to detect the target connection state according to the initial control signal.

[0096] In an exemplary embodiment, the detection unit is used to:

[0097] In the case where the initial control signal is at a high level, determining that the target connection state is used to indicate that the connection between the target server device and the first controller is normal;

[0098] In a case where the initial control signal is at a low level, determining the target connection state is used to indicate that the connection between the target server device and the first controller is abnormal.

[0099] In an exemplary embodiment, the processing module includes:

[0100] A searching unit, configured to search the target storage device corresponding to the target server device from the server devices and storage devices having a corresponding relationship;

[0101] A generating unit, for generating a target control signal matching the target connection state according to the target connection state, comprising: generating a high-level first control signal when the target connection state is used to indicate that the connection between the target server device and the first controller is normal, and generating a low-level second control signal when the target connection state is used to indicate that the connection between the target server device and the first controller is abnormal, wherein the target control signal includes the first control signal and the second control signal.

[0102] In an exemplary embodiment, a signal pin is disposed on the second controller, the signal pin is connected to the first controller, and the sending module includes:

[0103] a first sending unit, configured to send a high-level first control signal to the signal pin when the target connection state indicates that the connection between the target server device and the first controller is normal;

[0104] a second sending unit, configured to send a second control signal of a low level to the signal pin when the target connection state indicates that the connection between the target server device and the first controller is abnormal;

[0105] The target control signal includes the first control signal and the second control signal.

[0106] In an exemplary embodiment, a power supply is disposed in the target power supply line, the power supply is connected to the second controller, an output pin and a signal pin are disposed on the second controller, the signal pin is connected to the first controller, the output pin is connected to the target storage device, and the output pin is used to output the power supply voltage of the target storage device according to the voltage provided by the power supply, and the above-mentioned apparatus further includes:

[0107] An extraction module, used for extracting the target control signal sent by the first controller and received by the signal pin;

[0108] A control module, used to control the power supply voltage output by the output pin through a second controller according to the target control signal, wherein the target control signal is used to adjust the power supply voltage output by the output pin to match the target connection state, and the target power supply state includes whether the output pin outputs the power supply voltage corresponding to the target storage device.

[0109] In an exemplary embodiment, the control module includes:

[0110] In the case where the output pins include M pins, the supply voltage output by the M pins is controlled by the second controller according to the target control signal by performing the following steps, wherein M is a positive integer:

[0111] A first control unit, configured to control the M pins to output a target power supply voltage corresponding to the target storage device through a second controller when the target control signal is at a high level;

[0112] A second control unit, configured to control the M pins to stop outputting the power supply voltage through a second controller when the target control signal is at a low level;

[0113] The first control unit is used to: control the M pins to output the target power supply voltage corresponding to the target storage device through the second controller, including: generating an enable signal through the second controller, and sending the enable signal to the M pins through the second controller, wherein the M pins are configured to output the target power supply voltage according to the output mode indicated by the enable signal when receiving the enable signal, wherein the output mode is used to indicate the power supply voltage output by each of the M pins;

[0114] Among them, the second control unit is used to: control the M pins to stop outputting the power supply voltage through the second controller, including: generating a disable signal through the second controller, and sending the disable signal to the M pins through the second controller, wherein the M pins stop outputting the power supply voltage when receiving the disable signal.

[0115] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0116] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0117] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0118] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0119] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0120] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0121] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0122] An embodiment of the present application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0123] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0124] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0125] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for controlling a storage device, characterized in that: Applied to a first controller, the first controller is respectively connected to a server device, a storage device, and a second controller, the second controller is deployed in a power supply line corresponding to the storage device, the power supply line is used to supply power to the corresponding storage device, the method includes: Detecting a target connection state of a target server device in the server device, wherein the target connection state is used to indicate a connection status between the target server device and the first controller; A target storage device corresponding to the target server device is screened from the storage devices, and a target control signal matching the target connection state is generated according to the target connection state, wherein the target control signal is used to adjust the power supply state of the target power supply line corresponding to the target storage device to match the target connection state; and the target control signal is sent to the second controller on the target power supply line, wherein the second controller on the target power supply line is used to control the target power supply line according to the target control signal.

2. The method according to claim 1, characterized in that The target server device is deployed with a control device, the control device is connected to the first controller, and the control device is used to control the start and stop of the target server device. The detecting of the target connection state of the target server device in the server device includes: receiving an initial control signal generated by the target server device in response to a target control operation performed on the control device, wherein the target control operation is used to control the target server device to turn on or turn off; The target connection state is detected according to the initial control signal.

3. The method according to claim 2, characterized in that The detecting the target connection state according to the initial control signal includes: In the case where the initial control signal is at a high level, determining that the target connection state is used to indicate that the connection between the target server device and the first controller is normal; In a case where the initial control signal is at a low level, determining the target connection state is used to indicate that the connection between the target server device and the first controller is abnormal.

4. The method according to claim 1, characterized in that: The first controller stores server devices and storage devices with corresponding relationships, and the step of screening the target storage device corresponding to the target server device from the storage devices comprises: searching for the target storage device corresponding to the target server device from the server devices and storage devices with corresponding relationships; The method of generating a target control signal matching the target connection state according to the target connection state includes: generating a high-level first control signal when the target connection state is used to indicate that the connection between the target server device and the first controller is normal, and generating a low-level second control signal when the target connection state is used to indicate that the connection between the target server device and the first controller is abnormal, wherein the target control signal includes the first control signal and the second control signal.

5. The method according to claim 1, characterized in that The second controller is provided with a signal pin, the signal pin is connected to the first controller, and the sending of the target control signal to the second controller on the target power supply line includes: When the target connection state indicates that the connection between the target server device and the first controller is normal, sending a high-level first control signal to the signal pin; When the target connection state indicates that the connection between the target server device and the first controller is abnormal, sending a second control signal of a low level to the signal pin; The target control signal includes the first control signal and the second control signal.

6. The method according to claim 1, characterized in that A power supply is disposed in the target power supply line, the power supply is connected to the second controller, an output pin and a signal pin are disposed on the second controller, the signal pin is connected to the first controller, the output pin is connected to the target storage device, and the output pin is used to output the power supply voltage of the target storage device according to the voltage provided by the power supply, and the method further includes: Extracting the target control signal sent by the first controller and received by the signal pin; According to the target control signal, the power supply voltage output by the output pin is controlled by a second controller, wherein the target control signal is used to adjust the power supply voltage output by the output pin to match the target connection state, and the target power supply state includes whether the output pin outputs the power supply voltage corresponding to the target storage device.

7. The method according to claim 6, characterized in that The step of controlling the supply voltage output by the output pin by the second controller according to the target control signal comprises: when the output pin includes M pins, controlling the supply voltage output by the M pins by the second controller according to the target control signal by performing the following steps, wherein M is a positive integer: When the target control signal is at a high level, controlling the M pins to output a target power supply voltage corresponding to the target storage device through a second controller; When the target control signal is at a low level, controlling the M pins to stop outputting the power supply voltage through the second controller; Wherein, controlling the M pins to output the target power supply voltage corresponding to the target storage device through the second controller includes: generating an enable signal through the second controller, and sending the enable signal to the M pins through the second controller, wherein the M pins are configured to output the target power supply voltage according to the output mode indicated by the enable signal when receiving the enable signal, wherein the output mode is used to indicate the power supply voltage output by each of the M pins; The controlling the M pins to stop outputting the power supply voltage through the second controller includes: generating a disable signal through the second controller, and sending the disable signal to the M pins through the second controller, wherein the M pins stop outputting the power supply voltage when receiving the disable signal.

8. A control device for a storage device, characterized in that: Applied to a first controller, the first controller is respectively connected to a server device, a storage device, and a second controller, the second controller is deployed in a power supply line corresponding to the storage device, the power supply line is used to supply power to the corresponding storage device, the device comprises: a detection module, configured to detect a target connection state of a target server device in the server device, wherein the target connection state is used to indicate a connection status between the target server device and the first controller; A processing module, used to filter the target storage device corresponding to the target server device from the storage devices, and generate a target control signal matching the target connection state according to the target connection state, wherein the target control signal is used to adjust the power supply state of the target power supply line corresponding to the target storage device to match the target connection state; a sending module, used to send the target control signal to the second controller on the target power supply line, wherein the second controller on the target power supply line is used to control the target power supply line according to the target control signal.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.