[go: up one dir, main page]

CN116737072A - Hard disk control method and device, storage medium and electronic device - Google Patents

Hard disk control method and device, storage medium and electronic device Download PDF

Info

Publication number
CN116737072A
CN116737072A CN202310598213.8A CN202310598213A CN116737072A CN 116737072 A CN116737072 A CN 116737072A CN 202310598213 A CN202310598213 A CN 202310598213A CN 116737072 A CN116737072 A CN 116737072A
Authority
CN
China
Prior art keywords
hard disk
target
hard disks
hard
mounting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310598213.8A
Other languages
Chinese (zh)
Inventor
吴志豪
尹春辉
杨建军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202310598213.8A priority Critical patent/CN116737072A/en
Publication of CN116737072A publication Critical patent/CN116737072A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0683Plurality of storage devices
    • G06F3/0689Disk arrays, e.g. RAID, JBOD
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the application provides a hard disk control method, a device, a storage medium and an electronic device, wherein the method comprises the following steps: after the target device is powered on, starting a hard disk control application in the target device, wherein the hard disk control application is used for controlling the mounting of the hard disk in a target hard disk set in the target device; and mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the mounted hard disks in the target hard disk set are in a state allowing to be accessed. By the embodiment of the application, the technical problem of low efficiency of hard disk start control in the related technology is solved, and the effect of improving the efficiency of hard disk start control is achieved.

Description

