Disclosure of Invention
The application provides a method for detecting the in-place of a server hard disk, which can effectively monitor whether the hard disk on the server is in place.
In a first aspect, a method for detecting that a server hard disk is in place is provided, where a baseboard controller BMC of the server includes a field replaceable unit FRU, and the FRU includes information about a hard disk backplane in the server, and the method includes: the BMC sends broadcast information to all hard disk backplanes of the server, wherein the broadcast information is used for indicating the hard disk backplanes receiving the broadcast information to return response data; the BMC determines that N hard disks exist in the server according to the received address and response data of each hard disk backboard in the M hard disk backboards and the hard disk backboard information in the server, wherein N and M are positive integers.
With reference to the first aspect, in a first possible implementation manner of the first aspect, when the hard disk backplane information includes identification information of each hard disk backplane in the server, the BMC determines that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the identification information of each hard disk backplane in the server.
With reference to the first aspect and the foregoing implementation manner, in a second possible implementation manner of the first aspect, when the hard disk backplane information includes number information of each hard disk backplane in the server, the BMC determines that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the number information of the hard disk backplanes in the server.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the method further includes: and updating the hard disk backboard information in the server included in the FRU.
In a second aspect, a substrate controller is provided, in which the substrate controller BMC includes: the Field Replaceable Unit (FRU) is used for storing hard disk backboard information in the server; the sending unit is used for sending broadcast information to all hard disk backplanes of the server, and the broadcast information is used for indicating the hard disk backplanes receiving the broadcast information to return response data; the processing unit is used for determining that N hard disks exist in the server according to the received address and response data of each hard disk backboard in the M hard disk backboards and the hard disk backboard information in the server, wherein N and M are positive integers.
With reference to the second aspect, in a first possible implementation manner of the second aspect, when the hard disk backplane information includes identification information of each hard disk backplane in the server, the processing unit is configured to determine that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the identification information of each hard disk backplane in the server.
With reference to the second aspect and the foregoing implementation manner, in a second possible implementation manner of the second aspect, when the hard disk backplane information includes number information of each hard disk backplane in the server, the processing unit is configured to determine that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the number information of the hard disk backplanes in the server.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the FRU unit is further configured to: and updating the hard disk backboard information in the server.
Therefore, the method provided by the embodiment of the application can judge whether the hard disk backboard exists or not by writing the information of the hard disk backboard in the FRU in advance and saving the corresponding response data of the hard disk backboard, and further determine whether the hard disk exists on the hard disk backboard. The method provided by the application can effectively avoid the situation that the BMC misjudges the hard disk backboard caused by the interference problem.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
In the actual product application process, the BMC acquires the hard disk backplane and the hard disk information channel in the server and judges by using I2C information at present. For example, the BMC is designed to support 3 different backplanes with addresses of 0X20, 0X22, and 0X24, but only 0X20 is installed in the configuration of actual product sales, and when the BMC broadcasts three addresses of 0X20, 0X22, and 0X24 at the same time, Data bits after two addresses of 0X22 and 0X24 are both recognized as Data due to signal interference, so the BMC error determination system has 3 hard disk backplanes.
Based on the problems, the invention provides a method for detecting the in-place of a server hard disk, which can increase the stability of reading the information of a hard disk backboard by a BMC. Under the condition that the current BMC judges whether the design of the hard disk exists by using the address of the hard disk backboard of I2C and the data response information, the BMC sets the actual shipment quantity of the configured hard disk backboard in the FRU by using the information of the BMC FRU according to different configuration types, so that the misjudgment phenomenon of the backboard by the BMC caused by the interference problem is avoided. Meanwhile, different FRU information is refreshed according to the number of the expanded backplates in subsequent expansion, and the update of the number of the display backplates of the BMC can be realized.
Fig. 1 is a schematic block diagram illustrating a method according to an embodiment of the present application, and as shown in fig. 1, a BMC includes a field replaceable unit FRU, where the FRU includes information about a hard disk backplane in the server, including:
step 110, the BMC sends broadcast information to all hard disk backplanes of the server, where the broadcast information is used to indicate that the hard disk backplane receiving the broadcast information returns response data.
And step 120, the BMC determines that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the hard disk backplane information in the server, wherein N and M are positive integers.
In a system planning stage, the number of hard disk backplanes supported is planned, or the number of the existing hard disk backplanes is planned, so that the number information of the hard disk backplanes, the identification of the hard disk backplanes or the information of other hard disk backplanes can be written into a Field Replaceable Unit (FRU).
In step 120, in another way, after the BMC receives the response data corresponding to one hard disk backplane, it cannot determine that the hard disk backplane exists, and only when the response data is received according to the hard disk backplane information included in the FRU, it can determine that the hard disk backplane exists, and thus determine that the hard disk on the hard disk backplane is in place.
Therefore, the method provided by the embodiment of the application can judge whether the hard disk backboard exists or not by writing the information of the hard disk backboard in the FRU in advance and saving the corresponding response data of the hard disk backboard, and further determine whether the hard disk exists on the hard disk backboard. The method provided by the application can effectively avoid the situation that the BMC misjudges the hard disk backboard caused by the interference problem.
Optionally, as an embodiment of the present application, when the hard disk backplane information includes identification information of each hard disk backplane in the server, the BMC determines that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the identification information of each hard disk backplane in the server.
That is to say, when the FRU prestores which hard disk backplanes exist on the server at all, when the BMC receives the addresses of the M hard disk backplanes and the corresponding response data, it will determine which of the M hard disk backplanes actually exist, and further determine the hard disks on the existing hard disk backplanes.
Optionally, as an embodiment of the present application, when the hard disk backplane information includes number information of each hard disk backplane in the server, the BMC determines that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the number information of the hard disk backplanes in the server.
That is, when the FRU prestores the maximum number of the hard disk backplates existing on the server, when the BMC receives the addresses of the M hard disk backplates and the corresponding response data, it will determine which of the M hard disk backplates actually exist according to the maximum number of the hard disk backplates, and further determine the hard disk on the existing hard disk backplates.
Optionally, as an embodiment of the present application, the method further includes: and updating the hard disk backboard information in the server included in the FRU.
Fig. 2 shows a schematic flow chart of a method of another embodiment of the present application. As shown in fig. 2, the BMC sends a broadcast message to the hard disk backplane on the server, and the hard disk backplane that receives the broadcast message returns response data, otherwise, it is determined that the hard disk backplane does not exist, and the hard disk on the hard disk backplane does not exist; and when the returned response data of the hard disk backboard is received and the existence of the hard disk backboard is determined according to the hard disk backboard information, determining that the hard disk on the hard disk backboard also exists or not.
For example, the BMC is designed to support 3 different backplanes, the addresses of the backplanes are 0X20, 0X22, and 0X24, and only 0X20 is installed in the configuration for actual product sales, for example, the number of hard disk backplanes stored in the FRU is 1, when the BMC broadcasts three addresses of 0X20, 0X22, and 0X24 at the same time, Data bits after two addresses of 0X22 and 0X24 are both identified by error as having Data due to the interference problem of signals, and since the number of hard disk backplanes in the FRU is 1, the BMC determines that the system has 1 hard disk backplane 0X20 and the hard disk on the hard disk backplane exists.
Fig. 3 shows a schematic block diagram of an apparatus according to another embodiment of the present application, and as shown in fig. 3, the apparatus 300 includes:
a field replaceable unit 310, the field replaceable unit 310 being configured to store hard disk backplane information in the server.
A sending unit 320, where the sending unit 320 is configured to send broadcast information to all hard disk backplanes of the server, and the broadcast information is used to indicate that the hard disk backplane receiving the broadcast information returns response data.
And the processing unit 330 is configured to determine that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the hard disk backplane information in the server, where N and M are positive integers.
Optionally, as an embodiment of the present application, when the hard disk backplane information includes identification information of each hard disk backplane in the server, the processing unit 330 is configured to determine that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the identification information of each hard disk backplane in the server.
Optionally, as an embodiment of the present application, when the hard disk backplane information includes number information of each hard disk backplane in the server, the processing unit 330 is configured to determine that N hard disks exist in the server according to the received address and response data of each hard disk backplane in the M hard disk backplanes and the number information of the hard disk backplanes in the server.
Optionally, as an embodiment of the present application, the field replaceable unit 310 is further configured to: and updating the hard disk backboard information in the server.
Therefore, the device provided by the embodiment of the application can determine whether the hard disk backboard exists or not by writing the information of the hard disk backboard in the FRU in advance and saving the corresponding response data of the hard disk backboard, and further determine whether the hard disk exists on the hard disk backboard or not. The method provided by the application can effectively avoid the situation that the BMC misjudges the hard disk backboard caused by the interference problem.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a second device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.