CN114443445A - Hard disk lighting method and device, electronic equipment and storage medium - Google Patents
Hard disk lighting method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114443445A CN114443445A CN202111683366.XA CN202111683366A CN114443445A CN 114443445 A CN114443445 A CN 114443445A CN 202111683366 A CN202111683366 A CN 202111683366A CN 114443445 A CN114443445 A CN 114443445A
- Authority
- CN
- China
- Prior art keywords
- hard disk
- physical address
- rear hard
- backplane
- backboard
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000003860 storage Methods 0.000 title claims abstract description 16
- 230000015654 memory Effects 0.000 claims description 30
- 238000012163 sequencing technique Methods 0.000 claims description 29
- 238000004519 manufacturing process Methods 0.000 abstract description 26
- 238000004891 communication Methods 0.000 description 8
- 238000013461 design Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000007689 inspection Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/325—Display of status information by lamps or LED's
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The invention relates to the technical field of computers, in particular to a hard disk lighting method, a hard disk lighting device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring an idle physical address and a rear hard disk backboard of a physical address to be allocated; allocating a physical address for the rear hard disk backplane according to the idle physical address; and lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address. By adopting the method, the rear hard disk backboard does not need to be matched with a dial switch, and the rear hard disk backboard does not need to be controlled by the dial switch to use different physical addresses. Therefore, the wrong position of the dial switch cannot be generated, so that the situation that the hard disk cannot be normally lighted up to influence the first production yield when the equipment is tested is caused, and the problem that the SGPIO cable is missed or is wrongly inserted cannot be generated. Therefore, the production first pass rate is effectively improved.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a hard disk lighting method and device, electronic equipment and a storage medium.
Background
With the continuous development of the server industry, the mainstream server on the market at present can be considered in other aspects, such as user experience, besides the basic functions of the machine itself.
Hard disk management is an important function of storage management software, the hard disk lighting function can greatly improve the experience of a user in this aspect, the current hard disk lighting scheme of the server is mature, and the improvement space is still left in the aspect of lighting of the cascade backboard.
In actual production, the rear hard disk backboard is matched with a dial switch, the dial switch controls the rear hard disk to use different physical addresses, information of the dial switch is transmitted to the CPLD of the front backboard through the SGPIO signal, and the CPLD distributes PHY addresses.
However, different dialing codes can be realized only by restricting through process files under different conditions, and assembly staff do not pay attention to the dialing codes in many times during production and sometimes dial wrong positions, so that a hard disk cannot be normally lighted up during equipment inspection, and the first production pass rate is influenced. The problem of missing or wrong insertion of the SGPIO cable sometimes occurs.
Disclosure of Invention
In view of this, embodiments of the present invention provide a hard disk lighting method, an apparatus, an electronic device, and a storage medium, which aim to solve the problem that the hard disk cannot be normally lighted up during the inspection of the device due to the wrong position of the dial switch, which affects the first production yield.
According to a first aspect, an embodiment of the present invention provides a hard disk drive lighting method, including:
acquiring an idle physical address and a rear hard disk backboard of a physical address to be allocated;
allocating a physical address for the rear hard disk backplane according to the idle physical address;
and lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address.
According to the hard disk lighting method provided by the embodiment of the invention, the idle physical address and the rear hard disk backboard to which the physical address is to be allocated are obtained, then the physical address is allocated to the rear hard disk backboard according to the idle physical address, and the hard disk corresponding to the rear hard disk backboard is lighted according to the allocated physical address. Therefore, the rear hard disk backboard does not need to be matched with a dial switch and controlled by the dial switch to use different physical addresses. Therefore, the wrong position of the dial switch cannot be generated, so that the situation that the hard disk cannot be normally lighted up to influence the first production yield when the equipment is tested is caused, and the problem that the SGPIO cable is missed or is wrongly inserted cannot be generated. Therefore, according to the hard disk lighting method, the dial switch is omitted on the rear hard disk back board card, the complexity is obviously reduced in the board card PCB design stage, the SGPIO signal interface is omitted, the design complexity of signal line routing is reduced, the mounting problems of dial and SGPIO signal lines are not required to be considered in the board card volume production, and the production through rate is effectively improved.
With reference to the first aspect, in a first implementation manner of the first aspect, allocating a physical address to a rear hard disk backplane according to an idle physical address includes:
acquiring the number of hard disks corresponding to the rear hard disk backboard;
acquiring an address identifier corresponding to the idle physical address, and sequencing the idle physical address according to the address identifier;
and allocating the preset number of idle physical addresses ranked in the front to the rear hard disk back plate, wherein the preset number is equal to the number of the hard disks corresponding to the rear hard disk back plate.
The hard disk lighting method provided by the embodiment of the invention obtains the number of hard disks corresponding to the rear hard disk backboard. Then, acquiring an address identifier corresponding to the idle physical address, and sequencing the idle physical addresses according to the address identifier; and allocating the preset number of idle physical addresses which are ranked in the front to the rear hard disk backplane, wherein the preset number is equal to the number of hard disks corresponding to the rear hard disk backplane, so that the idle physical addresses are ensured to be in one-to-one correspondence with the hard disks corresponding to the rear hard disk backplane, the hard disks corresponding to the rear hard disk backplane can be found according to the allocated physical addresses, and the hard disks are lighted. According to the method, the rear hard disk backboard is not required to be matched with the dial switch, and the rear hard disk is not required to be controlled by the dial switch to use different physical addresses. Therefore, the wrong position of the dial switch cannot be generated, so that the situation that the hard disk cannot be normally lighted up to influence the first production pass rate when the equipment is tested is caused, the problem that the SGPIO cable is missed or is wrongly inserted is avoided, and the first production pass rate is effectively improved.
With reference to the first aspect, in a second implementation manner of the first aspect, the allocating physical addresses to the rear hard disk backplane according to the idle physical address includes:
acquiring attribute information of each rear hard disk backboard;
and distributing physical addresses to the rear hard disk backplanes according to the attribute information and preset priority.
According to the hard disk lighting method provided by the embodiment of the invention, the attribute information of each rear hard disk backboard is obtained; and distributing physical addresses to the rear hard disk backplanes according to the attribute information and preset priority. Therefore, physical addresses can be accurately allocated to the rear hard disk backplanes, and the problem that the same idle physical address is allocated to the rear hard disk backplanes due to the fact that the physical addresses are allocated to the rear hard disk backplanes simultaneously is solved. Therefore, the method can ensure the accuracy of the physical address allocated to each rear hard disk backboard, thereby effectively improving the production through rate.
With reference to the second implementation manner of the first aspect, in the third implementation manner of the first aspect, the attribute information includes an I2C channel identifier of a motherboard corresponding to each rear hard disk backplane, and the allocating a physical address to each rear hard disk backplane according to the attribute information and according to a preset priority includes:
sequencing all the rear hard disk backplanes according to the I2C channel identification;
and distributing physical addresses for the rear hard disk backplanes according to the sequencing result.
According to the hard disk lighting method provided by the embodiment of the invention, all rear hard disk backplanes are sequenced according to the I2C channel identification; according to the sequencing result, physical addresses are allocated to the rear hard disk backplanes, so that the accuracy of the physical addresses allocated to the rear hard disk backplanes can be ensured, and the production first pass rate is effectively improved.
With reference to the third implementation manner of the first aspect, in the fourth implementation manner of the first aspect, allocating a physical address to each rear hard disk backplane according to the sorting result includes:
and according to the sorting result, sequentially allocating physical addresses to the rear hard disk backplanes from the front to the rear according to the I2C channel identifiers.
According to the hard disk lighting method provided by the embodiment of the invention, physical addresses are sequentially distributed to the rear hard disk backplanes from front to back according to the I2C channel identifiers according to the sequencing result. Therefore, the physical address can be firstly distributed to the rear hard disk backplane with the higher priority of the I2C channel, the accuracy of the physical address distributed to each rear hard disk backplane is ensured, and the production first pass rate is effectively improved.
With reference to the second implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the attribute information includes the number of hard disks corresponding to each rear hard disk backplane, and the allocating a physical address to each rear hard disk backplane according to the attribute information and according to a preset priority includes:
acquiring the number of hard disks corresponding to each rear hard disk backboard;
sequencing the rear hard disk back plates according to the number of the hard disks corresponding to the rear hard disk back plates;
and distributing physical addresses for the rear hard disk backplanes according to the sequencing result.
The hard disk lighting method provided by the embodiment of the invention obtains the number of hard disks corresponding to each rear hard disk backboard; sequencing the rear hard disk backplates according to the number of the hard disks corresponding to the rear hard disk backplates; and distributing physical addresses for the rear hard disk backplanes according to the sequencing result. The accuracy of the physical address allocated to each rear hard disk backboard is ensured, so that the production first pass rate is effectively improved.
With reference to the first aspect, in a sixth implementation manner of the first aspect, the acquiring a free physical address includes:
reading all physical addresses to obtain a hard disk corresponding to each physical address;
and acquiring the idle physical address according to the hard disk corresponding to each physical address.
The hard disk lighting method provided by the embodiment of the invention reads all physical addresses to obtain the hard disks corresponding to all the physical addresses; and acquiring the idle physical address according to the hard disk corresponding to each physical address. Therefore, the accuracy of the acquired idle physical address can be ensured, and the inaccuracy of allocating the physical address to the rear hard disk backplane due to the inaccuracy of the idle physical address is avoided.
According to a second aspect, an embodiment of the present invention further provides a hard disk drive lighting device, including:
the acquisition module is used for acquiring an idle physical address and a rear hard disk backboard of the physical address to be allocated;
the allocation module is used for allocating physical addresses to the rear hard disk backboard according to the idle physical addresses;
and the lighting module is used for lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address.
The hard disk lighting device provided by the embodiment of the invention obtains the idle physical address and the rear hard disk backboard to be allocated with the physical address, allocates the physical address for the rear hard disk backboard according to the idle physical address, and lights the hard disk corresponding to the rear hard disk backboard according to the allocated physical address. Therefore, the rear hard disk backboard is not required to be matched with the dial switch, and the rear hard disk is not required to be controlled by the dial switch to use different physical addresses. Therefore, the wrong position of the dial switch cannot be generated, so that the situation that the hard disk cannot be normally lighted up to influence the first production yield when the equipment is tested is caused, and the problem that the SGPIO cable is missed or is wrongly inserted cannot be generated. Therefore, according to the hard disk lighting device, the dial switch is omitted on the rear hard disk back board card, the complexity is obviously reduced in the board PCB design stage, an SGPIO signal interface is omitted, the design complexity of signal line routing is reduced, the mounting problems of dial and SGPIO signal lines are not required to be considered in the board card mass production, and the production through rate is effectively improved.
According to a third aspect, an embodiment of the present invention provides an electronic device, which includes a memory and a processor, where the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions, so as to execute the hard disk lighting method in the first aspect or any one of the implementations of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the method for lighting up a hard disk in the first aspect or any one of the implementation manners of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a hard disk lighting method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a hard disk lighting method according to another embodiment of the present invention;
FIG. 3 is a flowchart illustrating a hard disk lighting method according to another embodiment of the present invention;
fig. 4 is a functional block diagram of a hard disk lighting device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hardware structure of an electronic device to which an embodiment of the present invention is applied.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that in the method for turning on a hard disk according to the embodiment of the present application, an execution subject may be a device for turning on a hard disk, and the device for turning on a hard disk may be implemented as part or all of an electronic device in a software, hardware, or a combination of software and hardware, where the electronic device may be a server or a terminal, where the server in the embodiment of the present application may be one server or a server cluster composed of multiple servers, and the terminal in the embodiment of the present application may be another intelligent hardware device such as a smart phone, a personal computer, a tablet computer, a wearable device, and an intelligent robot. In the following method embodiments, the execution subject is an electronic device as an example.
In an embodiment of the present application, as shown in fig. 1, a hard disk lighting method is provided, and an application of the method and an electronic device are taken as an example for description, it should be noted that the electronic device in the present application may be a BMC in a server or another processor, and the electronic device is not specifically limited in the embodiment of the present application. In the present application, an electronic device is described as an example of BMC. The method comprises the following steps:
s11, acquiring the spare physical address and the rear hard disk backboard of the physical address to be allocated.
In an alternative embodiment, the BMC may receive a free physical address entered by a user based on an external interface.
In another optional implementation manner, a user may burn the use condition information of the physical address in the server to the storage device, and the BMC reads the use condition information of the physical address from the storage device when the server is powered on and the hard disk backplane starts to supply power, so as to obtain the idle physical address.
For example, a user may burn FRU information into a storage device, where the FRU information is an editable piece of information burned into the storage device, including information such as a product model number and a serial number. Main components of the server, board cards and other components all have own FRU information. In this embodiment of the present application, the FRU information further includes a use condition of a physical address corresponding to the hard disk backplane.
And S12, distributing a physical address for the rear hard disk backplane according to the idle physical address.
Specifically, the BMC may allocate a physical address to the rear hard disk backplane according to the idle physical address. If the idle physical addresses cannot be completely allocated to the rear hard disk backplane, the BMC can acquire the address identifier corresponding to the idle physical addresses, and then allocate the physical addresses to the rear hard disk backplane according to the address identifier.
This step will be described in detail below.
And S13, lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address.
Specifically, the BMC may find the hard disk corresponding to the rear hard disk backplane according to the allocated physical address, detect the hard disk corresponding to the rear hard disk backplane, light up a fault when the hard disk fails, and light up a normal use when the hard disk normally operates.
According to the hard disk lighting method provided by the embodiment of the invention, the idle physical address and the rear hard disk backboard to which the physical address is to be allocated are obtained, then the physical address is allocated to the rear hard disk backboard according to the idle physical address, and the hard disk corresponding to the rear hard disk backboard is lighted according to the allocated physical address. Therefore, the rear hard disk backboard is not required to be matched with the dial switch, and the rear hard disk is not required to be controlled by the dial switch to use different physical addresses. Therefore, the wrong position of the dial switch cannot be generated, so that the situation that the hard disk cannot be normally lighted up to influence the first production yield when the equipment is tested is caused, and the problem that the SGPIO cable is missed or is wrongly inserted cannot be generated. Therefore, according to the hard disk lighting method, the dial switch is omitted on the rear hard disk back board card, the complexity is obviously reduced in the board card PCB design stage, the SGPIO signal interface is omitted, the design complexity of signal line routing is reduced, the mounting problems of dial and SGPIO signal lines are not required to be considered in the board card volume production, and the production through rate is effectively improved.
In an embodiment of the present application, as shown in fig. 2, a hard disk power-on method is provided, which is described by taking the application of the method and the BMC as an example, and includes the following steps:
s21, acquiring the spare physical address and the rear hard disk backboard of the physical address to be allocated.
Specifically, S21 may include the steps of:
and S211, reading all the physical addresses and acquiring the hard disk corresponding to each physical address.
S212, acquiring the idle physical address according to the hard disk corresponding to each physical address.
Specifically, the BMC may read all the physical addresses to obtain the hard disk corresponding to each physical address. And then, determining whether each physical address is idle according to the hard disk corresponding to each physical address, thereby acquiring an idle physical address.
The hard disk lighting method provided by the embodiment of the invention reads all physical addresses to obtain the hard disks corresponding to all the physical addresses; and acquiring the idle physical address according to the hard disk corresponding to each physical address. Therefore, the accuracy of the acquired idle physical address can be ensured, and the inaccuracy of allocating the physical address to the rear hard disk backplane due to the inaccuracy of the idle physical address is avoided.
And S22, distributing a physical address for the rear hard disk backplane according to the idle physical address.
Specifically, the above S22 may include the following steps:
s221, acquiring the number of the hard disks corresponding to the rear hard disk backboard.
Specifically, the BMC may read the attribute information of the rear hard disk backplane, and determine the number of hard disks corresponding to the rear hard disk backplane according to the attribute information of the rear hard disk backplane.
Illustratively, the BMC reads the attribute information of the rear hard disk backplane, and determines that the rear hard disk backplane is a 2.5X2 type backplane, so that the BMC determines that the number of the hard disks corresponding to the rear hard disk backplane is 2.
S222, acquiring an address identifier corresponding to the idle physical address, and sequencing the idle physical address according to the address identifier.
Specifically, the electronic device may determine an address identifier corresponding to the idle physical address according to a correspondence between the idle physical address and the address identifier, and then sort the idle physical addresses according to the address identifier.
For example, assuming that the number of idle physical addresses is 4 and the corresponding address identifiers are 0 to 3, the BMC sorts the idle physical addresses according to the address identifiers. The order of arrangement may be 0, 1, 2, 3, or 3, 2, 1, 0.
And S223, allocating the preset number of idle physical addresses ranked in the front to the rear hard disk backplane.
The preset number is equal to the number of the hard disks corresponding to the rear hard disk backboard.
Specifically, the BMC may allocate a preset number of idle physical addresses ranked in the top to the rear hard disk backplane.
For example, assuming that the arrangement order is 0, 1, 2, and 3, and the number of the hard disks corresponding to the rear hard disk backplane is 2, the BMC allocates two free physical addresses with addresses of 0 and 1 to the rear hard disk backplane.
In an optional implementation manner, if the number of the idle physical addresses is 2 and the number of the hard disks corresponding to the rear hard disk backplane is 2, the BMC directly allocates the 2 idle physical addresses to the rear hard disk backplane, and the idle physical addresses do not need to be sorted according to the address identifiers.
And S23, lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address.
Please refer to fig. 1 for a description of S13 for this step, which is not described herein again.
The hard disk lighting method provided by the embodiment of the invention obtains the number of hard disks corresponding to the rear hard disk backboard. Then, acquiring an address identifier corresponding to the idle physical address, and sequencing the idle physical addresses according to the address identifier; and allocating the preset number of idle physical addresses which are ranked in the front to the rear hard disk backplane, wherein the preset number is equal to the number of hard disks corresponding to the rear hard disk backplane, so that the idle physical addresses are ensured to be in one-to-one correspondence with the hard disks corresponding to the rear hard disk backplane, the hard disks corresponding to the rear hard disk backplane can be found according to the allocated physical addresses, and the hard disks are lighted. According to the method, the rear hard disk backboard is not required to be matched with the dial switch, and the rear hard disk is not required to be controlled by the dial switch to use different physical addresses. Therefore, the wrong position of the dial switch cannot be generated, so that the situation that the hard disk cannot be normally lighted up to influence the first production pass rate when the equipment is tested is caused, the problem that the SGPIO cable is missed or is wrongly inserted is avoided, and the first production pass rate is effectively improved.
In an embodiment of the present application, as shown in fig. 3, a hard disk lighting method is provided, which is described by taking an application of the method and an electronic device as an example, and includes the following steps:
s31, acquiring the spare physical address and the rear hard disk backboard of the physical address to be allocated.
Please refer to fig. 2 for a description of S21 for this step, which is not described herein again.
And S32, distributing a physical address for the rear hard disk backplane according to the idle physical address.
Wherein the number of the rear hard disk backplanes to be allocated with the physical addresses is at least two,
specifically, the above S32 may include the following steps:
s321, obtaining attribute information of each rear hard disk backplane.
Specifically, the BMC may read the attribute information of each rear hard disk backplane, thereby obtaining the attribute information of each rear hard disk backplane.
And S322, distributing physical addresses to the rear hard disk backplanes according to the attribute information and the preset priority.
Specifically, the BMC allocates a physical address to each rear hard disk backplane according to the attribute information of each rear hard disk backplane and a preset priority.
In an optional implementation manner of the present application, the attribute information includes an I2C channel identifier of a motherboard corresponding to each rear hard disk backplane. The step S222 "allocating physical addresses to the rear hard disk backplanes according to the attribute information and the preset priority" may include the following steps:
(1) and sequencing the rear hard disk backplanes according to the I2C channel identification.
(2) And distributing physical addresses for the rear hard disk backplanes according to the sequencing result.
Specifically, the BMC may obtain I2C channel identifiers of the motherboards corresponding to the rear hard disk backplanes, sort the rear hard disk backplanes according to the I2C channel identifiers, and allocate physical addresses to the rear hard disk backplanes according to the sorting result.
For example, assuming that the number of the rear hard disk backplanes to be allocated with the physical address is 3, the I2C channel identifiers of the motherboard corresponding to each rear hard disk backplane are I2C channel identifier 1, I2C channel identifier 2, and I2C channel identifier 3, respectively, and the BMC sorts each rear hard disk backplane according to the I2C channel identifier, and allocates the physical address to each rear hard disk backplane according to the sorting result.
One of the situations is as follows: and according to the sorting result, sequentially allocating physical addresses to the rear hard disk backplanes from the front to the rear according to the I2C channel identifiers.
In another case: and according to the sorting result, sequentially allocating physical addresses to the rear hard disk backplanes from the back to the front according to the I2C channel identifiers.
Specifically, one of the cases: the BMC can sequentially allocate physical addresses to the rear hard disk backplanes from front to back according to the sorting result and the I2C channel identifiers.
In another case: and according to the sorting result, sequentially allocating physical addresses to the rear hard disk backplanes from the back to the front according to the I2C channel identifiers.
For example, assuming that the number of the rear hard disk backplanes to be allocated with the physical address is 3, the I2C channel identifiers of the motherboard corresponding to each rear hard disk backplane are I2C channel identifier 1, I2C channel identifier 2, and I2C channel identifier 3, respectively, and the BMC sorts each rear hard disk backplane according to the I2C channel identifier, and allocates the physical address to each rear hard disk backplane according to the sorting result. The BMC may allocate physical addresses to the rear hard disk backplanes in the order of I2C channel label 1, I2C channel label 2, and I2C channel label 3 according to the sorting result. That is, the BMC preferably allocates a physical address to the rear hard disk backplane corresponding to the I2C channel label 1, then allocates a physical address to the rear hard disk backplane corresponding to the I2C channel label 2, and finally allocates a physical address to the rear hard disk backplane corresponding to the I2C channel label 3.
In another case: the BMC may allocate physical addresses to the rear hard disk backplanes in the order of I2C channel label 3, I2C channel label 2, and I2C channel label 1 according to the sorting result. That is to say, the BMC preferentially allocates a physical address to the rear hard disk backplane corresponding to the I2C channel label 3, then allocates a physical address to the rear hard disk backplane corresponding to the I2C channel label 2, and finally allocates a physical address to the rear hard disk backplane corresponding to the I2C channel label 1.
In an optional implementation manner of the present application, the attribute information includes the number of hard disks corresponding to each rear hard disk backplane. The step S222 "allocating physical addresses to the rear hard disk backplanes according to the attribute information and the preset priority" may include the following steps:
(1) and acquiring the number of the hard disks corresponding to each rear hard disk backboard.
(2) And sequencing the rear hard disk backboards according to the number of the hard disks corresponding to the rear hard disk backboards.
(3) And distributing physical addresses for the rear hard disk backplanes according to the sequencing result.
Specifically, the BMC may read the attribute information of the rear hard disk backplane, and determine the number of hard disks corresponding to the rear hard disk backplane according to the attribute information of the rear hard disk backplane.
Illustratively, the BMC reads the attribute information of the rear hard disk backplane, and determines that the rear hard disk backplane is a 2.5X2 type backplane, so that the BMC determines that the number of the hard disks corresponding to the rear hard disk backplane is 2.
And then, the BMC sorts the rear hard disk backplanes according to the number of the hard disks corresponding to the rear hard disk backplanes. And distributing physical addresses for the rear hard disk backplanes according to the sequencing result.
For example, it is assumed that the number of the rear hard disk backplanes to which the physical address is to be allocated is 2, where the number of the hard disks corresponding to one rear hard disk backplane is 2, and the number of the hard disks corresponding to another rear hard disk backplane is 4. The BMC can sort the two rear hard disk backplanes according to the number of the hard disks corresponding to each rear hard disk backplane, and then allocate physical addresses to each rear hard disk backplane according to the sorting result.
One of the situations is as follows: and according to the sequencing result, sequentially distributing physical addresses to the rear hard disk backplanes in the sequence of the number of the hard disks corresponding to the rear hard disk backplanes from large to small.
In another case: and according to the sequencing result, sequentially distributing physical addresses to the rear hard disk backplanes from small to large according to the number of the hard disks corresponding to the rear hard disk backplanes.
For example, the BMC may allocate a physical address to the rear hard disk backplane with the number of corresponding hard disks being 4, and then allocate a physical address to the rear hard disk backplane with the number of hard disks being 2, so as to ensure that the server may be plugged with a sufficient number of hard disks.
The BMC can also allocate physical addresses to the rear hard disk backplanes with the number of the corresponding hard disks being 2 firstly, and then allocate physical addresses to the rear hard disk backplanes with the number of the corresponding hard disks being 4, so that the normal operation of the server can be guaranteed not to be influenced.
And S33, lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address.
Please refer to fig. 2 for the description of S23 for this step, which is not repeated herein.
According to the hard disk lighting method provided by the embodiment of the invention, the attribute information of each rear hard disk backboard is obtained; and distributing physical addresses to the rear hard disk backplanes according to the attribute information and preset priority. Therefore, physical addresses can be accurately allocated to the rear hard disk backplanes, and the problem that the same idle physical address is allocated to the rear hard disk backplanes due to the fact that the physical addresses are allocated to the rear hard disk backplanes simultaneously is solved. Therefore, the method can ensure the accuracy of the physical address allocated to each rear hard disk backboard, thereby effectively improving the production through rate.
Specifically, the BMC sorts the rear hard disk backplanes according to the I2C channel identifiers; according to the sequencing result, physical addresses are allocated to the rear hard disk backplanes, so that the accuracy of the physical addresses allocated to the rear hard disk backplanes can be ensured, and the production first pass rate is effectively improved. In addition, the BMC can also acquire the number of hard disks corresponding to each rear hard disk backboard; sequencing the rear hard disk backplates according to the number of the hard disks corresponding to the rear hard disk backplates; and distributing physical addresses for the rear hard disk backplanes according to the sequencing result. The accuracy of the physical address allocated to each rear hard disk backboard is ensured, so that the production first pass rate is effectively improved.
It should be understood that although the various steps in the flow charts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
As shown in fig. 4, the present embodiment provides a hard disk drive lighting device, including:
an obtaining module 41, configured to obtain an idle physical address and a rear hard disk backplane to which a physical address is to be allocated;
the allocation module 42 is configured to allocate a physical address to the rear hard disk backplane according to the idle physical address;
and the lighting module 43 is configured to light up the hard disk corresponding to the rear hard disk backplane according to the allocated physical address.
In an embodiment of the present application, the distribution module 42 is specifically configured to obtain the number of hard disks corresponding to the rear hard disk backplane; acquiring an address identifier corresponding to the idle physical address, and sequencing the idle physical address according to the address identifier; and allocating the preset number of idle physical addresses ranked in the front to the rear hard disk back plate, wherein the preset number is equal to the number of the hard disks corresponding to the rear hard disk back plate.
In an embodiment of the present application, the number of the rear hard disk backplanes to be allocated with the physical address is at least two, and the allocation module 42 is specifically configured to obtain attribute information of each rear hard disk backplane; and distributing physical addresses to the rear hard disk backplanes according to the attribute information and preset priority.
In an embodiment of the present application, the attribute information includes I2C channel identifiers of the motherboards corresponding to the rear hard disk backplanes, and the allocating module 42 is specifically configured to sort the rear hard disk backplanes according to the I2C channel identifiers; and distributing physical addresses for the rear hard disk backplanes according to the sequencing result.
In an embodiment of the present application, the allocating module 42 is specifically configured to allocate physical addresses to the rear hard disk backplanes sequentially according to the order from front to back of the I2C channel identifier according to the sorting result.
In an embodiment of the present application, the attribute information includes the number of hard disks corresponding to each rear hard disk backplane, and according to the attribute information, the allocation module 42 is specifically configured to obtain the number of hard disks corresponding to each rear hard disk backplane; sequencing the rear hard disk backplates according to the number of the hard disks corresponding to the rear hard disk backplates; and distributing physical addresses for the rear hard disk backplanes according to the sequencing result.
In an embodiment of the present application, the obtaining module 41 is specifically configured to read all physical addresses and obtain a hard disk corresponding to each physical address; and acquiring the idle physical address according to the hard disk corresponding to each physical address.
For specific limitations and beneficial effects of the hard disk lighting device, reference may be made to the above limitations on the hard disk lighting method, which is not described herein again. All or part of the modules in the hard disk lighting device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the electronic device, or can be stored in a memory in the electronic device in a software form, so that the processor can call and execute operations corresponding to the modules.
An embodiment of the present invention further provides an electronic device, which includes the hard disk lighting device shown in fig. 4.
As shown in fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 5, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, memory 54, at least one communication bus 52. Wherein a communication bus 52 is used to enable the connection communication between these components. The communication interface 53 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 53 may also include a standard wired interface and a standard wireless interface. The Memory 54 may be a high-speed RAM Memory (volatile Random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 54 may alternatively be at least one memory device located remotely from the processor 51. Wherein the processor 51 may be in connection with the apparatus described in fig. 4, the memory 54 stores an application program, and the processor 51 calls the program code stored in the memory 54 for performing any of the above-mentioned method steps.
The communication bus 52 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 52 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The memory 54 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 54 may also comprise a combination of the above types of memories.
The processor 51 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 51 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 54 is also used to store program instructions. The processor 51 may call program instructions to implement the hard disk lighting method as shown in the embodiments of fig. 1 to 3 of the present application.
The embodiment of the invention also provides a non-transient computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the hard disk lighting method in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
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 invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims (10)
1. A hard disk lighting method is characterized by comprising the following steps:
acquiring an idle physical address and a rear hard disk backboard of a physical address to be allocated;
according to the idle physical address, distributing a physical address for the rear hard disk backboard;
and lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address.
2. The method of claim 1, wherein the allocating a physical address to the backplane of the rear hard disk according to the free physical address comprises:
acquiring the number of hard disks corresponding to the rear hard disk backboard;
acquiring an address identifier corresponding to the idle physical address, and sequencing the idle physical address according to the address identifier;
and allocating the preset number of the idle physical addresses which are sorted in the front to the rear hard disk back plate, wherein the preset number is equal to the number of the hard disks corresponding to the rear hard disk back plate.
3. The method of claim 1, wherein the number of the backplane of the hard disk drive to be allocated with the physical address is at least two, and the allocating the physical address to the backplane of the hard disk drive according to the free physical address comprises:
acquiring attribute information of each rear hard disk backboard;
and distributing physical addresses to the rear hard disk backplanes according to the attribute information and preset priorities.
4. The method of claim 3, wherein the attribute information includes an I2C channel identifier of a motherboard corresponding to each backplane, and wherein allocating a physical address to each backplane according to the attribute information and a preset priority comprises:
sequencing each rear hard disk backboard according to the I2C channel identifier;
and distributing physical addresses to the rear hard disk backplanes according to the sorting result.
5. The method of claim 4, wherein the allocating physical addresses to the rear hard disk backplanes according to the sorting result comprises:
and according to the sorting result, sequentially allocating physical addresses to the rear hard disk backplanes according to the sequence of the I2C channel identifiers from front to back.
6. The method of claim 3, wherein the attribute information includes the number of hard disks corresponding to each of the rear hard disk backplanes, and wherein allocating a physical address to each of the rear hard disk backplanes according to the attribute information and a preset priority comprises:
acquiring the number of hard disks corresponding to each rear hard disk backboard;
sequencing the rear hard disk back plates according to the number of the hard disks corresponding to the rear hard disk back plates;
and distributing physical addresses to the rear hard disk backplanes according to the sorting result.
7. The method of claim 1, wherein the obtaining the free physical address comprises:
reading all physical addresses to obtain a hard disk corresponding to each physical address;
and acquiring the idle physical address according to the hard disk corresponding to each physical address.
8. A hard disk drive lighting device, the device comprising:
the acquisition module is used for acquiring an idle physical address and a rear hard disk backboard of the physical address to be allocated;
the allocation module is used for allocating a physical address to the rear hard disk backboard according to the idle physical address;
and the lighting module is used for lighting the hard disk corresponding to the rear hard disk backboard according to the distributed physical address.
9. An electronic device, comprising a memory and a processor, wherein the memory stores computer instructions, and the processor executes the computer instructions to perform the hard disk lighting method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that it stores computer instructions for causing a computer to execute the hard disk lighting method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111683366.XA CN114443445B (en) | 2021-12-31 | 2021-12-31 | Hard disk lighting method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111683366.XA CN114443445B (en) | 2021-12-31 | 2021-12-31 | Hard disk lighting method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114443445A true CN114443445A (en) | 2022-05-06 |
CN114443445B CN114443445B (en) | 2024-05-24 |
Family
ID=81366363
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111683366.XA Active CN114443445B (en) | 2021-12-31 | 2021-12-31 | Hard disk lighting method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114443445B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116155865A (en) * | 2023-01-05 | 2023-05-23 | 惠州市德赛智储科技有限公司 | BMS slave board address automatic allocation method, allocation system and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521172A (en) * | 2011-11-22 | 2012-06-27 | 华为技术有限公司 | Allocating method of hardware address, back panel and system |
CN108829523A (en) * | 2018-06-26 | 2018-11-16 | 迈普通信技术股份有限公司 | Memory source distribution method, device, electronic equipment and readable storage medium storing program for executing |
CN112035061A (en) * | 2020-08-17 | 2020-12-04 | 鹏城实验室 | Solid state disk resource allocation method and device and storage medium |
CN112527575A (en) * | 2020-11-26 | 2021-03-19 | 浪潮电子信息产业股份有限公司 | Hard disk lighting test method, device and equipment and readable storage medium |
-
2021
- 2021-12-31 CN CN202111683366.XA patent/CN114443445B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521172A (en) * | 2011-11-22 | 2012-06-27 | 华为技术有限公司 | Allocating method of hardware address, back panel and system |
CN108829523A (en) * | 2018-06-26 | 2018-11-16 | 迈普通信技术股份有限公司 | Memory source distribution method, device, electronic equipment and readable storage medium storing program for executing |
CN112035061A (en) * | 2020-08-17 | 2020-12-04 | 鹏城实验室 | Solid state disk resource allocation method and device and storage medium |
CN112527575A (en) * | 2020-11-26 | 2021-03-19 | 浪潮电子信息产业股份有限公司 | Hard disk lighting test method, device and equipment and readable storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116155865A (en) * | 2023-01-05 | 2023-05-23 | 惠州市德赛智储科技有限公司 | BMS slave board address automatic allocation method, allocation system and storage medium |
CN116155865B (en) * | 2023-01-05 | 2024-01-05 | 惠州市德赛智储科技有限公司 | BMS slave board address automatic allocation method, allocation system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114443445B (en) | 2024-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110489367B (en) | Method and system for flexibly allocating and easily managing backplane by CPLD (complex programmable logic device) | |
CN111722990A (en) | Method and device for checking cable connection between main back boards | |
CN112463689B (en) | OCP card hot plug device, method and computer readable storage medium | |
CN114003538B (en) | Identification method of intelligent network card and intelligent network card | |
CN112286709A (en) | Diagnosis method, diagnosis device and diagnosis equipment for server hardware faults | |
US7266628B2 (en) | System and method of retiring events upon device replacement | |
CN114443445B (en) | Hard disk lighting method and device, electronic equipment and storage medium | |
US20120254598A1 (en) | System configuration | |
CN102914981A (en) | Chip burning detection system | |
CN102063341A (en) | High-density server | |
CN117370118A (en) | Method, device and equipment for detecting hard disk slot number and readable storage medium | |
CN113742182A (en) | Hard disk lighting method, device, storage medium and computer program product | |
CN112948380A (en) | Data storage method and device based on big data, electronic equipment and storage medium | |
CN112799894A (en) | Server hardware identification method and system | |
US9807838B1 (en) | System and method for providing downloadable custom LED blinking pattern for backplane controller or enclosure management controller | |
CN108710508B (en) | Processing method and device and electronic equipment | |
CN112115666B (en) | Method and system for drawing schematic diagram | |
CN115098342A (en) | System log collection method, system, terminal and storage medium | |
CN114238019A (en) | Hard disk display method, device, equipment and medium | |
CN113935270A (en) | Chip pin connection state display method, computer device and storage medium | |
CN111966378A (en) | Board card version upgrading method, device and medium | |
Nan et al. | Design and development of module management controller for MicroTCA. 4 standard | |
CN109471764B (en) | Method, device, terminal and storage medium for quickly reading system information | |
CN114880264A (en) | PCIE signal configuration processing method, system, terminal and storage medium | |
CN113703851B (en) | Method, device, system, equipment and storage medium for configuring server backboard |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |