Method, device, computer equipment and storage medium for locating hard disk position

By obtaining the hard disk backplane information and arrangement order to generate the hard disk serial number, the problem of the inability to accurately locate the hard disk position in the existing technology is solved, and the precise positioning and management of the hard disk is realized, which reduces the design complexity and cost.

CN118708129BActive Publication Date: 2024-12-27INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411197048.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-27
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

The prior art cannot accurately locate all hard disk locations within the server, and additional components such as array cards or CPLDs are required, increasing design complexity and cost.

Method used

By obtaining the backplane information and arrangement order of the hard disk backplane, the number of hard disk slots on the hard disk backplane is determined and the hard disk serial number is generated to achieve accurate positioning of the hard disk and reduce dependence on additional components.

Benefits of technology

It realizes accurate location of hard disks within the server, reduces design complexity and cost, and simplifies the hard disk management process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708129B_ABST
    Figure CN118708129B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of servers, and discloses a method, device, computer equipment and storage medium for locating a hard disk position, the method comprising: obtaining backplane information of a first preset number of hard disk backplanes, and determining the arrangement order of the hard disk backplanes; determining the number of hard disk slots of the hard disk backplane according to the backplane information; determining the starting sequence number of the hard disk sequence number in the hard disk backplane according to the arrangement order, and generating the hard disk sequence number of the accessible hard disk of each hard disk backplane according to the starting sequence number and the number of hard disk slots, wherein the hard disk sequence number is used to locate the position of the accessible hard disk. The present invention solves the problem that the positions of all hard disks cannot be located, and that locating the hard disk requires the introduction of additional components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of servers, and in particular to a method, device, computer equipment and storage medium for locating a hard disk position. Background Art

[0002] As the demand for data storage grows, servers need to be equipped with more and more hard disks. Currently, in the server chassis, hard disk backplanes of various shapes and positions are used to expand the hard disks for the server, thereby increasing the number of hard disks in the server.

[0003] Servers equipped with multiple hard disks need to manage these hard disks while meeting data storage needs. When managing hard disks, they need to be accurately located. The current method of locating hard disks through in-band management cannot locate hard disks directly connected to the CPU (Central Processing Unit) or PCH (Platform Controller Hub), and requires the introduction of additional components such as array cards or CPLD (Complex Programmable Logic Device), which will take up additional server space, increase design costs, and increase the complexity and difficulty of hard disk management.

[0004] Therefore, the related art has the problem that it is impossible to locate the positions of all hard disks, and locating the hard disks requires the introduction of additional components. Summary of the invention

[0005] In view of this, the present invention provides a method, apparatus, computer device and storage medium for locating a hard disk position, so as to solve the problem that the positions of all hard disks cannot be located and that locating the hard disk requires the introduction of additional components.

[0006] In a first aspect, the present invention provides a method for locating a hard disk, comprising:

[0007] Acquire backplane information of a first preset number of hard disk backplanes, and determine an arrangement order of the hard disk backplanes;

[0008] Determine the number of hard disk slots on the hard disk backplane based on the backplane information;

[0009] The starting serial number of the hard disk serial number in the hard disk backplane is determined according to the arrangement order, and the hard disk serial number of the accessible hard disk of each hard disk backplane is generated according to the starting serial number and the number of hard disk slots, wherein the hard disk serial number is used to locate the position of the accessible hard disk.

[0010] The method for locating the position of a hard disk provided in this embodiment obtains the backplane information of the hard disk backplane and the arrangement order of the backplane information, determines the number of hard disk slots of the hard disk in the hard disk backplane according to the backplane information, and generates a hard disk serial number for each hard disk according to the arrangement order and the number of hard disk slots. Through the backplane information, in a scenario where multiple hard disk backplanes are combined, a hard disk serial number is generated according to the backplane information, so that the physical position of the hard disk located according to the hard disk serial number is consistent with the actual physical position. The scheme rules are clear and easy to implement. The problem that the position of all hard disks cannot be located and the positioning of hard disks requires the introduction of additional components is solved.

[0011] In some optional implementations, determining the starting sequence number of the hard disk sequence numbers in the hard disk backplane according to the arrangement order, and generating the hard disk sequence number of the hard disk that can be connected to each hard disk backplane according to the starting sequence number and the number of hard disk slots, includes:

[0012] Check whether all hard disk backplanes are in place according to their arrangement order;

[0013] When all hard disk backplanes are in place, the first hard disk backplane and the remaining hard disk backplanes are determined according to the arrangement order;

[0014] The preset value is used as the starting serial number of the first hard disk backplane, and the ending serial number of the previous hard disk backplane of the remaining hard disk backplanes plus the preset step length are used as the starting serial numbers of the remaining hard disk backplanes;

[0015] Generate the hard disk serial number of the hard disk that can be connected to the first hard disk backplane according to the starting serial number of the first hard disk backplane and the number of hard disk slots;

[0016] Generate hard disk serial numbers of the hard disks that can be connected to the remaining hard disk backplanes according to the starting serial numbers of the remaining hard disk backplanes and the number of hard disk slots.

[0017] In this implementation, when all hard disk backplanes are in place, the first hard disk backplane and the remaining hard disk backplanes are determined according to the arrangement order, the starting serial numbers of the first hard disk backplane and the remaining hard disk backplanes are determined respectively, and the hard disk serial number of each hard disk is generated according to the starting serial number and the number of hard disk slots, and the hard disk serial number is used to determine the location information of the hard disk, so that the physical position of the hard disk located according to the hard disk serial number is consistent with the actual physical position. The scheme rules are clear and easy to implement.

[0018] In some optional embodiments, the method further comprises:

[0019] When all hard disk backplanes are in place, a hard disk serial number offset corresponding to each hard disk backplane is generated, wherein the hard disk serial number offset is used to determine the starting serial number of the hard disk serial number in the hard disk backplane;

[0020] Save the hard disk serial number offset to the hard disk backplane's memory.

[0021] In this embodiment, a hard disk serial number offset corresponding to each hard disk backplane is generated, so that when the hard disk backplane is not in place, the BMC can still generate a hard disk serial number and ensure that the hard disk physical position determined according to the hard disk serial number is consistent with the actual physical position.

[0022] In some optional implementations, generating a hard disk serial number of a hard disk that can be connected to each hard disk backplane according to the starting serial number and the number of hard disk slots includes:

[0023] If the hard disk serial number offset exists in the memory of the hard disk backplane, the hard disk serial number offset is obtained from the memory of the hard disk backplane;

[0024] Determine the starting serial number based on the hard disk serial number offset;

[0025] Generate the hard disk serial number of the hard disk that can be connected to each hard disk backplane according to the starting serial number and the number of hard disk slots.

[0026] In this embodiment, in the case of a hard disk backplane that is not in place, the starting serial number is determined according to the hard disk serial number offset, and the hard disk serial number of each hard disk is generated according to the starting serial number and the number of hard disk slots. When the hard disk backplane is not in place, the BMC can still generate a hard disk serial number corresponding to the specific hard disk physical position of the hard disk, and ensure that the hard disk physical position determined according to the hard disk serial number is consistent with the actual physical position.

[0027] In some optional implementations, obtaining backplane information of a first preset number of hard disk backplanes and determining an arrangement order of the hard disk backplanes includes:

[0028] Acquire the backplane information from the memories of the first preset number of hard disk backplanes according to the preset header of the backplane information;

[0029] After the backplane information is obtained, the link number corresponding to the hard disk backplane is obtained from the backplane information, wherein the link number is the number of the link connecting the hard disk backplane and the baseboard management controller;

[0030] Determine the arrangement order based on the link number.

[0031] In some optional implementations, after obtaining backplane information of a first preset number of hard disk backplanes, the method further includes:

[0032] Write the backplane information into the mainboard memory;

[0033] When the backplane information is needed, the backplane information is obtained from the mainboard memory.

[0034] In some optional implementations, obtaining backplane information of a first preset number of hard disk backplanes includes:

[0035] Sending an acquisition instruction to the programmable logic device of the hard disk backplane;

[0036] A response message is obtained from the programmable logic device of the hard disk backplane, wherein the response message includes backplane information, and the backplane information in the programmable logic device is obtained by the programmable logic device from the memory of the hard disk backplane.