Hard disk control method and device, storage medium and electronic device
Technical Field
The embodiment of the application relates to the technical field of storage equipment, in particular to a hard disk control method and device, a storage medium and an electronic device.
Background
At present, the storage device has wide application in various fields, for example, the storage device commonly used in the fields of security protection, traffic and the like can be used for storing a large amount of video data, and a certain number of hard disks are generally arranged in the storage device. Because a large amount of capacitive loads are arranged on the hard disk and the backboard, meanwhile, a large amount of power is required for starting the motor of the hard disk, large peak power consumption can be generated on 12V and 5V of the hard disk in the power-on stage, and the large-disk-position equipment of 3U and 4U above 8 or 16 disk positions needs to be considered to limit the power of the hard disk in the power-on stage so as to ensure that the power of the whole machine is in the allowable range of a power supply or an adapter of the whole machine, and the whole machine can be restarted when the total power exceeds the allowable range. From the whole device hard disk power-on starting process, the current peak values of the hard disks 12V and 5V have multiple stages along with different hard disk service requirements and software initialization processes, and the phenomenon of power supply overcurrent restarting of the storage device in the related technology usually occurs in the starting process. It can be seen that the efficiency of the hard disk start control in the related art is low.
Aiming at the technical problem of low efficiency of hard disk start control in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the application provides a hard disk control method, a device, a storage medium and an electronic device, which are used for at least solving the technical problem of low efficiency of hard disk starting control in the related technology.
According to an embodiment of the present application, there is provided a hard disk control method including: after the target equipment is powered on, starting a hard disk control application in the target equipment, wherein the hard disk control application is used for controlling the mounting of a hard disk in a target hard disk set in the target equipment; and mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the mounted hard disks in the target hard disk set are in a state allowing access.
In an exemplary embodiment, the mounting, by the hard disk control application, the hard disks in the target hard disk set in batches includes: and mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the peak power generated by mounting each batch of hard disks is smaller than the peak power threshold preset in the target equipment, and the target equipment is set to be restarted when the peak power generated in the target equipment is larger than or equal to the peak power threshold.
In an exemplary embodiment, the mounting, by the hard disk control application, the hard disks in the target hard disk set in batches includes: simultaneously starting to mount the ith batch of hard disks in the target hard disk set at the first moment; and simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set at a second moment, wherein i is a positive integer greater than or equal to 1, and the second moment is a moment determined by delaying a first preset duration from the first moment.
In an exemplary embodiment, the loading the (i+1) th batch of hard disks in the target hard disk set at the second moment is started simultaneously, including: executing a first delay program, wherein the first delay program is used for delaying the first preset time length, and the first preset time length is a time length determined according to the performance parameters of each hard disk in the (i+1) th batch of hard disks; and under the condition that the first delay program is executed, simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set.
In an exemplary embodiment, the mounting, by the hard disk control application, the hard disks in the target hard disk set in batches includes: simultaneously starting to mount the ith hard disk in the target hard disk set; and when the mounting of the ith hard disk is completed, simultaneously starting to mount the (i+1) th hard disk in the target hard disk set, wherein i is a positive integer greater than or equal to 1.
In an exemplary embodiment, the number of hard disks in the i-th batch of hard disks is the same as the number of hard disks in the i+1th batch of hard disks, or the number of hard disks in the i-th batch of hard disks and the number of hard disks in the i+1th batch of hard disks satisfy the following condition: and simultaneously mounting the ith hard disk or the (i+1) th hard disk, wherein the peak power generated by mounting the ith hard disk or the (i+1) th hard disk is smaller than a peak power threshold preset in the target equipment, and the target equipment is set to restart when the peak power generated in the target equipment is larger than or equal to the peak power threshold.
In an exemplary embodiment, before the hard disk control application is started in the target device, the method further includes: and after the target equipment is powered on, powering on the hard disks in the target hard disk set in batches.
In an exemplary embodiment, after the target device is powered on, powering on the hard disks in the target set of hard disks in batches includes: after the target equipment is powered on, controlling the hard disks in the target hard disk set not to be powered on; and when the system boot starting program is entered in the target equipment, starting to electrify the hard disks in the target hard disk set in batches.
According to another embodiment of the present application, there is also provided a hard disk control apparatus including: the system comprises a starting module, a control module and a control module, wherein the starting module is used for starting a hard disk control application in target equipment after the target equipment is powered on, and the hard disk control application is used for controlling the mounting of a hard disk in a target hard disk set in the target equipment; and the processing module is used for mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the mounted hard disks in the target hard disk set are in a state allowing to be accessed.
According to a further embodiment of the application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the application, after the target equipment is electrified, the hard disk control application is started in the target equipment, wherein the hard disk control application is used for controlling the mounting of the hard disks in the target hard disk set in the target equipment, the hard disks in the target hard disk set are mounted in batches through the hard disk control application, namely after the hard disk control application is started, the hard disks are mounted in batches or are mounted in batches through the hard disk control application, so that the aim of reducing the peak power when the hard disks are mounted can be fulfilled, the phenomenon that the target equipment is restarted due to power supply overcurrent in the starting process in the related art is avoided, the technical problem that the efficiency of the hard disk starting control in the related art is lower is solved, and the effect of improving the efficiency of the hard disk starting control is achieved.
Drawings
FIG. 1 is a block diagram of a hardware configuration of a mobile terminal of a hard disk control method according to an embodiment of the present application;
FIG. 2 is a flow chart of a hard disk control method according to an embodiment of the present application;
FIG. 3 is a topology of a storage device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a software boot process of a storage device according to an embodiment of the application;
FIG. 5 is a schematic diagram of a hard disk power control module according to an embodiment of the application;
FIG. 6 is a flowchart of a storage device power control method according to an embodiment of the application;
fig. 7 is a block diagram of a hard disk control device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the operation on a mobile terminal as an example, fig. 1 is a block diagram of a mobile terminal hardware structure of a hard disk control method according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a hard disk control method in an embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, a method for controlling a hard disk is provided, fig. 2 is a flowchart of a method for controlling a hard disk according to an embodiment of the present application, and as shown in fig. 2, the flowchart includes the following steps:
step S202, after a target device is powered on, starting a hard disk control application in the target device, wherein the hard disk control application is used for controlling the mounting of a hard disk in a target hard disk set in the target device;
and step S204, mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the mounted hard disks in the target hard disk set are in a state allowing to be accessed.
By the steps, after the target device is electrified, the hard disk control application is started in the target device, wherein the hard disk control application is used for controlling the mounting of the hard disks in the target hard disk set in the target device, the hard disks in the target hard disk set are mounted in batches through the hard disk control application, namely after the hard disk control application is started, the hard disks are mounted in batches or mounted in batches through the hard disk control application, so that the aim of reducing the peak power when the hard disks are mounted can be fulfilled, the phenomenon that the target device is restarted due to power supply overcurrent in the starting process in the prior art is avoided, the technical problem that the efficiency of the hard disk starting control in the prior art is low is solved, and the effect of improving the efficiency of the hard disk starting control is achieved.
The main execution body of the steps may be a processor, or a device side, or a controller, for example, a controller or a processor in a storage device, or an application control program in a device, or a processor configured on a storage device and having man-machine interaction capability, or a processing device or a processing unit having similar processing capability, but is not limited thereto.
In the above embodiment, taking the above target device as a storage device as an example, the storage device may include a certain number of hard disks, for example, 8 (or 16, or other numbers of hard disks), the overall shape of the storage device may be in a form of a chassis or a cabinet, after the target device is powered on, a hard disk control application is started in the target device, that is, after the power supply of the storage device is powered on, a hard disk control application is started in the storage device, and the hard disk control application may be application software for controlling the hard disk in the storage device to be mounted, or the hard disk control application is application software matched with the storage device, for managing the storage device and the hard disk in the storage device; after the hard disk control application is started, the hard disks in the target hard disk set may be mounted in batches by the hard disk control application, for example, the storage device includes a plurality of (e.g., 8, or 16, or other numbers of) hard disks, that is, the target hard disk set includes a plurality of (e.g., 8, or 16, or other numbers of) hard disks, the hard disk control application may mount the plurality of hard disks in batches, for example, the target hard disk set includes 8 hard disks, and may mount the hard disks in two batches, each batch mounts 4 hard disks, where the mounted hard disks will be allowed to be accessed. According to the method and the device for controlling the hard disk, after the hard disk control application is started in the target device, the hard disks in the target hard disk set are mounted in batches, so that the purpose of reducing the peak power during hard disk mounting can be achieved, the problem that all the hard disks can be mounted at one time in the starting process of the target device in the related art, and the peak power is easily caused by reading and writing a large amount of data, so that the phenomenon of restarting the power supply overcurrent is avoided. Therefore, the embodiment of the application can solve the technical problem of lower efficiency of the hard disk start control in the related technology, and can achieve the effect of improving the efficiency of the hard disk start control.
In an optional embodiment, the mounting, by the hard disk control application, the hard disks in the target hard disk set in batches includes: and mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the peak power generated by mounting each batch of hard disks is smaller than the peak power threshold preset in the target equipment, and the target equipment is set to be restarted when the peak power generated in the target equipment is larger than or equal to the peak power threshold. In this embodiment, when the batch mounting of the hard disks in the target hard disk set is performed, it may be controlled that the peak power generated by simultaneously mounting each batch of the hard disks is smaller than a preset peak power threshold, for example, the preset peak power threshold is 800W (or 1000W, or other power thresholds), for example, the target hard disk set includes 8 (or 16, or other numbers of) hard disks, and if the peak power possibly generated by simultaneously mounting 8 hard disks exceeds the preset peak power threshold, the hard disks may be mounted in batches, for example, 4 hard disks may be mounted in batches, and 4 hard disks may be mounted in batches, or 6 hard disks may be mounted in batches, and 2 hard disks may be mounted in batches; if the peak power generated by simultaneously mounting 6 hard disks exceeds the preset peak power threshold value, 4 schemes are adopted for mounting each batch. Alternatively, the mounting may be performed in more batches (e.g., 3 batches, or others). According to the method and the device for mounting the hard disks in batches, the purpose of mounting the hard disks in batches can be achieved, and the power generated by mounting each batch of hard disks is smaller than the preset peak power threshold, so that the problem of restarting caused by exceeding the peak power threshold can be avoided.
Alternatively, batch mounting may be performed by setting the number of hard disks mounted in each batch to be less than a preset number threshold, for example, the peak power generated by simultaneously mounting the number of hard disks with the preset number threshold is equal to the maximum peak power or the peak power threshold allowed by the target device, so that the peak power generated by each batch of mounting may be controlled not to exceed the maximum peak power whenever the number of hard disks mounted in each batch is less than the preset number threshold.
In an optional embodiment, the mounting, by the hard disk control application, the hard disks in the target hard disk set in batches includes: simultaneously starting to mount the ith batch of hard disks in the target hard disk set at the first moment; and simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set at a second moment, wherein i is a positive integer greater than or equal to 1, and the second moment is a moment determined by delaying a first preset duration from the first moment. In this embodiment, the mounting of the ith batch of hard disks in the target hard disk set may be started at the first time, and then the mounting of the (i+1) th batch of hard disks in the target hard disk set may be started at the second time, where the second time may be a time delayed by a first preset duration relative to the first time, for example, the first preset duration is 10 seconds (or 8 seconds, or other durations), and in practical application, the first preset duration may be set or adjusted according to performance parameters of the hard disks. In other words, the hard disk is mounted by time-sharing peak-shifting, so that the problem that the power generated during mounting is smaller than the preset peak power threshold value can be avoided.
In an optional embodiment, the loading the (i+1) th batch of hard disks in the target hard disk set is started at the same time at the second moment, including: executing a first delay program, wherein the first delay program is used for delaying the first preset time length, and the first preset time length is a time length determined according to the performance parameters of each hard disk in the (i+1) th batch of hard disks; and under the condition that the first delay program is executed, simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set. In this embodiment, when the mounting of the ith hard disk in the target hard disk set is started at the first moment, a first delay program may be executed, where the first delay program is used to delay a first preset duration, for example, the first preset duration is 15 seconds (or 10 seconds, or other durations), and in practical application, the first preset duration may be set or adjusted according to performance parameters of the hard disk; and under the condition that the first delay program is executed, loading the (i+1) th batch of hard disks in the target hard disk set at the same time. According to the embodiment, the ith batch of hard disks and the (i+1) th batch of hard disks are staggered for mounting by executing the first delay program.
In an optional embodiment, the mounting, by the hard disk control application, the hard disks in the target hard disk set in batches includes: simultaneously starting to mount the ith hard disk in the target hard disk set; and when the mounting of the ith hard disk is completed, simultaneously starting to mount the (i+1) th hard disk in the target hard disk set, wherein i is a positive integer greater than or equal to 1. In this embodiment, the mounting of the ith batch of hard disks in the target hard disk set may be started at the same time, and then when it is determined that the mounting of the ith batch of hard disks is completed, the mounting of the (i+1) th batch of hard disks in the target hard disk set may be started at the same time. For example, after the ith batch of hard disks are mounted, the (i+1) th batch of hard disks are mounted automatically, the time interval between the two batches is not limited, and the mounting efficiency of the whole target storage device can be further improved while the peak power generated when each batch of hard disks are mounted is ensured not to exceed a preset peak power threshold value.
In an alternative embodiment, the number of hard disks in the ith batch of hard disks is the same as the number of hard disks in the (i+1) th batch of hard disks, or the number of hard disks in the ith batch of hard disks and the number of hard disks in the (i+1) th batch of hard disks satisfy the following conditions: and simultaneously mounting the ith hard disk or the (i+1) th hard disk, wherein the peak power generated by mounting the ith hard disk or the (i+1) th hard disk is smaller than a peak power threshold preset in the target equipment, and the target equipment is set to restart when the peak power generated in the target equipment is larger than or equal to the peak power threshold. Optionally, during batch mounting, the number of hard disks in the ith batch of hard disks may be the same as or different from the number of hard disks in the (i+1) th batch of hard disks, and only the peak power generated during simultaneous mounting of each batch of hard disks is required to be smaller than a preset peak power threshold, so that the problem of restarting caused by exceeding the preset peak power threshold is avoided.
In an alternative embodiment, before starting the hard disk control application in the target device, the method further comprises: and after the target equipment is powered on, powering on the hard disks in the target hard disk set in batches. In this embodiment, before the hard disk control application is started in the target device, and after the target device is powered on, the hard disks in the target hard disk set are powered on in batches. Taking the example that the target device includes 8 hard disks, the target device may be powered on in two batches, for example, the first batch powers on 4 hard disks, and the second batch powers on 4 hard disks outside, where optionally, a second preset time period may be spaced between the first batch power-on and the second batch power-on, for example, the second preset time period is 15 seconds (or 10 seconds, or other time periods); alternatively, the first batch of hard disks can be automatically powered on after the first batch of hard disks are powered on. In this way, in the process of powering up and starting the whole target device (such as a storage device), the powering-up stage (or called an initialization stage) and the application software starting stage are both performed in batches, so that the problem that the peak power exceeds the maximum power allowed by the power supply can be effectively prevented, and the problem of restarting the power supply after overcurrent is avoided.
In an alternative embodiment, after the target device is powered on, powering on the hard disks in the target set of hard disks in batches includes: after the target equipment is powered on, controlling the hard disks in the target hard disk set not to be powered on; and when the system boot starting program is entered in the target equipment, starting to electrify the hard disks in the target hard disk set in batches. In this embodiment, after the target device is powered on, that is, after the target device is powered on, the hard disks in the target hard disk set may be controlled not to be powered on, and when a system boot start program (such as UBOOT or BIOS) is entered in the target device, the hard disks in the target hard disk set are powered on in batches. In practical applications, a control circuit (such as a MOS or EFUSE circuit) may be added to control powering up or powering down of each hard disk in the target hard disk set, for example, an EFUSE circuit is connected between the power supply and each hard disk, and an enable terminal of the EFUSE is controlled to control powering up or powering down of the corresponding hard disk.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the application. The present application will be specifically described with reference to examples.
Fig. 3 is a topology diagram of a storage device according to an embodiment of the present application, taking a topology diagram of an 8-bit storage device as an example in fig. 3, and a topology diagram of other (e.g., 16-bit, or other) storage devices and the like, the 8-bit storage device in fig. 3 includes a CPU, a storage expansion module (e.g., storage expansion modules 1-2 in fig. 3), a hard disk power control module, and a hard disk (e.g., hard disks 1-8 in fig. 3).
The working principle of each functional module is explained below.
(1) CPU: the CPU is a control core of the whole device, and generally the CPU does not support multiple SATA (Serial Advanced Technology Attachment, serial high technology configuration) interfaces, and can only extend multiple SATA interfaces through SATA or PCIE (Peripheral Component Interconnect Express, high speed serial computer expansion bus standard, abbreviated as PCI Express) expansion chips. FIG. 4 is a schematic diagram of a software start-up process of a storage device according to an embodiment of the present application, and the general CPU overall software start-up process includes the following steps:
s402, powering up the whole machine;
s404, after power-on, UBOOT is first entered (for x86 CPU, BIOS is first entered), i.e. a system boot startup procedure is entered;
s406, then, different operating systems (embedded CPU is generally linux, X86 is generally windows) are mounted, and a system kernel is started;
s408, the user logs in to the application software interface.
(2) And a storage expansion module: the CPU can expand a plurality of SATA interfaces such as 8, 16, 24 and … according to various topologies through the storage expansion chip. The main expansion chips in the market are all 4-5 downlink expansion ports, and the 8-disk device exemplified in the application needs two storage expansion modules (such as the storage expansion modules 1-2 in fig. 3) to realize. The CPU interacts with the storage expansion module through buses such as SATA/PCIE and the like to read and write information into the hard disk.
(3) Hard disk power supply control module: the device mainly refers to a control circuit, a hardware logic module and the like for supplying power (12V and 5V power sources) to a hard disk on a device main board or a SATA back board. The control source can be a CPU or an MCU, and is determined according to the specific power topology of the whole machine. The CPU can control the hard disk power supply control module through GPIO, I2C and the like. One of the most typical hard disk power control modules is shown in fig. 5, which is for 1 hard disk, with each hard disk interface having a corresponding control EFUSE (which may be referred to as an electronic switch, or an over-current protection switch). Or it is a conventional design to use a set of EFUSE for every 4 hard disks, depending on the actual power topology and cost requirements.
(4) The hard disk 12V and 5V power supplies in the whole software starting process are actually and dynamically monitored, and a plurality of power peaks are found.
When the whole machine is just electrified, the power of 12V reaches a peak value, the capacitive loads of the whole machine and the hard disk are larger at the moment, the motor of the hard disk just rotates and also needs the maximum power, and the software generally runs under the system kernel (SATA related drive can be loaded at the moment to perform actions such as SATA protocol handshake and disk recognition).
And when the software is just entered and the application phase is just run, the 12V power and the 5V power reach the other power peak value (the peak power of 5V is actually measured to exceed the power-on phase). At this time, the service needs mount all the hard disks again, and needs to mount all the hard disks as soon as possible to prevent video loss, so that all the hard disks are mounted at one time, and a large amount of data is read and written simultaneously, so that peak power occurs. For this stage, application software is required to mount the hard disk with a new policy without affecting the storage service, reducing peak power.
(5) For a typical 8-disk device, corresponding peak staggering measures are designed by combining peak power of different stages started by software after power-up, and fig. 6 is a flowchart of a power supply control method of a storage device according to an embodiment of the present application, where the flowchart includes:
s602, powering up the whole machine;
s604, after the whole machine is powered on, the hard disk is controlled by default to be not powered on, and UBOOT/BIOS is entered.
When running to UBOOT/BIOS, the power-on of the first 4 hard disks is controlled by the power control module, and the process is controlled by GPIO (General-purpose input/output port) hardware as shown in FIG. 5. And when the time delay is 15 seconds and the system kernel is started, 4 hard disks are controlled to be electrified.
S606, an operating system (such as linux or windows) is mounted, and a kernel is started. At this time, the 4 hard disks are powered on under the control of GPIO hardware.
At this time, the peak power of the hard disk power-on initialization stage can be staggered.
S608, when the application software is started, the software is divided into two groups (or batches) to mount the hard disks, the first 4 hard disks are firstly mounted, the last 4 hard disks are mounted after 10 seconds, and the measured 5V power peak value of the hard disk is reduced by more than 30%. The packet mounting interval can be evaluated according to the service requirement, and the influence on the stored service is smaller within 10 seconds.
It should be noted that, the interval of 15 seconds for batch power-up of the hard disk and the interval of 10 seconds for batch mounting of the hard disk in fig. 6 are only an example, and may be set or adjusted according to actual needs in practical applications.
The strategies such as time-sharing power-on of the hard disk, slow start control of the SATA power supply and the like in the related art generally only solve the problem of peak power of the hard disk when the whole machine is powered on, and the main consideration is that the power of the 12V power supply of the hard disk is not up to the peak value, and the design before usually ignores the problem. The embodiment of the application pays attention to the power supply condition of the hard disk power supply in the whole equipment starting process, and makes different strategies at different business software stages to make 12V and 5V power peak staggering, and the consideration is more complete, namely the hard disk power supply peak value is limited by multidimensional control from the complete power-on business starting process. The strategy also solves the problem of overcurrent restarting of the 5V power supply after the new high-capacity hard disk is connected in the current market feedback. The effect of improving the efficiency of the hard disk start control is achieved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to each embodiment of the present application.
In this embodiment, there is also provided a hard disk control device, fig. 7 is a block diagram of a hard disk control device according to an embodiment of the present application, and as shown in fig. 7, the device includes:
a starting module 702, configured to start a hard disk control application in a target device after the target device is powered on, where the hard disk control application is configured to control mounting of a hard disk in a target hard disk set in the target device;
and the processing module 704 is configured to mount, by using the hard disk control application in batches, the hard disks in the target hard disk set, where the mounted hard disks in the target hard disk set are in a state that allows access.
In an alternative embodiment, the processing module 704 includes: and the first processing unit is used for mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the peak power generated by simultaneously mounting each batch of hard disks is smaller than the peak power threshold preset in the target equipment, and the target equipment is set to be restarted when the peak power generated in the target equipment is larger than or equal to the peak power threshold.
In an alternative embodiment, the processing module 704 includes: the second processing unit is used for simultaneously starting to mount the ith hard disk in the target hard disk set at the first moment; and the third processing unit is used for simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set at a second moment, wherein i is a positive integer greater than or equal to 1, and the second moment is a moment determined by delaying a first preset duration from the first moment.
In an alternative embodiment, the third processing unit includes: an execution subunit, configured to execute a first delay program, where the first delay program is configured to delay the first preset duration, where the first preset duration is a duration determined according to a performance parameter of each hard disk in the i+1st batch of hard disks; and the processing subunit is used for simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set under the condition that the first delay program is executed.
In an alternative embodiment, the processing module 704 includes: the fourth processing unit is used for simultaneously starting to mount the ith hard disk in the target hard disk set; and the fifth processing unit is used for starting to mount the (i+1) th batch of hard disks in the target hard disk set at the same time when the mounting of the (i) th batch of hard disks is completed, wherein i is a positive integer greater than or equal to 1.
In an alternative embodiment, the number of hard disks in the ith batch of hard disks is the same as the number of hard disks in the (i+1) th batch of hard disks, or the number of hard disks in the ith batch of hard disks and the number of hard disks in the (i+1) th batch of hard disks satisfy the following conditions: and simultaneously mounting the ith hard disk or the (i+1) th hard disk, wherein the peak power generated by mounting the ith hard disk or the (i+1) th hard disk is smaller than a peak power threshold preset in the target equipment, and the target equipment is set to restart when the peak power generated in the target equipment is larger than or equal to the peak power threshold.
In an alternative embodiment, the apparatus further comprises: and the power-on module is used for powering on the hard disks in the target hard disk set in batches before the hard disk control application is started in the target equipment and after the target equipment is powered on.
In an alternative embodiment, the power-up module includes: the control unit is used for controlling the hard disks in the target hard disk set not to be electrified after the target equipment is electrified; and the power-on unit is used for starting to power on the hard disks in the target hard disk set in batches when the system boot startup program is entered in the target equipment.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, each of the above modules may be located in a different processor in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately manufactured as each integrated circuit module, or a plurality of modules or steps may be manufactured as a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.

Claims (11)

1. A hard disk control method, comprising:
after the target equipment is powered on, starting a hard disk control application in the target equipment, wherein the hard disk control application is used for controlling the mounting of a hard disk in a target hard disk set in the target equipment;
and mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the mounted hard disks in the target hard disk set are in a state allowing access.
2. The method of claim 1, wherein the mounting of the hard disks in the target set of hard disks by the hard disk control application in batches comprises:
and mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the peak power generated by mounting each batch of hard disks is smaller than the peak power threshold preset in the target equipment, and the target equipment is set to be restarted when the peak power generated in the target equipment is larger than or equal to the peak power threshold.
3. The method of claim 1, wherein the mounting of the hard disks in the target set of hard disks by the hard disk control application in batches comprises:
simultaneously starting to mount the ith batch of hard disks in the target hard disk set at the first moment;
and simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set at a second moment, wherein i is a positive integer greater than or equal to 1, and the second moment is a moment determined by delaying a first preset duration from the first moment.
4. The method of claim 3, wherein the simultaneously enabling mounting of the i+1st batch of hard disks in the target set of hard disks at the second time comprises:
executing a first delay program, wherein the first delay program is used for delaying the first preset time length, and the first preset time length is a time length determined according to the performance parameters of each hard disk in the (i+1) th batch of hard disks;
and under the condition that the first delay program is executed, simultaneously starting to mount the (i+1) th batch of hard disks in the target hard disk set.
5. The method of claim 1, wherein the mounting of the hard disks in the target set of hard disks by the hard disk control application in batches comprises:
simultaneously starting to mount the ith hard disk in the target hard disk set;
and when the mounting of the ith hard disk is completed, simultaneously starting to mount the (i+1) th hard disk in the target hard disk set, wherein i is a positive integer greater than or equal to 1.
6. The method according to claim 3 or 4, wherein the number of hard disks in the ith lot of hard disks is the same as the number of hard disks in the (i+1) th lot of hard disks, or the number of hard disks in the ith lot of hard disks and the number of hard disks in the (i+1) th lot of hard disks satisfy the following condition: and simultaneously mounting the ith hard disk or the (i+1) th hard disk, wherein the peak power generated by mounting the ith hard disk or the (i+1) th hard disk is smaller than a peak power threshold preset in the target equipment, and the target equipment is set to restart when the peak power generated in the target equipment is larger than or equal to the peak power threshold.
7. The method of any of claims 1 to 5, wherein prior to launching a hard disk control application in the target device, the method further comprises:
and after the target equipment is powered on, powering on the hard disks in the target hard disk set in batches.
8. The method of claim 7, wherein powering up the hard disks in the set of target hard disks in batches after powering up the target device comprises:
after the target equipment is powered on, controlling the hard disks in the target hard disk set not to be powered on;
and when the system boot starting program is entered in the target equipment, starting to electrify the hard disks in the target hard disk set in batches.
9. A hard disk control device, comprising:
the system comprises a starting module, a control module and a control module, wherein the starting module is used for starting a hard disk control application in target equipment after the target equipment is powered on, and the hard disk control application is used for controlling the mounting of a hard disk in a target hard disk set in the target equipment;
and the processing module is used for mounting the hard disks in the target hard disk set in batches through the hard disk control application, wherein the mounted hard disks in the target hard disk set are in a state allowing to be accessed.
10. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 8.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
CN202310598213.8A 2023-05-24 2023-05-24 Hard disk control method and device, storage medium and electronic device Pending CN116737072A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310598213.8A CN116737072A (en) 2023-05-24 2023-05-24 Hard disk control method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310598213.8A CN116737072A (en) 2023-05-24 2023-05-24 Hard disk control method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116737072A true CN116737072A (en) 2023-09-12

