[go: up one dir, main page]

CN113031859B - Hard disk high-temperature disk-falling protection method, system and medium - Google Patents

Hard disk high-temperature disk-falling protection method, system and medium Download PDF

Info

Publication number
CN113031859B
CN113031859B CN202110212366.5A CN202110212366A CN113031859B CN 113031859 B CN113031859 B CN 113031859B CN 202110212366 A CN202110212366 A CN 202110212366A CN 113031859 B CN113031859 B CN 113031859B
Authority
CN
China
Prior art keywords
temperature
hard disk
data
existing
disk
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.)
Active
Application number
CN202110212366.5A
Other languages
Chinese (zh)
Other versions
CN113031859A (en
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.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer 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 Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110212366.5A priority Critical patent/CN113031859B/en
Publication of CN113031859A publication Critical patent/CN113031859A/en
Application granted granted Critical
Publication of CN113031859B publication Critical patent/CN113031859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/20Cooling means
    • G06F1/206Cooling means comprising thermal management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • 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/0614Improving the reliability of 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/065Replication mechanisms
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • 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/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a hard disk high-temperature disk-falling protection method, which comprises the following steps: setting a monitoring period, and acquiring a first current temperature of the hard disk every other monitoring period; setting a temperature control threshold, and executing an initialization step based on a first existing temperature and the temperature control threshold to obtain a cache partition and a high-temperature hard disk; performing a data diversion step based on the cache partition and the high-temperature hard disk, and simultaneously detecting the existing space occupancy rate of the cache partition and a second existing temperature of the high-temperature hard disk; executing a data diversion cutoff step based on the existing space occupancy rate, the second existing temperature and the temperature control threshold value to obtain first file verification information; detecting a third existing temperature of the high-temperature hard disk after the data diversion cutoff step is executed; performing a data reflow step based on the third existing temperature, the temperature control threshold, and the first file verification information; the invention can ensure the stability of the temperature of the hard disk and improve the data processing efficiency and stability of the hard disk while not interrupting the high-speed processing of the hard disk on the data.

Description

一种硬盘高温掉盘防护方法、系统及介质A method, system, and medium for protecting a hard disk from high-temperature disk loss

技术领域technical field

本发明涉及硬盘性能防护技术领域,特别是涉及一种硬盘高温掉盘防护方法、系统及介质。The invention relates to the technical field of hard disk performance protection, in particular to a method, system and medium for protecting a hard disk from high-temperature loss.

背景技术Background technique

服务器中在进行数据备份、数据迁移或设备升级时,硬盘的读写速度会极大的提升进而保证服务器中数据的处理效率。但随着硬盘读写速度的提升,硬盘的温度也会随之升高,若硬盘的温度超过服务器中预先设定的温度阈值,则服务器会对硬盘进行卸载操作,这将会导致服务器中数据处理过程中断。通常针对于避免此情况出现的解决方法是通过控制硬盘的读写速度,进而控制硬盘的温度处于稳定状态,但此方法会极大的降低服务器中数据的处理效率。When performing data backup, data migration or equipment upgrade in the server, the read and write speed of the hard disk will be greatly improved to ensure the processing efficiency of data in the server. However, as the read/write speed of the hard disk increases, the temperature of the hard disk will also rise accordingly. If the temperature of the hard disk exceeds the preset temperature threshold in the server, the server will unload the hard disk, which will cause the data in the server to Processing interrupted. Usually, the solution to avoid this situation is to control the read/write speed of the hard disk, and then control the temperature of the hard disk to be in a stable state, but this method will greatly reduce the data processing efficiency in the server.

发明内容Contents of the invention

本发明主要解决的是现有方法无法在控制硬盘温度稳定的情况下满足硬盘对数据进行高速读写的问题。The invention mainly solves the problem that the existing method cannot satisfy the high-speed reading and writing of data by the hard disk under the condition of controlling the temperature of the hard disk to be stable.

为解决上述技术问题,本发明采用的一个技术方案是:提供一种硬盘高温掉盘防护方法,包括以下步骤:In order to solve the above-mentioned technical problems, a technical solution adopted by the present invention is to provide a method for protecting a hard disk from high-temperature loss, which includes the following steps:

设定监控周期,每隔所述监控周期获取硬盘的第一现有温度;Set the monitoring period, and obtain the first existing temperature of the hard disk every said monitoring period;

设定温度控制阈值,基于所述第一现有温度和所述温度控制阈值执行初始化步骤,得到高温硬盘和缓存分区;Setting a temperature control threshold, performing an initialization step based on the first existing temperature and the temperature control threshold, to obtain a high-temperature hard disk and a cache partition;

基于所述高温硬盘和所述缓存分区执行数据导流步骤,执行所述数据导流步骤的同时,检测所述缓存分区的现有空间占用率和所述高温硬盘的第二现有温度;Executing a data diversion step based on the high-temperature hard disk and the cache partition, while performing the data diversion step, detecting an existing space occupancy rate of the cache partition and a second existing temperature of the high-temperature hard disk;

基于所述现有空间占用率、所述第二现有温度和所述温度控制阈值执行数据导流截止步骤,得到第一文件校验信息;Executing a data diversion cut-off step based on the existing space occupancy rate, the second existing temperature, and the temperature control threshold, to obtain first file verification information;

执行所述数据导流截止步骤后,检测所述高温硬盘的第三现有温度,基于所述第三现有温度、所述温度控制阈值和所述第一文件校验信息执行数据回流步骤。After the data diversion cut-off step is performed, a third existing temperature of the high-temperature hard disk is detected, and a data reflow step is performed based on the third existing temperature, the temperature control threshold and the first file verification information.

作为一种改进的方案,所述基于所述第一现有温度和所述温度控制阈值执行初始化步骤的步骤进一步包括:As an improved solution, the step of performing the initialization step based on the first existing temperature and the temperature control threshold further includes:

比对所述第一现有温度和所述温度控制阈值,当所述第一现有温度达到所述温度控制阈值时,执行所述初始化步骤。Comparing the first existing temperature with the temperature control threshold, and executing the initialization step when the first existing temperature reaches the temperature control threshold.

作为一种改进的方案,所述初始化步骤包括:As an improved solution, the initialization step includes:

设定所述第一现有温度所对应的硬盘为所述高温硬盘;Setting the hard disk corresponding to the first existing temperature as the high-temperature hard disk;

获取所述高温硬盘的容量值;Obtain the capacity value of the high-temperature hard disk;

设定第一容量百分比,基于所述第一容量百分比和所述容量值创建所述缓存分区。A first capacity percentage is set, and the cache partition is created based on the first capacity percentage and the capacity value.

作为一种改进的方案,所述数据导流步骤包括:As an improved solution, the data diversion step includes:

控制所述高温硬盘待机;controlling the high-temperature hard disk to stand by;

获取所述高温硬盘的待处理数据;Obtain the data to be processed of the high-temperature hard disk;

将所述待处理数据传输至所述缓存分区;transferring the data to be processed to the cache partition;

获取所述缓存分区的第一地址信息;Obtain first address information of the cache partition;

访问磁盘控制器,将所述磁盘控制器中的磁盘读写地址信息变更为所述第一地址信息。accessing the disk controller, and changing the disk read/write address information in the disk controller to the first address information.

作为一种改进的方案,所述基于所述现有空间占用率、所述第二现有温度和所述温度控制阈值执行数据导流截止步骤的步骤进一步包括:As an improved solution, the step of performing the step of data diversion cut-off based on the existing space occupancy rate, the second existing temperature and the temperature control threshold further includes:

设定占用率阈值,比对所述现有空间占用率和所述占用率阈值;Setting an occupancy threshold, comparing the existing space occupancy with the occupancy threshold;

设定第一百分比阈值,计算所述第二现有温度与所述温度控制阈值的商的第一绝对值,比对所述第一绝对值与所述第一百分比阈值;setting a first percentage threshold, calculating a first absolute value of the quotient of the second existing temperature and the temperature control threshold, and comparing the first absolute value with the first percentage threshold;

当所述第一绝对值达到所述第一百分比阈值,且所述现有空间占用率未达到所述占用率阈值时,停止将所述待处理数据传输至所述缓存分区,并执行所述数据导流截止步骤;When the first absolute value reaches the first percentage threshold and the existing space occupancy does not reach the occupancy threshold, stop transmitting the data to be processed to the cache partition, and execute The data diversion cut-off step;

当所述第一绝对值达到所述第一百分比阈值,且所述现有空间占用率达到所述占用率阈值时,停止将所述待处理数据传输至所述缓存分区,并执行所述数据导流截止步骤;When the first absolute value reaches the first percentage threshold and the existing space occupancy reaches the occupancy threshold, stop transmitting the data to be processed to the cache partition, and execute the The data diversion cut-off steps are described;

当所述第一绝对值未达到所述第一百分比阈值,且所述现有空间占用率达到所述占用率阈值时,停止将所述待处理数据传输至所述缓存分区,继续比对所述第一绝对值与所述第一百分比阈值,直至所述第一绝对值达到所述第一百分比阈值时,执行所述数据导流截止步骤。When the first absolute value does not reach the first percentage threshold and the existing space occupancy reaches the occupancy threshold, stop transmitting the data to be processed to the cache partition and continue comparing For the first absolute value and the first percentage threshold, until the first absolute value reaches the first percentage threshold, execute the data diversion cut-off step.

作为一种改进的方案,所述数据导流截止步骤包括:As an improved solution, the data diversion cut-off step includes:

获取当前所述缓存分区中数据的所述第一文件校验信息;Obtain the first file verification information of the data in the current cache partition;

获取所述高温硬盘的第二地址信息;Obtaining the second address information of the high-temperature hard disk;

访问所述磁盘控制器,将所述磁盘控制器中的所述磁盘读写地址信息变更为所述第二地址信息。Accessing the disk controller, changing the disk read/write address information in the disk controller to the second address information.

作为一种改进的方案,所述基于所述第三现有温度、所述温度控制阈值和所述第一文件校验信息执行数据回流步骤的步骤进一步包括:As an improved solution, the step of performing the data reflow step based on the third existing temperature, the temperature control threshold and the first file verification information further includes:

设定第二百分比阈值,计算所述第三现有温度与所述温度控制阈值的商的第二绝对值,比对所述第二绝对值与所述第二百分比阈值;Setting a second percentage threshold, calculating a second absolute value of the quotient of the third existing temperature and the temperature control threshold, and comparing the second absolute value with the second percentage threshold;

当所述第二绝对值达到所述第二百分比阈值时,则基于所述第一文件校验信息执行所述数据回流步骤。When the second absolute value reaches the second percentage threshold, the data reflow step is performed based on the first file verification information.

作为一种改进的方案,所述数据回流步骤包括:As an improved solution, the data reflux step includes:

判断所述高温硬盘是否处于读写状态;Judging whether the high-temperature hard disk is in a read-write state;

若是,则获取所述高温硬盘的当前读写速度,并设定读写速度百分比,计算所述读写速度百分比和所述当前读写速度的乘积,定义所述乘积为第一回流速度,按照所述第一回流速度将所述缓存分区中的数据复制至所述高温硬盘;If so, then obtain the current read-write speed of the high-temperature hard disk, and set the percentage of read-write speed, calculate the product of the percentage of read-write speed and the current read-write speed, define the product as the first reflow speed, according to The first reflow speed copies the data in the cache partition to the high-temperature hard disk;

若否,则设定第二回流速度,并按照所述第二回流速度将所述缓存分区中的数据复制至所述高温硬盘;If not, setting a second reflow speed, and copying the data in the cache partition to the high-temperature hard disk according to the second reflow speed;

定义复制至所述高温硬盘的数据为第一数据,获取所述第一数据的第二文件校验信息,比对所述第二文件校验信息与所述第一文件校验信息是否匹配,若匹配,则将所述缓存分区格式化。defining the data copied to the high-temperature hard disk as first data, obtaining second file verification information of the first data, and comparing whether the second file verification information matches the first file verification information, If matched, the cache partition is formatted.

本发明还提供一种硬盘高温掉盘防护系统,包括:The present invention also provides a protection system for high-temperature disk loss of a hard disk, including:

温度监控模块、分区创建模块、数据导流模块、导流截止模块和数据回流模块;Temperature monitoring module, partition creation module, data diversion module, diversion cut-off module and data return module;

所述温度监控模块用于设定监控周期,并每隔所述监控周期获取硬盘的第一现有温度;The temperature monitoring module is used to set a monitoring period, and obtain the first existing temperature of the hard disk every said monitoring period;

所述分区创建模块用于设定温度控制阈值,并基于所述第一现有温度和所述温度控制阈值执行初始化步骤,得到高温硬盘和缓存分区;The partition creation module is used to set a temperature control threshold, and perform an initialization step based on the first existing temperature and the temperature control threshold to obtain a high-temperature hard disk and a cache partition;

所述数据导流模块用于根据所述高温硬盘和所述缓存分区执行数据导流步骤;所述数据导流模块还用于在执行所述数据导流步骤时,检测所述缓存分区的现有空间占用率和所述高温硬盘的第二现有温度;The data diversion module is used to perform the data diversion step according to the high-temperature hard disk and the cache partition; the data diversion module is also used to detect the status of the cache partition when performing the data diversion step. having a space occupancy rate and a second existing temperature of said high temperature hard drive;

所述导流截止模块用于根据所述现有空间占用率、所述第二现有温度和所述温度控制阈值执行数据导流截止步骤,得到第一文件校验信息;The diversion cut-off module is configured to perform a data diversion cut-off step according to the existing space occupancy rate, the second existing temperature, and the temperature control threshold, to obtain first file verification information;

所述数据回流模块用于在执行所述数据导流截止步骤后,检测所述高温硬盘的第三现有温度;所述数据回流模块通过所述第三现有温度、所述温度控制阈值和所述第一文件校验信息执行数据回流步骤。The data reflow module is configured to detect a third existing temperature of the high-temperature hard disk after performing the data diversion cut-off step; the data reflow module passes the third existing temperature, the temperature control threshold and The first file verification information performs a data reflow step.

本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现所述硬盘高温掉盘防护方法的步骤。The present invention also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for preventing high-temperature disk loss of the hard disk are implemented.

本发明的有益效果是:The beneficial effects of the present invention are:

1、本发明所述的硬盘高温掉盘防护方法,可以实现在不中断硬盘对于数据进行高速处理的同时,保证硬盘温度的稳定,进而有效的防止了硬盘因温度过高而被系统卸载导致掉盘的问题,极大的提高了硬盘的稳定性,并提升了硬盘的数据处理效率。1. The high-temperature hard disk loss protection method of the present invention can ensure the stability of the hard disk temperature without interrupting the high-speed data processing of the hard disk, thereby effectively preventing the hard disk from being unloaded by the system due to excessive temperature. It greatly improves the stability of the hard disk and improves the data processing efficiency of the hard disk.

2、本发明所述的硬盘高温掉盘防护系统,可以通过温度监控模块、分区创建模块、数据导流模块、导流截止模块和数据回流模块的相互配合,进而实现在不中断硬盘对于数据进行高速处理的同时,保证硬盘温度的稳定,进而有效的防止了硬盘因温度过高而被系统卸载导致掉盘的问题,极大的提高了硬盘的稳定性,并提升了硬盘的数据处理效率。2. The high-temperature disk loss protection system of the hard disk according to the present invention can realize data processing without interrupting the hard disk through the cooperation of the temperature monitoring module, the partition creation module, the data diversion module, the diversion cut-off module and the data return module. At the same time of high-speed processing, it ensures the stability of the hard disk temperature, thereby effectively preventing the problem of the hard disk being unloaded by the system due to overheating, which greatly improves the stability of the hard disk and improves the data processing efficiency of the hard disk.

3、本发明所述的计算机可读存储介质,可以实现引导温度监控模块、分区创建模块、数据导流模块、导流截止模块和数据回流模块进行配合,进而实现在不中断硬盘对于数据进行高速处理的同时,保证硬盘温度的稳定,进而有效的防止了硬盘因温度过高而被系统卸载导致掉盘的问题,极大的提高了硬盘的稳定性,并提升了硬盘的数据处理效率,且有效的增加了所述硬盘高温掉盘防护方法的可操作性。3. The computer-readable storage medium of the present invention can realize the cooperation of the temperature monitoring module, the partition creation module, the data diversion module, the diversion cut-off module and the data return module, and then realize the high-speed data processing without interrupting the hard disk. While processing, it ensures the stability of the hard disk temperature, thereby effectively preventing the hard disk from being uninstalled by the system due to high temperature and causing the disk to be dropped, which greatly improves the stability of the hard disk and improves the data processing efficiency of the hard disk. The operability of the method for protecting the hard disk from high temperature drop is effectively increased.

附图说明Description of drawings

为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.

图1是本发明实施例1所述的硬盘高温掉盘防护方法的流程图;FIG. 1 is a flow chart of the method for preventing high-temperature disk loss of a hard disk according to Embodiment 1 of the present invention;

图2是本发明实施例1所述的硬盘高温掉盘防护方法的具体流程示意图;FIG. 2 is a schematic flow chart of the method for preventing high-temperature disk loss of a hard disk according to Embodiment 1 of the present invention;

图3是本发明实施例2所述的硬盘高温掉盘防护系统的架构图。FIG. 3 is a structural diagram of the high-temperature disk loss protection system of the hard disk according to Embodiment 2 of the present invention.

具体实施方式detailed description

下面结合附图对本发明的较佳实施例进行详细阐述,以使本发明的优点和特征能更易于被本领域技术人员理解,从而对本发明的保护范围做出更为清楚明确的界定。The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, so that the advantages and features of the present invention can be more easily understood by those skilled in the art, so as to define the protection scope of the present invention more clearly.

在本发明的描述中,需要说明的是,本发明所描述的实施例是本发明一部分实施例,而不是全部的实施例;基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In the description of the present invention, it should be noted that the embodiments described in the present invention are some of the embodiments of the present invention, rather than all of them; All other embodiments obtained under the premise of creative labor belong to the protection scope of the present invention.

在本发明的描述中,需要说明的是,术语“第一”、“第二”、“第三”“第四”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "first", "second", "third" and "fourth" are used for description purposes only, and should not be understood as indicating or implying relative importance.

在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“现有温度”、“温度控制阈值”、“初始化步骤”、“缓存分区”、“高温硬盘”、“数据导流步骤”、“现有空间占用率”、“数据导流截止步骤”、“文件校验信息”、“数据回流步骤”应做广义理解。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that, unless otherwise specified and limited, the terms "existing temperature", "temperature control threshold", "initialization step", "cache partition", "high temperature hard disk", " "Data diversion steps", "existing space occupancy rate", "data diversion cut-off steps", "file verification information", and "data return steps" should be understood in a broad sense. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.

实施例1Example 1

本实施例提供一种硬盘高温掉盘防护方法,如图1和图2所示,包括以下步骤:This embodiment provides a method for protecting a hard disk from high-temperature disk loss, as shown in Figures 1 and 2, including the following steps:

S100、判断硬盘是否处于高速工作模式,若是,则设定监控周期,每隔所述监控周期,获取处于高速工作模式的硬盘的第一现有温度;S100. Determine whether the hard disk is in the high-speed working mode, if so, set a monitoring cycle, and obtain the first existing temperature of the hard disk in the high-speed working mode every said monitoring cycle;

步骤S100具体包括:Step S100 specifically includes:

判断服务器是否在进行大数据备份任务、数据升级任务或数据迁移任务等;若是,则代表硬盘处于高速工作模式,对硬盘采取温度监控步骤;若否,则代表硬盘处于非高速工作模式,则继续对硬盘的工作状态进行判断。Determine whether the server is performing big data backup tasks, data upgrade tasks, or data migration tasks, etc.; if yes, it means that the hard disk is in a high-speed working mode, and take temperature monitoring steps for the hard disk; if not, it means that the hard disk is in a non-high-speed working mode, and continue Judge the working status of the hard disk.

此步骤中,大数据备份任务、数据升级任务或数据迁移任务等不做限定,仅作为对于海量数据处理的一种描述方式,因为在进行海量数据处理时,硬盘才会处于一个相对高速的工作模式,且数据量较大,此时硬盘处于高速工作模式的时间会较长,进而导致硬盘的温度升高,此时需要对硬盘进行温度的监控。In this step, big data backup tasks, data upgrade tasks, or data migration tasks are not limited, and are only used as a description of massive data processing, because when processing massive data, the hard disk will work at a relatively high speed. Mode, and the amount of data is large, the hard disk will be in the high-speed working mode for a long time at this time, which will cause the temperature of the hard disk to rise. At this time, it is necessary to monitor the temperature of the hard disk.

S200、设定温度控制阈值,比对所述第一现有温度和所述温度控制阈值,当所述第一现有温度达到所述温度控制阈值时,执行初始化步骤,得到缓存分区和高温硬盘;S200. Set a temperature control threshold, compare the first existing temperature with the temperature control threshold, and when the first existing temperature reaches the temperature control threshold, perform an initialization step to obtain a cache partition and a high-temperature hard disk ;

步骤S200具体包括:Step S200 specifically includes:

初始化步骤包括:The initialization steps include:

对所述第一现有温度所对应的硬盘进行标记,所述硬盘中具有该标记的硬盘均为高温硬盘;Mark the hard disk corresponding to the first existing temperature, and all the hard disks with the mark in the hard disk are high-temperature hard disks;

获取所述高温硬盘的容量值,设定第一容量百分比,基于所述第一容量百分比和所述容量值在服务器的存储环境中创建缓存分区。Acquiring the capacity value of the high-temperature hard disk, setting a first capacity percentage, and creating cache partitions in the storage environment of the server based on the first capacity percentage and the capacity value.

此步骤中,该第一容量百分比根据硬盘处理的任务具体设定,比如大数据备份的数据量较大,则第一容量百分比即可设置为20%;缓存分区的容量一定是要比高温硬盘的容量小,因为其只作为临时的读写设备,若空间较大,则数据传输时间进而会加长,则缓存分区的读写性能和功耗也会变大,通常第一容量百分比设置为10%。In this step, the first capacity percentage is set according to the tasks processed by the hard disk. For example, if the data volume of big data backup is large, the first capacity percentage can be set to 20%; the capacity of the cache partition must be higher than that of the high-temperature hard disk. The capacity of the cache partition is small because it is only used as a temporary read-write device. If the space is large, the data transmission time will be longer, and the read-write performance and power consumption of the cache partition will also increase. Usually, the first capacity percentage is set to 10 %.

S300、基于高温硬盘和缓存分区执行数据导流步骤;S300, performing data diversion steps based on high-temperature hard disks and cache partitions;

步骤S300具体包括:Step S300 specifically includes:

数据导流步骤包括:The data diversion steps include:

将该高温硬盘的高速工作模式转换为待机模式,即停止该高温硬盘的一切读写操作,使该高温硬盘待机;Convert the high-speed working mode of the high-temperature hard disk to standby mode, that is, stop all read and write operations of the high-temperature hard disk, and make the high-temperature hard disk stand by;

获取海量数据处理任务中的剩余数据,即硬盘待处理的数据(即待处理数据);Obtain the remaining data in the massive data processing task, that is, the data to be processed on the hard disk (that is, the data to be processed);

将该剩余数据传输至该缓存分区;transfer the remaining data to the cache partition;

获取该缓存分区的第一端口地址(即第一地址信息);Obtain the first port address of the cache partition (that is, the first address information);

访问磁盘控制器,并将磁盘控制器中的磁盘读写端口地址(即磁盘读写地址信息)更改为该第一端口地址。Access the disk controller, and change the disk read-write port address (that is, the disk read-write address information) in the disk controller to the first port address.

此步骤中,通过对于读写地址的修改,触发对于海量数据任务的读写端的转换,通过缓存分区使高温硬盘待机恢复温度,在保证任务处理的前提下,防止了硬盘高温掉盘,且对于硬盘的温度进行了快速的调节。In this step, through the modification of the read-write address, the conversion of the read-write end of the massive data task is triggered, and the high-temperature hard disk is restored to the temperature through the cache partition. On the premise of ensuring task processing, the hard disk is prevented from being dropped due to high temperature, and for The temperature of the hard disk is quickly adjusted.

S400、执行所述数据导流步骤的同时,设定检测周期,每隔检测周期,检测缓存分区的现有空间占用率和所述高温硬盘的第二现有温度,基于所述空间占用率和所述第二现有温度执行数据导流截止步骤,得到第一文件校验信息;S400. While performing the data diversion step, set a detection cycle, and detect the existing space occupancy rate of the cache partition and the second existing temperature of the high-temperature hard disk every detection cycle, based on the space occupancy rate and The second existing temperature executes the data diversion cut-off step to obtain the verification information of the first file;

步骤S400具体包括:Step S400 specifically includes:

设定占用率阈值,比对所述现有空间占用率和所述占用率阈值;Setting an occupancy threshold, comparing the existing space occupancy with the occupancy threshold;

设定第一百分比阈值,计算该第二现有温度与所述温度控制阈值的商的第一绝对值,比对该第一绝对值与所述第一百分比对阈值;setting a first percentage threshold, calculating a first absolute value of the quotient of the second existing temperature and the temperature control threshold, and comparing the first absolute value with the first percentage threshold;

当所述第一绝对值达到所述第一百分比阈值,且所述现有空间占用率未达到所述占用率阈值时,停止所述剩余数据的传输,并执行数据导流截止步骤;When the first absolute value reaches the first percentage threshold and the existing space occupancy rate does not reach the occupancy rate threshold, stop the transmission of the remaining data, and perform a data diversion cut-off step;

当所述第一绝对值达到所述第一百分比阈值,且所述现有空间占用率达到所述占用率阈值时,停止所述剩余数据的传输,并执行数据导流截止步骤;When the first absolute value reaches the first percentage threshold and the existing space occupancy reaches the occupancy threshold, stop the transmission of the remaining data, and perform a data diversion cut-off step;

当所述现有空间占用率达到所述占用率阈值,且所述第一绝对值未达到所述第一百分比阈值时,停止所述剩余数据的传输,直至所述第一绝对值达到所述第一百分比阈值时,执行数据导流截止步骤。When the existing space occupancy rate reaches the occupancy rate threshold and the first absolute value does not reach the first percentage threshold, stop the transmission of the remaining data until the first absolute value reaches the When the first percentage threshold is reached, the data diversion cut-off step is performed.

数据导流截止步骤具体包括:The data diversion cut-off steps specifically include:

获取当前所述缓存分区中数据的所述第一文件校验信息,即MD5值;Obtain the first file verification information of the data in the current cache partition, that is, the MD5 value;

获取所述高温硬盘的第二端口地址(即第二地址信息);Obtain the second port address (ie, the second address information) of the high-temperature hard disk;

访问所述磁盘控制器,将磁盘控制器中的磁盘读写端口地址更改为所述第二端口地址。Accessing the disk controller, changing the disk read-write port address in the disk controller to the second port address.

此步骤中,占用率阈值一般设定为95%以内,将95%作为临界点相比较而言是作为整个缓存分区最高能负载的数据值;当达到此占用率阈值时,立即停止数据导流,防止缓存分区负载过大,影响整个数据任务处理的效率;此步骤的第一百分比阈值一般依据硬盘及温度控制阈值的实际值设定,其作用是作为高温硬盘的第二现有温度对于温度控制阈值的比较标准,通常第一百分比阈值设定为70%;例如:当温度控制阈值为80,而第二现有温度为57;第一百分比阈值为70%,第一绝对值=57/80=71.25%,71.25% > 70%,则该第一绝对值未达到所述第一百分比阈值;In this step, the occupancy threshold is generally set within 95%, and taking 95% as the critical point is the highest data value that can be loaded by the entire cache partition; when this occupancy threshold is reached, the data diversion is stopped immediately , to prevent the cache partition from being overloaded and affecting the efficiency of the entire data task processing; the first percentage threshold in this step is generally set according to the actual value of the hard disk and temperature control threshold, and its function is to serve as the second existing temperature of the high-temperature hard disk For the comparison standard of the temperature control threshold, usually the first percentage threshold is set to 70%; for example: when the temperature control threshold is 80, and the second existing temperature is 57; the first percentage threshold is 70%, the second An absolute value=57/80=71.25%, 71.25%>70%, then the first absolute value does not reach the first percentage threshold;

此步骤中,同时进行判断,当第二现有温度达到标准,但现有空间占用率未达到要求时,可以提前停止剩余数据的传输,并执行数据导流截止步骤;当现有空间占用率达到要求,但现有温度未达到要求时,必须停止数据的传输,再进行温度条件判断,当两者同时达到标准,即可执行数据导流截止步骤。In this step, judgment is made at the same time. When the second existing temperature reaches the standard, but the existing space occupancy rate does not meet the requirements, the transmission of the remaining data can be stopped in advance, and the data diversion cut-off step is executed; when the existing space occupancy rate If the requirements are met but the current temperature does not meet the requirements, the data transmission must be stopped, and then the temperature condition judgment must be made. When both meet the standards at the same time, the data diversion cut-off step can be executed.

S500、当数据导流截止步骤执行完毕后,获取所述高温硬盘的当前读写速度,检测所述高温硬盘的第三现有温度,设定第二百分比阈值;计算所述第三现有温度与所述温度控制阈值的商的第二绝对值,比对所述第二绝对值和所述第二百分比阈值,当所述第二绝对值达到所述第二百分比阈值时,基于所述第一文件校验信息执行数据回流步骤;S500. After the data diversion cut-off step is completed, obtain the current reading and writing speed of the high-temperature hard disk, detect the third existing temperature of the high-temperature hard disk, and set a second percentage threshold; calculate the third current having a second absolute value of the quotient of temperature and said temperature control threshold, comparing said second absolute value with said second percentage threshold, when said second absolute value reaches said second percentage threshold , performing a data reflow step based on the first file verification information;

步骤S500具体包括:Step S500 specifically includes:

数据回流步骤具体包括:The data return steps specifically include:

判断高温硬盘是否处于读写状态;Determine whether the high-temperature hard disk is in the read-write state;

若是,则获取高温硬盘的当前读写速度,设定读写速度百分比,计算所述读写速度百分比和所述当前读写速度的乘积,定义所述乘积为第一回流速度,按照该第一回流速度将所述缓存分区中的全部数据复制至所述高温硬盘中;If so, obtain the current read/write speed of the high-temperature hard disk, set the percentage of read/write speed, calculate the product of the percentage of read/write speed and the current read/write speed, define the product as the first reflow speed, and according to the first The reflow speed copies all the data in the cache partition to the high-temperature hard disk;

若否,则设定第二回流速度,并按照所述第二回流速度将所述缓存分区中的数据复制至所述高温硬盘;If not, setting a second reflow speed, and copying the data in the cache partition to the high-temperature hard disk according to the second reflow speed;

检测复制到所述高温硬盘中数据的完整性;Detecting the integrity of data copied to the high-temperature hard disk;

若所述复制到所述高温硬盘中数据完整,则将所述缓存分区格式化;If the data copied to the high-temperature hard disk is complete, the cache partition is formatted;

若所述复制到所述高温硬盘中数据未完整,则继续将缓存分区中的数据复制至高温硬盘。If the data copied to the high-temperature hard disk is incomplete, continue to copy the data in the cache partition to the high-temperature hard disk.

检测复制到所述硬盘中数据的完整性具体包括:获取复制到所述高温硬盘中数据的第二文件校验信息;判断所述第二文件校验信息是否与所述第一文件校验信息一致,若一致,则判断所述校验信息匹配,且高温硬盘中数据完整,若非匹配,则判断所述校验信息非匹配,且所述高温硬盘中数据未完整。Detecting the integrity of the data copied to the hard disk specifically includes: obtaining the second file verification information of the data copied to the high-temperature hard disk; judging whether the second file verification information is consistent with the first file verification information Consistent, if consistent, it is judged that the verification information matches, and the data in the high-temperature hard disk is complete; if not, it is judged that the verification information does not match, and the data in the high-temperature hard disk is not complete.

此步骤中,在数据进行回流时,为了进一步防止高温硬盘再次高温,所以需要确定该高温硬盘是否还处于海量数据处理阶段,若是,则需要限制数据回流的速度,进而防止高温硬盘温度升高,通常读写速度百分比设置为50%,若高温硬盘对于海量数据已处理完毕,处于待机或非高速工作状态,则不需要对数据回流的速度进行限制,通常第二回流速度根据硬盘的常态读写速度设定。In this step, in order to further prevent the high-temperature hard disk from reheating when the data is reflowing, it is necessary to determine whether the high-temperature hard disk is still in the stage of mass data processing. Usually the reading and writing speed percentage is set to 50%. If the high-temperature hard disk has processed a large amount of data and is in a standby or non-high-speed working state, there is no need to limit the speed of data reflow. Usually, the second reflow speed is based on the normal reading and writing of the hard disk. speed setting.

通过本实施例所描述的硬盘高温掉盘防护方法,可以通过数据导流和数据回流的方法来实现在不中断当前硬盘对于数据处理的同时,进而控制高速工作模式下硬盘的温度,有效的防止了硬盘由于温度过高被系统卸载的问题,极大的提升了整个服务器的稳定性,保证了硬盘的工作效率。Through the method for protecting the hard disk from high-temperature loss of the hard disk described in this embodiment, it is possible to control the temperature of the hard disk in the high-speed working mode without interrupting the data processing of the current hard disk through the methods of data diversion and data return, effectively preventing It solves the problem that the hard disk is uninstalled by the system due to high temperature, greatly improves the stability of the entire server, and ensures the working efficiency of the hard disk.

实施例2Example 2

本实施例提供一种硬盘高温掉盘防护系统,如图3所示,包括:温度监控模块、分区创建模块、数据导流模块、导流截止模块和数据回流模块;This embodiment provides a hard disk high-temperature disk loss protection system, as shown in FIG. 3 , including: a temperature monitoring module, a partition creation module, a data diversion module, a diversion cut-off module, and a data return module;

温度监控模块用于判断硬盘是否处于高速工作模式,若是,则设定监控周期,每隔所述监控周期,获取处于高速工作模式的硬盘的第一现有温度,温度监控模块得到第一现有温度后,向分区创建模块发送第一信号;The temperature monitoring module is used to judge whether the hard disk is in the high-speed working mode, if so, then set the monitoring period, and obtain the first existing temperature of the hard disk in the high-speed working mode every time the monitoring period, and the temperature monitoring module obtains the first existing temperature. After the temperature, send the first signal to the partition creation module;

具体的,温度监控模块判断服务器是否在进行大数据备份任务、数据升级任务或数据迁移任务等;若是,则代表硬盘处于高速工作模式,温度监控模块对硬盘采取温度监控步骤;若否,则代表硬盘处于非高速工作模式,则温度监控模块继续对硬盘的工作状态进行判断。Specifically, the temperature monitoring module judges whether the server is performing a big data backup task, a data upgrade task or a data migration task, etc.; If the hard disk is in a non-high-speed working mode, the temperature monitoring module continues to judge the working state of the hard disk.

分区创建模块用于在收到第一信号后,设定温度控制阈值,并比对所述第一现有温度和所述温度控制阈值,当所述第一现有温度达到所述温度控制阈值时,分区创建模块执行初始化步骤,得到缓存分区和高温硬盘,并向数据导流模块发送第二信号;The partition creation module is used to set the temperature control threshold after receiving the first signal, and compare the first existing temperature with the temperature control threshold, when the first existing temperature reaches the temperature control threshold , the partition creation module executes the initialization step, obtains the cache partition and the high-temperature hard disk, and sends a second signal to the data diversion module;

具体的,初始化步骤包括:分区创建模块对所述第一现有温度所对应的硬盘进行标记,所述硬盘中具有该标记的硬盘均为高温硬盘;分区创建模块获取所述高温硬盘的容量值,设定第一容量百分比,基于所述第一容量百分比和所述容量值在服务器的存储环境中创建缓存分区。Specifically, the initialization step includes: the partition creation module marks the hard disk corresponding to the first existing temperature, and the hard disks with the mark in the hard disk are all high-temperature hard disks; the partition creation module obtains the capacity value of the high-temperature hard disk , setting a first capacity percentage, and creating cache partitions in the storage environment of the server based on the first capacity percentage and the capacity value.

数据导流模块用于在收到第二信号后,根据高温硬盘和缓存分区执行数据导流步骤,并在执行所述数据导流步骤的同时,设定检测周期,每隔检测周期,数据导流模块检测缓存分区的现有空间占用率和所述高温硬盘的第二现有温度,并向导流截止模块发送第三信号;The data diversion module is used to perform the data diversion step according to the high-temperature hard disk and the cache partition after receiving the second signal, and set the detection cycle while performing the data diversion step, and every detection cycle, the data diversion The flow module detects the existing space occupancy rate of the cache partition and the second existing temperature of the high-temperature hard disk, and sends a third signal to the flow cutoff module;

具体的,数据导流步骤包括:数据导流模块将该高温硬盘的高速工作模式转换为待机模式,即停止该高温硬盘的一切读写操作,使该高温硬盘待机;数据导流模块获取海量数据处理任务中的剩余数据,即硬盘待处理的数据(即待处理数据);数据导流模块将该剩余数据传输至该缓存分区;数据导流模块获取该缓存分区的第一端口地址(即第一地址信息);数据导流模块访问磁盘控制器,并将磁盘控制器中的磁盘读写端口地址(即磁盘读写地址信息)更改为该第一端口地址。Specifically, the data diversion step includes: the data diversion module converts the high-speed working mode of the high-temperature hard disk into a standby mode, that is, stops all read and write operations of the high-temperature hard disk, and makes the high-temperature hard disk stand by; the data diversion module obtains a large amount of data Process the remaining data in the task, that is, the data to be processed on the hard disk (that is, the data to be processed); the data diversion module transfers the remaining data to the cache partition; the data diversion module obtains the address of the first port of the cache partition (that is, the first address information); the data diversion module accesses the disk controller, and changes the disk read-write port address (that is, the disk read-write address information) in the disk controller to the first port address.

导流截止模块用于在收到第三信号后,根据所述空间占用率和所述第二现有温度执行数据导流截止步骤,得到第一文件校验信息,并向数据回流模块发送第四信号;The diversion cut-off module is configured to execute the data diversion cut-off step according to the space occupancy rate and the second existing temperature after receiving the third signal, obtain the first file verification information, and send the first file verification information to the data return module. Four signals;

具体的,导流截止模块设定占用率阈值,并比对所述现有空间占用率和所述占用率阈值;导流截止模块设定第一百分比阈值,并计算该第二现有温度与所述温度控制阈值的商的第一绝对值,比对该第一绝对值与所述第一百分比对阈值;当所述第一绝对值达到所述第一百分比阈值,且所述现有空间占用率未达到所述占用率阈值时,导流截止模块停止所述剩余数据的传输,并执行数据导流截止步骤;当所述第一绝对值达到所述第一百分比阈值,且所述现有空间占用率达到所述占用率阈值时,导流截止模块停止所述剩余数据的传输,并执行数据导流截止步骤;当所述现有空间占用率达到所述占用率阈值,且所述第一绝对值未达到所述第一百分比阈值时,导流截止模块停止所述剩余数据的传输,直至所述第一绝对值达到所述第一百分比阈值时,导流截止模块执行数据导流截止步骤。Specifically, the diversion cut-off module sets the occupancy threshold, and compares the existing space occupancy with the occupancy threshold; the diversion cut-off module sets the first percentage threshold, and calculates the second existing space occupancy threshold. a first absolute value of the quotient of the temperature and the temperature control threshold, comparing the first absolute value with the first percentage pair threshold; when the first absolute value reaches the first percentage threshold, And when the existing space occupancy rate does not reach the occupancy rate threshold, the diversion cut-off module stops the transmission of the remaining data, and executes the data diversion cut-off step; when the first absolute value reaches the hundredth ratio threshold, and when the existing space occupancy rate reaches the occupancy rate threshold, the diversion cut-off module stops the transmission of the remaining data, and executes the data diversion cut-off step; when the existing space occupancy rate reaches the specified The occupancy rate threshold, and the first absolute value does not reach the first percentage threshold, the diversion cut-off module stops the transmission of the remaining data until the first absolute value reaches the first percentage When the threshold value is exceeded, the diversion cut-off module executes the data diversion cut-off step.

具体的,数据导流截止步骤包括:导流截止模块获取当前所述缓存分区中数据的所述第一文件校验信息,即MD5值;导流截止模块获取所述高温硬盘的第二端口地址(即第二地址信息);导流截止模块访问所述磁盘控制器,将磁盘控制器中的磁盘读写端口地址更改为所述第二端口地址。Specifically, the data diversion cut-off step includes: the diversion cut-off module obtains the first file verification information of the data in the current cache partition, that is, the MD5 value; the diversion cut-off module obtains the second port address of the high-temperature hard disk (that is, the second address information); the diversion cut-off module accesses the disk controller, and changes the disk read-write port address in the disk controller to the second port address.

数据回流模块用于在收到第四信号后,获取所述高温硬盘的当前读写速度,并检测所述高温硬盘的第三现有温度,设定第二百分比阈值;数据回流模块计算所述第三现有温度与所述温度控制阈值的商的第二绝对值,比对所述第二绝对值和所述第二百分比阈值,当所述第二绝对值达到所述第二百分比阈值时,数据回流模块基于所述第一文件校验信息执行数据回流步骤;The data reflow module is used to obtain the current reading and writing speed of the high-temperature hard disk after receiving the fourth signal, and detect the third existing temperature of the high-temperature hard disk, and set the second percentage threshold; the data reflow module calculates a second absolute value of the quotient of the third existing temperature and the temperature control threshold, comparing the second absolute value with the second percentage threshold, when the second absolute value reaches the first When the two percentage threshold is reached, the data reflow module executes the data reflow step based on the first file verification information;

具体的,数据回流步骤包括:数据回流模块判断高温硬盘是否处于读写状态;若是,则数据回流模块获取高温硬盘的当前读写速度,设定读写速度百分比,计算所述读写速度百分比和所述当前读写速度的乘积,数据回流模块定义所述乘积为第一回流速度,并按照该第一回流速度将所述缓存分区中的全部数据复制至所述高温硬盘中;若否,则数据回流模块设定第二回流速度,并按照所述第二回流速度将所述缓存分区中的数据复制至所述高温硬盘;数据回流模块检测复制到所述高温硬盘中数据的完整性;若所述复制到所述高温硬盘中数据完整,则数据回流模块将所述缓存分区格式化;若所述复制到所述高温硬盘中数据未完整,则数据回流模块继续复制缓存分区中的内容至高温硬盘。Specifically, the data reflow step includes: the data reflow module judges whether the high-temperature hard disk is in the read-write state; The product of the current read/write speed, the data reflow module defines the product as a first reflow speed, and copies all the data in the cache partition to the high-temperature hard disk according to the first reflow speed; if not, then The data reflow module sets a second reflow speed, and copies the data in the cache partition to the high-temperature hard disk according to the second reflow speed; the data reflow module detects the integrity of the data copied to the high-temperature hard disk; if If the data copied to the high-temperature hard disk is complete, the data reflow module formats the cache partition; if the data copied to the high-temperature hard disk is incomplete, the data reflow module continues to copy the contents of the cache partition to High temperature hard drive.

具体的,数据回流模块获取复制到所述高温硬盘中数据的第二文件校验信息;判断所述第二文件校验信息是否与所述第一文件校验信息匹配,若匹配,则数据回流模块判断所述高温硬盘中数据完整,若非匹配,则数据回流模块判断所述高温硬盘中数据未完整。Specifically, the data reflow module obtains the second file verification information copied to the data in the high-temperature hard disk; judges whether the second file verification information matches the first file verification information, and if it matches, the data reflows The module judges that the data in the high-temperature hard disk is complete, and if it does not match, the data reflow module judges that the data in the high-temperature hard disk is incomplete.

基于与前述实施例中一种硬盘高温掉盘防护方法同样的发明构思,本说明书实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现所述硬盘高温掉盘防护方法的步骤。Based on the same inventive concept as the method for protecting a hard disk from high-temperature disk loss in the foregoing embodiments, the embodiment of this specification also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium, and the computer program When executed by the processor, the steps of realizing the method for protecting the hard disk from high-temperature disk drop.

区别于现有技术,采用本申请一种硬盘高温掉盘防护方法、系统及介质可以通过本方法实现在不中断硬盘对于数据进行高速处理的同时,保证硬盘温度的稳定,通过本系统为本方法提供了有效的技术支撑,进而有效的防止了硬盘因温度过高而被系统卸载导致掉盘的问题,极大的提高了硬盘的稳定性,并提升了硬盘的数据处理效率。Different from the prior art, the application of a hard disk high-temperature drop protection method, system and media can use this method to realize the high-speed processing of data without interrupting the hard disk, while ensuring the stability of the hard disk temperature, through this system-based method It provides effective technical support, and then effectively prevents the problem that the hard disk is unloaded by the system due to excessive temperature, which greatly improves the stability of the hard disk and improves the data processing efficiency of the hard disk.

上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments disclosed in the above-mentioned embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above-mentioned embodiments can be completed by hardware, and the program can also be instructed by a program. The program completed by the relevant hardware can be stored in a computer-readable storage medium. The above-mentioned The storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.

以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only an embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technologies fields, all of which are equally included in the scope of patent protection of the present invention.

Claims (10)

1. A hard disk high-temperature disk-falling protection method is characterized by comprising the following steps:
setting a monitoring period, and acquiring a first existing temperature of the hard disk every other monitoring period;
setting a temperature control threshold, and executing an initialization step based on the first existing temperature and the temperature control threshold to obtain a high-temperature hard disk and a cache partition;
executing a data diversion step based on the high-temperature hard disk and the cache partition, and detecting the existing space occupancy rate of the cache partition and a second existing temperature of the high-temperature hard disk while executing the data diversion step;
executing a data diversion cutoff step based on the existing space occupancy rate, the second existing temperature and the temperature control threshold value to obtain first file verification information;
after the data diversion stopping step is executed, detecting a third existing temperature of the high-temperature hard disk, and executing a data backflow step based on the third existing temperature, the temperature control threshold and the first file verification information.
2. The hard disk high-temperature disk-drop protection method according to claim 1, characterized in that: the step of performing an initialization step based on the first existing temperature and the temperature control threshold further comprises:
comparing the first existing temperature with the temperature control threshold, and executing the initialization step when the first existing temperature reaches the temperature control threshold.
3. The hard disk high-temperature disk-drop protection method according to claim 1 or 2, characterized in that: the initialization step includes:
setting the hard disk corresponding to the first existing temperature as the high-temperature hard disk;
acquiring a capacity value of the high-temperature hard disk;
setting a first capacity percentage, and creating the cache partition based on the first capacity percentage and the capacity value.
4. The hard disk high-temperature disk-drop protection method according to claim 1, characterized in that: the data flow guiding step comprises the following steps:
controlling the high-temperature hard disk to stand by;
acquiring data to be processed of the high-temperature hard disk;
transmitting the data to be processed to the cache partition;
acquiring first address information of the cache partition;
and accessing the disk controller, and changing the disk read-write address information in the disk controller into the first address information.
5. The hard disk high-temperature disk-drop protection method according to claim 4, characterized in that: the step of performing a data diversion cutoff step based on the existing space occupancy, the second existing temperature, and the temperature control threshold further comprises:
setting an occupancy rate threshold value, and comparing the existing space occupancy rate with the occupancy rate threshold value;
setting a first percentage threshold, calculating a first absolute value of a quotient of the second existing temperature and the temperature control threshold, and comparing the first absolute value with the first percentage threshold;
when the first absolute value reaches the first percentage threshold value and the existing space occupancy rate does not reach the occupancy rate threshold value, stopping transmitting the data to be processed to the cache partition and executing the data diversion stopping step;
when the first absolute value reaches the first percentage threshold value and the existing space occupancy rate reaches the occupancy rate threshold value, stopping transmitting the data to be processed to the cache partition and executing the data diversion stopping step;
when the first absolute value does not reach the first percentage threshold value and the existing space occupancy reaches the occupancy threshold value, stopping transmitting the data to be processed to the cache partition, continuing to compare the first absolute value with the first percentage threshold value, and executing the data diversion cutoff step until the first absolute value reaches the first percentage threshold value.
6. The hard disk high-temperature disk-drop protection method according to claim 5, characterized in that: the data flow cutoff step comprises:
acquiring the first file verification information of the data in the current cache partition;
acquiring second address information of the high-temperature hard disk;
and accessing the disk controller, and changing the disk read-write address information in the disk controller into the second address information.
7. The hard disk high-temperature disk-drop protection method according to claim 4, characterized in that: the step of performing a data reflow step based on the third existing temperature, the temperature control threshold, and the first file verification information further comprises:
setting a second percentage threshold, calculating a second absolute value of a quotient of the third existing temperature and the temperature control threshold, and comparing the second absolute value with the second percentage threshold;
when the second absolute value reaches the second percentage threshold, the data reflow step is performed based on the first file verification information.
8. The hard disk high-temperature disk-drop protection method according to claim 7, characterized in that: the data reflow step includes:
judging whether the high-temperature hard disk is in a read-write state or not;
if so, acquiring the current read-write speed of the high-temperature hard disk, setting the read-write speed percentage, calculating the product of the read-write speed percentage and the current read-write speed, defining the product as a first reflux speed, and copying the data in the cache partition to the high-temperature hard disk according to the first reflux speed;
if not, setting a second reflow speed, and copying the data in the cache partition to the high-temperature hard disk according to the second reflow speed;
defining the data copied to the high-temperature hard disk as first data, acquiring second file verification information of the first data, comparing whether the second file verification information is matched with the first file verification information, and if so, formatting the cache partition.
9. The utility model provides a hard disk high temperature protection system that falls, its characterized in that includes: the system comprises a temperature monitoring module, a partition creating module, a data flow guide module, a flow guide cut-off module and a data backflow module;
the temperature monitoring module is used for setting a monitoring period and acquiring a first existing temperature of the hard disk every other monitoring period;
the partition creating module is used for setting a temperature control threshold value, and executing an initialization step based on the first existing temperature and the temperature control threshold value to obtain a high-temperature hard disk and a cache partition;
the data diversion module is used for executing a data diversion step according to the high-temperature hard disk and the cache partition; the data flow guiding module is further used for detecting the existing space occupancy rate of the cache partition and a second existing temperature of the high-temperature hard disk when the data flow guiding step is executed;
the diversion cut-off module is used for executing a data diversion cut-off step according to the existing space occupancy rate, the second existing temperature and the temperature control threshold value to obtain first file verification information;
the data reflow module is used for detecting a third existing temperature of the high-temperature hard disk after the data diversion ending step is executed; and the data reflow module performs a data reflow step through the third existing temperature, the temperature control threshold and the first file verification information.
10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the steps of the method for protecting a hard disk from a high-temperature disk crash of any one of claims 1 to 8.
CN202110212366.5A 2021-02-25 2021-02-25 Hard disk high-temperature disk-falling protection method, system and medium Active CN113031859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110212366.5A CN113031859B (en) 2021-02-25 2021-02-25 Hard disk high-temperature disk-falling protection method, system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110212366.5A CN113031859B (en) 2021-02-25 2021-02-25 Hard disk high-temperature disk-falling protection method, system and medium

Publications (2)

Publication Number Publication Date
CN113031859A CN113031859A (en) 2021-06-25
CN113031859B true CN113031859B (en) 2023-01-10

Family

ID=76462278

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110212366.5A Active CN113031859B (en) 2021-02-25 2021-02-25 Hard disk high-temperature disk-falling protection method, system and medium

Country Status (1)

Country Link
CN (1) CN113031859B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461452A (en) * 2022-01-27 2022-05-10 西安超越申泰信息科技有限公司 Hard disk protection method, electronic device and computer-readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901181A (en) * 2010-02-09 2010-12-01 浪潮(北京)电子信息产业有限公司 Hard disk status monitoring method and system
CN102510390B (en) * 2011-09-28 2014-01-01 北京飞杰信息技术有限公司 Method and device for instructing data migration by hard disk temperature self-detection
CN105701028B (en) * 2014-11-28 2018-10-09 国际商业机器公司 Disk management method in distributed memory system and equipment
CN105183607A (en) * 2015-08-13 2015-12-23 浪潮(北京)电子信息产业有限公司 Disk temperature monitoring method and system
CN107818025B (en) * 2017-10-31 2021-06-29 郑州云海信息技术有限公司 Hard disk cold data verification method, device, device and computer readable storage medium
CN110109802A (en) * 2019-04-16 2019-08-09 深圳市国鑫恒宇科技有限公司 A kind of real-time method and system for reading hard disk temperature
CN111611098A (en) * 2020-05-22 2020-09-01 深圳忆联信息系统有限公司 Solid state disk overheating protection method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113031859A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US8484736B2 (en) Storage device having an anti-malware protection
WO2010137067A1 (en) Storage system, control method therefor, and program
CN110111835B (en) A kind of NVMe solid-state hard disk IOPS testing method, system and device
JP2009251725A (en) Storage controller and duplicated data detection method using storage controller
CN107315616B (en) Firmware loading method and device and electronic equipment
CN113031859B (en) Hard disk high-temperature disk-falling protection method, system and medium
CN112463054A (en) Method and equipment for improving read-write performance
CN102902606B (en) A kind of data back up method and device
CN111382011B (en) A file data access method, device and computer-readable storage medium
CN117931091A (en) Abnormal power failure processing method, device, equipment, medium and product
WO2016101225A1 (en) Data backup method, apparatus and system
JP2011065622A (en) Method and system for protecting data, storage device and storage device controller
CN105740098A (en) Determination method and system for stale data among backup data
TWI438632B (en) Controlling method and controller for memory
US20120005441A1 (en) Copying apparatus, copying method, memory medium, and program
WO2014103037A1 (en) Information processing device, information processing method, and information processing program
CN106681669A (en) Method, device and system for virtual disk capacity expansion
CN117806893A (en) Processing method of abnormal data of memory device and memory device
CN114461452A (en) Hard disk protection method, electronic device and computer-readable storage medium
CN115033425B (en) A method for improving data backup success rate
CN113535616B (en) Computer readable storage medium, method and device for controlling access of flash memory device
CN102023934B (en) Data protection method and system, external storage device and storage device controller
CN107436737A (en) The method and system of suspend operation optimizations is handled in a kind of solid state hard disc
KR101459750B1 (en) SAS Data converting system to provide stability
CN114968694A (en) A kind of hard disk fault injection method, device, equipment and storage medium

Legal Events

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