[0037] In this implementation, a programmable logic device is used to obtain a response message, which simplifies the acquisition process and improves the efficiency of generating a hard disk serial number.

[0038] In some optional implementations, after generating the hard disk serial number of the hard disk that can be connected to each hard disk backplane, the method further includes:

[0039] Obtaining hard disk physical information of the hard disk to be maintained, wherein the hard disk physical information includes the serial number of the hard disk;

[0040] Determine the hard disk serial number corresponding to the hard disk physical information according to the correspondence between the serial number and the hard disk serial number, wherein the correspondence is generated according to the serial number and the hard disk serial number before obtaining the hard disk physical information of the hard disk to be maintained;

[0041] The hard disk physical information and the hard disk serial number corresponding to the hard disk physical information are saved in a database;

[0042] The hard disk physical information and corresponding hard disk serial number in the database are displayed on the front-end interface.

[0043] In this embodiment, the hard disk physical information of the hard disk is obtained, the hard disk serial number corresponding to the hard disk physical information is determined, the hard disk physical information is saved in the database, and displayed on the front-end interface, so that the server operation and maintenance personnel can maintain the hard disk.

[0044] In some optional implementations, before obtaining the hard disk physical information of the hard disk to be maintained, the method further includes:

[0045] Perform status monitoring on the hard disk to be maintained, and obtain monitoring data including the serial number of the hard disk to be maintained;

[0046] When the monitoring data exceeds the preset threshold, a fault code is generated, wherein the fault code is used to generate a first alarm message on the front-end interface;

[0047] Generates hard disk physical information including monitoring data and fault codes.

[0048] In some optional implementations, after generating the hard disk serial number of the hard disk that can be connected to each hard disk backplane, the method further includes:

[0049] When hard disk failure information is obtained, the faulty hard disk is determined according to the hard disk failure information;

[0050] Determine the target hard disk serial number corresponding to the faulty hard disk;

[0051] Generate a second warning message based on the hard disk failure information and the target hard disk serial number.

[0052] In this embodiment, the faulty hard disk is determined according to the hard disk fault information, the target hard disk serial number corresponding to the faulty hard disk is determined, and a second alarm message including the fault information and the target hard disk serial number is generated. The operation and maintenance personnel can quickly locate the faulty hard disk according to the target hard disk serial number and repair or replace the faulty hard disk.

[0053] In some optional implementations, before determining the faulty hard disk according to the hard disk fault information, the method further includes:

[0054] Obtaining the in-place status of the hard disk to be detected, and judging whether the hard disk to be detected is in place according to the in-place status;

[0055] When the hard disk to be detected is in place, the connection status of the hard disk to be detected is obtained, and according to the connection status of the hard disk to be detected, it is determined whether the hard disk to be detected is successfully connected;

[0056] In the case that the hard disk to be detected is not successfully connected, it is determined that the hard disk to be detected is a faulty hard disk;

[0057] In the case that the hard disk to be detected is successfully connected, judging whether the connection rate of the hard disk to be detected is within a preset range according to the connection status, if not, determining that the hard disk to be detected is a faulty hard disk;

[0058] When it is determined that the hard disk to be detected is a faulty hard disk, hard disk fault information is generated.

[0059] In some optional embodiments, the method further comprises:

[0060] Get the number of ports corresponding to the hard disk backplane from the backplane information;

[0061] Determine whether the number of ports is equal to the preset number. If it is equal, the upstream device of the hard disk backplane is the first device. If it is not equal, the upstream device of the hard disk backplane is the second device. The first device and the second device are used to determine the hard disk type of the hard disk that can be connected to the hard disk backplane. The first device and the second device are used to manage the accessible hard disks according to the hard disk serial numbers.

[0062] In a second aspect, the present invention provides a device for locating a hard disk, comprising:

[0063] An acquisition module, used to acquire backplane information of a first preset number of hard disk backplanes and determine an arrangement order of the hard disk backplanes;

[0064] A determination module, used to determine the number of hard disk slots of the hard disk backplane according to the backplane information;

[0065] A generation module is used to determine the starting serial number of the hard disk serial number in the hard disk backplane according to the arrangement order, and generate the hard disk serial number of the accessible hard disk of each hard disk backplane according to the starting serial number and the number of hard disk slots, wherein the hard disk serial number is used to locate the position of the accessible hard disk.

[0066] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for locating a hard disk position according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0067] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for locating a hard disk position of the first aspect or any corresponding embodiment thereof.

[0068] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for locating a hard disk position according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0070] Figure 1 is a schematic diagram of a current solution for determining whether hard disk location information is correct according to an embodiment of the present invention;

[0071] Figure 2 is a flow chart of a method for locating a hard disk according to an embodiment of the present invention;

[0072] Figure 3 is a schematic diagram of a system for locating a hard disk position according to an embodiment of the present invention;

[0073] Figure 4 is a schematic diagram of a hard disk location positioning system with an out-of-position hard disk backplane according to an embodiment of the present invention;

[0074] Figure 5 is a schematic diagram of a hard disk location positioning system including a mainboard according to an embodiment of the present invention;

[0075] Figure 6 is a structural block diagram of a device for locating a hard disk according to an embodiment of the present invention;

[0076] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0078] In the limited space of the server chassis, the number of hard drive slots in the server is increased by combining multiple hard drive backplanes to achieve server expansion hard drives. According to the position of the hard drive backplane in the server chassis, the hard drives in the hard drive backplane can be divided into front window hard drives, middle hard drives, and rear window hard drives. When the hard drive backplane is connected to the server motherboard through a RIAD (Redundant Arrays of Independent Disks) card, the hard drives mounted on different hard drive backplanes need to have a certain pattern to facilitate the identification of hard drive position numbers and silk screen information. When the server is maintaining and mounting hard drives, it is necessary to accurately locate the hard drives. The traditional hard drive positioning method is achieved through in-band management. The location information of the hard drive under the controller is obtained through the in-band management channel. If there is a communication abnormality in the in-band management, the specific location of the faulty hard drive cannot be determined. Currently, there are two solutions for locating the hard drive position based on in-band management. The first solution is as follows: Figure 1As shown, a baseboard management controller (BMC), at least one array card, and several cables are used to form a first link. The hard disk on the backplane is lit through the first link of the array card through the BMC; a second link is formed through the BMC, the backplane, and the cable. The hard disk indicator light status is read through the second link. The hard disk indicator light status is operated through different links to determine whether the hard disk indicator light is in accordance with the expected sequence, and then determine whether the hard disk position information is correct. The first solution requires the introduction of an array card as a judgment condition for whether the hard disk position is correct, and it is impossible to locate the hard disk in the hard disk backplane directly connected to the CPU or PCH. In addition, the introduction of the array card and the cable increases the design cost. The second solution requires the additional introduction of a CPLD. The BMC obtains the signal for the hard disk positioning operation, sends the control right management instruction to the CPLD, and takes over the management right of the hard disk behavior; through the CPLD detection, reporting and other mechanisms, the BMC determines the hard disk status. The CPLD independent hardware management solution is adopted, which deepens the overall complexity and difficulty of the system. In addition to the cost increase, it is also necessary to reserve space for additional hardware components.

[0079] Based on the above content, an embodiment of the present invention provides a method for locating the position of a hard disk, adding an E2PROM (Electrically-Erasable Programmable Read-Only Memory) on the hard disk backplane, and burning the hard disk FRU (Field Replace Unit) information into the E2PROM as the backplane information of the hard disk backplane. The I2C link information of the I2C (Inter-Integrated Circuit) connection of the hard disk backplane and the number of hard disk slots supported by the hard disk backplane are recorded in the backplane information, so that the arrangement order of the backplane information is determined according to the I2C link information, the starting sequence number of the hard disk sequence number in the hard disk backplane is determined according to the arrangement order and the number of hard disk slots, the number of hard disk slots of the hard disk in the hard disk backplane is determined according to the backplane information, and the hard disk sequence number of each hard disk is generated according to the starting sequence number and the number of hard disk slots, and the hard disk position is located by the hard disk sequence number. In this way, the physical position of each hard disk is located, and the problem of design inconsistency caused by the inconsistency between the hard disk sequence number read by the BMC and the chassis silk screen is reduced, and multiple sets of chassis hard disk silk screens are required in extreme cases.

[0080] According to an embodiment of the present invention, an embodiment of locating the position of a hard disk is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer device with data processing capabilities, such as a computer, a server, etc., and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0081] In this embodiment, a method for locating a hard disk position is provided, which can be used in the above-mentioned computer device. Figure 2 is a flow chart of a method for locating a hard disk according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0082] Step S201, obtaining backplane information of a first preset number of hard disk backplanes, and determining an arrangement order of the hard disk backplanes.

[0083] Specifically, an E2PROM (Electrically-Erasable ProgrammableRead-Only Memory) is added to the hard disk backplane, and the hard disk FRU (FieldReplace Unit) information is burned into the E2PROM as the backplane information of the hard disk backplane. In addition, the above FRU information is burned at the factory, and it will not be changed after being burned once. The stability of the FRU information will not be affected when the system is reset or the factory value is restored.

[0084] FRU information records the information of the hard disk backplane, including information related to hardware features. FRU information includes, but is not limited to: hard disk type, chassis position of the backplane, supported hard disk types, number of backplane ports, number of supported hard disk slots, I2C topology information, etc. Hard disk types include: SAS (Serial Attached SCSI), SATA (Serial ATA), NVMe (Non-Volatile Memory Express), etc. According to the supported hard disk types, the backplane can be divided into SAS / SATA pass-through backplane, NVMe backplane, SAS / SATA / NVMe pass-through backplane, SAS / SATA Expander backplane, SAS / SATA / NVMeExpander backplane, SATA pass-through backplane, CXL (Compute Express Link, high-speed serial protocol) backplane. The chassis position of the backplane includes: front, middle, and rear. According to the position of the hard disk in the chassis, it can be divided into front hard disk, middle hard disk, and rear hard disk. Supported hard disk types include 3.5-inch, 2.5-inch, E1.S, E3.S, and M.2 hard disk types; the number of backplane ports is used to distinguish the allocated unused PCIe (peripheral component interconnectexpress, a high-speed serial computer expansion bus standard) bandwidth information when the hard disk is an NVMe hard disk. The number of supported hard disk slots is the physical number of hard disks supported by the hard disk backplane. The I2C topology information is the I2C link information connected to the hard disk backplane.

[0085] This embodiment defines the frame format requirements of the FRU information. According to the frame format requirements, the location where the above information is recorded in the FRU information can be determined, for example:

[0086] Table 1 FRU information.

[0087]

[0088] The method of locating the hard disk position is performed by the hard disk position locating system, such as Figure 3As shown, the hard disk location positioning system includes m hard disk backplanes, for example: hard disk backplane 1, hard disk backplane 2, hard disk backplane 3, ..., hard disk backplane m, each hard disk backplane includes an E2PROM, in which FRU information has been written, for example: FRU1, FRU2, FRU3, ..., FRUm, and the ports of the hard disk backplane are n1 port, n2 port, n3 port, ..., nm port. When the server mounts multiple hard disk backplanes, the serial number arrangement of the hard disks will depend on the type of hard disk backplane, the number of hard disk slots on the backplane, and the specific location of the hard disk backplane. The baseboard management controller (BMC) is the main device, and reads the backplane information, i.e., the FRU information, of each I2C connected hard disk backplane through the I2C topology. The number of hard disk backplanes is the first preset number, which is set according to actual needs, and there is no specific number limit here. After obtaining the backplane information of the first preset number of hard disk backplanes, the BMC reads the FRU information, determines the I2C link connected to each hard disk backplane, and determines the arrangement order of the backplane information according to the order of the I2C links. For example, the I2C link connected to hard disk backplane 1 is I2C1, the I2C link connected to hard disk backplane 2 is I2C2, and the I2C link connected to hard disk backplane 3 is I2C3. Therefore, the arrangement order is: hard disk backplane 1, hard disk backplane 2, hard disk backplane 3. HDD BP Form Information is the abbreviation of Hard Disk Drive Boot Parameters Form Information, which means the mechanical hard disk boot parameter table information.

[0089] Step S202, determining the number of hard disk slots of the hard disk backplane according to the backplane information.

[0090] Specifically, the number of hard disk slots supported by the hard disk backplane, that is, the number of hard disk slots, is read from the FRU information of each hard disk backplane. Each hard disk backplane has a plurality of hard disk slots, and each hard disk slot can be connected to a hard disk.

[0091] Step S203, determine the starting serial number of the hard disk serial numbers in the hard disk backplane according to the arrangement order, and generate the hard disk serial number of the accessible hard disk of each hard disk backplane according to the starting serial number and the number of hard disk slots, wherein the hard disk serial number is used to locate the position of the accessible hard disk.

[0092] Specifically, the starting serial number of the hard disk serial numbers in the hard disk backplane is determined according to the arrangement order and the number of hard disk slots. The starting serial number of the first hard disk backplane is 0. Starting from the second hard disk backplane, the starting serial number of each hard disk backplane is the sum of the number of hard disk slots of the previous hard disk backplanes. For example: the arrangement order is hard disk backplane 1, hard disk backplane 2, hard disk backplane 3, the number of hard disk slots of hard disk backplane 1 is n1, the number of hard disk slots of disk backplane 1 is n1+n2, and the number of hard disk slots of disk backplane 1 is n3. Then the starting serial number of hard disk backplane 1 is 0, the starting serial number of hard disk backplane 1 is n1, and the starting serial number of hard disk backplane 1 is n2.

[0093] Generate a hard disk serial number for each hard disk based on the starting serial number and the number of hard disk slots. For example, the starting serial number of hard disk backplane 1 is 0, and the number of hard disk slots is n1; the starting serial number of hard disk backplane 1 is n1, and the number of hard disk slots is n2; the starting serial number of hard disk backplane 1 is n1+n2, and the number of hard disk slots is n3. Therefore, the hard disk serial numbers of hard disks that can be connected to hard disk backplane 1 are 0 to n1-1, the hard disk serial numbers of hard disks that can be connected to hard disk backplane 2 are n1 to n1+n2-1, and the hard disk serial numbers of hard disks that can be connected to hard disk backplane 3 are n1+n2 to n1+n2+n3-1.

[0094] The method for locating the position of a hard disk provided in this embodiment obtains the backplane information of the hard disk backplane and the arrangement order of the backplane information, determines the number of hard disk slots of the hard disk in the hard disk backplane according to the backplane information, and generates the hard disk serial number of each connectable hard disk according to the arrangement order and the number of hard disk slots. Through the backplane information, in a scenario where multiple hard disk backplanes are combined, the hard disk serial number is generated according to the backplane information, so that the physical position of the hard disk located according to the hard disk serial number is consistent with the actual physical position. The scheme rules are clear and easy to implement. It solves the problem that the positions of all hard disks cannot be located, and the positioning of hard disks requires the introduction of additional components.

[0095] In some optional implementations, determining the starting sequence number of the hard disk sequence numbers in the hard disk backplane according to the arrangement order, and generating the hard disk sequence number of the hard disk that can be connected to each hard disk backplane according to the starting sequence number and the number of hard disk slots, includes:

[0096] Check whether all hard disk backplanes are in place according to their arrangement order;

[0097] When all hard disk backplanes are in place, the first hard disk backplane and the remaining hard disk backplanes are determined according to the arrangement order;

[0098] The preset value is used as the starting serial number of the first hard disk backplane, and the ending serial number of the previous hard disk backplane of the remaining hard disk backplanes plus the preset step length are used as the starting serial numbers of the remaining hard disk backplanes;

[0099] Generate the hard disk serial number of the hard disk that can be connected to the first hard disk backplane according to the starting serial number of the first hard disk backplane and the number of hard disk slots;

[0100] Generate hard disk serial numbers of the hard disks that can be connected to the remaining hard disk backplanes according to the starting serial numbers of the remaining hard disk backplanes and the number of hard disk slots.

