A data protection method and device based on disk temperature monitoring
By implementing the disk temperature log query and over-temperature warning functions in the HBA card firmware, the operating temperature of the SAS disk is dynamically monitored, which solves the problem of business failure and data loss caused by high temperature of the disk, and achieves efficient and real-time temperature monitoring and data protection. , reducing costs.
Patent Information
- Application Number
- CN202410298075.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-03-14
AI Technical Summary
SAS disks have business failure or data loss due to excessive operating temperature. The prior art requires upper-layer operating systems, complex SMART data and additional hardware equipment for temperature monitoring, which increases costs and risks.
By adding the functions of disk temperature log query, over-temperature warning, and disk operating status adjustment to the HBA card firmware, the disk operating temperature can be dynamically monitored, warnings and safe temperature thresholds can be set, temperature exceedances can be responded to in a timely manner, and the disk business status can be adjusted.
It realizes disk temperature monitoring without upper-layer software intervention and additional hardware equipment, improves the real-time and accuracy of temperature monitoring, ensures the normal execution of disk services and the reliability of data, and reduces implementation costs.
Smart Images

Figure CN118567941B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of disk protection, and in particular relates to a data protection method and device based on disk temperature monitoring. Background Art
[0002] As an important storage medium carrier, the reliability and security of SAS disks are of vital importance. The actual working temperature of the disk is an important indicator parameter. Under the condition of continuous large data transmission and poor environmental heat dissipation, the internal working temperature of the disk will gradually increase. When it is higher than its rated working temperature, it will cause read and write business failures, increase the pressure on the host bus adapter (HBA) hardware and business software for error handling, and affect the performance of other disks in the topology. In extreme environments, high temperature environments are prone to cause permanent damage to magnetic media and cause storage data loss. Related technologies generally monitor the working temperature of the disk by adding temperature sensor devices to the surface of the disk or using the SMARTCTL tool. When the disk is overheated, the environmental fan speed is increased or the disk is processed offline. The upper-level business software needs to be involved or additional temperature monitoring equipment is added, which not only increases the equipment cost of the enterprise, but also has many risks such as temperature detection delay and affecting the normal execution of disk data business. Summary of the invention
[0003] The purpose of the present invention is to provide a data protection method and device based on disk temperature monitoring, aiming to solve the problem of business failure or data loss caused by overly high operating temperature of SAS disk, without relying on upper-level operating system, complex SMART data and additional hardware equipment.
[0004] According to a first aspect of the present invention, a data protection method based on disk temperature monitoring is provided, comprising:
[0005] Querying the temperature log of the disk to obtain the rated operating temperature of the disk, and determining the warning operating temperature threshold and the safe operating temperature threshold according to the rated operating temperature of the disk;
[0006] querying the temperature log of the disk, dynamically monitoring the actual operating temperature of the disk, and comparing the actual operating temperature with the warning operating temperature threshold and the safe operating temperature threshold;
[0007] When the actual operating temperature changes from being lower than the safe operating temperature threshold to being higher than the warning operating temperature threshold, over-temperature abnormal information is reported to the host side, and the service status of the disk is adjusted according to the first service delivery strategy of the host side; when the actual operating temperature changes from being higher than the warning operating temperature threshold to being lower than the safe operating temperature threshold, normal temperature information is reported to the host side, and the service status of the disk is adjusted according to the second service delivery strategy of the host side.
[0008] Preferably, determining the warning operating temperature threshold and the safe operating temperature threshold according to the rated operating temperature of the disk further includes:
[0009] The rated operating temperature of the disk is multiplied by a preset over-temperature warning coefficient, and the obtained value is used as the warning operating temperature threshold of the disk;
[0010] The rated operating temperature of the disk is multiplied by a preset safety temperature coefficient, and the obtained value is used as the safe operating temperature threshold of the disk.
[0011] Preferably, the step of obtaining the rated operating temperature of the disk further comprises:
[0012] After the HBA card and the disk are linked, the HBA card firmware is used to issue a SCSI command to the disk to query the temperature log page table of the disk to obtain the rated operating temperature of the disk.
[0013] Preferably, the HBA card firmware sets a normal disk management linked list and an over-temperature disk management linked list respectively, and the dynamic monitoring of the actual operating temperature of the disk further includes:
[0014] When the disk is first connected, it is mounted in the normal disk management linked list. The HBA card firmware sets the disk temperature query time slice. After the timer is triggered, the temperature log page table of the connected disk is queried through the SCSI command to obtain the actual working temperature of the disk.
[0015] Preferably, the adjusting the service status of the disk according to the first service delivery strategy of the host side further includes:
[0016] When the actual operating temperature exceeds the warning operating temperature threshold, the disk is removed from the normal disk management linked list and mounted in the overtemperature disk management linked list, and the abnormality is reported to the host side; the host side stops the service or performs data backup processing on the disk, and the HBA card firmware sets the disk to standby state by sending a SCSI command;
[0017] The adjusting the service status of the disk according to the second service delivery strategy of the host side further includes:
[0018] When the actual operating temperature is lower than the safe operating temperature threshold, the disk is removed from the over-temperature disk management list and mounted in the normal disk management list, and the normal temperature information is reported to the host side; the host side performs service recovery on the disk, and the HBA card firmware sets the disk to the running state by sending a SCSI command.
[0019] According to a second aspect of the present invention, there is provided a data protection device based on disk temperature monitoring, comprising:
[0020] A setting unit, used for querying the temperature log of the disk, obtaining the rated working temperature of the disk, and determining the warning working temperature threshold and the safe working temperature threshold according to the rated working temperature of the disk;
[0021] A monitoring unit, used for querying the temperature log of the disk, dynamically monitoring the actual operating temperature of the disk, and comparing the actual operating temperature with the warning operating temperature threshold and the safe operating temperature threshold;
[0022] A processing unit is used to report over-temperature abnormal information to the host side when the actual operating temperature changes from lower than the safe operating temperature threshold to higher than the warning operating temperature threshold, and adjust the business status of the disk according to the first business delivery strategy of the host side; when the actual operating temperature changes from higher than the warning operating temperature threshold to lower than the safe operating temperature threshold, report normal temperature information to the host side, and adjust the business status of the disk according to the second business delivery strategy of the host side.
[0023] Compared with the related art, the technical solution of the present invention has the following advantages:
[0024] The disk temperature monitoring process is carried out by constructing SCSI commands by the HBA card firmware, without the intervention of upper-level software and the need to parse complex SMART information, which improves the real-time performance of temperature monitoring. When the disk temperature exceeds the threshold, the solution responds in time to ensure that the subsequent business of the disk can be completed normally without being affected, ensuring data reliability. There is no need to add additional temperature monitoring hardware equipment and software monitoring systems, reducing implementation costs.
[0025] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures and processes indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. It is obvious that the drawings described below are certain embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 is a flow chart of a data protection method based on disk temperature monitoring according to the present invention.
[0028] Figure 2 It is an overall flow chart of disk temperature monitoring according to the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] Based on the above analysis, the present invention proposes a data protection method and device based on disk temperature monitoring, which does not rely on the upper operating system, complex SMART (Self-Monitoring Analysis and Reporting Technology) data and additional hardware devices for disk temperature monitoring. By adding functions such as disk temperature log query, early over-temperature warning and adjustment of disk operation status in the HBA card firmware, the working temperature of the disk is dynamically monitored, and the disks whose temperatures exceed the set threshold are managed separately. The upper-layer software can adjust the service delivery strategy for the over-temperature warning disk by responding to the feedback of the HBA card firmware. When the upper-layer software stops the over-temperature warning disk service, the HBA card firmware sets the over-temperature warning disk to standby mode and stops operation by sending a small computer system interface (SCSI) command. On the contrary, when the disk temperature drops to the safe operating temperature threshold, the original service delivery strategy of the disk is restored, thereby improving the data security and reliability of the disk without affecting the performance of other disks and the original service transmission of the over-temperature disk.
[0031] See also Figure 1 The data protection method based on disk temperature monitoring provided by the present invention includes:
[0032] Step 101: query the temperature log of the disk to obtain the rated operating temperature of the disk, and determine the warning operating temperature threshold and the safe operating temperature threshold according to the rated operating temperature of the disk.
[0033] The solution of the present invention can be implemented by HBA card firmware logic, and the overall implementation solution is as follows: Figure 2 After the system is powered on, the HBA card establishes a link with the disk. After the link establishment process is completed, the HBA card firmware queries the temperature log page table of the connected disk through SCSI commands to obtain the rated operating temperature of the disk.
[0034] Then, the warning operating temperature threshold and the safe operating temperature threshold of the disk are determined according to the rated operating temperature of the disk, so that when the actual operating temperature of the disk exceeds the warning operating temperature threshold, the disk overtemperature processing flow is entered, and when the actual operating temperature of the disk is lower than the safe operating temperature threshold, the disk overtemperature processing flow is exited.
[0035] In a preferred embodiment, the value obtained by multiplying the rated operating temperature of the disk by the over-temperature warning coefficient is used as the warning operating temperature threshold of the disk. The value obtained by multiplying the rated operating temperature of the disk by the safety temperature coefficient is used as the safety operating temperature threshold of the disk.
[0036] For example, the general working temperature of the disk is between 30 and 50°C, and the maximum working temperature does not exceed 70°C. Therefore, in a specific embodiment, the over-temperature warning coefficient can be set to 0.85, and the safety temperature coefficient can be set to 0.65. Taking the rated working temperature of the disk at 70°C as an example, the warning working temperature threshold is 59.5°C, and the safety working temperature threshold is 45.5°C. In this way, early warning can be achieved without causing the disk to enter the over-temperature processing flow too frequently.
[0037] Step 102: query the temperature log of the disk, dynamically monitor the actual operating temperature of the disk, and compare the actual operating temperature with the warning operating temperature threshold and the safe operating temperature threshold.
[0038] The HBA card firmware sets the normal disk management linked list and the over-temperature disk management linked list respectively. When the disk is first connected, it is mounted in the normal disk management linked list. The HBA card firmware sets the disk temperature query time slice. After the timer is triggered, the SCSI command is used to query the temperature log page table of the connected disk to obtain the actual working temperature of the disk and compare it with the warning working temperature threshold and safe working temperature threshold of the disk.
[0039] Step 103: When the actual operating temperature changes from being lower than the safe operating temperature threshold to being higher than the warning operating temperature threshold, over-temperature abnormal information is reported to the host side, and the service status of the disk is adjusted according to the first service delivery strategy of the host side; when the actual operating temperature changes from being higher than the warning operating temperature threshold to being lower than the safe operating temperature threshold, normal temperature information is reported to the host side, and the service status of the disk is adjusted according to the second service delivery strategy of the host side.
[0040] Specifically, when the actual operating temperature of the disk exceeds the warning operating temperature threshold, the disk is removed from the normal disk management list and mounted in the over-temperature disk management list, and the exception is immediately reported to the host side. The host side can adjust the service delivery strategy of the over-temperature disk according to the actual working conditions, such as stopping the service or data backup. After the host side stops delivering the service of the over-temperature disk, the HBA card firmware sets the over-temperature disk to standby state by sending a SCSI command.
[0041] Similarly, the HBA card firmware will resume the temperature query time slice, and obtain the actual working temperature of the disk again after the timer is triggered according to the above process, so as to realize dynamic temperature monitoring of the disk. When the actual working temperature of the disk in the over-temperature disk management list is higher than the safe working temperature, the HBA card firmware will send a SCSI command to set the over-temperature warning disk to standby state.
[0042] When the actual operating temperature of the disk in the over-temperature disk management list is lower than the safe operating temperature, the disk is removed from the over-temperature disk management list and mounted in the normal disk management list. At the same time, the normal temperature information is reported to the host side, and the host side can adjust the service delivery strategy of the disk according to the actual working conditions, such as restoring the service. The HBA card firmware sets the disk to the running state by sending a SCSI command.
[0043] For disks whose actual operating temperature is lower than the warning operating temperature and remain mounted in the normal disk management list, the HBA card firmware only needs to dynamically monitor the actual operating temperature of the disk. No additional processing is required, and the service and performance of the disk will not be affected.
[0044] It can be seen that the data protection method based on disk temperature monitoring proposed in the present invention has the following advantages compared with the related technologies:
[0045] The disk temperature monitoring process is carried out by constructing SCSI commands by the HBA card firmware, without the intervention of upper-level software and the need to parse complex SMART information, which improves the real-time performance of temperature monitoring. When the disk temperature exceeds the threshold, the solution responds in time to ensure that the subsequent business of the disk can be completed normally without being affected, ensuring data reliability. There is no need to add additional temperature monitoring hardware equipment and software monitoring systems, reducing implementation costs.
[0046] Accordingly, the present invention provides a data protection device based on disk temperature monitoring in a second aspect, comprising:
[0047] A setting unit, used for querying the temperature log of the disk, obtaining the rated working temperature of the disk, and determining the warning working temperature threshold and the safe working temperature threshold according to the rated working temperature of the disk;
[0048] A monitoring unit, used for querying the temperature log of the disk, dynamically monitoring the actual operating temperature of the disk, and comparing the actual operating temperature with the warning operating temperature threshold and the safe operating temperature threshold;
[0049] A processing unit is used to report over-temperature abnormal information to the host side when the actual operating temperature changes from lower than the safe operating temperature threshold to higher than the warning operating temperature threshold, and adjust the business status of the disk according to the first business delivery strategy of the host side; when the actual operating temperature changes from higher than the warning operating temperature threshold to lower than the safe operating temperature threshold, report normal temperature information to the host side, and adjust the business status of the disk according to the second business delivery strategy of the host side.
[0050] The above-mentioned device can be implemented by the data protection method based on disk temperature monitoring provided by the embodiment of the first aspect above. The specific implementation method can be found in the description of the embodiment of the first aspect, which will not be repeated here.
[0051] It is understood that the steps, names and parameters described in the above embodiments are only examples. Those skilled in the art can also easily think of combinations and adjustments to the structural features of the above embodiments according to the use requirements, and the concept of the present invention should not be limited to the specific details of the above examples.
[0052] The above embodiment of the present invention uses an HBA card to exchange data with a SAS disk to obtain the actual working temperature of the disk and control the operation status of the disk. However, for the SOC chip, those skilled in the art should understand that in addition to the HBA card, the SOC chip that can obtain the actual working temperature of the disk can also use the SCSI protocol. The temperature monitoring target is not limited to the SAS disk. As long as the technical solution of obtaining the working temperature and controlling the operation status of the disk using the SCSI protocol is used, it is within the scope of the present invention.
[0053] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data protection method based on disk temperature monitoring, characterized in that: include: Querying the temperature log of the disk to obtain the rated operating temperature of the disk, and determining the warning operating temperature threshold and the safe operating temperature threshold according to the rated operating temperature of the disk; querying the temperature log of the disk, dynamically monitoring the actual operating temperature of the disk, and comparing the actual operating temperature with the warning operating temperature threshold and the safe operating temperature threshold; When the actual operating temperature changes from being lower than the safe operating temperature threshold to being higher than the warning operating temperature threshold, over-temperature abnormal information is reported to the host side, and the service status of the disk is adjusted according to the first service delivery strategy of the host side; When the actual operating temperature changes from exceeding the warning operating temperature threshold to being lower than the safe operating temperature threshold, reporting normal temperature information to the host side, and adjusting the service status of the disk according to the second service delivery strategy of the host side; The step of obtaining the rated operating temperature of the disk further comprises: After establishing a link between the HBA card and the disk, using the HBA card firmware to issue a SCSI command to the disk, querying the temperature log page table of the disk to obtain the rated operating temperature of the disk; The adjusting the service status of the disk according to the first service delivery strategy of the host side further includes: When the actual operating temperature exceeds the warning operating temperature threshold, the disk is removed from the normal disk management linked list and mounted in the overtemperature disk management linked list, and the abnormality is reported to the host side; the host side stops the service or performs data backup processing on the disk, and the HBA card firmware sets the disk to standby state by sending a SCSI command; The adjusting the service status of the disk according to the second service delivery strategy of the host side further includes: When the actual operating temperature is lower than the safe operating temperature threshold, the disk is removed from the over-temperature disk management list and mounted in the normal disk management list, and the normal temperature information is reported to the host side; the host side performs service recovery on the disk, and the HBA card firmware sets the disk to the running state by sending a SCSI command.
2. The data protection method based on disk temperature monitoring according to claim 1, characterized in that: The step of determining a warning operating temperature threshold and a safe operating temperature threshold according to the rated operating temperature of the disk further includes: The rated operating temperature of the disk is multiplied by a preset over-temperature warning coefficient, and the obtained value is used as the warning operating temperature threshold of the disk; The rated operating temperature of the disk is multiplied by a preset safety temperature coefficient, and the obtained value is used as the safe operating temperature threshold of the disk.
3. The data protection method based on disk temperature monitoring according to claim 1, characterized in that: The HBA card firmware sets a normal disk management linked list and an over-temperature disk management linked list respectively, and the dynamic monitoring of the actual operating temperature of the disk further includes: When the disk is first connected, it is mounted in the normal disk management linked list. The HBA card firmware sets the disk temperature query time slice. After the timer is triggered, the temperature log page table of the connected disk is queried through the SCSI command to obtain the actual working temperature of the disk.
4. A data protection device based on disk temperature monitoring, characterized in that: include: A setting unit, used for querying the temperature log of the disk, obtaining the rated working temperature of the disk, and determining the warning working temperature threshold and the safe working temperature threshold according to the rated working temperature of the disk; A monitoring unit, used for querying the temperature log of the disk, dynamically monitoring the actual operating temperature of the disk, and comparing the actual operating temperature with the warning operating temperature threshold and the safe operating temperature threshold; a processing unit, configured to report over-temperature abnormality information to a host side when the actual operating temperature changes from being lower than the safe operating temperature threshold to being higher than the warning operating temperature threshold, and to adjust the service status of the disk according to the first service delivery strategy of the host side; When the actual operating temperature changes from exceeding the warning operating temperature threshold to being lower than the safe operating temperature threshold, reporting normal temperature information to the host side, and adjusting the service status of the disk according to the second service delivery strategy of the host side; The setting unit is further used for: After establishing a link between the HBA card and the disk, using the HBA card firmware to issue a SCSI command to the disk, querying the temperature log page table of the disk to obtain the rated operating temperature of the disk; The processing unit is further configured to: When the actual operating temperature exceeds the warning operating temperature threshold, the disk is removed from the normal disk management linked list and mounted in the overtemperature disk management linked list, and the abnormality is reported to the host side; the host side stops the service or performs data backup processing on the disk, and the HBA card firmware sets the disk to standby state by sending a SCSI command; When the actual operating temperature is lower than the safe operating temperature threshold, the disk is removed from the over-temperature disk management list and mounted in the normal disk management list, and the normal temperature information is reported to the host side; the host side performs service recovery on the disk, and the HBA card firmware sets the disk to the running state by sending a SCSI command.
5. The data protection device based on disk temperature monitoring according to claim 4, characterized in that: The setting unit is further used for: The rated operating temperature of the disk is multiplied by a preset over-temperature warning coefficient, and the obtained value is used as the warning operating temperature threshold of the disk; The rated operating temperature of the disk is multiplied by a preset safety temperature coefficient, and the obtained value is used as the safe operating temperature threshold of the disk.
6. The data protection device based on disk temperature monitoring according to claim 4, characterized in that: The monitoring unit is further used for: When the disk is first connected, it is mounted in the normal disk management linked list. The HBA card firmware sets the disk temperature query time slice. After the timer is triggered, the temperature log page table of the connected disk is queried through the SCSI command to obtain the actual working temperature of the disk.
Citation Information
Patent Citations
High-temperature protecting method of solid hard disk
CN108052292A
A method and a system for automatically monitoring the temperature of a storage expander under a Linux system
CN108959022A