WO2017054692A1 - Power-on controlling method and device for hard disk in hard disk array - Google Patents
Power-on controlling method and device for hard disk in hard disk array Download PDFInfo
- Publication number
- WO2017054692A1 WO2017054692A1 PCT/CN2016/100167 CN2016100167W WO2017054692A1 WO 2017054692 A1 WO2017054692 A1 WO 2017054692A1 CN 2016100167 W CN2016100167 W CN 2016100167W WO 2017054692 A1 WO2017054692 A1 WO 2017054692A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- hard disk
- current
- time
- disk array
- startup
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000003213 activating effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
Definitions
- the present disclosure relates to the field of storage technologies, for example, to a hard disk power-on control method and apparatus in a hard disk array.
- a hard disk array is usually connected to a host directly or externally through a network.
- the hard disk array consists of multiple hard disks.
- the related technology adopts a group power-on method, which detects the output current of the power module in real time by adding a current detecting module, and detects that the output current of the power module is less than the setting.
- a group power-on method which detects the output current of the power module in real time by adding a current detecting module, and detects that the output current of the power module is less than the setting.
- the first threshold is determined
- each set of hard disks in the hard disk array is sequentially powered up by using a preset first time interval, and when it is detected that the output current of the power module is greater than or equal to the first threshold and less than the second threshold
- Each of the sets of hard disks is powered on in a preset second time interval.
- the method for controlling the power-on of the hard disk in the hard disk array includes the method for controlling the power-on of the hard disk in the hard disk array, including:
- the hard disk is started when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
- the updating the current current according to the running status of the multiple hard disks includes:
- the current of the hard disk array is subtracted from the starting current of the hard disk and the operating current of the hard disk is increased.
- the updating the current current according to an operating state of the multiple hard disks includes:
- determining whether the started time of the hard disk in the activated state in the hard disk array reaches a startup time length includes:
- the acquiring the startup current of the hard disk includes:
- an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
- the present disclosure further provides a hard disk power-on control device in a hard disk array, wherein the hard disk power-on control device in the hard disk array includes:
- the startup module is set to sequentially start multiple hard disks of the hard disk array
- Obtaining a module configured to acquire a starting current of the hard disk before starting each hard disk
- a determining module configured to determine whether a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array, wherein, according to an operating state of the multiple hard disks New current current;
- the startup module is further configured to start the hard disk when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
- the determining module is further configured to: after starting the hard disk, increase a starting current of the hard disk to a current of the hard disk array; and when the hard disk is booted, to the hard disk array The current current subtracts the starting current of the hard disk and increases the operating current of the hard disk.
- the determining module includes:
- a determining unit configured to determine whether the started time of the hard disk in the activated state in the hard disk array reaches a startup time
- the determining unit is configured to determine that the hard disk startup is completed when the boot time of the hard disk in the startup state reaches the startup time.
- the determining unit includes:
- Obtaining a subunit configured to obtain a startup time and a startup time of the hard disk
- the determining subunit is configured to determine whether the started time of the hard disk reaches the startup time according to the startup time and the started time of the hard disk, wherein the started time is a time difference between the current time and the startup time.
- the obtaining module includes:
- a reading unit configured to read a model of the hard disk
- the obtaining unit is configured to obtain an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
- the present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the above method.
- the present disclosure also provides an electronic device, the device comprising:
- At least one processor At least one processor
- the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
- the present invention saves the hardware cost when the hard disk in the hard disk array is powered on, and does not need to be obtained by the current detecting module, thereby solving the problem that the power output is over-current and shut down when all the hard disks in the hard disk array are powered on at the same time.
- the problem of abnormal conditions such as breaking the system reduces the maximum power consumption of the system and reduces the impact on the power supply.
- FIG. 1 is a schematic flow chart of a first embodiment of a method for controlling power-on of a hard disk in a hard disk array according to the present disclosure
- FIG. 2 is a schematic diagram of a hard disk array hard disk model in an embodiment of the present disclosure
- FIG. 3 is a schematic diagram of a refinement process of updating the current current according to an operating state of a plurality of hard disks in FIG. 1;
- FIG. 4 is a schematic diagram of a refinement process for determining completion of the hard disk in FIG. 3;
- FIG. 5 is a schematic diagram showing the refinement process of determining whether the boot time of the hard disk reaches the startup time in FIG. 4;
- FIG. 6 is a schematic diagram showing a refinement process of acquiring a starting current of the hard disk in FIG. 1;
- FIG. 7 is a schematic diagram of functional modules of a first embodiment of a hard disk power-on control device in the hard disk array of the present disclosure
- FIG. 8 is a schematic diagram of a refinement function module of the judging module in FIG. 7;
- FIG. 9 is a schematic diagram of a refinement function module of the acquisition module in FIG. 7;
- FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
- the plurality of hard disks of the hard disk array are sequentially activated; the startup current of the hard disk is obtained before each hard disk is started, and it is determined whether the sum of the startup current and the current current of the hard disk array is less than or equal to a current rating of the hard disk array, wherein the current current is updated according to an operating state of the plurality of hard disks; and a sum of the starting current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array When the hard disk is booted.
- FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for controlling power-on of a hard disk in a hard disk array according to the present disclosure.
- step 110 multiple hard disks of the hard disk array are sequentially started.
- the hard disk array is composed of a plurality of hard disks, and the hard disks in the hard disk array may be the same type of hard disks or different types of hard disks.
- the hard disk array is exemplified by four hard disks. Referring to FIG. 2, the four hard disks are a hard disk of type seagate2000, two hard disks of type WD250, and one hard disk of type hitachi500.
- the rated current of the hard disk array is 10A, and the working parameters of the four hard disks are as follows:
- the hard disk array can also be composed of two, three, five, six, seven, and the like, and the number of hard disks can be determined according to actual needs.
- the hard disk model may be the above model or other models than the above models.
- step 120 the startup current of the hard disk is obtained before starting each hard disk, and it is determined whether the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, where The current current is updated according to the operating states of the plurality of hard disks.
- the starting current can be obtained by looking up a table.
- the starting current of the hard disk is 7A.
- the current current of the hard disk array before the hard disk of the model seagate2000 has not been started is 0A.
- the current current of the hard disk array is not fixed, and the current current of the hard disk array is updated according to the operating state of the multiple hard disks, and the current current is updated when the hard disk is started.
- the current current is also updated, that is, when the system detects that a hard disk is started or a hard disk is started, a current current update command is triggered, and then the current current is once performed according to the command. Update.
- step 130 the hard disk is started when the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array.
- the hard disk is activated when it is determined that the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array. For example, before the first hard disk is started, the sum of the starting current and the current current of the hard disk array is 7A+0A, that is, 7A, and the current value is less than the rated current value of the hard disk array by 10A, and the hard disk is started, and Set the hard drive to be started. After the hard disk is started, the current current is updated once, and then steps 110 to 130 are repeated until all the hard disks in the hard disk array are started, and the hard disk is powered on.
- the hard disk array During power-on operation of the hard disk array, if it is determined that the sum of the startup current and the current current of the hard disk array is greater than the rated current of the hard disk array before starting the hard disk, wait for a period of time until the determination is performed.
- the hard disk is started when the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, and the hard disk is set to be activated.
- the waiting time it may be determined in real time or periodically whether the sum of the starting current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, and may also update the current current of the hard disk array each time.
- the current current of the hard disk array is updated according to the running state of the hard disk array of the hard disk array, and the current detecting module is not required to be acquired, thereby saving hardware cost and simultaneously Starting a plurality of hard disks of the hard disk array, and determining whether a sum of a boot current of the hard disk and a current current of the hard disk array is less than or equal to a rated current of the hard disk array of the hard disk array before starting each hard disk, where the starting current and the current are
- the hard disk array is activated when the sum of current currents of the hard disk array is less than or equal to the rated current of the hard disk array, and the hard disk array can be solved.
- the power output is over-current, shut down, and other abnormal conditions, which reduces the maximum power consumption of the system and reduces the impact on the power supply.
- the present disclosure proposes a second embodiment of a hard disk power-on control method in a hard disk array.
- the updating the current current according to the operating states of the plurality of hard disks includes steps 310 to 320.
- step 310 after the hard disk is booted, the current of the hard disk array is increased by the current of the hard disk array.
- the operating state of the hard disk includes a startup state and a startup completion state.
- the current current of the hard disk array is updated once.
- the update process is: increasing the current current of the hard disk array.
- the starting current of the hard disk that is, the current current is equal to the sum of the current current of the previous time and the starting current of the hard disk.
- step 320 when the hard disk startup is completed, the current of the hard disk array is subtracted from the current of the hard disk and the operating current of the hard disk is increased.
- the current current of the hard disk array is also updated once, and the updating process is: subtracting the starting current of the hard disk from the current current of the hard disk array and adding the The operating current of the hard disk, that is, the current current is equal to the current current of the previous time minus the starting current of the hard disk plus the operating current of the hard disk.
- the determining whether the hard disk is booted or not includes steps 410 to 420.
- step 410 it is determined whether the started time of the hard disk in the activated state in the hard disk array reaches the startup time.
- the hard disk in the bootable state of the hard disk array determines whether the booting time of the hard disk is reached in real time or timing. Referring to FIG. 5, the determining whether the boot time of the hard disk in the boot state in the hard disk array reaches the boot time of the hard disk includes steps 510 and 520.
- step 510 the startup time and the startup time of the hard disk are obtained.
- step 520 it is determined whether the started time of the hard disk reaches the startup time according to the startup time and the started time corresponding to the hard disk, wherein the started time is a time difference between the current time and the startup time.
- the startup time and the startup time of the recorded hard disk may be obtained, and determining the hard disk according to the startup time and the startup time of the hard disk. Whether the started time has reached the startup time. Determining that the started time of the hard disk reaches a startup time when the started time is greater than or equal to the startup time; determining that the started time of the hard disk does not reach the startup when the started time is less than the startup time duration.
- the started time is a time recorded by a timer or a counter, and the time value is a time difference between the current time and the start time.
- step 420 when the boot time of the hard disk in the boot state reaches the boot time, it is determined that the hard disk boot is completed.
- the system determines that the hard disk startup is completed, and if the system does not receive the startup completion command, Indicates that the hard disk is still in the startup state, and no startup is completed.
- the current current of the hard disk array when the current current of the hard disk array is updated, the current current of the hard disk array is updated after the hard disk is started and the hard disk startup is completed, and the current current is not updated in real time or periodically, so that the current is The current current update is very simple and not cumbersome.
- the present disclosure provides a third embodiment of the method for controlling the power-on of the hard disk in the hard disk array.
- the acquiring the starting current of the hard disk includes steps 610 to 620 . .
- step 610 the model number of the hard disk is read.
- an operating parameter of the hard disk is obtained according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
- the model of the hard disk may be seagate2000, WD250, hitachi500, and the like.
- the working parameters of the hard disk are obtained according to the model, wherein the working parameters include a starting current, an operating current, and a startup time.
- the model of the hard disk is seagate2000, the model is indexed, and a table of starting time, starting current and working current with the hard disk model as the main key is found, and the hard disk can be obtained according to the table.
- Working parameters When the hard disk model is read as WD250, the model is also indexed to find a boot time, starting current and working power with the hard disk model as the main key. A table of flows from which the operating parameters of the hard disk can be obtained.
- the working parameters of the hard disk are obtained according to the model of the hard disk, thereby providing a basis for calculating the current current of the hard disk array.
- the execution body of the hard disk power-on control method in the hard disk array of the foregoing embodiment may be a terminal.
- the hard disk power-on control method in the hard disk array may be implemented by a client control program installed on the terminal, where the terminal is a hard disk array.
- the present disclosure also provides a hard disk power-on control device in a hard disk array.
- FIG. 7 is a schematic diagram of functional modules of a first embodiment of a hard disk power-on control device in a hard disk array according to the present disclosure.
- the hard disk power-on control device in the hard disk array includes: a startup module 10, an acquisition module 20, and a determination module 30.
- the startup module 10 is configured to sequentially activate a plurality of hard disks of the hard disk array.
- the hard disk array is composed of a plurality of hard disks, and the hard disks in the hard disk array may be the same type of hard disks or different types of hard disks.
- the hard disk array is composed of four hard disks as an example. Referring to FIG. 2, the four hard disks are a seagate 2000 hard disk, two models are WD250 hard disks, and one model is a hitachi 500 hard disk.
- the rated current of the hard disk array of the hard disk array is 10 A, and the working parameters of the hard disk are as follows:
- the hard disk array may also be composed of two, three, five, six, seven, and the like, and the number of hard disks is determined according to actual needs.
- the hard disk model may be the above model or other models than the above models.
- the boot order of the plurality of hard disks is the first boot of the hard disk of the model seagate2000, the second boot of the hard disk of the model WD250, and the third boot of the hard disk of the model WD250.
- Model number The hit hard disk of the hitachi 500 is activated four times.
- the booting module 10 sequentially starts a plurality of hard disks in the above-mentioned order.
- the startup module 10 is further configured to activate the hard disk when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
- the startup module 10 activates the hard disk when it is determined that the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array. For example, before the first hard disk is started, the sum of the starting current and the current current of the hard disk array is 7A+0A, that is, 7A, and the current value is less than the rated current value of the hard disk array by 10A, and the hard disk is started, and Set the hard drive to be started. After the hard disk is started, the current current is updated once, and then the startup process is repeated, and the process and the judgment process are determined until all the hard disks in the hard disk array are started, and the hard disk is powered on.
- the startup module 10 starts the hard disk and sets the hard disk to be activated.
- the waiting time it may be determined in real time or periodically whether the sum of the starting current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, and may also update the current current of the hard disk array each time.
- the starting Module 10 After determining whether the sum of the starting current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, when it is determined that the sum of the currents is less than or equal to the rated current, the starting Module 10 immediately starts the hard disk and sets the hard disk to be booted.
- the obtaining module 20 is configured to acquire a starting current of the hard disk before starting each hard disk.
- the determining module 30 is configured to determine whether the sum of the starting current and the current current of the hard disk array is less than or equal to a rated current of the hard disk array, wherein the current current is updated according to an operating state of the hard disk.
- the acquiring module 20 acquires the starting current of the hard disk before starting the hard disk.
- the starting current can be obtained by looking up a table. In the system of the hard disk array, there is a table of starting time, starting current and working current indexed by the hard disk model. It can be known from the table that the starting current of the hard disk is 7A.
- the determining module 30 determines whether the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array.
- the hard disk array Since the hard disk of the model seagate2000 is the first hard disk of the hard disk array, the hard disk array is in the The current current of the hard disk model seagate2000 is 0A before it is started. However, the current current of the hard disk array is not fixed, and the current current of the hard disk array is updated according to the running state of the hard disk, and when the hard disk is started, the current current is updated; or when there is When the hard disk startup is completed, the current current is also updated, that is, when the system detects that a hard disk is started or a hard disk is started, a current current update command is triggered, and then the current current is updated according to the command.
- the determining module 30 is further configured to: after starting the hard disk, increase a starting current of the hard disk to a current current of the hard disk array; and when the hard disk startup is completed, to the hard disk array The current current subtracts the starting current of the hard disk and increases the operating current of the hard disk.
- the operating state of the hard disk includes a startup state and a startup completion state.
- the determining module 30 updates the current current of the hard disk array once, and the update process is: current to the hard disk array.
- the current increases the starting current of the hard disk, that is, the current current is equal to the sum of the current current of the previous time and the starting current of the hard disk; when each hard disk of the hard disk array is booted, the determining module 30 also needs Updating the current current of the hard disk array by updating the current of the hard disk array by the current of the hard disk and increasing the operating current of the hard disk, that is, the current current is equal to the current current time.
- the current is subtracted from the starting current of the hard disk plus the operating current of the hard disk.
- the current current of the hard disk array is updated according to the running state of the hard disk array of the hard disk array, and the current detecting module is not required to be acquired, thereby saving hardware cost and simultaneously Activating a hard disk of the hard disk array, and determining whether a sum of a starting current of the hard disk and a current current of the hard disk array is less than or equal to a rated current of the hard disk array of the hard disk array before starting each hard disk, where the starting current and the hard disk are When the sum of the currents of the arrays is less than or equal to the rated current of the hard disk array, the hard disk is started, which may solve the problem that the power output is over-current, turned off, and the like when all the hard disks in the hard disk array are powered on at the same time. , reducing the maximum power consumption of the system and reducing the impact on the power supply.
- the present disclosure further provides a second embodiment of the hard disk power-on control device in the hard disk array.
- the determination module is The method 30 includes a judging unit 31 and a determining unit 32, and the judging unit 31 includes an obtaining subunit 311 and a judging subunit 312.
- the determining unit 31 is configured to determine whether the started time of the hard disk in the activated state is Up to the start time.
- the determining unit 31 determines whether the started time of the hard disk in the activated state in the hard disk array reaches the startup time in real time or timing.
- the startup time and the startup time of the plurality of hard disks are recorded, and the startup time of the hard disks is recorded by a timer or a counter.
- the obtaining sub-unit 311 may acquire the started time and the started time of the recorded hard disk, and then the The determining sub-unit 312 determines whether the started time of the hard disk reaches the startup time according to the startup time and the started time corresponding to the hard disk.
- the started time is a time recorded by a timer or a counter, and the time value is a time difference between the current time and the start time.
- the determining unit 32 is configured to determine that the hard disk startup is completed when the boot time of the hard disk in the startup state reaches the startup time.
- the determining unit 32 determines that the hard disk startup is completed.
- the set timer or counter value reaches the set startup time, a startup completion command is triggered, and after receiving the startup completion command, the system determines that the hard disk startup is completed, and if the system does not receive the startup completion command, Indicates that the hard disk is still in the startup state, and no startup is completed.
- the current current of the hard disk array when the current current of the hard disk array is updated, the current current of the hard disk array is updated after the multiple hard disks are started and when the multiple hard disks are booted, without updating the current current in real time or periodically.
- the update of the current current is very simple and not cumbersome.
- the present disclosure proposes a third embodiment of the hard disk power-on control device in the hard disk array.
- the acquiring module 20 includes: a reading unit 21 and an obtaining unit 22 .
- the reading unit 21 is arranged to read the model number of the hard disk.
- the obtaining unit 22 is configured to acquire an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
- the reading unit 21 reads the model number of the hard disk before starting each hard disk.
- the hard disk Models can be seagate2000, WD250, hitachi500, etc.
- the acquiring unit 22 acquires the working parameters of the hard disk according to the model, wherein the working parameters include a starting current, an operating current, and a starting duration.
- the model of the hard disk is seagate2000, the model is indexed, and a table of starting time, starting current and working current with the hard disk model as the main key is found, and the hard disk can be obtained according to the table.
- Working parameters When the hard disk model is read as WD250, the model is also indexed, and a table of starting time, starting current and working current with the hard disk model as the main key is found, and the working of the hard disk can be obtained according to the table. parameter.
- the working parameters of the hard disk are obtained according to the model of the hard disk, thereby providing a basis for calculating the current current of the hard disk array, and simultaneously starting multiple hard disks of the hard disk array by using the hard disk array.
- the hard disk is activated, which can solve the problem that the power output is over-current, turned off, and the like when all the hard disks in the hard disk array are powered on at the same time, thereby reducing the maximum power of the system. Consumption, reducing the impact on the power supply.
- the current current of the hard disk array is obtained, the current current is calculated according to the operating state of the hard disk without being detected by the current detecting module, thereby saving hardware costs.
- Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
- the embodiment of the present disclosure further provides a schematic structural diagram of an electronic device.
- the electronic device includes:
- At least one processor 40 which is exemplified by a processor 40 in FIG. 10; and a memory 50, may further include a communication interface 60 and a bus 70. among them, The processor 40, the memory 50, and the communication interface 60 can complete communication with each other via the bus 70. Communication interface 60 can be used for information transfer. Processor 40 may invoke logic instructions in memory 50 to perform the methods of the above-described embodiments.
- logic instructions in the memory 50 described above may be implemented in the form of software functional units and sold or used as separate products, and may be stored in a computer readable storage medium.
- the memory 50 is a computer readable storage medium and can be used to store software programs, computer executable programs, and program instructions/modules corresponding to the methods in the embodiments of the present disclosure.
- the processor 40 executes the function application and the data processing by running the software program, the instruction and the module stored in the memory 50, that is, the hard disk power-on control method in the hard disk array in the above method embodiment.
- the memory 50 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 50 may include a high speed random access memory, and may also include a nonvolatile memory.
- the technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method of the embodiments of the present disclosure.
- the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
- the disclosure provides a hard disk power-on control method and device in a hard disk array, which reduces the abnormality of the power output over-current and the shutdown when all the hard disks in the hard disk array are powered on at the same time without increasing the hardware cost.
- the hardware cost and the maximum power consumption of the system reduce the impact on the power module.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
A power-on controlling method and device for hard disk in a hard disk array, wherein the method comprises: actuating multiple hard disks in the hard disk array in turn (110); obtaining the actuating current of the hard disk prior to the actuation of each hard disk, and determining whether the sum of said actuating current and the present current of the hard disk array is smaller or equal to the rated current of the hard disk array, wherein, updating, according to the operation state of said multiple hard disks, said present current (120); actuating the hard disk when the sum of the actuating current and the present current of the hard disk array is smaller or equal to the rated current of the hard disk array (130).
Description
本公开涉及存储技术领域,例如涉及一种硬盘阵列中的硬盘上电控制方法及装置。The present disclosure relates to the field of storage technologies, for example, to a hard disk power-on control method and apparatus in a hard disk array.
随着信息量的高速增长,对存储空间的容量要求越来越高,硬盘阵列应运而生。硬盘阵列通常作为独立系统,在主机外直连或通过网络与主机相连,其硬盘阵列内部由多个硬盘组成。机械硬盘内部通常有一个电动马达,用以驱动硬盘内部磁盘的转动,而电动马达的启动电流往往是正常运行时电流的2倍。如果硬盘阵列的所有磁盘同时上电,则产生的巨大的冲击电流很可能超过电源模块的最大输出能力,造成电源输出过流、被关断等异常情况,降低硬盘阵列的可靠性。With the rapid growth of information volume, the capacity requirements for storage space are getting higher and higher, and hard disk arrays have emerged. A hard disk array is usually connected to a host directly or externally through a network. The hard disk array consists of multiple hard disks. There is usually an electric motor inside the mechanical hard disk to drive the rotation of the internal disk of the hard disk, and the starting current of the electric motor is often twice the current during normal operation. If all the disks of the hard disk array are powered on at the same time, the huge inrush current generated may exceed the maximum output capability of the power module, causing abnormal conditions such as overcurrent and shutdown of the power supply output, and reducing the reliability of the hard disk array.
为了解决硬盘阵列中的所有硬盘同时上电造成的问题,相关技术采用分组上电的方式,该方式通过增加一个电流检测模块实时检测电源模块的输出电流,当检测到电源模块的输出电流小于设定的第一阈值时,采用预设的第一时间间隔依次对硬盘阵列中的每组硬盘进行上电,当检测到电源模块的输出电流大于或等于所述第一阈值且小于第二阈值时,采用预设的第二时间间隔依次对所述每组硬盘进行上电。虽然上述方式能解决硬盘阵列中的所有硬盘同时上电造成的问题,但该上电方式需要增加电流检测模块,增加了硬件成本。In order to solve the problem caused by simultaneous power-on of all the hard disks in the hard disk array, the related technology adopts a group power-on method, which detects the output current of the power module in real time by adding a current detecting module, and detects that the output current of the power module is less than the setting. When the first threshold is determined, each set of hard disks in the hard disk array is sequentially powered up by using a preset first time interval, and when it is detected that the output current of the power module is greater than or equal to the first threshold and less than the second threshold Each of the sets of hard disks is powered on in a preset second time interval. Although the above method can solve the problem caused by simultaneous power-on of all the hard disks in the hard disk array, the power-on mode requires an increase in the current detecting module, which increases the hardware cost.
发明内容Summary of the invention
本公开提供的一种硬盘阵列中的硬盘上电控制方法,所述硬盘阵列中的硬盘上电控制方法包括:The method for controlling the power-on of the hard disk in the hard disk array provided by the disclosure includes the method for controlling the power-on of the hard disk in the hard disk array, including:
依次启动硬盘阵列的多个硬盘;Start multiple hard disks of the hard disk array in sequence;
在启动每个硬盘之前均获取所述硬盘的启动电流,并判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,其中,根据所述多个硬盘的运行状态更新所述当前电流;以及
Obtaining a starting current of the hard disk before starting each hard disk, and determining whether a sum of the starting current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array, wherein, according to the multiple The operating state of the hard disk updates the current current;
在所述启动电流与所述硬盘阵列当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。The hard disk is started when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
可选地,所述根据所述多个硬盘的运行状态更新所述当前电流包括:Optionally, the updating the current current according to the running status of the multiple hard disks includes:
在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流;After starting the hard disk, increasing a current of the hard disk to a current of the hard disk array;
在所述硬盘启动完成时,对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流。When the booting of the hard disk is completed, the current of the hard disk array is subtracted from the starting current of the hard disk and the operating current of the hard disk is increased.
可选地,在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流之后,所述根据所述多个硬盘的运行状态更新所述当前电流包括:Optionally, after the current of the hard disk array is increased, and the current of the hard disk is increased after the booting of the hard disk is started, the updating the current current according to an operating state of the multiple hard disks includes:
判断所述硬盘阵列中的处于启动状态的所述硬盘的已启动时间是否到达启动时长;以及Determining whether the started time of the hard disk in the activated state in the hard disk array reaches a startup time;
在所述处于启动状态的硬盘的已启动时间到达启动时长时,确定所述硬盘启动完成。When the boot time of the hard disk in the startup state reaches the startup time, it is determined that the hard disk startup is completed.
可选地,所述判断所述硬盘阵列中的处于启动状态的硬盘的已启动时间是否到达启动时长包括:Optionally, determining whether the started time of the hard disk in the activated state in the hard disk array reaches a startup time length includes:
获取所述硬盘的启动时刻及启动时长;以及Obtaining a startup time and a startup time of the hard disk;
根据所述硬盘对应的启动时长及已启动时间判断所述硬盘的已启动时间是否到达启动时长,其中,所述已启动时间为当前时刻及启动时刻的时间差值。Determining, according to the startup time and the started time of the hard disk, whether the started time of the hard disk reaches the startup time, wherein the started time is a time difference between the current time and the startup time.
可选地,所述获取所述硬盘的启动电流包括:Optionally, the acquiring the startup current of the hard disk includes:
读取所述硬盘的型号;以及Reading the model number of the hard disk;
根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。Obtaining an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
本公开还提供了一种硬盘阵列中的硬盘上电控制装置,所述硬盘阵列中的硬盘上电控制装置包括:The present disclosure further provides a hard disk power-on control device in a hard disk array, wherein the hard disk power-on control device in the hard disk array includes:
启动模块,设置为依次启动硬盘阵列的多个硬盘;The startup module is set to sequentially start multiple hard disks of the hard disk array;
获取模块,设置为在启动每个硬盘之前均获取所述硬盘的启动电流;以及Obtaining a module, configured to acquire a starting current of the hard disk before starting each hard disk;
判断模块,设置为判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,其中,根据所述多个硬盘的运行状态更
新所述当前电流;a determining module, configured to determine whether a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array, wherein, according to an operating state of the multiple hard disks
New current current;
其中,所述启动模块,还设置为在所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。The startup module is further configured to start the hard disk when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
可选地,所述判断模块,还设置为在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流;以及在所述硬盘启动完成时,对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流。Optionally, the determining module is further configured to: after starting the hard disk, increase a starting current of the hard disk to a current of the hard disk array; and when the hard disk is booted, to the hard disk array The current current subtracts the starting current of the hard disk and increases the operating current of the hard disk.
可选地,所述判断模块包括:Optionally, the determining module includes:
判断单元,设置为判断所述硬盘阵列中的处于启动状态的所述硬盘的已启动时间是否到达启动时长;以及a determining unit, configured to determine whether the started time of the hard disk in the activated state in the hard disk array reaches a startup time;
确定单元,设置为在所述处于启动状态的硬盘的已启动时间到达启动时长时,确定所述硬盘启动完成。The determining unit is configured to determine that the hard disk startup is completed when the boot time of the hard disk in the startup state reaches the startup time.
可选地,所述判断单元包括:Optionally, the determining unit includes:
获取子单元,设置为获取所述硬盘的启动时刻及启动时长;以及Obtaining a subunit, configured to obtain a startup time and a startup time of the hard disk;
判断子单元,设置为根据所述硬盘的启动时长及已启动时间判断所述硬盘的已启动时间是否到达启动时长,其中,所述已启动时间为当前时刻及启动时刻的时间差值。The determining subunit is configured to determine whether the started time of the hard disk reaches the startup time according to the startup time and the started time of the hard disk, wherein the started time is a time difference between the current time and the startup time.
可选地,所述获取模块包括:Optionally, the obtaining module includes:
读取单元,设置为读取所述硬盘的型号;以及a reading unit configured to read a model of the hard disk;
获取单元,设置为根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。The obtaining unit is configured to obtain an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
本公开还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述方法。The present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the above method.
本公开还提供了一种电子设备,该设备包括:The present disclosure also provides an electronic device, the device comprising:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述的方法。
The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
本公开在对硬盘阵列中的硬盘进行上电时,而无需通过电流的检测模块获取,从而节省了硬件成本,可以解决硬盘阵列中的所有硬盘同时上电时,造成电源输出过流、被关断等异常情况的问题,降低了系统最大功耗,减少了对电源的冲击。The present invention saves the hardware cost when the hard disk in the hard disk array is powered on, and does not need to be obtained by the current detecting module, thereby solving the problem that the power output is over-current and shut down when all the hard disks in the hard disk array are powered on at the same time. The problem of abnormal conditions such as breaking the system reduces the maximum power consumption of the system and reduces the impact on the power supply.
图1为本公开硬盘阵列中的硬盘上电控制方法的第一实施例的流程示意图;1 is a schematic flow chart of a first embodiment of a method for controlling power-on of a hard disk in a hard disk array according to the present disclosure;
图2为本公开实施例中硬盘阵列硬盘型号的示意图;2 is a schematic diagram of a hard disk array hard disk model in an embodiment of the present disclosure;
图3为图1中根据多个硬盘的运行状态更新所述当前电流的细化流程示意图;3 is a schematic diagram of a refinement process of updating the current current according to an operating state of a plurality of hard disks in FIG. 1;
图4为图3中确定所述硬盘启动完成的细化流程示意图;4 is a schematic diagram of a refinement process for determining completion of the hard disk in FIG. 3;
图5为图4中判断所述硬盘的已启动时间是否到达启动时长的细化流程示意图;FIG. 5 is a schematic diagram showing the refinement process of determining whether the boot time of the hard disk reaches the startup time in FIG. 4;
图6为图1中获取所述硬盘的启动电流的细化流程示意图;6 is a schematic diagram showing a refinement process of acquiring a starting current of the hard disk in FIG. 1;
图7为本公开硬盘阵列中的硬盘上电控制装置的第一实施例的功能模块示意图;7 is a schematic diagram of functional modules of a first embodiment of a hard disk power-on control device in the hard disk array of the present disclosure;
图8为图7中判断模块的细化功能模块示意图;8 is a schematic diagram of a refinement function module of the judging module in FIG. 7;
图9为图7中获取模块的细化功能模块示意图;以及9 is a schematic diagram of a refinement function module of the acquisition module in FIG. 7;
图10为本公开实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
以下参照附图对实施例进行说明,在不冲突的情况下,实施例和实施例中的特征可以相互任意组合。The embodiments are described below with reference to the accompanying drawings, and the features of the embodiments and the embodiments may be arbitrarily combined with each other without conflict.
本公开实施例中,依次启动硬盘阵列的多个硬盘;在启动每个硬盘之前均获取所述硬盘的启动电流,并判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,其中,根据所述多个硬盘的运行状态更新所述当前电流;以及在所述启动电流与所述硬盘阵列当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。
In the embodiment of the present disclosure, the plurality of hard disks of the hard disk array are sequentially activated; the startup current of the hard disk is obtained before each hard disk is started, and it is determined whether the sum of the startup current and the current current of the hard disk array is less than or equal to a current rating of the hard disk array, wherein the current current is updated according to an operating state of the plurality of hard disks; and a sum of the starting current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array When the hard disk is booted.
参照图1,图1为本公开硬盘阵列中的硬盘上电控制方法的第一实施例的流程示意图。Referring to FIG. 1, FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for controlling power-on of a hard disk in a hard disk array according to the present disclosure.
在步骤110中,依次启动硬盘阵列的多个硬盘。In step 110, multiple hard disks of the hard disk array are sequentially started.
所述硬盘阵列由多个硬盘组成,所述硬盘阵列中的硬盘可以为相同的型号的硬盘,也可以为不同的型号的硬盘。在本实施例中,所述硬盘阵列以由4个硬盘组成为例。参照图2,4个硬盘分别是一个型号为seagate2000的硬盘,两个型号为WD250的硬盘,一个型号为hitachi500的硬盘。所述硬盘阵列的额定电流为10A,4个硬盘的工作参数如下表所述:The hard disk array is composed of a plurality of hard disks, and the hard disks in the hard disk array may be the same type of hard disks or different types of hard disks. In this embodiment, the hard disk array is exemplified by four hard disks. Referring to FIG. 2, the four hard disks are a hard disk of type seagate2000, two hard disks of type WD250, and one hard disk of type hitachi500. The rated current of the hard disk array is 10A, and the working parameters of the four hard disks are as follows:
硬盘型号Hard disk model | 启动电流Starting current | 启动时长Startup time | 工作电流Working current |
WD250WD250 | 2A2A | 4s4s | 1A1A |
hitachi500Hitachi500 | 4A4A | 7s7s | 2A2A |
seagate2000Seagate2000 | 7A7A | 10s10s | 3A3A |
可以理解的是,所述硬盘阵列也可以由2个、3个、5个、6个、7个等硬盘组成,硬盘个数可以根据实际需要确定。所述硬盘型号可以为上述型号,也可以为除上述型号之外的其它型号。在对硬盘阵列的硬盘进行上电时,先判断硬盘阵列中是否存在未启动的硬盘,在判定所述硬盘阵列中存在硬盘未启动后,则按照硬盘在硬盘阵列中的顺序依次启动多个硬盘。以上述硬盘阵列为例,在该硬盘阵列中,多个硬盘的启动顺序分别为型号为seagate2000的硬盘第一个启动、第一个型号为WD250的硬盘第二个启动、第二个型号为WD250的硬盘第三个启动、型号为hitachi500的硬盘第四个启动,当对该硬盘阵列的硬盘进行上电时,按照上述顺序依次启动硬盘。It can be understood that the hard disk array can also be composed of two, three, five, six, seven, and the like, and the number of hard disks can be determined according to actual needs. The hard disk model may be the above model or other models than the above models. When powering on the hard disk of the hard disk array, first determine whether there is an unstarted hard disk in the hard disk array. After determining that the hard disk is not started in the hard disk array, start the multiple hard disks in the order of the hard disk in the hard disk array. . Taking the above hard disk array as an example, in the hard disk array, the boot order of the plurality of hard disks is the first boot of the hard disk model seagate2000, the second hard disk of the first model WD250, and the second model is WD250. The third boot of the hard disk is the fourth boot of the hard disk of the hitachi 500. When the hard disk of the hard disk array is powered on, the hard disk is sequentially started in the above order.
在步骤120中,在启动每个硬盘之前均获取所述硬盘的启动电流,并判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,其中,根据多个硬盘的运行状态更新所述当前电流。In step 120, the startup current of the hard disk is obtained before starting each hard disk, and it is determined whether the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, where The current current is updated according to the operating states of the plurality of hard disks.
在对硬盘阵列的硬盘进行上电时,首先对型号为seagate2000的硬盘进行启动,在启动该硬盘前获取所述硬盘的启动电流。所述启动电流可以通过查表获得,在硬盘阵列的系统中,存在以硬盘型号为索引的启动时长、启动电流和工作电流的表。从该表中可以获知所述硬盘的启动电流为7A。在获得所述硬盘的启动电流后,判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等
于所述硬盘阵列的额定电流。由于所述型号为seagate2000的硬盘是所述硬盘阵列的第一个启动的硬盘,故所述硬盘阵列在所述型号为seagate2000的硬盘还未启动之前的当前电流为0A。然而,所述硬盘阵列的当前电流不是固定不变的,所述硬盘阵列的当前电流是根据多个硬盘的运行状态进行更新的,当有硬盘启动后,就对所述当前电流进行更新。当有硬盘启动完成时,也对所述当前电流进行更新,即当系统检测到有硬盘启动或有硬盘启动完成,就会触发一个当前电流更新命令,然后根据该命令对所述当前电流进行一次更新。When powering on the hard disk of the hard disk array, first start the hard disk of the model seagate2000, and obtain the starting current of the hard disk before starting the hard disk. The starting current can be obtained by looking up a table. In the system of the hard disk array, there is a table of starting time, starting current and working current indexed by the hard disk model. It can be known from the table that the starting current of the hard disk is 7A. After obtaining the startup current of the hard disk, determining whether the sum of the startup current and the current current of the hard disk array is less than or equal to
The rated current of the hard disk array. Since the hard disk of the model seagate2000 is the first boot hard disk of the hard disk array, the current current of the hard disk array before the hard disk of the model seagate2000 has not been started is 0A. However, the current current of the hard disk array is not fixed, and the current current of the hard disk array is updated according to the operating state of the multiple hard disks, and the current current is updated when the hard disk is started. When the hard disk startup is completed, the current current is also updated, that is, when the system detects that a hard disk is started or a hard disk is started, a current current update command is triggered, and then the current current is once performed according to the command. Update.
在步骤130中,在所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。In step 130, the hard disk is started when the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array.
当确定所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。例如,当启动第一个硬盘前,所述启动电流与硬盘阵列的当前电流之和为7A+0A,即7A,该电流值小于所述硬盘阵列的额定电流值10A,启动所述硬盘,并设置该硬盘为已启动。在启动该硬盘后,对所述当前电流进行一次更新,然后重复执行步骤110至步骤130,直到硬盘阵列中的所有硬盘都已启动,则硬盘上电结束。在对硬盘阵列的硬盘上电过程中,若在启动硬盘前,判定出所述启动电流与所述硬盘阵列的当前电流之和大于所述硬盘阵列的额定电流,则等待一段时间,直到判定所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,才启动该硬盘,并设置该硬盘为已启动。在等待的时间内,可以实时或定时判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,也可以在每次更新所述硬盘阵列的当前电流之后,才判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,当判断出所述电流之和小于或等于所述额定电流时,立即启动该硬盘,并设置该硬盘为已启动。The hard disk is activated when it is determined that the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array. For example, before the first hard disk is started, the sum of the starting current and the current current of the hard disk array is 7A+0A, that is, 7A, and the current value is less than the rated current value of the hard disk array by 10A, and the hard disk is started, and Set the hard drive to be started. After the hard disk is started, the current current is updated once, and then steps 110 to 130 are repeated until all the hard disks in the hard disk array are started, and the hard disk is powered on. During power-on operation of the hard disk array, if it is determined that the sum of the startup current and the current current of the hard disk array is greater than the rated current of the hard disk array before starting the hard disk, wait for a period of time until the determination is performed. The hard disk is started when the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, and the hard disk is set to be activated. During the waiting time, it may be determined in real time or periodically whether the sum of the starting current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, and may also update the current current of the hard disk array each time. After determining whether the sum of the starting current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, when it is determined that the sum of the currents is less than or equal to the rated current, immediately start the Hard drive and set the hard drive to be started.
本实施例在对硬盘阵列中的硬盘进行上电时,根据硬盘阵列的硬盘的运行状态更新所述硬盘阵列的当前电流,而无需通过电流的检测模块获取,从而节省了硬件成本,同时通过依次启动硬盘阵列的多个硬盘,并在启动每个硬盘之前判断硬盘的启动电流及硬盘阵列的当前电流之和是否小于或等于硬盘阵列的所述硬盘阵列的额定电流,在所述启动电流与所述硬盘阵列当前电流之和小于或等于所述硬盘阵列的额定电流时,才启动所述硬盘,可以解决硬盘阵列中的所
有硬盘同时上电时,造成电源输出过流、被关断等异常情况的问题,降低了系统最大功耗,减少了对电源的冲击。In the embodiment, when the hard disk in the hard disk array is powered on, the current current of the hard disk array is updated according to the running state of the hard disk array of the hard disk array, and the current detecting module is not required to be acquired, thereby saving hardware cost and simultaneously Starting a plurality of hard disks of the hard disk array, and determining whether a sum of a boot current of the hard disk and a current current of the hard disk array is less than or equal to a rated current of the hard disk array of the hard disk array before starting each hard disk, where the starting current and the current are The hard disk array is activated when the sum of current currents of the hard disk array is less than or equal to the rated current of the hard disk array, and the hard disk array can be solved.
When the hard disk is powered on at the same time, the power output is over-current, shut down, and other abnormal conditions, which reduces the maximum power consumption of the system and reduces the impact on the power supply.
在第一实施例的基础上,本公开提出硬盘阵列中的硬盘上电控制方法第二实施例。在本实施例中,参照图3,所述根据多个硬盘的运行状态更新所述当前电流包括步骤310至步骤320。Based on the first embodiment, the present disclosure proposes a second embodiment of a hard disk power-on control method in a hard disk array. In this embodiment, referring to FIG. 3, the updating the current current according to the operating states of the plurality of hard disks includes steps 310 to 320.
在步骤310中,在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流。In step 310, after the hard disk is booted, the current of the hard disk array is increased by the current of the hard disk array.
硬盘的运行状态包括启动状态及启动完成状态,当所述硬盘阵列中的每个硬盘启动后,都对所述硬盘阵列的当前电流更新一次,更新过程为:对硬盘阵列的当前电流增加所述硬盘的启动电流,即所述当前电流等于上一次的当前电流与所述硬盘的启动电流之和。The operating state of the hard disk includes a startup state and a startup completion state. When each hard disk in the hard disk array is started, the current current of the hard disk array is updated once. The update process is: increasing the current current of the hard disk array. The starting current of the hard disk, that is, the current current is equal to the sum of the current current of the previous time and the starting current of the hard disk.
在步骤320中,在所述硬盘启动完成时,对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流。In step 320, when the hard disk startup is completed, the current of the hard disk array is subtracted from the current of the hard disk and the operating current of the hard disk is increased.
当所述硬盘阵列的每个硬盘启动完成时,也要对所述硬盘阵列的当前电流更新一次,更新过程为:对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流,即所述当前电流等于上一次的当前电流减去所述硬盘的启动电流再加上所述硬盘的工作电流。参照图4,所述确定所述硬盘是否启动完成包括步骤410至步骤420。When the booting of each hard disk of the hard disk array is completed, the current current of the hard disk array is also updated once, and the updating process is: subtracting the starting current of the hard disk from the current current of the hard disk array and adding the The operating current of the hard disk, that is, the current current is equal to the current current of the previous time minus the starting current of the hard disk plus the operating current of the hard disk. Referring to FIG. 4, the determining whether the hard disk is booted or not includes steps 410 to 420.
在步骤410中,判断所述硬盘阵列中的处于启动状态的所述硬盘的已启动时间是否到达启动时长。In step 410, it is determined whether the started time of the hard disk in the activated state in the hard disk array reaches the startup time.
所述硬盘阵列中的处于启动状态的所述硬盘在启动后,实时或定时判断是否到达所述硬盘的启动时长。参照图5,所述判断所述硬盘阵列中的处于启动状态的硬盘的已启动时间是否到达所述硬盘的启动时长包括步骤510和步骤520。After the booting, the hard disk in the bootable state of the hard disk array determines whether the booting time of the hard disk is reached in real time or timing. Referring to FIG. 5, the determining whether the boot time of the hard disk in the boot state in the hard disk array reaches the boot time of the hard disk includes steps 510 and 520.
在步骤510中,获取所述硬盘的启动时刻及启动时长。In step 510, the startup time and the startup time of the hard disk are obtained.
在步骤520中,根据所述硬盘对应的启动时长及已启动时间判断所述硬盘的已启动时间是否到达启动时长,其中,所述已启动时间为当前时刻及启动时刻的时间差值。In step 520, it is determined whether the started time of the hard disk reaches the startup time according to the startup time and the started time corresponding to the hard disk, wherein the started time is a time difference between the current time and the startup time.
在所述硬盘启动后,记录所述硬盘的启动时刻及启动时长,同时通过一个
定时器或计数器记录所述硬盘的已启动时间。在判断所述硬盘的已启动时间是否达到启动时长的过程中,就可以获取该记录的所述硬盘的启动时刻及启动时长,并根据所述硬盘的启动时长及已启动时间判断所述硬盘的已启动时间是否到达启动时长。当所述已启动时间大于或等于所述启动时长时,确定所述硬盘的已启动时间到达启动时长;当所述已启动时间小于所述启动时长,确定所述硬盘的已启动时间未到达启动时长。所述已启动时间为定时器或计数器记录的时间,该时间值为当前时刻及启动时刻的时间差值。After the hard disk is started, record the startup time and startup time of the hard disk, and pass a
A timer or counter records the started time of the hard disk. In the process of determining whether the boot time of the hard disk reaches the startup time, the startup time and the startup time of the recorded hard disk may be obtained, and determining the hard disk according to the startup time and the startup time of the hard disk. Whether the started time has reached the startup time. Determining that the started time of the hard disk reaches a startup time when the started time is greater than or equal to the startup time; determining that the started time of the hard disk does not reach the startup when the started time is less than the startup time duration. The started time is a time recorded by a timer or a counter, and the time value is a time difference between the current time and the start time.
在步骤420中,在所述处于启动状态的硬盘的已启动时间到达启动时长时,确定所述硬盘启动完成。In step 420, when the boot time of the hard disk in the boot state reaches the boot time, it is determined that the hard disk boot is completed.
当判定所述处于启动状态的硬盘的已启动时间到达启动时长时,确定所述硬盘启动完成。可以在设置定时器或计数器的值达到设置的已启动时间时,触发一个启动完成命令,系统在接收到该启动完成命令后,确定所述硬盘启动完成,若系统没接收到启动完成命令,则表示所述硬盘还处于启动状态,没有启动完成。When it is determined that the started time of the hard disk in the startup state reaches the startup time, it is determined that the hard disk startup is completed. When the set timer or counter value reaches the set startup time, a startup completion command is triggered, and after receiving the startup completion command, the system determines that the hard disk startup is completed, and if the system does not receive the startup completion command, Indicates that the hard disk is still in the startup state, and no startup is completed.
本实施例在对硬盘阵列的当前电流更新时,通过在硬盘启动后及硬盘启动完成时才对所述硬盘阵列的当前电流进行更新,而不必实时或定时更新所述当前电流,使得对所述当前电流的更新十分简单,不繁琐。In this embodiment, when the current current of the hard disk array is updated, the current current of the hard disk array is updated after the hard disk is started and the hard disk startup is completed, and the current current is not updated in real time or periodically, so that the current is The current current update is very simple and not cumbersome.
基于上述任一实施例,本公开提出了硬盘阵列中的硬盘上电控制方法第三实施例,在本实施例中,参照图6,所述获取所述硬盘的启动电流包括步骤610至步骤620。Based on any of the above embodiments, the present disclosure provides a third embodiment of the method for controlling the power-on of the hard disk in the hard disk array. In this embodiment, referring to FIG. 6 , the acquiring the starting current of the hard disk includes steps 610 to 620 . .
在步骤610中,读取所述硬盘的型号。In step 610, the model number of the hard disk is read.
在步骤620中,根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。In step 620, an operating parameter of the hard disk is obtained according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
在启动每个硬盘之前,读取所述硬盘的型号。所述硬盘的型号可以为seagate2000、WD250、hitachi500等。在读取到所述硬盘的型号后,根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。例如,当读取到所述硬盘的型号为seagate2000,则以该型号为索引,查找到一个以硬盘型号为主键的启动时长、启动电流和工作电流的表,根据该表就能获取所述硬盘的工作参数。当读取到所述硬盘型号为WD250时,同样以该型号为索引,查找到一个以硬盘型号为主键的启动时长、启动电流和工作电
流的表,根据该表就能获取所述硬盘的工作参数。Read the model number of the hard disk before starting each hard disk. The model of the hard disk may be seagate2000, WD250, hitachi500, and the like. After the model of the hard disk is read, the working parameters of the hard disk are obtained according to the model, wherein the working parameters include a starting current, an operating current, and a startup time. For example, when the model of the hard disk is seagate2000, the model is indexed, and a table of starting time, starting current and working current with the hard disk model as the main key is found, and the hard disk can be obtained according to the table. Working parameters. When the hard disk model is read as WD250, the model is also indexed to find a boot time, starting current and working power with the hard disk model as the main key.
A table of flows from which the operating parameters of the hard disk can be obtained.
本实施例根据硬盘的型号获取硬盘的工作参数,从而为计算所述硬盘阵列的当前电流提供了依据。In this embodiment, the working parameters of the hard disk are obtained according to the model of the hard disk, thereby providing a basis for calculating the current current of the hard disk array.
上述实施例的硬盘阵列中的硬盘上电控制方法的执行主体均可以为终端。可选地,该硬盘阵列中的硬盘上电控制方法可以由安装在终端上的客户端控制程序实现,其中,该终端为硬盘阵列。The execution body of the hard disk power-on control method in the hard disk array of the foregoing embodiment may be a terminal. Optionally, the hard disk power-on control method in the hard disk array may be implemented by a client control program installed on the terminal, where the terminal is a hard disk array.
本公开还提供一种硬盘阵列中的硬盘上电控制装置。The present disclosure also provides a hard disk power-on control device in a hard disk array.
参照图7,图7为本公开硬盘阵列中的硬盘上电控制装置的第一实施例的功能模块示意图。Referring to FIG. 7, FIG. 7 is a schematic diagram of functional modules of a first embodiment of a hard disk power-on control device in a hard disk array according to the present disclosure.
在本实施例中,所述硬盘阵列中的硬盘上电控制装置包括:启动模块10、获取模块20及判断模块30。In this embodiment, the hard disk power-on control device in the hard disk array includes: a startup module 10, an acquisition module 20, and a determination module 30.
所述启动模块10设置为依次启动硬盘阵列的多个硬盘。The startup module 10 is configured to sequentially activate a plurality of hard disks of the hard disk array.
所述硬盘阵列由多个硬盘组成,所述硬盘阵列中的硬盘可以为相同的型号的硬盘,也可以为不同的型号的硬盘。在本实施例中,所述硬盘阵列以由4个硬盘组成为例参照图2,4个硬盘分别是一个型号为seagate2000的硬盘,两个型号为WD250的硬盘,一个型号为hitachi500的硬盘。所述硬盘阵列的所述硬盘阵列的额定电流为10A,硬盘的工作参数如下表所述:The hard disk array is composed of a plurality of hard disks, and the hard disks in the hard disk array may be the same type of hard disks or different types of hard disks. In this embodiment, the hard disk array is composed of four hard disks as an example. Referring to FIG. 2, the four hard disks are a seagate 2000 hard disk, two models are WD250 hard disks, and one model is a hitachi 500 hard disk. The rated current of the hard disk array of the hard disk array is 10 A, and the working parameters of the hard disk are as follows:
硬盘型号Hard disk model | 启动电流Starting current | 启动时长Startup time | 工作电流Working current |
WD250WD250 | 2A2A | 4s4s | 1A1A |
hitachi500Hitachi500 | 4A4A | 7s7s | 2A2A |
seagate2000Seagate2000 | 7A7A | 10s10s | 3A3A |
所述硬盘阵列也可以由2个、3个、5个、6个、7个等硬盘组成,硬盘个数根据实际需要确定。所述硬盘型号可以为上述型号,也可以为除上述型号之外的其它型号。在对硬盘阵列的硬盘进行上电时,先判断硬盘阵列中是否存在未启动的硬盘,在判定所述硬盘阵列中存在硬盘未启动后,则所述启动模块10按照硬盘在硬盘阵列中的顺序依次启动多个硬盘。以上述硬盘阵列为例,在该硬盘阵列中,多个硬盘的启动顺序分别为型号为seagate2000的硬盘第一个启动、型号为WD250的硬盘第二个启动、型号为WD250的硬盘第三个启动、型号为
hitachi500的硬盘第四个启动,当对该硬盘阵列的硬盘进行上电时,所述启动模块10按照上述顺序依次启动多个硬盘。The hard disk array may also be composed of two, three, five, six, seven, and the like, and the number of hard disks is determined according to actual needs. The hard disk model may be the above model or other models than the above models. When the hard disk of the hard disk array is powered on, it is determined whether there is an unstarted hard disk in the hard disk array. After determining that the hard disk is not started in the hard disk array, the booting module 10 follows the order of the hard disk in the hard disk array. Start multiple hard disks in sequence. Taking the above hard disk array as an example, in the hard disk array, the boot order of the plurality of hard disks is the first boot of the hard disk of the model seagate2000, the second boot of the hard disk of the model WD250, and the third boot of the hard disk of the model WD250. Model number
The hit hard disk of the hitachi 500 is activated four times. When the hard disk of the hard disk array is powered on, the booting module 10 sequentially starts a plurality of hard disks in the above-mentioned order.
所述启动模块10还设置为在所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。The startup module 10 is further configured to activate the hard disk when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
当确定所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,所述启动模块10启动所述硬盘。例如,当启动第一个硬盘前,所述启动电流与硬盘阵列的当前电流之和为7A+0A,即7A,该电流值小于所述硬盘阵列的额定电流值10A,启动所述硬盘,并设置该硬盘为已启动。在启动该硬盘后,对所述当前电流进行一次更新,然后重复执行启动过程,判断过程及判断过程,直到硬盘阵列中的所有硬盘都已启动,则硬盘上电结束。在对阵列的硬盘上电过程中,若在启动硬盘前,判定出所述启动电流与所述硬盘阵列的当前电流之和大于所述硬盘阵列的额定电流,则等待一段时间,直到判定所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,所述启动模块10才启动该硬盘,并设置该硬盘为已启动。在等待的时间内,可以实时或定时判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,也可以在每次更新所述硬盘阵列的当前电流之后,才判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,当判断出所述电流之和小于或等于所述额定电流时,所述启动模块10立即启动该硬盘,并设置该硬盘为已启动。The startup module 10 activates the hard disk when it is determined that the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array. For example, before the first hard disk is started, the sum of the starting current and the current current of the hard disk array is 7A+0A, that is, 7A, and the current value is less than the rated current value of the hard disk array by 10A, and the hard disk is started, and Set the hard drive to be started. After the hard disk is started, the current current is updated once, and then the startup process is repeated, and the process and the judgment process are determined until all the hard disks in the hard disk array are started, and the hard disk is powered on. During the power-on operation of the hard disk of the array, if it is determined that the sum of the startup current and the current current of the hard disk array is greater than the rated current of the hard disk array before starting the hard disk, waiting for a period of time until determining that the When the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, the startup module 10 starts the hard disk and sets the hard disk to be activated. During the waiting time, it may be determined in real time or periodically whether the sum of the starting current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, and may also update the current current of the hard disk array each time. After determining whether the sum of the starting current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array, when it is determined that the sum of the currents is less than or equal to the rated current, the starting Module 10 immediately starts the hard disk and sets the hard disk to be booted.
所述获取模块20设置为在启动每个硬盘之前均获取所述硬盘的启动电流。The obtaining module 20 is configured to acquire a starting current of the hard disk before starting each hard disk.
所述判断模块30设置为判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,其中,根据硬盘的运行状态更新所述当前电流。The determining module 30 is configured to determine whether the sum of the starting current and the current current of the hard disk array is less than or equal to a rated current of the hard disk array, wherein the current current is updated according to an operating state of the hard disk.
在对硬盘阵列的硬盘进行上电时,首先对型号为seagate2000的硬盘进行启动,所述获取模块20在启动该硬盘前获取所述硬盘的启动电流。所述启动电流可以通过查表获得,在硬盘阵列的系统中,存在以硬盘型号为索引的启动时长、启动电流和工作电流的表。从该表中可以获知所述硬盘的启动电流为7A。在获得所述硬盘的启动电流后,所述判断模块30判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流。由于所述型号为seagate2000的硬盘是所述硬盘阵列的第一个启动的硬盘,故所述硬盘阵列在所
述型号为seagate2000的硬盘还未启动之前的当前电流为0A。然而,所述硬盘阵列的当前电流不是固定不变的,所述硬盘阵列的当前电流是根据硬盘的运行状态进行更新的,当有硬盘启动后,就对所述当前电流进行更新;或者当有硬盘启动完成时,也对所述当前电流进行更新,即当系统检测到有硬盘启动或有硬盘启动完成,就会触发一个当前电流更新命令,然后根据该命令对所述当前电流进行一次更新。When the hard disk of the hard disk array is powered on, the hard disk of the seagate 2000 is first started, and the acquiring module 20 acquires the starting current of the hard disk before starting the hard disk. The starting current can be obtained by looking up a table. In the system of the hard disk array, there is a table of starting time, starting current and working current indexed by the hard disk model. It can be known from the table that the starting current of the hard disk is 7A. After obtaining the startup current of the hard disk, the determining module 30 determines whether the sum of the startup current and the current current of the hard disk array is less than or equal to the rated current of the hard disk array. Since the hard disk of the model seagate2000 is the first hard disk of the hard disk array, the hard disk array is in the
The current current of the hard disk model seagate2000 is 0A before it is started. However, the current current of the hard disk array is not fixed, and the current current of the hard disk array is updated according to the running state of the hard disk, and when the hard disk is started, the current current is updated; or when there is When the hard disk startup is completed, the current current is also updated, that is, when the system detects that a hard disk is started or a hard disk is started, a current current update command is triggered, and then the current current is updated according to the command.
可选地,所述判断模块30还设置为在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流;以及在所述硬盘启动完成时,对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流。Optionally, the determining module 30 is further configured to: after starting the hard disk, increase a starting current of the hard disk to a current current of the hard disk array; and when the hard disk startup is completed, to the hard disk array The current current subtracts the starting current of the hard disk and increases the operating current of the hard disk.
硬盘的运行状态包括启动状态及启动完成状态,当所述硬盘阵列中的每个硬盘启动后,所述判断模块30对所述硬盘阵列的当前电流更新一次,更新过程为:对硬盘阵列的当前电流增加所述硬盘的启动电流,即所述当前电流等于上一次的当前电流与所述硬盘的启动电流之和;当所述硬盘阵列的每个硬盘启动完成时,所述判断模块30也要对所述硬盘阵列的当前电流更新一次,更新过程为:对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流,即所述当前电流等于上一次的当前电流减去所述硬盘的启动电流再加上所述硬盘的工作电流。The operating state of the hard disk includes a startup state and a startup completion state. After each hard disk in the hard disk array is started, the determining module 30 updates the current current of the hard disk array once, and the update process is: current to the hard disk array. The current increases the starting current of the hard disk, that is, the current current is equal to the sum of the current current of the previous time and the starting current of the hard disk; when each hard disk of the hard disk array is booted, the determining module 30 also needs Updating the current current of the hard disk array by updating the current of the hard disk array by the current of the hard disk and increasing the operating current of the hard disk, that is, the current current is equal to the current current time. The current is subtracted from the starting current of the hard disk plus the operating current of the hard disk.
本实施例在对硬盘阵列中的硬盘进行上电时,根据硬盘阵列的硬盘的运行状态更新所述硬盘阵列的当前电流,而无需通过电流的检测模块获取,从而节省了硬件成本,同时通过依次启动硬盘阵列的硬盘,并在启动每个硬盘之前判断硬盘的启动电流及硬盘阵列的当前电流之和是否小于或等于硬盘阵列的所述硬盘阵列的额定电流,在所述启动电流与所述硬盘阵列当前电流之和小于或等于所述硬盘阵列的额定电流时,才启动所述硬盘,可以解决硬盘阵列中的所有硬盘同时上电时,造成电源输出过流、被关断等异常情况的问题,降低了系统最大功耗,减少了对电源的冲击。In the embodiment, when the hard disk in the hard disk array is powered on, the current current of the hard disk array is updated according to the running state of the hard disk array of the hard disk array, and the current detecting module is not required to be acquired, thereby saving hardware cost and simultaneously Activating a hard disk of the hard disk array, and determining whether a sum of a starting current of the hard disk and a current current of the hard disk array is less than or equal to a rated current of the hard disk array of the hard disk array before starting each hard disk, where the starting current and the hard disk are When the sum of the currents of the arrays is less than or equal to the rated current of the hard disk array, the hard disk is started, which may solve the problem that the power output is over-current, turned off, and the like when all the hard disks in the hard disk array are powered on at the same time. , reducing the maximum power consumption of the system and reducing the impact on the power supply.
基于硬盘阵列中的硬盘上电控制装置的第一实施例,本公开还提出了硬盘阵列中的硬盘上电控制装置的第二实施例,在本实施例中,参照图8,所述判断模块30包括:判断单元31及确定单元32,所述判断单元31包括获取子单元311及判断子单元312。Based on the first embodiment of the hard disk power-on control device in the hard disk array, the present disclosure further provides a second embodiment of the hard disk power-on control device in the hard disk array. In this embodiment, referring to FIG. 8, the determination module is The method 30 includes a judging unit 31 and a determining unit 32, and the judging unit 31 includes an obtaining subunit 311 and a judging subunit 312.
所述判断单元31设置为判断处于启动状态的所述硬盘的已启动时间是否到
达启动时长。The determining unit 31 is configured to determine whether the started time of the hard disk in the activated state is
Up to the start time.
所述硬盘在启动后,所述判断单元31实时或定时判断所述硬盘阵列中的处于启动状态的所述硬盘的已启动时间是否到达启动时长。在所述多个硬盘启动后,记录所述多个硬盘的启动时刻及启动时长,同时通过一个定时器或计数器记录所述硬盘的已启动时间。所述判断单元31在判断所述多个硬盘的已启动时间是否达到启动时长的过程中,所述获取子单元311就可以获取该记录的所述硬盘的启动时刻及已启动时长,然后所述判断子单元312根据所述硬盘对应的启动时长及已启动时间判断所述硬盘的已启动时间是否到达启动时长。当所述已启动时间大于或等于所述启动时长时,确定所述硬盘的已启动时间到达启动时长;当所述已启动时间小于所述启动时长,确定所述硬盘的已启动时间未到达启动时长。所述已启动时间为定时器或计数器记录的时间,该时间值为当前时刻及启动时刻的时间差值。After the hard disk is started, the determining unit 31 determines whether the started time of the hard disk in the activated state in the hard disk array reaches the startup time in real time or timing. After the plurality of hard disks are started, the startup time and the startup time of the plurality of hard disks are recorded, and the startup time of the hard disks is recorded by a timer or a counter. In the process of determining whether the started time of the plurality of hard disks reaches the startup time, the obtaining sub-unit 311 may acquire the started time and the started time of the recorded hard disk, and then the The determining sub-unit 312 determines whether the started time of the hard disk reaches the startup time according to the startup time and the started time corresponding to the hard disk. Determining that the started time of the hard disk reaches a startup time when the started time is greater than or equal to the startup time; determining that the started time of the hard disk does not reach the startup when the started time is less than the startup time duration. The started time is a time recorded by a timer or a counter, and the time value is a time difference between the current time and the start time.
所述确定单元32设置为在所述处于启动状态的硬盘的已启动时间到达启动时长时,确定所述硬盘启动完成。The determining unit 32 is configured to determine that the hard disk startup is completed when the boot time of the hard disk in the startup state reaches the startup time.
当判定有所述硬盘的已启动时间到达启动时长时,所述确定单元32确定所述硬盘启动完成。可以在设置定时器或计数器的值达到设置的已启动时间时,触发一个启动完成命令,系统在接收到该启动完成命令后,确定所述硬盘启动完成,若系统没接收到启动完成命令,则表示所述硬盘还处于启动状态,没有启动完成。When it is determined that the started time of the hard disk reaches the startup time, the determining unit 32 determines that the hard disk startup is completed. When the set timer or counter value reaches the set startup time, a startup completion command is triggered, and after receiving the startup completion command, the system determines that the hard disk startup is completed, and if the system does not receive the startup completion command, Indicates that the hard disk is still in the startup state, and no startup is completed.
本实施例在对硬盘阵列的当前电流更新时,通过在多个硬盘启动后及多个硬盘启动完成时才对所述硬盘阵列的当前电流进行更新,而不必实时或定时更新所述当前电流,使得对所述当前电流的更新十分简单,不繁琐。In this embodiment, when the current current of the hard disk array is updated, the current current of the hard disk array is updated after the multiple hard disks are started and when the multiple hard disks are booted, without updating the current current in real time or periodically. The update of the current current is very simple and not cumbersome.
基于硬盘阵列中的硬盘上电控制装置的第一实施例和/或第二实施例,本公开提出硬盘阵列中的硬盘上电控制装置第三实施例。在本实施例中,参照图9,所述获取模块20包括:读取单元21及获取单元22。Based on the first embodiment and/or the second embodiment of the hard disk power-on control device in the hard disk array, the present disclosure proposes a third embodiment of the hard disk power-on control device in the hard disk array. In this embodiment, referring to FIG. 9 , the acquiring module 20 includes: a reading unit 21 and an obtaining unit 22 .
所述读取单元21设置为读取所述硬盘的型号。The reading unit 21 is arranged to read the model number of the hard disk.
所述获取单元22设置为根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。The obtaining unit 22 is configured to acquire an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
在启动每个硬盘之前,所述读取单元21读取所述硬盘的型号。所述硬盘的
型号可以为seagate2000、WD250、hitachi500等。在读取到所述硬盘的型号后,所述获取单元22根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。例如,当读取到所述硬盘的型号为seagate2000,则以该型号为索引,查找到一个以硬盘型号为主键的启动时长、启动电流和工作电流的表,根据该表就能获取所述硬盘的工作参数。当读取到所述硬盘型号为WD250时,同样以该型号为索引,查找到一个以硬盘型号为主键的启动时长、启动电流和工作电流的表,根据该表就能获取所述硬盘的工作参数。The reading unit 21 reads the model number of the hard disk before starting each hard disk. The hard disk
Models can be seagate2000, WD250, hitachi500, etc. After the model of the hard disk is read, the acquiring unit 22 acquires the working parameters of the hard disk according to the model, wherein the working parameters include a starting current, an operating current, and a starting duration. For example, when the model of the hard disk is seagate2000, the model is indexed, and a table of starting time, starting current and working current with the hard disk model as the main key is found, and the hard disk can be obtained according to the table. Working parameters. When the hard disk model is read as WD250, the model is also indexed, and a table of starting time, starting current and working current with the hard disk model as the main key is found, and the working of the hard disk can be obtained according to the table. parameter.
本实施例在对硬盘阵列中的硬盘进行上电时,根据硬盘的型号获取硬盘的工作参数,从而为计算所述硬盘阵列的当前电流提供了依据,同时通过依次启动硬盘阵列的多个硬盘,并在启动每个硬盘之前判断硬盘的启动电流及硬盘阵列的当前电流之和是否小于或等于硬盘阵列的所述硬盘阵列的额定电流,在所述启动电流与所述硬盘阵列当前电流之和小于或等于所述硬盘阵列的额定电流时,才启动所述硬盘,可以解决硬盘阵列中的所有硬盘同时上电时,造成电源输出过流、被关断等异常情况的问题,降低了系统最大功耗,减少了对电源的冲击。在获取硬盘阵列的当前电流时,是根据硬盘的运行状态计算出所述当前电流的,而无需通过电流检测模块检测获得,从而节省了硬件成本。In this embodiment, when the hard disk in the hard disk array is powered on, the working parameters of the hard disk are obtained according to the model of the hard disk, thereby providing a basis for calculating the current current of the hard disk array, and simultaneously starting multiple hard disks of the hard disk array by using the hard disk array. And determining whether the sum of the boot current of the hard disk and the current current of the hard disk array is less than or equal to the rated current of the hard disk array of the hard disk array before starting each hard disk, and the sum of the starting current and the current current of the hard disk array is less than When the rated current of the hard disk array is equal to or equal to the rated current of the hard disk array, the hard disk is activated, which can solve the problem that the power output is over-current, turned off, and the like when all the hard disks in the hard disk array are powered on at the same time, thereby reducing the maximum power of the system. Consumption, reducing the impact on the power supply. When the current current of the hard disk array is obtained, the current current is calculated according to the operating state of the hard disk without being detected by the current detecting module, thereby saving hardware costs.
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,本公开的技术方案本质上可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括一个或多个指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本公开实施例所述的方法。The above-mentioned serial numbers of the embodiments of the present disclosure are merely for the description, and do not represent the advantages and disadvantages of the embodiments. Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the technical solution of the present disclosure can be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, optical disk), including one or more instructions. The method described in the embodiments of the present disclosure is performed such that a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.).
本公开实施例还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。Embodiments of the present disclosure also provide a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
本公开实施例还提供了一种电子设备的结构示意图。参见图10,该电子设备包括:The embodiment of the present disclosure further provides a schematic structural diagram of an electronic device. Referring to FIG. 10, the electronic device includes:
至少一个处理器(processor)40,图10中以一个处理器40为例;和存储器(memory)50,还可以包括通信接口(Communications Interface)60和总线70。其中,
处理器40、存储器50、通信接口60可以通过总线70完成相互间的通信。通信接口60可以用于信息传输。处理器40可以调用存储器50中的逻辑指令,以执行上述实施例的方法。At least one processor 40, which is exemplified by a processor 40 in FIG. 10; and a memory 50, may further include a communication interface 60 and a bus 70. among them,
The processor 40, the memory 50, and the communication interface 60 can complete communication with each other via the bus 70. Communication interface 60 can be used for information transfer. Processor 40 may invoke logic instructions in memory 50 to perform the methods of the above-described embodiments.
此外,上述的存储器50中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the logic instructions in the memory 50 described above may be implemented in the form of software functional units and sold or used as separate products, and may be stored in a computer readable storage medium.
存储器50作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序,如本公开实施例中的方法对应的程序指令/模块。处理器40通过运行存储在存储器50中的软件程序、指令以及模块,从而执行功能应用以及数据处理,即实现上述方法实施例中的硬盘阵列中的硬盘上电控制方法。The memory 50 is a computer readable storage medium and can be used to store software programs, computer executable programs, and program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 40 executes the function application and the data processing by running the software program, the instruction and the module stored in the memory 50, that is, the hard disk power-on control method in the hard disk array in the above method embodiment.
存储器50可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器50可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 50 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to usage of the terminal device, and the like. Further, the memory 50 may include a high speed random access memory, and may also include a nonvolatile memory.
本公开实施例的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例的所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。The technical solution of the embodiments of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method of the embodiments of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
本公开提供硬盘阵列中的硬盘上电控制方法及装置,在不增加硬件成本时,减少了硬盘阵列中的所有硬盘同时上电时,造成电源输出过流、被关断等异常情况,降低了硬件成本及系统最大功耗,减少了对电源模块的冲击。
The disclosure provides a hard disk power-on control method and device in a hard disk array, which reduces the abnormality of the power output over-current and the shutdown when all the hard disks in the hard disk array are powered on at the same time without increasing the hardware cost. The hardware cost and the maximum power consumption of the system reduce the impact on the power module.
Claims (11)
- 一种硬盘阵列中的硬盘上电控制方法,包括:依次启动硬盘阵列的多个硬盘;A hard disk power-on control method in a hard disk array, comprising: sequentially starting a plurality of hard disks of the hard disk array;在启动每个硬盘之前均获取所述硬盘的启动电流,并判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,其中,根据所述多个硬盘的运行状态更新所述当前电流;以及Obtaining a starting current of the hard disk before starting each hard disk, and determining whether a sum of the starting current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array, wherein, according to the multiple The operating state of the hard disk updates the current current;在所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。The hard disk is started when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
- 如权利要求1所述的硬盘阵列中的硬盘上电控制方法,其中,所述根据所述多个硬盘的运行状态更新所述当前电流包括:The hard disk power-on control method in the hard disk array of claim 1 , wherein the updating the current current according to an operating state of the plurality of hard disks comprises:在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流;以及After the hard disk is booted, increasing a current of the hard disk to a current of the hard disk array;在所述硬盘启动完成时,对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流。When the booting of the hard disk is completed, the current of the hard disk array is subtracted from the starting current of the hard disk and the operating current of the hard disk is increased.
- 如权利要求2所述的硬盘阵列中的硬盘上电控制方法,其中,在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流之后,所述根据所述多个硬盘的运行状态更新所述当前电流包括:The hard disk power-on control method in the hard disk array according to claim 2, wherein after the hard disk is started, after the current of the hard disk array is increased, the starting current of the hard disk is increased, The current status of the hard disk is updated to include the current current:判断所述硬盘阵列中的处于启动状态的硬盘的已启动时间是否到达启动时长;以及Determining whether the started time of the hard disk in the activated state in the hard disk array reaches the startup time;在所述处于启动状态的硬盘的已启动时间到达启动时长时,确定所述硬盘启动完成。When the boot time of the hard disk in the startup state reaches the startup time, it is determined that the hard disk startup is completed.
- 如权利要求3所述的硬盘阵列中的硬盘上电控制方法,其中,所述判断所述处于启动状态的硬盘的已启动时间是否到达启动时长包括:The method for controlling the power-on of the hard disk in the hard disk array of claim 3, wherein the determining whether the started time of the hard disk in the activated state reaches the startup time comprises:获取所述硬盘的启动时刻及启动时长;以及 Obtaining a startup time and a startup time of the hard disk;根据所述硬盘对应的启动时长及已启动时间判断所述硬盘的已启动时间是否到达启动时长,其中,所述已启动时间为当前时刻及启动时刻的时间差值。Determining, according to the startup time and the started time of the hard disk, whether the started time of the hard disk reaches the startup time, wherein the started time is a time difference between the current time and the startup time.
- 如权利要求1至4任一项所述的硬盘阵列中的硬盘上电控制方法,其中,所述获取所述硬盘的启动电流包括:The hard disk power-on control method in the hard disk array according to any one of claims 1 to 4, wherein the acquiring the startup current of the hard disk comprises:读取所述硬盘的型号;以及Reading the model number of the hard disk;根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。Obtaining an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
- 一种硬盘阵列中的硬盘上电控制装置,包括:A hard disk power-on control device in a hard disk array, comprising:启动模块,设置为依次启动硬盘阵列的多个硬盘;The startup module is set to sequentially start multiple hard disks of the hard disk array;获取模块,设置为在启动每个硬盘之前均获取所述硬盘的启动电流;以及判断模块,设置为判断所述启动电流与所述硬盘阵列的当前电流之和是否小于或等于所述硬盘阵列的额定电流,其中,根据所述多个硬盘的运行状态更新所述当前电流;Obtaining a module, configured to acquire a startup current of the hard disk before starting each hard disk; and determining a module, configured to determine whether a sum of the startup current and a current current of the hard disk array is less than or equal to the hard disk array a rated current, wherein the current current is updated according to an operating state of the plurality of hard disks;其中,所述启动模块,还设置为在所述启动电流与所述硬盘阵列的当前电流之和小于或等于所述硬盘阵列的额定电流时,启动所述硬盘。The startup module is further configured to start the hard disk when a sum of the startup current and a current current of the hard disk array is less than or equal to a rated current of the hard disk array.
- 如权利要求6所述的硬盘阵列中的硬盘上电控制装置,其中,所述判断模块,还设置为在启动所述硬盘后,对所述硬盘阵列的当前电流增加所述硬盘的启动电流;以及在所述硬盘启动完成时,对所述硬盘阵列的当前电流减去所述硬盘的启动电流并增加所述硬盘的工作电流。The hard disk power-on control device of the hard disk array of claim 6, wherein the determining module is further configured to increase a starting current of the hard disk to a current of the hard disk array after the hard disk is started; And when the booting of the hard disk is completed, the current of the hard disk array is subtracted from the starting current of the hard disk and the operating current of the hard disk is increased.
- 如权利要求7所述的硬盘阵列中的硬盘上电控制装置,其中,所述判断模块包括:The hard disk power-on control device of the hard disk array of claim 7, wherein the determining module comprises:判断单元,设置为判断所述硬盘阵列中的处于启动状态的硬盘的已启动时间是否到达启动时长;以及 a determining unit, configured to determine whether a boot time of the hard disk in the activated state in the hard disk array reaches a startup time;确定单元,设置为在所述处于启动状态的硬盘的已启动时间到达启动时长时,确定所述硬盘启动完成。The determining unit is configured to determine that the hard disk startup is completed when the boot time of the hard disk in the startup state reaches the startup time.
- 如权利要求8所述的硬盘阵列中的硬盘上电控制装置,其中,所述判断单元包括:The hard disk power-on control device in the hard disk array of claim 8, wherein the determining unit comprises:获取子单元,设置为获取所述硬盘的启动时刻及启动时长;以及Obtaining a subunit, configured to obtain a startup time and a startup time of the hard disk;判断子单元,设置为根据所述硬盘对应的启动时长及已启动时间判断所述硬盘的已启动时间是否到达启动时长,其中,所述已启动时间为当前时刻及启动时刻的时间差值。The determining subunit is configured to determine whether the started time of the hard disk reaches the startup time according to the startup time and the started time corresponding to the hard disk, wherein the started time is a time difference between the current time and the startup time.
- 如权利要求6至9任一项所述的硬盘阵列中的硬盘上电控制装置,其中,所述获取模块包括:The hard disk power-on control device in the hard disk array according to any one of claims 6 to 9, wherein the acquisition module comprises:读取单元,设置为读取所述硬盘的型号;以及a reading unit configured to read a model of the hard disk;获取单元,设置为根据所述型号获取所述硬盘的工作参数,其中,所述工作参数包括启动电流、工作电流及启动时长。The obtaining unit is configured to obtain an operating parameter of the hard disk according to the model, wherein the working parameter includes a starting current, an operating current, and a starting duration.
- 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-5中任一项的方法。 A non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of claims 1-5.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510646235.2 | 2015-09-30 | ||
CN201510646235.2A CN106557139A (en) | 2015-09-30 | 2015-09-30 | Hard disk electrification control method and device in hard disk array |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017054692A1 true WO2017054692A1 (en) | 2017-04-06 |
Family
ID=58417984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/100167 WO2017054692A1 (en) | 2015-09-30 | 2016-09-26 | Power-on controlling method and device for hard disk in hard disk array |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106557139A (en) |
WO (1) | WO2017054692A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110244830A (en) * | 2018-09-05 | 2019-09-17 | 浙江大华技术股份有限公司 | A kind of control circuit and its control method powered on for hard disk |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107422827A (en) * | 2017-07-28 | 2017-12-01 | 郑州云海信息技术有限公司 | A kind of method and system of hard disk overcurrent protection |
CN111090324B (en) * | 2019-11-08 | 2021-06-29 | 苏州浪潮智能科技有限公司 | A method, device and medium for staggered power-on of a server hard disk |
CN111352495B (en) * | 2020-02-29 | 2021-09-14 | 苏州浪潮智能科技有限公司 | Hard disk off-peak power-on control system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1627412A (en) * | 2003-12-13 | 2005-06-15 | 鸿富锦精密工业(深圳)有限公司 | Control circuit and method for starting up multiple hard disks with multiple backboards in sequence |
CN101000518A (en) * | 2006-01-13 | 2007-07-18 | 英业达股份有限公司 | A system that controls hard drives to boot sequentially |
US7370220B1 (en) * | 2003-12-26 | 2008-05-06 | Storage Technology Corporation | Method and apparatus for controlling power sequencing of a plurality of electrical/electronic devices |
CN102749981A (en) * | 2012-05-31 | 2012-10-24 | 华为技术有限公司 | Method and system for controlling hard disk electrification in hard disk array |
CN102778942A (en) * | 2012-06-29 | 2012-11-14 | 浪潮电子信息产业股份有限公司 | Design method for off-peak electrification of hard disk |
-
2015
- 2015-09-30 CN CN201510646235.2A patent/CN106557139A/en active Pending
-
2016
- 2016-09-26 WO PCT/CN2016/100167 patent/WO2017054692A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1627412A (en) * | 2003-12-13 | 2005-06-15 | 鸿富锦精密工业(深圳)有限公司 | Control circuit and method for starting up multiple hard disks with multiple backboards in sequence |
US7370220B1 (en) * | 2003-12-26 | 2008-05-06 | Storage Technology Corporation | Method and apparatus for controlling power sequencing of a plurality of electrical/electronic devices |
CN101000518A (en) * | 2006-01-13 | 2007-07-18 | 英业达股份有限公司 | A system that controls hard drives to boot sequentially |
CN102749981A (en) * | 2012-05-31 | 2012-10-24 | 华为技术有限公司 | Method and system for controlling hard disk electrification in hard disk array |
CN102778942A (en) * | 2012-06-29 | 2012-11-14 | 浪潮电子信息产业股份有限公司 | Design method for off-peak electrification of hard disk |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110244830A (en) * | 2018-09-05 | 2019-09-17 | 浙江大华技术股份有限公司 | A kind of control circuit and its control method powered on for hard disk |
CN110244830B (en) * | 2018-09-05 | 2022-06-07 | 浙江大华技术股份有限公司 | Control circuit for hard disk power-on and control method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN106557139A (en) | 2017-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9128729B1 (en) | System and method for automatically configuring bios performance profiles | |
US8543164B2 (en) | Sleep method, wake method and mobile terminal device | |
WO2017054692A1 (en) | Power-on controlling method and device for hard disk in hard disk array | |
CN103365667B (en) | A kind of method and apparatus of the installation operation system in host computer system | |
CN105404525A (en) | Method and apparatus for managing BIOS configuration in a computer system | |
CN1545654A (en) | Quick starting method for computer | |
CN115658113A (en) | Server self-starting method, device, readable storage medium and electronic equipment | |
US10013261B2 (en) | Techniques for managing or controlling computing devices | |
CN109067416B (en) | Method for realizing hot plug and start of SIM card and intelligent hardware | |
CN111142644A (en) | Hard disk operation control method and device and related components | |
CN111371610A (en) | A network card firmware batch refresh method, system, terminal and storage medium | |
CN106055440A (en) | Testing method and system for realizing abnormal power failure of server through BMC | |
CN109388552B (en) | Method, device and storage medium for determining duration of application startup | |
US20130047009A1 (en) | Computing device, storage medium and method for testing stability of server | |
CN110471800B (en) | Server and method for automatically overhauling substrate management controller | |
CN115514031B (en) | Charging control method, device, computer equipment and storage medium | |
CN108762790B (en) | Unmanned aerial vehicle battery restart processing method and device and storage medium | |
CN106060668B (en) | Intelligent television setting method and device | |
CN109780687B (en) | Air conditioner starting-up pre-blowing control method and system and air conditioner | |
CN111124786A (en) | Batch detection method, batch detection device and computer readable storage medium | |
US8954717B2 (en) | System capable of booting through a universal serial bus device and method thereof | |
US9218260B2 (en) | Host device and method for testing booting of servers | |
CN111142954A (en) | Startup control method and device and computer readable storage medium | |
CN111158769A (en) | Method and device for checking and modifying BIOS (basic input output System) options | |
CN114153507B (en) | Control method and device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16850316 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16850316 Country of ref document: EP Kind code of ref document: A1 |