[0101] Specifically, it is determined whether the read backplane information conforms to the arrangement order to determine whether all hard disk backplanes are in place. If all hard disk backplanes are in place, the first hard disk backplane and the remaining hard disk backplanes are determined according to the arrangement order. For example, if the arrangement order is hard disk backplane 1, hard disk backplane 2, hard disk backplane 3..., then the first hard disk backplane is hard disk backplane 1, and the remaining hard disk backplanes are hard disk backplane 2, hard disk backplane 3...

[0102] The preset value is, for example, 0, and the preset value is used as the starting serial number of the first hard disk backplane, for example: the starting serial number of hard disk backplane 1 is 0. The ending serial number of the previous hard disk backplane of the remaining hard disk backplanes plus the preset step length is used as the starting serial number of the remaining hard disk backplanes, for example: the remaining hard disk backplane is hard disk backplane 2, the previous hard disk backplane of hard disk backplane 2 is hard disk backplane 1, and the ending serial number of hard disk backplane 1 is n1-1. The ending serial number of the previous hard disk backplane of the remaining hard disk backplanes plus the preset step length is used as the starting serial number of the remaining hard disk backplanes, and the starting serial number of hard disk backplane 2 is n1.

[0103] According to the starting serial number of the first hard disk backplane and the number of hard disk slots, the hard disk serial numbers of the hard disks that can be connected to the first hard disk backplane are generated. According to the starting serial numbers of the remaining hard disk backplanes and the number of hard disk slots, the hard disk serial numbers of the hard disks that can be connected to the remaining hard disk backplanes are generated. For example, as shown in Table 2, the hard disk backplane connected to I2C1 is the first hard disk backplane, and the remaining hard disk backplanes are the remaining hard disk backplanes.

[0104] Table 2 Hard disk serial numbers when all hard disk backplanes are in place.

[0105]

[0106] Among them, the I2C link connected to the hard disk backplane 1 is I2C1, the starting sequence number of the hard disk backplane 1 is 0, the number of hard disk slots is n1, the starting sequence number of the hard disk backplane 2 is n1, the number of hard disk slots is n2, the starting sequence number of the hard disk backplane 3 is n1+n2, and the number of hard disk slots is n3. Therefore, the hard disk sequence numbers of the hard disks in the hard disk backplane 1 are 0 to n1-1, the hard disk sequence numbers of the hard disks in the hard disk backplane 2 are n1 to n1+n2-1, and the hard disk sequence numbers of the hard disks in the hard disk backplane 3 are n1+n2 to n1+n2+n3-1. For other contents, please refer to Table 2 and will not be repeated here.

[0107] In this implementation, when all hard disk backplanes are in place, the first hard disk backplane and the remaining hard disk backplanes are determined according to the arrangement order, the starting serial numbers of the first hard disk backplane and the remaining hard disk backplanes are determined respectively, and the hard disk serial number of each hard disk is generated according to the starting serial number and the number of hard disk slots, and the hard disk serial number is used to determine the location information of the hard disk, so that the physical position of the hard disk located according to the hard disk serial number is consistent with the actual physical position. The scheme rules are clear and easy to implement.

[0108] In some optional embodiments, the method further comprises:

[0109] When all hard disk backplanes are in place, a hard disk serial number offset corresponding to each hard disk backplane is generated, wherein the hard disk serial number offset is used to determine the starting serial number of the hard disk serial number in the hard disk backplane;

[0110] Save the hard disk serial number offset to the hard disk backplane's memory.

[0111] Specifically, when reading the backplane information through the I2C link, it is necessary to read it in sequence according to the I2C sequence to ensure that the hard disk serial number read is consistent with the design. When a hard disk backplane is not in place or multiple hard disk backplanes are not in place, the solution of reading the hard disk backplane information through the I2C sequence cannot meet the requirements of consistency with the hard disk serial number and silk screen. For example: Figure 4 As shown in Table 3, when the hard board backplane 2 connected to I2C2 is not in place, if the hard disk serial number is generated in the same way as when all hard disk backplanes are in place, the hard disk serial number generated at this time will not be consistent with the expected hard disk silk screen serial number because the BMC cannot obtain the hard disk information of the hard disk backplane that is not in place, as shown in Table 3.

[0112] Table 3 Incorrect hard disk serial number when there is no hard disk backplane in place.

[0113]

[0114] Among them, hard disk backplane 2 is not in place, resulting in hard disk backplane 2 being ignored when generating hard disk serial numbers, resulting in wrong hard disk serial numbers of hard disks in hard disk backplanes after hard disk backplane 2, such as hard disk backplane 3, the hard disk serial numbers of hard disks in hard disk backplane 3 are n1+n2 to n1+n2+n3-1 in sequence, and the hard disk serial numbers of hard disks in hard disk backplane 3 generated at this time are n1 to n1+n3-1 in sequence, which is wrong. For other wrong hard disk serial numbers, please refer to Table 3, which will not be repeated here. Therefore, it is necessary to generate a hard disk serial number offset (Offset offset) for each hard disk backplane to ensure that the correct hard disk serial number can still be generated when there is a hard disk backplane that is not in place.

[0115] Generate the hard disk serial number offset corresponding to each hard disk backplane. For example, when all hard disk backplanes are in place, the starting serial number corresponding to each hard disk backplane is used as the hard disk serial number offset of the hard disk backplane. When the hard disk backplanes are not all in place, the starting serial number of the hard disk serial numbers in the hard disk backplane is determined according to the hard disk serial number offset. Save the hard disk serial number offset (Offset offset) to the memory of the hard disk backplane for easy acquisition by the BMC.

[0116] In this embodiment, a hard disk serial number offset corresponding to each hard disk backplane is generated, so that when the hard disk backplane is not in place, the BMC can still generate a hard disk serial number and ensure that the hard disk physical position determined according to the hard disk serial number is consistent with the actual physical position.

[0117] In some optional implementations, generating a hard disk serial number of a hard disk that can be connected to each hard disk backplane according to the starting serial number and the number of hard disk slots includes:

[0118] If the hard disk serial number offset exists in the memory of the hard disk backplane, the hard disk serial number offset is obtained from the memory of the hard disk backplane;

[0119] Determine the starting serial number based on the hard disk serial number offset;

[0120] Generate the hard disk serial number of the hard disk that can be connected to each hard disk backplane according to the starting serial number and the number of hard disk slots.

[0121] Specifically, if there is a hard disk serial number offset in the memory of the hard disk backplane, the hard disk serial number offset can be used to generate the hard disk serial number. In addition, it is determined whether the read backplane information conforms to the arrangement order to determine whether all hard disk backplanes are in place. In the case of a hard disk backplane that is not in place, it is necessary to use the hard disk serial number offset to generate the hard disk serial number. Obtain the hard disk serial number offset (Offset) from the memory of the hard disk backplane.

[0122] Use the Offset as the starting number of the corresponding hard disk backplane, for example:

[0123] Generate a hard disk serial number for each hard disk according to the starting serial number and the number of hard disk slots, for example, as shown in Table 4.

[0124] Table 4 Hard disk serial numbers when there is a hard disk backplane that is not in place.

[0125]

[0126] Among them, the I2C link connected to the hard disk backplane 1 is I2C1, the Offset offset of the hard disk backplane 1 is 0, and the Offset offset of the hard disk backplane 1 is used as the starting sequence number. The starting sequence number of the hard disk backplane 1 is 0, and the number of hard disk slots is n1. Similarly, the starting sequence number of the hard disk backplane 2 is n1, and the number of hard disk slots is n2. The starting sequence number of the hard disk backplane 3 is n1+n2, and the number of hard disk slots is n3. Therefore, the hard disk sequence numbers of the hard disks in the hard disk backplane 1 are 0 to n1-1, the hard disk sequence numbers of the hard disks in the hard disk backplane 2 are n1 to n1+n2-1, and the hard disk sequence numbers of the hard disks in the hard disk backplane 3 are n1+n2 to n1+n2+n3-1. For other contents, please refer to Table 4 and will not be repeated here.

[0127] In this embodiment, in the case of a hard disk backplane that is not in place, the starting serial number is determined according to the hard disk serial number offset, and the hard disk serial number of each hard disk is generated according to the starting serial number and the number of hard disk slots. When the hard disk backplane is not in place, the BMC can still generate a hard disk serial number corresponding to the specific hard disk physical position of the hard disk, and ensure that the hard disk physical position determined according to the hard disk serial number is consistent with the actual physical position.