Family

ID=87900315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310598213.8A Pending CN116737072A (en) 2023-05-24 2023-05-24 Hard disk control method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116737072A (en)

Similar Documents

Publication Publication Date Title
US9710045B2 (en) Managing network wake-up commands
US10402207B2 (en) Virtual chassis management controller
US7137003B2 (en) Subscriber identity module verification during power management
JP5707321B2 (en) Sleep processor
US8386823B2 (en) Method and apparatus for cost and power efficient, scalable operating system independent services
US20030212857A1 (en) Adaptive startup policy for accelerating multi-disk array spin-up
US7051236B2 (en) Wirelessly network-connected, battery-powered information handling system featuring prevention of data corruption after wake-up by a network event
US7757094B2 (en) Power management for subscriber identity module
CN111142644A (en) Hard disk operation control method and device and related components
EP1835770B1 (en) Power management for subscriber identity module
US20220244772A1 (en) Power management method and device
EP3859538A1 (en) Data processing method and distributed storage system
CN104978233A (en) Method and device for dynamically using memory
US11894772B2 (en) Method for providing dynamic voltage regulator characteristic changes
CN114217942B (en) Power management in blade enclosure
CN104699647A (en) Method and system for operating a dual chipset network interface controller
US8612780B2 (en) Method and apparatus for modifying power management configuration of a computer to accommodate a packet processing latency policy associated with a pattern
CN115048270A (en) Fan performance real-time monitoring method, system, terminal and storage medium
CN116737072A (en) Hard disk control method and device, storage medium and electronic device
CN116641907A (en) Server fan control method, system, terminal and storage medium
JP6044225B2 (en) Blade server and blade server control method
CN116841368A (en) Control method and device of heat dissipation device, storage medium and electronic device
CN112416454B (en) Method and device for controlling disk startup
CN113391689A (en) Hard disk electrifying method and device, electronic device and storage medium
US20210349516A1 (en) Energy saving device and method for saving energy in data center

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination