Method and device for controlling disk startup
By obtaining disk status information and controlling disk booting according to the boot level, the problem of long boot time of disk arrays in high-density storage devices is solved, improving efficiency and reducing power costs, and ensuring data security.
Patent Information
- Application Number
- CN202011290123.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-17
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2040-11-17
AI Technical Summary
The power output power consumption of high-density storage devices is small, resulting in a long start-up time of disk arrays and low efficiency, which affects customer experience. Especially in case of emergency power-up and down, the disk array cannot be written in time, resulting in data loss.
By obtaining the status information of the disk in the disk array, determine the boot level of the disk, and control the disk startup in sequence in order from high to low, powering up time-sharing to optimize current requirements, avoiding the high load on the power supply when the disk starts simultaneously. .
It significantly shortens the boot time of the disk array, improves disk boot efficiency, reduces power costs, and avoids the risk of data loss.
Smart Images

Figure CN112416454B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method and device for controlling disk startup. Background Art
[0002] There are many fan groups and disk array nodes in high-density storage devices. At present, the startup process of high-density storage devices is generally that after the main control unit completes power-on, it notifies the control unit, and the control unit first enables all fan groups and then enables the disk array.
[0003] The power module of the high-density storage device itself has a small output power consumption. The operation of the main control unit has used up some current, and the operation of the fan group has used up some current. The remaining current quota is used to start the disk array, which will inevitably cause the disk array to take a long time to start. In addition, the main control unit needs to read and write the disk array, which is bound to be greatly delayed. The use of high-specification power modules can shorten the startup time of the disk array, but due to the working current characteristics of the disk, it causes low energy efficiency and greatly increases the power cost. The obvious disadvantage of the existing technical solution is that the equipment startup service is slow to connect, and it takes a long time to read and write the disk array. This results in a poor customer experience, especially when emergency power on and off is required, and the disk array cannot be written for a long time. Customers cannot tolerate data loss.
[0004] In the related art, there is no effective solution to the problem that the disk has a long startup time and low efficiency due to the low output power consumption of the power module of the high-density storage device. Summary of the invention
[0005] The embodiment of the present invention provides a method and device for controlling disk startup, so as to at least solve the problem in the related art that the startup of a disk array takes a long time and is inefficient due to the low output power consumption of a power module of a high-density storage device.
[0006] According to one embodiment of the present invention, a method for controlling disk startup is provided, comprising: obtaining status information of disks in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1; determining a startup level of the disk based on the status information of the disk in the disk array; and controlling the startup of the disks in the disk array according to the startup level.
[0007] Optionally, determining the startup level of the disk according to the status information of the disk in the disk array includes: determining the startup level of the first disk to be the first startup level, wherein the first disk is the disk in the disk array that last performed a data read operation or a data write operation; determining the startup level of the second disk to be the second startup level, wherein the remaining storage space of the second disk is less than or equal to a first threshold; determining the startup level of the third disk to be the third startup level, wherein the third disk is a disk in the disk array other than the first disk and the second disk; wherein the first startup level is higher than the second startup level, and the second startup level is higher than the third startup level.
[0008] Optionally, the method further includes: obtaining a data request, wherein the data request includes: a read data request and a write data request; and determining a startup level of the disk according to the data request and status information of the disk.
[0009] Optionally, determining the startup level of the disk according to the data request and the status information of the disk includes: when the data request is the read data request, determining the startup level of the fourth disk to be the fourth startup level, wherein the read data request carries first data requested to be read, and the first data is stored in the fourth disk; determining the startup level of the fifth disk to be the fifth startup level, wherein the amount of data stored in the fifth disk is greater than or equal to a second threshold; determining the startup level of the sixth disk to be the sixth startup level, wherein the sixth disk is a disk in the disk array other than the fourth disk and the fifth disk; wherein the fourth startup level is higher than the fifth startup level, and the fifth startup level is higher than the sixth startup level.
[0010] Optionally, determining the startup level of the disk according to the data request and the status information of the disk includes: when the data request is the write data request, determining the startup level of the seventh disk as the seventh startup level, wherein the write data request carries second data requested to be written, and the remaining storage space of the seventh disk is greater than or equal to a third threshold value; determining the startup level of the eighth disk as the eighth startup level, wherein the eighth disk is a disk in the disk array other than the seventh disk.
[0011] Optionally, controlling the startup of the disks in the disk array according to the startup levels includes: controlling the startup of the disks in the disk array in order from high to low according to the startup levels.
[0012] Optionally, the method further includes: determining the startup level of the disk in the disk array every predetermined period; establishing an association relationship between the startup level and the corresponding disk; and recording the association relationship.
[0013] According to another embodiment of the present invention, a device for controlling disk startup is provided, including: an acquisition module, used to obtain status information of disks in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1; a determination module, used to determine the startup level of the disk according to the status information of the disk in the disk array; and a control module, used to control the startup of the disk in the disk array according to the startup level.
[0014] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.
[0015] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0016] According to the present invention, by obtaining the status information of the disks in the disk array, the disk array includes N disks, and N is an integer greater than or equal to 1; according to the status information of the disks in the disk array, the startup level of the disks is determined; and according to the startup level, the startup of the disks in the disk array is controlled. Therefore, the problem of long startup time and low efficiency of the disks caused by the low output power consumption of the power module of the high-density storage device can be solved, and the effect of improving the startup efficiency of the disks can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 It is a hardware structure block diagram of a computer terminal of a method for controlling disk startup according to an embodiment of the present invention;
[0019] Figure 2 is a flow chart of controlling disk startup according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of a storage device structure according to an optional embodiment of the present invention Figure 1 ;
[0021] Figure 4 Schematic diagram of the startup process of a storage device according to an optional embodiment of the present invention Figure 1 ;
[0022] Figure 5is a schematic diagram of a storage device structure according to an optional embodiment of the present invention Figure 2 ;
[0023] Figure 6 Schematic diagram of the startup process of a storage device according to an optional embodiment of the present invention Figure 2 ;
[0024] Figure 7 It is a structural block diagram of a device for controlling disk startup according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0027] The method embodiment provided in the first embodiment of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of a method for controlling disk startup according to an embodiment of the present invention. Figure 1 As shown, the computer terminal 10 may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for controlling disk startup in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a 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 a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] In this embodiment, a method for controlling disk startup running on the above-mentioned computer terminal is provided. Figure 2 is a flow chart of controlling disk startup according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0031] Step S202, obtaining status information of a disk in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1;
[0032] Step S204, determining the startup level of the disk according to the status information of the disk in the disk array;
[0033] Step S206: Control the disks in the disk array to start up according to the startup level.
[0034] Through the above steps, by obtaining the status information of the disks in the disk array, the disk array includes N disks, N is an integer greater than or equal to 1; according to the status information of the disks in the disk array, the startup level of the disks is determined; and the startup of the disks in the disk array is controlled according to the startup level. Therefore, the problem of long startup time and low efficiency of the disks caused by the low output power consumption of the power module of the high-density storage device can be solved, and the effect of improving the disk startup efficiency can be achieved.
[0035] Optionally, the execution subject of the above steps may be a terminal, etc., but is not limited thereto.
[0036] As an optional implementation, the disk array may be a disk array in a storage device, and the modules in the storage device that consume more power include: a main control unit, a disk array, and a fan group. The power consumption of the disk array is relatively high. Figure 3 is a schematic diagram of a storage device structure according to an optional embodiment of the present invention Figure 1 , where the power module is used to provide power to the main control unit, hard disk, and switch. The disk array includes multiple disks, and the specific number of disks included depends on the actual situation. Figure 4 Schematic diagram of the startup process of a storage device according to an optional embodiment of the present invention Figure 1 , which may specifically include the following steps:
[0037] Step S41, the storage device is powered on or a key is pressed to start the storage device;
[0038] Step S42, the main control unit enables the power module;
[0039] Step S43, the main control unit notifies the control unit that the startup is complete, and instructs the control unit to enable the fan combination disk array;
[0040] Step S44, the control unit enables the fan group;
[0041] Step S45, the control unit enables the disk array;
[0042] Step S46, the storage device startup process ends.
[0043] Since the current of hard disk startup is relatively large, generally 2 to 3 times of the working current. If the disks in the disk array are to be powered on at the same time, the requirements for the power module are relatively high. After the storage device is started, such a large current is not needed during normal operation, which leads to power waste. In this implementation, a power module of conventional specifications can be selected, and the disk array is powered on in a time-sharing manner at fixed time intervals during startup to stagger the startup current. Specifically, the disks can be divided into different startup levels according to the status information of the disks in the disk array, and the disks in the disk array can be started in a time-sharing manner according to the startup levels, thereby avoiding the problem of slow startup speed of the disk array caused by the high demand for current when the disks in the disk array are started at the same time, thereby achieving the technical effect of improving the startup efficiency of the disk array.
[0044] Optionally, determining the startup level of the disk according to the status information of the disk in the disk array includes: determining the startup level of the first disk to be the first startup level, wherein the first disk is the disk in the disk array that last performed a data read operation or a data write operation; determining the startup level of the second disk to be the second startup level, wherein the remaining storage space of the second disk is less than or equal to a first threshold; determining the startup level of the third disk to be the third startup level, wherein the third disk is a disk in the disk array other than the first disk and the second disk; wherein the first startup level is higher than the second startup level, and the second startup level is higher than the third startup level.
[0045] As an optional implementation, after the storage device completes startup, the data in the disk can be read, and the data can also be written to the disk. If the storage device suddenly loses power or is restarted, the storage device does not know which disk in the disk array was read or written before the restart after it restarts. In this case, the read or write operation needs to be performed again, which is cumbersome and time-consuming. In order to prevent this from happening, in this embodiment, the level of the disk that performs the read or write operation before the storage device is restarted can be set to the highest startup level. After the storage device is restarted, the disk that performs the read or write operation before the restart is started first, so that the read or write operation that was not completed before the restart can be continued. This avoids the problem of low efficiency caused by the need to re-perform the read operation after the storage device is restarted, and can achieve the technical effect of improving the efficiency of reading or writing data.
[0046] As an optional implementation, the startup level can be set according to the remaining storage space size in the disk, and the disk with more stored data is set to a higher startup level, that is, the disk with the remaining storage space less than or equal to the first threshold is set to the second startup level, and the first threshold can be determined according to the actual situation, for example, it can be 10G, 1G, 500M, etc. The levels of other disks in the disk array except the first startup level and the second startup level are set to the third startup level.
[0047] As an optional implementation, the disks in the disk array can be started in time-sharing order according to the order of the startup levels. The first disk of the first startup level can be started first. In this embodiment, the disks in the disk array that meet the requirements of the previous data read operation or write operation are collectively referred to as first disks, and the number of first disks can be one or more. After the first disk is started, the second disk of the second startup level is started. Similarly, the disks in the disk array that meet the requirements of the remaining storage space being less than or equal to the first threshold are collectively referred to as second disks, and the number of second disks can be one or more. After the second disk of the second startup level is started, the other disks in the disk array are started. In this embodiment, by starting the disks in the disk array in time-sharing order, the problem of low efficiency of simultaneous startup can be avoided, thereby achieving the effect of improving the disk startup efficiency.
[0048] Optionally, the method further includes: obtaining a data request, wherein the data request includes: a read data request and a write data request; and determining a startup level of the disk according to the data request and status information of the disk.
[0049] As an optional implementation, the startup levels of the disks in the disk array may be divided according to the acquired operation requests. Figure 5 is a schematic diagram of a storage device structure according to an optional embodiment of the present invention Figure 2 The power module adopts conventional specifications. The switch controls the circuit switch of the disk array. The switch is managed by the control unit, which also controls and manages the power on and operation of the fan group. The main control unit manages the control unit and exchanges data with the disk array. The exchanged data includes read data and write data. The main control unit also records and maintains the disk array operation status data.
[0050] As an optional implementation, after the storage device is started and the main control unit is started, the disk operated in the disk array last time is first queried from the system log or maintenance data table, and the fan in the corresponding physical fan area is analyzed and identified, and the two are used as the first startup level. The control unit is informed to start the first startup level disk and fan first. Then the system log or maintenance data table is continued to be queried to identify the disk that is not empty in the disk array as the second startup level. The remaining disks and fan groups are used as the third startup level. Finally, the control unit is informed of the contents in the second and third startup levels, and the control unit is started according to priority.
[0051] As an optional implementation, the main control unit can obtain a data request, which can be a read data request or a write data request. The disk startup level in the disk array is divided according to the data request. After the disk startup in the disk array is completed, data can be read or written through the communication connection between the main control unit and the disk. For example, if it is to read data, the read data request carries the data information requested to be read, and the disk storing the data sends the data to the main control unit. If it is to write data, the write data request carries the data requested to be written, and the data can be written to the corresponding disk through the communication connection between the main control unit and the disk.
[0052] Optionally, determining the startup level of the disk according to the data request and the status information of the disk includes: when the data request is the read data request, determining the startup level of the fourth disk to be the fourth startup level, wherein the read data request carries first data requested to be read, and the first data is stored in the fourth disk; determining the startup level of the fifth disk to be the fifth startup level, wherein the amount of data stored in the fifth disk is greater than or equal to a second threshold; determining the startup level of the sixth disk to be the sixth startup level, wherein the sixth disk is a disk in the disk array other than the fourth disk and the fifth disk; wherein the fourth startup level is higher than the fifth startup level, and the fifth startup level is higher than the sixth startup level.
[0053] As an optional implementation, when the data request is a data read request, the disk level storing the requested data can be set to the highest startup level (fourth startup level). The startup levels of the remaining disks can be divided according to the amount of data stored in the disks, and the startup level storing the amount of data greater than or equal to the second threshold is set to the fifth startup level, and the disks other than the fourth startup level and the fifth startup level are set to the sixth startup level. In this embodiment, the fourth disk, the fifth disk, and the sixth disk are used to refer to disks that meet the corresponding conditions, and can be a general term for one or more disks.
[0054] As an optional implementation, the disks can be started in time-sharing mode according to the startup levels, and the fourth disk of the fourth startup level is started first, and the fifth disk of the fifth startup level is started after the fourth disk is started, and the sixth disk of the sixth startup level is started after the fifth disk is started. In this embodiment, the disks in the disk array are started in time-sharing mode according to the data read request, so that the startup efficiency of the disks can be improved.
[0055] Optionally, determining the startup level of the disk according to the data request and the status information of the disk includes: when the data request is the write data request, determining the startup level of the seventh disk as the seventh startup level, wherein the write data request carries second data requested to be written, and the remaining storage space of the seventh disk is greater than or equal to a third threshold value; determining the startup level of the eighth disk as the eighth startup level, wherein the eighth disk is a disk in the disk array other than the seventh disk.
[0056] As an optional implementation, when the data request is a write data request, the startup level of the disk with a larger remaining storage space can be set to the highest level. Specifically, a third threshold can be set, and the disk level with a remaining space greater than or equal to the third threshold is set to the highest level. After the seventh disk with the highest level is started, other disks are started. In this embodiment, the seventh disk and the eighth disk are used to refer to disks that meet the corresponding conditions, and can be a general term for one or more disks.
[0057] Optionally, controlling the startup of the disks in the disk array according to the startup levels includes: controlling the startup of the disks in the disk array in order from high to low according to the startup levels.
[0058] In this embodiment, the disks are started in descending order of their startup levels, and the startup of disks of different startup levels may be separated by a preset time, which may be determined according to actual conditions, such as 3 minutes, 5 minutes, 1 hour, etc. For example, after the disk of the first startup level is started for 5 minutes, the disk of the second startup level is enabled.
[0059] Optionally, the method further includes: determining the startup level of the disk in the disk array every predetermined period; establishing an association relationship between the startup level and the corresponding disk; and recording the association relationship.
[0060] As an optional implementation, since the status of the disk is changing, for example, the stored data is constantly changing, and the remaining storage space will also be constantly changing, therefore, the status of the disk in the disk array can be obtained once every predetermined period, and the boot level of the disk can be updated according to the current status of the disk, and the boot level and the corresponding disk identification are associated and stored in a log or maintenance table. By looking up the table, the disks included in the corresponding boot level can be determined, and then the startup of the corresponding disk can be controlled.
[0061] As an optional implementation, Figure 6 Schematic diagram of the startup process of a storage device according to an optional embodiment of the present invention Figure 2 , which may include the following steps:
[0062] Step S61, the storage device is powered on or a key is pressed to start the storage device;
[0063] Step S62, the main control unit enables the power module;
[0064] Step S63, after the main control unit is started, the log or maintenance table is queried and analyzed to determine the startup level of the disks in the disk array. Specifically, the disk operated before the storage device is expanded is determined to be a disk of the first startup level, the disk whose remaining storage space is less than or equal to the preset threshold is determined to be a disk of the second startup level; the startup level of the remaining disks in the disk array is determined to be the third startup level;
[0065] Step S64, sending instruction information to the control unit to instruct to control the corresponding disks to start up in order from high to low startup levels.
[0066] Step S65, the storage device startup process ends.
[0067] In this embodiment, the device is started up by giving priority to powering on the disk array that was last operated, ensuring rapid continuation of data services without having to wait for the disk array to be started before writing to the disk. At the same time, the fans in the corresponding physical fan zone are enabled so that the working disk can dissipate heat in time. The empty disk and the remaining fan group serve as the third startup level, which can save current overhead to the maximum extent and is used to increase the number of hot disk startups and reduce startup time. The power supply is powered by a conventional power module, which greatly reduces costs. At the same time, it is also compatible with common power modules on the market to improve maintainability.
[0068] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0069] In this embodiment, a device for controlling disk startup is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0070] Figure 7is a structural block diagram of a device for controlling disk startup according to an embodiment of the present invention, such as Figure 7 As shown, the device includes: an acquisition module 72, used to obtain status information of disks in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1; a determination module 74, used to determine the startup level of the disk according to the status information of the disk in the disk array; and a control module 76, used to control the startup of the disk in the disk array according to the startup level.
[0071] Optionally, the above-mentioned device is also used to implement the above-mentioned determination of the startup level of the disk according to the status information of the disk in the disk array in the following manner: determine the startup level of the first disk as the first startup level, wherein the first disk is the disk in the disk array that last performed a data read operation or a write operation; determine the startup level of the second disk as the second startup level, wherein the remaining storage space of the second disk is less than or equal to a first threshold; determine the startup level of the third disk as the third startup level, wherein the third disk is a disk in the disk array other than the first disk and the second disk; wherein the first startup level is higher than the second startup level, and the second startup level is higher than the third startup level.
[0072] Optionally, the above-mentioned device is also used to obtain a data request, wherein the data request includes: a read data request and a write data request; and determine the startup level of the disk according to the data request and the status information of the disk.
[0073] Optionally, the above-mentioned device is also used to implement the determination of the startup level of the disk according to the data request and the status information of the disk in the following manner: when the data request is the read data request, determining the startup level of the fourth disk as the fourth startup level, wherein the read data request carries the first data requested to be read, and the first data is stored in the fourth disk; determining the startup level of the fifth disk as the fifth startup level, wherein the amount of data stored in the fifth disk is greater than or equal to a second threshold; determining the startup level of the sixth disk as the sixth startup level, wherein the sixth disk is a disk in the disk array other than the fourth disk and the fifth disk; wherein the fourth startup level is higher than the fifth startup level, and the fifth startup level is higher than the sixth startup level.
[0074] Optionally, the above-mentioned device is also used to implement the determination of the startup level of the disk according to the data request and the status information of the disk in the following manner: when the data request is the write data request, determining the startup level of the seventh disk as the seventh startup level, wherein the write data request carries the second data requested to be written, and the remaining storage space of the seventh disk is greater than or equal to a third threshold value; determining the startup level of the eighth disk as the eighth startup level, wherein the eighth disk is a disk in the disk array other than the seventh disk.
[0075] Optionally, the apparatus is further configured to implement the above-mentioned control of disk startup in the disk array according to the startup level in the following manner: controlling the startup of the disks in the disk array in order from high to low according to the startup level.
[0076] Optionally, the above device is also used to determine the startup level of the disk in the disk array every predetermined period; establish an association relationship between the startup level and the corresponding disk; and record the association relationship.
[0077] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0078] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0079] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0080] S1, obtaining status information of a disk in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1;
[0081] S2, determining the startup level of the disk according to the status information of the disk in the disk array;
[0082] S3, controlling the disks in the disk array to start up according to the startup level.
[0083] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0084] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0085] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0086] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0087] S1, obtaining status information of a disk in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1;
[0088] S2, determining the startup level of the disk according to the status information of the disk in the disk array;
[0089] S3, controlling the disks in the disk array to start up according to the startup level.
[0090] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0091] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0092] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for controlling disk startup, characterized in that: include: Obtaining status information of a disk in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1; Determining the startup level of the disk according to the status information of the disk in the disk array; Control the startup of the disks in the disk array according to the startup level; Wherein, determining the startup level of the disk according to the status information of the disk in the disk array includes: Determining a startup level of a first disk as a first startup level, wherein the first disk is a disk in the disk array that previously performed a data read operation or a data write operation; Determining that the startup level of the second disk is a second startup level, wherein the remaining storage space of the second disk is less than or equal to a first threshold; Determining a startup level of a third disk as a third startup level, wherein the third disk is a disk in the disk array except the first disk and the second disk; The first startup level is higher than the second startup level, and the second startup level is higher than the third startup level.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a data request, wherein the data request includes: a read data request and a write data request; The startup level of the disk is determined according to the data request and the status information of the disk.
3. The method according to claim 2, characterized in that The step of determining the startup level of the disk according to the data request and the status information of the disk includes: In a case where the data request is the data read request, determining that the startup level of the fourth disk is the fourth startup level, wherein the data read request carries the first data requested to be read, and the fourth disk stores the first data; Determining that the startup level of the fifth disk is the fifth startup level, wherein the amount of data stored in the fifth disk is greater than or equal to a second threshold; Determine the startup level of the sixth disk as the sixth startup level, wherein the sixth disk is a disk in the disk array except the fourth disk and the fifth disk; The fourth startup level is higher than the fifth startup level, and the fifth startup level is higher than the sixth startup level.
4. The method according to claim 2, characterized in that: The step of determining the startup level of the disk according to the data request and the status information of the disk includes: In a case where the data request is the write data request, determining that the startup level of the seventh disk is the seventh startup level, wherein the write data request carries the second data requested to be written, and the remaining storage space of the seventh disk is greater than or equal to the third threshold; The startup level of the eighth disk is determined to be the eighth startup level, wherein the eighth disk is a disk in the disk array except the seventh disk.
5. The method according to any one of claims 1 to 4, characterized in that Controlling the disk startup in the disk array according to the startup level includes: The disks in the disk array are controlled to start up in order from high to low according to the start-up levels.
6. The method according to claim 1, characterized in that The method further comprises: Determining the startup level of the disk in the disk array every predetermined period; Establishing an association relationship between the startup level and the corresponding disk; The association relationship is recorded.
7. A device for controlling disk startup, characterized in that: include: An acquisition module, used for acquiring status information of a disk in a disk array, wherein the disk array includes N disks, and N is an integer greater than or equal to 1; A determination module, used to determine the startup level of the disk according to the status information of the disk in the disk array; A control module, used for controlling the startup of the disks in the disk array according to the startup level; The device is also used to determine the startup level of the first disk as the first startup level, wherein the first disk is the disk in the disk array that last performed a data read operation or a data write operation; determine the startup level of the second disk as the second startup level, wherein the remaining storage space of the second disk is less than or equal to a first threshold; determine the startup level of the third disk as the third startup level, wherein the third disk is a disk in the disk array other than the first disk and the second disk; wherein the first startup level is higher than the second startup level, and the second startup level is higher than the third startup level.
8. A storage medium, characterized in that: The storage medium stores a computer program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.