[0128] In some optional implementations, obtaining backplane information of a first preset number of hard disk backplanes and determining an arrangement order of the hard disk backplanes includes:

[0129] Acquire the backplane information from the memories of the first preset number of hard disk backplanes according to the preset header of the backplane information;

[0130] After the backplane information is obtained, the link number corresponding to the hard disk backplane is obtained from the backplane information, wherein the link number is the number of the link connecting the hard disk backplane and the baseboard management controller;

[0131] Determine the arrangement order based on the link number.

[0132] Specifically, the preset header of the backplane information is, for example, the entry "HDD BP Form Information" and the information recorded in the entry in Table 1. The information in the preset header is used as a search keyword to search for backplane information in the memories (E2PROM) of the first preset number of hard disk backplanes.

[0133] After obtaining the backplane information, obtain the link number corresponding to the hard disk backplane from the backplane information, and determine the arrangement order according to the link number. For example: the link number of the I2C link connected to hard disk backplane 1 is I2C1, the link number of the I2C link connected to hard disk backplane 2 is I2C2, and the link number of the I2C link connected to hard disk backplane 3 is I2C3. Therefore, the arrangement order is: hard disk backplane 1, hard disk backplane 2, hard disk backplane 3.

[0134] In some optional implementations, after obtaining backplane information of a first preset number of hard disk backplanes, the method further includes:

[0135] Write the backplane information into the mainboard memory;

[0136] When the backplane information is needed, the backplane information is obtained from the mainboard memory.

[0137] Specifically, Figure 5 As shown, the backplane information is written into the motherboard memory of the motherboard as the motherboard FRU information. In addition, the Offset offset can also be written into the motherboard memory. The FRU information of the hard disk backplane can be ignored.

[0138] When backplane information is needed, for example, when the accessible hard disks of each hard disk backplane need to be maintained or when the hard disk serial number needs to be regenerated, the backplane information is needed. At this time, the baseboard management controller (BMC) can directly obtain the backplane information from the motherboard memory.

[0139] In addition, the hard disk FRU information can be burned into the E2PROM on the hard disk backplane as the backplane information of the hard disk backplane, and the FRU information can be burned into the mainboard memory at the same time.

[0140] In some optional implementations, obtaining backplane information of a first preset number of hard disk backplanes includes:

[0141] Sending an acquisition instruction to the programmable logic device of the hard disk backplane;

[0142] A response message is obtained from the programmable logic device of the hard disk backplane, wherein the response message includes backplane information, and the backplane information in the programmable logic device is obtained by the programmable logic device from the memory of the hard disk backplane.

[0143] Specifically, a programmable logic device, such as CPLD, is provided on the hard disk backplane. After the hard disk backplane is connected to the I2CSwitch and successfully connected to the BMC, the programmable logic device obtains the backplane information from the memory of the hard disk backplane and saves it.

[0144] When the BMC needs backplane information, it sends an acquisition command to the programmable logic device on the hard disk backplane. After receiving the acquisition command, the programmable logic device generates a response message containing the backplane information and sends the response message to the BMC.

[0145] In this implementation, a programmable logic device is used to obtain a response message, which simplifies the acquisition process and improves the efficiency of generating a hard disk serial number.

[0146] In some optional implementations, after generating the hard disk serial number of the hard disk that can be connected to each hard disk backplane, the method further includes:

[0147] Obtaining hard disk physical information of the hard disk to be maintained, wherein the hard disk physical information includes the serial number of the hard disk;

[0148] Determine the hard disk serial number corresponding to the hard disk physical information according to the correspondence between the serial number and the hard disk serial number, wherein the correspondence is generated according to the serial number and the hard disk serial number before obtaining the hard disk physical information of the hard disk to be maintained;

[0149] The hard disk physical information and the hard disk serial number corresponding to the hard disk physical information are saved in a database;

[0150] The hard disk physical information and corresponding hard disk serial number in the database are displayed on the front-end interface.

[0151] Specifically, obtain the physical information of the hard disk to be maintained, such as the serial number, hard disk model, capacity, density, temperature, sector, seek time, transmission, bit error rate, fault code, etc. of the hard disk to be maintained. The serial number of the hard disk is a unique identifier assigned by the manufacturer to each hard disk to distinguish different hard disk drives. The serial number is usually a string of letters and numbers, which can be found on the label of the hard disk or queried through system tools.

[0152] Before obtaining the hard disk physical information of the hard disk, a corresponding relationship is generated based on the serial number and the hard disk serial number. According to the corresponding relationship between the generated serial number and the hard disk serial number, the hard disk serial number corresponding to the hard disk physical information is determined. The hard disk physical information and the hard disk serial number corresponding to the hard disk physical information are saved in the database, and the hard disk physical information and the corresponding hard disk serial number in the database are displayed on the front-end interface.

[0153] In this embodiment, the hard disk physical information of the hard disk is obtained, the hard disk serial number corresponding to the hard disk physical information is determined, the hard disk physical information is saved in the database, and displayed on the front-end interface, so that the server operation and maintenance personnel can maintain the hard disk.

[0154] In some optional implementations, before obtaining the hard disk physical information of the hard disk to be maintained, the method further includes:

[0155] Perform status monitoring on the hard disk to be maintained, and obtain monitoring data including the serial number of the hard disk to be maintained;

[0156] When the monitoring data exceeds the preset threshold, a fault code is generated, wherein the fault code is used to generate a first alarm message on the front-end interface;

[0157] Generates hard disk physical information including monitoring data and fault codes.

[0158] Specifically, the preset technology is, for example, SMART technology. SMART technology is used to monitor the physical information of each hard disk at the server level, that is, the Serial Number and other information corresponding to the hard disk drive letter of each hard disk to be maintained at the server level are obtained through the commands provided by SMART technology. It should be noted that the full name of SMART technology is "Self-Monitoring Analysis and Reporting Technology", which is a disk self-analysis detection technology. When running, SMART technology will record several parameters of the physical hard disk information of the hard disk itself in the server. These physical hard disk information include hard disk model, capacity, temperature, density, sector, seek time, transmission, bit error rate, etc.

[0159] After a hard disk has been running for thousands of hours, many of its internal physical parameters will change. If a physical parameter exceeds the alarm threshold, it means that the hard disk is close to damage, but the hard disk is still working. If the user ignores the alarm and continues to use it, the hard disk will become very unreliable and may fail at any time. Therefore, when the monitoring data exceeds the preset threshold, a fault code is generated. For example, when the hard disk temperature exceeds 70°C, a fault code representing excessive temperature is generated; when the hard disk seek time is greater than 1s, a fault code indicating too long seek time is generated. Finally, the physical information of the hard disk containing the monitoring data and the fault code is generated.

[0160] In some optional implementations, after generating the hard disk serial number of the hard disk that can be connected to each hard disk backplane, the method further includes:

[0161] When hard disk failure information is obtained, the faulty hard disk is determined according to the hard disk failure information;

[0162] Determine the target hard disk serial number corresponding to the faulty hard disk;

[0163] Generate a second warning message based on the hard disk failure information and the target hard disk serial number.

[0164] Specifically, after receiving the hard disk fault information, the hard disk fault information includes the fault type of the faulty hard disk and the identifier used to identify the hard disk, such as the BDF (Bus / Device / Function) number of the hard disk, the serial number of the hard disk, etc. According to the mapping relationship between the hard disk identifier and the serial number, the faulty hard disk and the target hard disk serial number corresponding to the faulty hard disk are determined. The physical location of the faulty hard disk can be quickly located according to the target hard disk serial number. The target hard disk serial number is compared with the chassis hard disk silk screen to find the faulty hard disk on the hard disk backplane.

[0165] When a hard disk fails, if you continue to use the hard disk, there is a risk of data loss and affecting server operation. Therefore, the system will generate a second alarm message based on the fault information and the target hard disk serial number, prompting the operation and maintenance personnel to repair or replace the faulty hard disk in time.

[0166] In this embodiment, the faulty hard disk is determined according to the hard disk fault information, the target hard disk serial number corresponding to the faulty hard disk is determined, and a second alarm message including the fault information and the target hard disk serial number is generated. The operation and maintenance personnel can quickly locate the faulty hard disk according to the target hard disk serial number and repair or replace the faulty hard disk.

[0167] In some optional implementations, before determining the faulty hard disk according to the hard disk fault information, the method further includes:

[0168] Obtaining the in-place status of the hard disk to be detected, and judging whether the hard disk to be detected is in place according to the in-place status;

[0169] When the hard disk to be detected is in place, the connection status of the hard disk to be detected is obtained, and according to the connection status of the hard disk to be detected, it is determined whether the hard disk to be detected is successfully connected;

[0170] In the case that the hard disk to be detected is not successfully connected, it is determined that the hard disk to be detected is a faulty hard disk;

[0171] In the case that the hard disk to be detected is successfully connected, judging whether the connection rate of the hard disk to be detected is within a preset range according to the connection status, if not, determining that the hard disk to be detected is a faulty hard disk;

[0172] When it is determined that the hard disk to be detected is a faulty hard disk, hard disk fault information is generated.

[0173] Specifically, whether the hard disk to be detected is in place can be determined based on the in-place status of the hard disk to be detected. If the hard disk to be detected is not in place, it is considered that the hard disk to be detected on the slot is a normal hard disk, and no other operation is performed; if the hard disk to be detected is in place, it is further determined whether the hard disk to be detected is faulty based on the connection (link) status of the hard disk to be detected.

[0174] When the hard disks to be detected are in place, the connection (link) status of each hard disk to be detected is obtained. The acquisition process will continue for a preset time period, and the connection status of the hard disk will be obtained once every preset time step within the preset time period. In total, the connection status of the hard disks to be detected is obtained a second number of times. For example: the preset time period is 60 seconds, the preset time step is 2 seconds, and the connection (link) status of the hard disk is detected every 2 seconds within 60 seconds. In total, the connection status of the hard disks to be detected is obtained 30 times.

[0175] According to the above multiple connection states, it is determined whether the hard disk to be detected is connected (link). If not, it is considered that the hard disk to be detected is not connected successfully, and the hard disk to be detected is directly identified as a faulty hard disk; if it is connected, it is determined whether the connection (link) rate of the hard disk to be detected is abnormal according to the multiple connection states, such as whether the connection rate of the hard disk to be detected is too low or whether it meets the standard requirements. If the connection rate of the hard disk to be detected is no longer within the preset range, it is considered that the hard disk to be detected is faulty and is a faulty hard disk. For example: according to the 30 connection states of the hard disk to be detected obtained within the above 60 seconds, it is determined that the connection state of the hard disk to be detected is abnormal. If 60 seconds have passed and the connection state of the hard disk is still abnormal, it is considered that the hard disk is faulty. In the case where it is determined that the hard disk to be detected is a faulty hard disk, hard disk fault information including the fault type of the faulty hard disk and an identifier for determining the hard disk is generated.

[0176] In some optional embodiments, the method further comprises:

[0177] Get the number of ports corresponding to the hard disk backplane from the backplane information;

[0178] Determine whether the number of ports is equal to the preset number. If it is equal, the upstream device of the hard disk backplane is the first device. If it is not equal, the upstream device of the hard disk backplane is the second device. The first device and the second device are used to determine the hard disk type of the hard disk that can be connected to the hard disk backplane. The first device and the second device are used to manage the accessible hard disks according to the hard disk serial numbers.

[0179] Specifically, the upstream device of the hard disk backplane can be a CPU direct PCIe interface connected to the NVMe hard disk on the hard disk backplane; the upstream device of the hard disk backplane can also be a SAS / RAID controller connected to the SAS / SATA or NVMe hard disk on the hard disk backplane through a tri-mode card, wherein the tri-mode card is a standard card that supports SAS / SATA / NVMe three-in-one. In this scenario, it is impossible to distinguish whether the accessible hard disk on the hard disk backplane is an NVMe hard disk directly connected to the CPU or an NVMe hard disk connected to the tri-mode card. In traditional solutions, the upstream tri-mode card judgment is usually performed by means of a dip switch (hardware switch) according to the specific configuration of the server. However, the dip switch design requires the production line to increase the process of manual dialing during the production line processing, which not only increases the production process and affects the production efficiency, but also causes improper operation due to manual operation.

[0180] This embodiment identifies the server chassis configuration and writes the number of upstream ports (Ports) of the hard disk backplane into the FRU information, as shown in Table 1. By reading the number of ports (Ports) corresponding to the hard disk backplane, it is determined whether the upstream device is the CPU or the SAS / RAID controller connected to the hard disk backplane through the tri-mode card. The specific process includes:

[0181] The server BMC obtains the number of upstream ports on the hard disk backplane, i.e., the number of ports, corresponding to the hard disk backplane from the backplane information, i.e., the FRU information. The preset number is, for example, 0. It is determined whether the number of ports is equal to the preset number. If the number of ports is equal to 0, the upstream device of the hard disk backplane is the first device, such as a SAS / RAID controller, which is connected to the hard disk backplane through a tri-mode card. If the number of ports is not equal to 0, the upstream device of the hard disk backplane is the second device, which is the CPU.

[0182] If the upstream device of the hard disk backplane is the first device, the hard disk type of the hard disk that can be connected to the hard disk backplane is an NVMe hard disk connected to the tri-mode card. If the upstream device of the hard disk backplane is the second device, the hard disk type of the hard disk that can be connected to the hard disk backplane is an NVMe hard disk directly connected to the CPU. The first device and the second device can manage the accessible hard disks according to the hard disk serial number.

[0183] In some optional implementations, the hard disk backplane may be managed according to the backplane information of the hard disk backplane, and the process of managing the hard disk backplane includes steps A1 to A3.

[0184] Step A1, determining a target I2C link connected to each hard disk backplane according to the mainboard type and model type of the server.

[0185] Specifically, the I2C link is a physical link connected to each hard disk backplane in the hardware to be tested. The physical link may also be an SMBUS (System Management BUS) link.

[0186] The BMC can determine the hardware identification of the hardware to be tested based on the motherboard type and model type, wherein the hardware identification is used to uniquely characterize the hardware product to be tested. For example, the hardware identification can be a virtual ID (Identity Document) used to characterize the hardware to be tested. The purpose of determining the hardware identification of the hardware to be tested is that the BMC can determine the memory space pointed to by the hardware identification through the hardware identification, thereby obtaining data associated with the hard disk backplane of the hardware to be tested from the pointed memory space. For example, the physical link positions that each hard disk backplane on the hardware to be tested is allowed to access can be obtained from the memory space. Among the I2C links pointed to by the obtained physical link positions that are allowed to access, the target I2C link connected to each hard disk backplane of the hardware to be tested is determined.

[0187] Step A2, determining the backplane information of the hard disk backplane connected to each target I2C link.

[0188] Specifically, the backplane information of different hard disk backplanes is different, and the backplane information can be used as a unique identifier of the hard disk backplane.

[0189] Step A3: monitor the corresponding hard disk backplanes in turn according to the backplane information.

[0190] Specifically, after the backplane information of each hard disk backplane is determined, each hard disk backplane under the hardware to be tested can be identified through the backplane information; when each hard disk backplane is identified, each identified hard disk backplane is monitored cyclically in turn.

[0191] In this embodiment, the I2C link connected to each hard disk backplane is determined by the motherboard type and model type, and the backplane information of the hard disk backplane connected to each target I2C link is determined. According to the information of each backplane, the corresponding hard disk backplane is monitored in turn, thereby achieving accurate identification and monitoring of each hard disk backplane when hard disk backplanes of the same backplane type exist on the hardware to be tested, improving the accuracy of determining the unique backplane identifier of each hard disk backplane, thereby improving the accuracy of identifying and monitoring each hard disk backplane.

[0192] In this embodiment, a device for locating the position of a hard disk is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0193] This embodiment provides a device for locating a hard disk position, such as Figure 6 As shown, including:

[0194] An acquisition module 601 is used to acquire backplane information of a first preset number of hard disk backplanes and determine an arrangement order of the hard disk backplanes;

[0195] A determination module 602 is used to determine the number of hard disk slots of the hard disk backplane according to the backplane information;

