Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a hard disk backboard, a hard disk control method and a server, which are used for solving the problem of poor flexibility of hard disk configuration in the prior art.
According to a first aspect of the present invention, an embodiment of the present invention provides a hard disk backplane, including an Expander board, where the Expander board is provided with a plurality of inherent bays, and the Expander board is further connected to a cascade bay through a cascade connector;
a first cascade end of the cascade connector is connected in series to a detection power supply through a resistor, a second cascade end of the cascade connector is used for cascading hard disks, and the first cascade end is also electrically connected with the complex programmable logic device, so that the complex programmable logic device judges the number of the hard disks in place of a cascade disk position by detecting the voltage change of the first cascade end;
and the complex programmable logic device is in communication connection with the Expander board and is used for sending the in-place hard disk number of the cascade disk position to the Expander board so that the Expander board can carry out disk position according to the cascade.
And the number of the hard disks in the position orders the cascade disk position and the inherent disk position.
Optionally, the hard disk backplane further includes a power switch connected in series with the cascade disk:
the programmable logic device is used for turning off a power switch connected with the first cascade end to cut off the power supply of a hard disk connected with the first cascade end when detecting that the voltage of the first cascade end is a first threshold voltage; and when the voltage of the first cascade end is detected to be the second threshold voltage, the power switch connected with the first cascade end is turned on to supply power to the hard disk connected with the first cascade end.
Optionally, the hard disk backplane further comprises a power switch connected in series with the intrinsic disk:
the programmable logic device is used for closing a power switch of the inherent disk position corresponding to the no-load signal when receiving the no-load signal of the inherent disk position so as to cut off the power supply of a hard disk of the inherent disk position corresponding to the no-load signal;
and when the in-place signal of the inherent disk position is received, the power switch corresponding to the in-place signal is opened so as to supply power to the hard disk corresponding to the no-load signal.
Optionally, the power switch is connected in series between the motherboard power supply and the hard disk transformer.
Optionally, the Expander board is configured to, when the number of in-place hard disks received from the programmable logic device is N and the number of inherent disks is M, sequentially define the inherent disks as N +1, N +2, … …, and N + M, where N is an integer and M is a positive integer.
According to a second aspect of the present invention, an embodiment of the present invention further provides a hard disk control method, including the following steps:
the programmable logic device judges the number of in-place hard disks of the cascade disk position according to the voltage change of the first cascade end and sends the in-place hard disks to an Expander board; and the Expander board sequences the cascade disk positions and the inherent disk positions according to the number of the in-place hard disks.
Optionally, the method further comprises:
when the programmable logic device detects that the voltage of the first cascade end is a first threshold voltage, the programmable logic device closes a power switch connected with the first cascade end to cut off the power supply of a hard disk connected with the first cascade end; and when the voltage of the first cascade end is detected to be the second threshold voltage, the power switch connected with the first cascade end is turned on to supply power to the hard disk connected with the first cascade end.
Optionally, the method further comprises:
when the programmable logic device receives a no-load signal of the inherent disk, the programmable logic device closes a power switch of the inherent disk corresponding to the no-load signal so as to cut off the power supply of a hard disk of the inherent disk corresponding to the no-load signal;
and when the in-place signal of the inherent disk position is received, the power switch corresponding to the in-place signal is opened so as to supply power to the hard disk corresponding to the no-load signal.
Optionally, the method further includes, when the number of the in-place hard disks sent by the programmable logic device is N and the number of the inherent hard disk is M, sequentially defining the hard disk positions as N +1, N +2, … …, and N + M, where N is an integer and M is a positive integer.
According to a third aspect of the present invention, an embodiment of the present invention further provides a server, including the hard disk backplane described in the foregoing embodiment.
In the embodiment of the invention, the hard disk back plate comprises an Expander plate, wherein the Expander plate is provided with a plurality of inherent disk positions and is also connected with a cascade disk position through a cascade connector; a first cascade end of the cascade connector is connected in series to a detection power supply through a resistor, a second cascade end of the cascade connector is used for cascading hard disks, and the first cascade end is also electrically connected with the complex programmable logic device, so that the complex programmable logic device judges the number of the hard disks in place of a cascade disk position by detecting the voltage change of the first cascade end; and the complex programmable logic device is in communication connection with the Expander board and is used for sending the in-place hard disk number of the cascade disk position to the Expander board so that the Expander board sequences the cascade disk position and the inherent disk position according to the in-place hard disk number of the cascade disk position. Thus, the Expander board can dynamically monitor the number of the modified hard disks, and sequence and manage the disk positions of the hard disks, thereby effectively improving the flexibility of hard disk configuration.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are merely for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
Fig. 1 shows a schematic structural diagram of an adaptive hard disk backplane provided by the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown in the diagram.
The hard disk back plate comprises an Expander plate, and the Expander plate is provided with a plurality of inherent disk positions for connecting the hard disk. In a specific implementation, each hard disk slot may be provided with an interface connector, such as SFF-8680, which is commonly used at present, and each interface connector is connected to the Expander board through an SASX1 line, so that a hard disk may be connected to the interface connector to realize access.
The Expander board is further connected with the cascade disk through a cascade connector, and in the embodiment of the invention, the cascade connector is used for connecting 4 cascade disks for details.
The first cascade end of the cascade connector can comprise 4 cascade ends of Pin1, Pin2, Pin3 and Pin4 which respectively correspond to 4 cascade bays, and the cascade ends are connected in series to a detection power VCC through a resistor R. Specifically, when the complex programmable logic device detects that the voltage of the first cascade end is higher than a first threshold voltage, namely a high voltage state, the hard disk is represented not to be in place; when the complex programmable logic device detects that the voltage of the first cascade end is lower than the second threshold voltage, namely a low voltage state, the hard disk is represented to be in place.
The Expander board can be further connected with a Complex Programmable Logic Device (CPLD) through a GPIO (english: General Purpose Input/Output, chinese: General Purpose Input/Output) line, and in the embodiment of the present invention, the Expander board can be connected with the Complex Programmable Logic Device through three GPIO lines. The on-position condition of the cascade disk is characterized by the high-low level states of the first lines of three GPIO, see table one:
| cascaded number of bays in place
|
GPIO 1
|
GPIO 2
|
GPIO 3
|
| 0
|
0
|
0
|
0
|
| 1
|
0
|
0
|
1
|
| 2
|
0
|
1
|
0
|
| 3
|
0
|
1
|
1
|
| 4
|
1
|
0
|
0 |
As shown in table one, the programmable logic device is in communication connection with the Expander board through three GPIO lines, namely GPIO 1, GPIO 2 and GPIO 3, and when signals of GPIO 1, GPIO 2 and GPIO 3 are {0, 0, 0) respectively, the cascade disk bit number is represented as 0, and when the signals of {0, 0, 1} respectively, the cascade disk bit number is represented as 1.
In addition, all the interface connectors and/or the cascade hard disk positions of the inherent disk positions can be connected with the complex programmable logic device, and firstly, for the cascade hard disk positions, the programmable logic device can judge the existing disk positions in the cascade hard disk positions through the voltage change of the first cascade terminal. Moreover, the interface connector may also send a Present # signal to the programmable logic device when detecting that the hard disk is Present, and in an exemplary embodiment, the Present # signal is an idle signal indicating that the hard disk is not Present when the Present # signal is 1, and is an on signal indicating that the hard disk is Present when the Present # signal is 0. Through the configuration, the programmable logic device can monitor the in-place situation of the hard disks of each cascade disk position and the inherent disk position.
In order to further improve configuration flexibility, when some hard disks need to be powered off, the embodiment of the invention also provides a hard disk backplane, which controls power supply of each disk position, and can further save energy consumption by turning off power supply of non-disk positions due to opening of electrical ports of the non-disk positions.
Referring also to fig. 1, all of the cascaded bays and/or intrinsic bays are connected in series with a power switch, which in an embodiment of the present invention may be EFUSE (chinese: electronic fuse), and the power switch may be connected in series between the motherboard power supply and each of the cascaded bays and/or intrinsic bays, thereby implementing power control of the cascaded bays and/or intrinsic bays by the power switch. In a preferred embodiment, the power switch can be connected in series between the main board power supply and the hard disk transformer, so that more standby power consumption of the device can be reduced when the power supply is cut off.
In specific implementation, the complex programmable logic device obtains the in-place number of the cascade disk position hard disk and the inherent disk position hard disk, outputs a PWR _ EN # signal, controls to open the EFUSE of the corresponding disk position when PWR _ EN # is 0, supplies power to the hard disk of the corresponding disk position, controls to close the EFUSE of the corresponding disk position when PWR _ EN # is 1, and cuts off the power of the hard disk of the corresponding disk position, so that power consumption is saved.
In addition, in order to further improve the flexibility of hard disk configuration, in an exemplary implementation, the programmable logic device may further obtain a control message of the processor, and select to turn on or turn off the EFUSE of the corresponding bay through the control message, so as to more flexibly configure the number of hard disks used in the system, thereby further enhancing the flexibility of hard disk configuration.
According to the description of the above embodiment, after the programmable logic device determines the number of in-place hard disks of the cascade disk, the inherent disk and the cascade disk can be sorted in time, so as to implement unified management. In an exemplary embodiment, when the number of in-place hard disks received by the Expander card and sent by the programmable logic device is N and the number of inherent disks is M, the inherent disks are sequentially defined as N +1, N +2, … … and N + M, where N is an integer, M is a positive integer and the number of inherent disks is 12 as an example, when the complex programmable logic device detects in-place of a cascaded hard disk, when a detected signal is 1, it is indicated that the cascaded hard disks of the Expander board are not connected, and further, the ordering of the inherent disks of the Expander board is 1 to 12; when the detected signal is 0, the number of the cascade hard disks in place is N, and the arrangement of the hard disk slots on the Expander board is from N +1 to N + 12.
It should be noted that the order of the inherent bays may be ordered according to the order of the physical identifier carried by the interface connector itself or according to the order of the Expander board interface, and the order of the cascade bays may be ordered according to the order of the cascade connector ports, which is not limited in the embodiment of the present invention. Of course, the Expander board and the complex programmable logic device also include other structural components, which are not described in detail herein.
Fig. 2 shows a schematic flow chart of the hard disk control method provided by the present invention, which specifically includes the following steps:
step S101: the programmable logic device judges the number of in-place hard disks of the cascade disk position according to the voltage change of the first cascade end and sends the in-place hard disks to an Expander board;
step S102: and the Expander board sequences the cascade disk positions and the inherent disk positions according to the number of the in-place hard disks.
In an exemplary embodiment, when the number of the hard disks in place sent by the programmable logic device is N and the number of the inherent disks is M, the Expander board sequentially defines the hard disk positions as N +1, N +2, … …, N + M, where N is an integer and M is a positive integer.
Referring to fig. 3, which is a schematic flow chart of another hard disk control method according to an embodiment of the present invention, on the basis of the method shown in fig. 2, the method includes:
step S201: when the programmable logic device detects that the voltage of the first cascade end is a first threshold voltage, the programmable logic device closes a power switch connected with the first cascade end to cut off the power supply of a hard disk connected with the first cascade end;
step S202: and when the voltage of the first cascade end is detected to be the second threshold voltage, the power switch connected with the first cascade end is turned on to supply power to the hard disk connected with the first cascade end.
Referring to fig. 4, which is a schematic flow chart of another hard disk control method according to an embodiment of the present invention, as shown in fig. 4, on the basis of the foregoing embodiment, the method further includes:
step S301: when the programmable logic device receives a no-load signal of the inherent disk, the programmable logic device closes a power switch of the inherent disk corresponding to the no-load signal so as to cut off the power supply of a hard disk of the inherent disk corresponding to the no-load signal;
step S302: and when the in-place signal of the inherent disk position is received, the power switch corresponding to the in-place signal is opened so as to supply power to the hard disk corresponding to the no-load signal.
In the embodiment of the invention, the hard disk backplane comprises an Expander board, the Expander board is interactively connected with the complex programmable logic device through three GPIO lines, Present # signals of all hard disk slot positions are connected with the complex programmable logic device, and Power signals of all hard disk slot positions are respectively connected with the complex programmable logic device after being isolated by corresponding EFUSE; the complicated programmable logic device obtains the in-place quantity of the cascade slot position hard disks and the hard disk slot position hard disks, outputs PWR _ EN # signals and controls to open or close the EFUSE corresponding to each hard disk slot position, and the Expander board is used for sequencing all the hard disk slot positions according to the in-place quantity of the cascade slot position hard disks, so that the quantity detection of the cascade hard disks and the hard disk slot position in-place hard disks is realized, the number of board cards is reduced, the research and development and operation and maintenance cost is reduced, the hard disk slot positions are sequenced according to the in-place quantity of the cascade hard disks, meanwhile, the power-on and power-off control of the corresponding hard disks is realized, and the power consumption is saved.
The embodiment of the present invention further provides a server, which includes the hard disk backplane described in the above embodiment, and can be used to implement the hard disk control method described in the above method embodiment, and has the same technical effect, and details are not described herein again.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.