[0196] Generation module 603 is used to determine the starting serial number of the hard disk serial number in the hard disk backplane according to the arrangement order, and generate the hard disk serial number of the accessible hard disk of each hard disk backplane according to the starting serial number and the number of hard disk slots, wherein the hard disk serial number is used to locate the position of the accessible hard disk.

[0197] In some optional implementations, the generation module 603 determines the starting sequence number of the hard disk sequence numbers in the hard disk backplane according to the arrangement order, and generates the hard disk sequence number of the hard disk that can be connected to each hard disk backplane according to the starting sequence number and the number of hard disk slots, including:

[0198] Check whether all hard disk backplanes are in place according to their arrangement order;

[0199] When all hard disk backplanes are in place, the first hard disk backplane and the remaining hard disk backplanes are determined according to the arrangement order;

[0200] The preset value is used as the starting serial number of the first hard disk backplane, and the ending serial number of the previous hard disk backplane of the remaining hard disk backplanes plus the preset step length are used as the starting serial numbers of the remaining hard disk backplanes;

[0201] Generate the hard disk serial number of the hard disk that can be connected to the first hard disk backplane according to the starting serial number of the first hard disk backplane and the number of hard disk slots;

[0202] Generate hard disk serial numbers of the hard disks that can be connected to the remaining hard disk backplanes according to the starting serial numbers of the remaining hard disk backplanes and the number of hard disk slots.

[0203] In some optional embodiments, the device is used to:

[0204] When all hard disk backplanes are in place, a hard disk serial number offset corresponding to each hard disk backplane is generated, wherein the hard disk serial number offset is used to determine the starting serial number of the hard disk serial number in the hard disk backplane;

[0205] Save the hard disk serial number offset to the hard disk backplane's memory.

[0206] In some optional implementations, the generation module 603 generates the hard disk serial number of the hard disk that can be connected to each hard disk backplane according to the starting serial number and the number of hard disk slots, including:

[0207] If the hard disk serial number offset exists in the memory of the hard disk backplane, the hard disk serial number offset is obtained from the memory of the hard disk backplane;

[0208] Determine the starting serial number based on the hard disk serial number offset;

[0209] Generate the hard disk serial number of the hard disk that can be connected to each hard disk backplane according to the starting serial number and the number of hard disk slots.

[0210] In some optional implementations, the acquisition module 601 acquires the backplane information of a first preset number of hard disk backplanes and determines the arrangement order of the hard disk backplanes, including:

[0211] Acquire the backplane information from the memories of the first preset number of hard disk backplanes according to the preset header of the backplane information;

[0212] After the backplane information is obtained, the link number corresponding to the hard disk backplane is obtained from the backplane information, wherein the link number is the number of the link connecting the hard disk backplane and the baseboard management controller;

[0213] Determine the arrangement order based on the link number.

[0214] In some optional implementations, after acquiring the backplane information of the first preset number of hard disk backplanes, the device is further configured to:

[0215] Write the backplane information into the mainboard memory;

[0216] When the backplane information is needed, the backplane information is obtained from the mainboard memory.

[0217] In some optional implementations, the acquisition module 601 acquires backplane information of a first preset number of hard disk backplanes, including:

[0218] Sending an acquisition instruction to the programmable logic device of the hard disk backplane;

[0219] A response message is obtained from the programmable logic device of the hard disk backplane, wherein the response message includes backplane information, and the backplane information in the programmable logic device is obtained by the programmable logic device from the memory of the hard disk backplane.

[0220] In some optional implementations, after generating the hard disk serial number of the hard disk that can be connected to each hard disk backplane, the device is further used to:

[0221] Obtaining hard disk physical information of the hard disk to be maintained, wherein the hard disk physical information includes the serial number of the hard disk;

[0222] Determine the hard disk serial number corresponding to the hard disk physical information according to the correspondence between the serial number and the hard disk serial number, wherein the correspondence is generated according to the serial number and the hard disk serial number before obtaining the hard disk physical information of the hard disk to be maintained;

[0223] The hard disk physical information and the hard disk serial number corresponding to the hard disk physical information are saved in a database;

[0224] The hard disk physical information and corresponding hard disk serial number in the database are displayed on the front-end interface.

[0225] In some optional implementations, before obtaining the hard disk physical information of the hard disk to be maintained, the device is further used to:

[0226] Perform status monitoring on the hard disk to be maintained, and obtain monitoring data including the serial number of the hard disk to be maintained;

[0227] When the monitoring data exceeds the preset threshold, a fault code is generated, wherein the fault code is used to generate a first alarm message on the front-end interface;

[0228] Generates hard disk physical information including monitoring data and fault codes.

[0229] In some optional implementations, after generating the hard disk serial number of the hard disk that can be connected to each hard disk backplane, the device is further used to:

[0230] When hard disk failure information is obtained, the faulty hard disk is determined according to the hard disk failure information;

[0231] Determine the target hard disk serial number corresponding to the faulty hard disk;

[0232] Generate a second warning message based on the hard disk failure information and the target hard disk serial number.

[0233] In some optional implementations, before determining the faulty hard disk according to the hard disk fault information, the device is further used to:

[0234] Obtaining the in-place status of the hard disk to be detected, and judging whether the hard disk to be detected is in place according to the in-place status;

[0235] When the hard disk to be detected is in place, the connection status of the hard disk to be detected is obtained, and according to the connection status of the hard disk to be detected, it is determined whether the hard disk to be detected is successfully connected;

[0236] In the case that the hard disk to be detected is not successfully connected, it is determined that the hard disk to be detected is a faulty hard disk;

[0237] In the case that the hard disk to be detected is successfully connected, judging whether the connection rate of the hard disk to be detected is within a preset range according to the connection status, if not, determining that the hard disk to be detected is a faulty hard disk;

[0238] When it is determined that the hard disk to be detected is a faulty hard disk, hard disk fault information is generated.

[0239] In some optional embodiments, the device is also used for:

[0240] Get the number of ports corresponding to the hard disk backplane from the backplane information;

[0241] Determine whether the number of ports is equal to the preset number. If it is equal, the upstream device of the hard disk backplane is the first device. If it is not equal, the upstream device of the hard disk backplane is the second device. The first device and the second device are used to determine the hard disk type of the hard disk that can be connected to the hard disk backplane. The first device and the second device are used to manage the accessible hard disks according to the hard disk serial numbers.

[0242] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0243] The device for locating the hard disk position in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0244] The embodiment of the present invention also provides a computer device having the above Figure 6 The device for locating the hard disk position is shown.

[0245] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0246] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0247] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0248] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer 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.

[0249] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0250] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0251] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0252] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0253] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the present invention.

Claims

1. A method for locating a hard disk, characterized in that: The method comprises: Obtaining backplane information of a first preset number of hard disk backplanes, and determining an arrangement order of the hard disk backplanes, wherein the backplane information is FRU information, the FRU information is stored in the hard disk backplane and / or the mainboard, and the FRU information includes the number of ports and the number of hard disk slots of the hard disk backplane; Determine the number of hard disk slots of the hard disk backplane according to the backplane information; Determine the starting sequence number of the hard disk sequence numbers in the hard disk backplane according to the arrangement sequence, and generate the hard disk sequence number of each hard disk that can be connected to the hard disk backplane according to the starting sequence number and the number of hard disk slots, wherein the hard disk sequence number is used to locate the position of the hard disk that can be connected; Obtaining hard disk physical information of the hard disk to be maintained, wherein the hard disk physical information includes the hard disk serial number; determining the hard disk serial number corresponding to the hard disk physical information according to the correspondence between the serial number and the hard disk serial number, wherein the correspondence is generated according to the serial number and the hard disk serial number before obtaining the hard disk physical information of the hard disk to be maintained; saving the hard disk physical information and the hard disk serial number corresponding to the hard disk physical information into a database; displaying the hard disk physical information and the corresponding hard disk serial number in the database on a front-end interface; When all the hard disk backplanes are in place, generate a hard disk serial number offset corresponding to each hard disk backplane, wherein the hard disk serial number offset is used to determine the starting serial number of the hard disk serial numbers in the hard disk backplane; save the hard disk serial number offset to the memory of the hard disk backplane; The generating of the hard disk serial number of each hard disk that can be connected to the hard disk backplane according to the starting serial number and the number of hard disk slots includes: if the hard disk serial number offset exists in the memory of the hard disk backplane, obtaining the hard disk serial number offset from the memory of the hard disk backplane; determining the starting serial number according to the hard disk serial number offset; generating the hard disk serial number of each hard disk that can be connected to the hard disk backplane according to the starting serial number and the number of hard disk slots; In the case that there is a hard disk backplane that is not in place, the starting serial number is determined according to the hard disk serial number offset, and the hard disk serial number of each hard disk is generated according to the starting serial number and the number of hard disk slots; Obtaining the in-place status of the hard disk to be detected, and judging whether the hard disk to be detected is in place according to the in-place status; in the case that the hard disk to be detected is in place, obtaining the connection status of the hard disk to be detected, and judging whether the hard disk to be detected is successfully connected according to the connection status of the hard disk to be detected; in the case that the hard disk to be detected is not successfully connected, determining that the hard disk to be detected is a faulty hard disk; in the case that the hard disk to be detected is successfully connected, judging whether the connection rate of the hard disk to be detected is within a preset range according to the connection status, and if not, determining that the hard disk to be detected is a faulty hard disk; in the case that the hard disk to be detected is determined to be a faulty hard disk, generating hard disk fault information; In the case of obtaining the hard disk failure information, determining the faulty hard disk according to the hard disk failure information; determining the target hard disk sequence number corresponding to the faulty hard disk; and generating second alarm information according to the hard disk failure information and the target hard disk sequence number; Obtain the number of ports corresponding to the hard disk backplane from the backplane information; determine whether the number of ports is equal to a preset number, if equal, the upstream device of the hard disk backplane is the first device, if not equal, the upstream device of the hard disk backplane is the second device, wherein the first device and the second device are used to determine the hard disk type of the hard disk that can be connected to the hard disk backplane, and the first device and the second device are used to manage the accessible hard disk according to the hard disk serial number.

2. The method according to claim 1, characterized in that The step of determining the starting sequence number of the hard disk sequence numbers in the hard disk backplane according to the arrangement sequence, and generating the hard disk sequence number of each hard disk that can be connected to the hard disk backplane according to the starting sequence number and the number of hard disk slots, comprises: According to the arrangement order of the hard disk backplanes, determining whether all the hard disk backplanes are in place; When all the hard disk backplanes are in place, determining the first hard disk backplane and the remaining hard disk backplanes according to the arrangement order; The preset value is used as the starting serial number of the first hard disk backplane, and the ending serial number of the previous hard disk backplane of the remaining hard disk backplanes plus the preset step length is used as the starting serial number of the remaining hard disk backplanes; Generate hard disk serial numbers of hard disks that can be connected to the first hard disk backplane according to the starting serial number of the first hard disk backplane and the number of hard disk slots; The hard disk serial numbers of the hard disks that can be connected to the remaining hard disk backplanes are generated according to the starting serial numbers of the remaining hard disk backplanes and the number of hard disk slots.

3. The method according to claim 1, characterized in that The step of obtaining backplane information of a first preset number of hard disk backplanes and determining an arrangement order of the hard disk backplanes includes: According to a preset header of the backplane information, the backplane information is acquired from the memories of a first preset number of the hard disk backplanes; After obtaining the backplane information, obtaining the link number corresponding to the hard disk backplane from the backplane information, wherein the link number is the number of the link connecting the hard disk backplane and the baseboard management controller; The arrangement order is determined according to the link sequence number.

4. The method according to claim 1, characterized in that: After obtaining the backplane information of the first preset number of hard disk backplanes, the method further includes: Writing the backplane information into the mainboard memory; When the backplane information is needed, the backplane information is acquired from the mainboard memory.

5. The method according to claim 1, characterized in that The step of obtaining backplane information of a first preset number of hard disk backplanes includes: Sending an acquisition instruction to the programmable logic device of the hard disk backplane; A response message is obtained from the programmable logic device of the hard disk backplane, wherein the response message includes the backplane information, and the backplane information in the programmable logic device is obtained by the programmable logic device from the memory of the hard disk backplane.

6. The method according to claim 1, characterized in that Before obtaining the hard disk physical information of the hard disk to be maintained, the method further includes: Performing status monitoring on the hard disk to be maintained to obtain monitoring data including the serial number of the hard disk to be maintained; When the monitoring data exceeds a preset threshold, a fault code is generated, wherein the fault code is used to generate a first warning message on the front-end interface; Generate the hard disk physical information including the monitoring data and the fault code.

7. A device for locating a hard disk, characterized in that: The device comprises: An acquisition module is used to acquire backplane information of a first preset number of hard disk backplanes and determine the arrangement order of the hard disk backplanes, wherein the backplane information is FRU information, the FRU information is stored in the hard disk backplane and / or the mainboard, and the FRU information includes the number of ports and the number of hard disk slots of the hard disk backplane; A determination module, used to determine the number of hard disk slots of the hard disk backplane according to the backplane information; A generating module, used to determine the starting sequence number of the hard disk sequence numbers in the hard disk backplane according to the arrangement order, and generate the hard disk sequence number of each hard disk that can be connected to the hard disk backplane according to the starting sequence number and the number of hard disk slots, wherein the hard disk sequence number is used to locate the position of the accessible hard disk; Obtaining hard disk physical information of the hard disk to be maintained, wherein the hard disk physical information includes the hard disk serial number; determining the hard disk serial number corresponding to the hard disk physical information according to the correspondence between the serial number and the hard disk serial number, wherein the correspondence is generated according to the serial number and the hard disk serial number before obtaining the hard disk physical information of the hard disk to be maintained; saving the hard disk physical information and the hard disk serial number corresponding to the hard disk physical information into a database; displaying the hard disk physical information and the corresponding hard disk serial number in the database on a front-end interface; When all the hard disk backplanes are in place, generate a hard disk serial number offset corresponding to each hard disk backplane, wherein the hard disk serial number offset is used to determine the starting serial number of the hard disk serial numbers in the hard disk backplane; save the hard disk serial number offset to the memory of the hard disk backplane; The generating of the hard disk serial number of each hard disk that can be connected to the hard disk backplane according to the starting serial number and the number of hard disk slots includes: if the hard disk serial number offset exists in the memory of the hard disk backplane, obtaining the hard disk serial number offset from the memory of the hard disk backplane; determining the starting serial number according to the hard disk serial number offset; generating the hard disk serial number of each hard disk that can be connected to the hard disk backplane according to the starting serial number and the number of hard disk slots; In the case that there is a hard disk backplane that is not in place, the starting serial number is determined according to the hard disk serial number offset, and the hard disk serial number of each hard disk is generated according to the starting serial number and the number of hard disk slots; Obtaining the in-place status of the hard disk to be detected, and judging whether the hard disk to be detected is in place according to the in-place status; in the case that the hard disk to be detected is in place, obtaining the connection status of the hard disk to be detected, and judging whether the hard disk to be detected is successfully connected according to the connection status of the hard disk to be detected; in the case that the hard disk to be detected is not successfully connected, determining that the hard disk to be detected is a faulty hard disk; in the case that the hard disk to be detected is successfully connected, judging whether the connection rate of the hard disk to be detected is within a preset range according to the connection status, and if not, determining that the hard disk to be detected is a faulty hard disk; in the case that the hard disk to be detected is determined to be a faulty hard disk, generating hard disk fault information; In the case of obtaining the hard disk failure information, determining the faulty hard disk according to the hard disk failure information; determining the target hard disk sequence number corresponding to the faulty hard disk; and generating second alarm information according to the hard disk failure information and the target hard disk sequence number; Obtain the number of ports corresponding to the hard disk backplane from the backplane information; determine whether the number of ports is equal to a preset number, if equal, the upstream device of the hard disk backplane is the first device, if not equal, the upstream device of the hard disk backplane is the second device, wherein the first device and the second device are used to determine the hard disk type of the hard disk that can be connected to the hard disk backplane, and the first device and the second device are used to manage the accessible hard disk according to the hard disk serial number.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for locating a hard disk position as described in any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for locating a hard disk position according to any one of claims 1 to 6.