Method and system for controlling data storage device temperature

11662787 · 2023-05-30

Assignee

Inventors

Cpc classification

International classification

Abstract

A method of controlling an operating temperature of a data storage device is disclosed. A threshold temperature for the storage device is set. Over time, during operation of the data storage device, an operating temperature of the storage device is measured at a plurality of points in time. A plurality of temperature measurements as a function of time are thereby obtained. Above threshold temperature measurements are accumulated over time to form a high temperature accumulation value (V.sub.high), and below threshold temperature measurements are accumulated to form a low temperature accumulation value (V.sub.low). The low temperature accumulation value (V.sub.low) and the high temperature accumulation value (V.sub.high) are compared. If an outcome of the comparison is that the high temperature accumulation value (V.sub.high) is too high in relation to the low temperature accumulation value (V.sub.low), an operating temperature lowering action is initiated.

Claims

1. A method of controlling an operating temperature of a data storage device, the method comprising the steps of: setting a threshold temperature for the storage device, over time, during operation of the data storage device, measuring an operating temperature of the storage device at a plurality of points in time, thereby obtaining a plurality of temperature measurements as a function of time, accumulating above threshold temperature measurements over time to form a high temperature accumulation value, accumulating below threshold temperature measurements over time to form a low temperature accumulation value, comparing the low temperature accumulation value and the high temperature accumulation value, and in response to an outcome of the comparison is that the high temperature accumulation value is too high in relation to the low temperature accumulation value, initiating an operating temperature lowering action.

2. The method according to claim 1, wherein the operating temperature lowering action is at least one from the group of starting a cooling arrangement, increasing performance of the cooling arrangement, or reducing performance of the data storage device.

3. The method according to claim 1, further comprising: if the outcome of the comparison is that the low temperature accumulation value is sufficiently large in relation to the high temperature accumulation value, increasing performance of the data storage device.

4. The method according to claim 1, wherein: the high temperature accumulation value is formed by calculating a first integral of temperature measurements above the threshold temperature as a function of time, the low temperature accumulation value, is formed by calculating a second integral of temperature measurements below the threshold temperature as a function of time, and wherein comparing the low temperature accumulation value and the high temperature accumulation value is done by calculating a ratio between the low temperature accumulation value and the high temperature accumulation value.

5. The method according to claim 1, wherein the steps of accumulating and comparing comprise: starting a timer, if, at a first point in time, the measured temperature is above the threshold temperature, incrementing a counter in proportion to a number of degrees that the measured temperature is above the threshold temperature, if, at the first point in time, the measured temperature is below the threshold temperature, decrementing the counter in proportion to a number of degrees that the measured temperature is below the threshold temperature, and the outcome of the comparison is that the high temperature accumulation value is too high in relation to the low temperature accumulation value if the counter exceeds a predetermined threshold counter value.

6. The method according to claim 1, further comprising comparing the measured operating temperature to a maximum allowed temperature, the maximum allowed temperature being higher than the threshold temperature, and if the measured operating temperature is above the maximum allowed temperature, initiating an operating temperature lowering action.

7. The method according to claim 1, further comprising: measuring a first time interval from a first point in time when the measured operating temperature passed from above the threshold temperature to below the threshold temperature to a second point in time when the measured operating temperature next passed from below the threshold temperature to above the threshold temperature, comparing the first time interval with a predetermined minimum time interval, and if the first time interval is shorter than the predetermined minimum time interval, issuing an indication that further operating temperature lowering actions may be needed.

8. The method according to claim 1, further comprising: monitoring errors in operation of the storage device, and based on an occurrence of errors, adjusting at least one of the threshold temperature or the operating temperature lowering actions.

9. A temperature controller for controlling an operating temperature of a data storage device, the temperature controller comprising: a temperature sensor, the temperature controller further comprising circuitry configured to execute: setting a threshold temperature for the storage device, measuring over time, using the temperature sensor, an operating temperature of the storage device at a plurality of points in time during operation of the storage device, thereby obtaining a plurality of temperature measurements as a function of time, accumulating above threshold temperature measurements over time to form a high temperature accumulation value, accumulating below threshold temperature measurements over time to form a low temperature accumulation value, comparing the low temperature accumulation value and the high temperature accumulation value, and initiating an operating temperature lowering action in response to an outcome of the comparison is that the high temperature accumulation value is too high in relation to the low temperature accumulation value.

10. The temperature controller according to claim 9, further comprising circuitry configured to execute: increasing performance of the storage device if an outcome of the comparison is that the low temperature accumulation value is sufficiently high in relation to the high temperature accumulation value.

11. The temperature controller according to claim 9, wherein: forming the high temperature accumulation value comprises calculating a first integral of temperature measurements above the threshold temperature as a function of time, forming the low temperature accumulation value comprises calculating a second integral of temperature measurements below the threshold temperature as a function of time, and compare the low temperature accumulation value and the high temperature accumulation value by calculating a ratio between the low temperature accumulation value and the high temperature accumulation value.

12. The temperature controller according to claim 9, further comprising circuitry configured to execute: a first timer, and a counter, and wherein, the high temperature accumulation increments the counter in proportion to a number of degrees that the measured temperature is above the threshold temperature if, at a first point in time, the measured temperature is above the threshold temperature, the low temperature accumulation decrements the counter in proportion to a number of degrees that the measured temperature is below the threshold temperature if, at the first point in time, the measured temperature is below the threshold temperature, and the comparing determines that the high temperature accumulation value is too high in relation to the low temperature accumulation value if the counter exceeds a predetermined threshold counter value.

13. The temperature controller according to claim 9, further comprising circuitry configured to execute: a second timer for measuring a first time interval from a first point in time when the measured temperature passed from above the threshold temperature to below the threshold temperature to a second point in time when the measured temperature next passed from below the threshold temperature to above the threshold temperature, comparing the first time interval with a predetermined minimum time interval, and issuing an indication that further operating temperature lowering actions may be needed if the first time interval is shorter than the predetermined minimum time interval.

14. A data storage device comprising a temperature controller for controlling an operating temperature of a data storage device, the temperature controller comprising: a temperature sensor, the temperature controller further comprising circuitry configured to execute: setting a threshold temperature for the storage device, measuring over time, using the temperature sensor, an operating temperature of the storage device at a plurality of points in time during operation of the storage device, thereby obtaining a plurality of temperature measurements as a function of time, accumulating above threshold temperature measurements over time to form a high temperature accumulation value, accumulating below threshold temperature measurements over time to form a low temperature accumulation value, comparing the low temperature accumulation value and the high temperature accumulation value, and initiating an operating temperature lowering action in response to an outcome of the comparison is that the high temperature accumulation value is too high in relation to the low temperature accumulation value.

15. A non-transitory computer readable storage medium having stored thereon instructions for implementing a method, when executed on a device having processing capabilities, for controlling an operating temperature of a data storage device, the method comprising the steps of: setting a threshold temperature for the storage device, over time, during operation of the data storage device, measuring an operating temperature of the storage device at a plurality of points in time, thereby obtaining a plurality of temperature measurements as a function of time, accumulating above threshold temperature measurements over time to form a high temperature accumulation value, accumulating below threshold temperature measurements over time to form a low temperature accumulation value, comparing the low temperature accumulation value and the high temperature accumulation value, and in response to an outcome of the comparison that the high temperature accumulation value is too high in relation to the low temperature accumulation value, initiating an operating temperature lowering action.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The invention will now be described in more detail by way of example and with reference to the accompanying schematic drawings, in which:

(2) FIG. 1 is a diagram of a system including a data storage device,

(3) FIG. 2A is a graph showing variations in operating temperature in the data storage device in FIG. 1,

(4) FIG. 2B is a graph showing variations in operating temperature if a prior art method were used for controlling the operating temperature in the data storage device in FIG. 1,

(5) FIG. 2C is a graph illustrating the high temperature accumulation value and the low temperature accumulation value,

(6) FIG. 2D is a graph showing variations in operating temperature according to a variant of the inventive method,

(7) FIG. 3 is a flow chart illustrating the temperature control method according to a variant of the invention,

(8) FIG. 4 is a block diagram of an embodiment of the inventive temperature controller, and

(9) FIG. 5 is a block diagram of an embodiment of a storage device including a temperature controller according to an embodiment of the invention.

DETAILED DESCRIPTION

(10) In FIG. 1, a video surveillance system 1 is shown. The invention will be discussed in the context of such a video surveillance system. However, it should be appreciated that the embodiments are not in any way limited to video surveillance but are applicable to data storage devices in general, be they connected to a network or not.

(11) The video surveillance system 1 includes a plurality of network cameras 2 connected to a network 3. The network 3 may be any kind of network, wired or wireless, such as a local area network, a wide area network, or a cellular network. Video captured by the cameras 2 may be stored locally in the cameras 2. More importantly, captured video may be transmitted by the cameras 2, via the network 3, to a remote site, such as a control centre 4. In the control centre 4, there is equipment for viewing and storing received video. There may be a computer 5 running a video management system which provides an operator with the opportunity to view the received video on a display 6. The video may be viewed live, when it is received. Alternatively, or additionally, the received video may be stored in a recorder 7.

(12) Video may need to be retrieved at a later point in time for viewing or analysis, for instance if a crime is reported to have been committed in the area where the cameras 2 are located. At such point, it is important that the cameras have captured video of the relevant scene at the relevant time and that the captured video has been safely transmitted to the control centre 4. These parts of the creation of the video are however not of particular relevance for the present invention and will therefore not be discussed further.

(13) Of greater importance in this context is the storage of the video. The recorder 7 comprises one or more storage devices 8. In this example, the storage devices are hard disk drives. In order to be able to ensure that the relevant video is available when needed, reliable operation of the storage device 8 has to be ensured. Video data that is received from the cameras 2 need to be written safely on the hard disk drives 8. Furthermore, once written, the video data have to be safely stored and retrievable when needed.

(14) With time, hard disk drives are worn by use. One factor that influences the service life of hard disk drives and other data storage devices is temperature. Elevated temperatures tend to reduce MTBF. Therefore, manufacturers set limits to the temperatures at which the hard disk drives can be stored and operated. As noted above, during operation, it is essentially only the upper limit of the allowable operating temperature range that is an issue.

(15) To protect the hard disk drive from overheating, the operating temperature is monitored and if the operating temperature passes above the maximum allowable operating temperature, action is taken to lower the temperature. Such operating temperature lowering action may be to turn on a cooling fan or other cooling arrangement or to increase the power of such a cooling arrangement. Other possible operating temperature lowering actions include reducing the performance of the hard disk drive 8 or even turning it off. If there are more than one hard disk drive 8 in the recorder 7, the hard disk drives may take turns at storing incoming video data, thereby allowing one hard disk drive to cool down while data are being written to the other.

(16) Overzealous operating temperature control leads to unnecessarily high costs of cooling arrangements and high power consumption for cooling. It also leads to lower data storage device performance and higher costs for redundant storage devices. Rather than strictly keeping the hard disk drive below the maximum allowable operating temperature or threshold temperature stated by the manufacturer, the inventor has found that the operating temperature may be allowed to surpass that threshold temperature temporarily, as long as the temperature load above the threshold temperature is not too high compared to periods of operation below the threshold temperature. In other words, operation above the threshold temperature for a limited period of time is acceptable provided the storage device gets sufficient periods of time to recuperate. Thus, the historical heat load on the data storage device should be monitored and operation above the threshold temperature should be balanced by operation below the threshold temperature by means of operating temperature lowering action.

(17) Temperature control of the storage device 8 will now be discussed initially with reference to FIG. 2A, which shows an example of how the operating temperature of the storage device 8 may vary without temperature control.

(18) In periods of high ambient temperature, the operating temperature T.sub.op increases and in periods of low ambient temperature, the operating temperature T.sub.op decreases. Furthermore, the operating temperature T.sub.op increases in periods of high workload on the storage device, such as when large amounts of video data are written to the hard disk drive 8 and when large amounts of video data are read from the hard disk drive 8. If no temperature control is applied, unfortunate combinations of high ambient temperature and high workload may lead to operating temperatures that are detrimental to the hard disk drive 8. As a consequence, the expected service life of the hard disk drive may be shortened, leading to data loss and costs for repairs or replacement of the hard disk drive 8.

(19) As already noted, some form of temperature control is usually applied in order to protect storage devices such as the hard disk drive 8. In FIG. 2B, another example of operating temperature variation of the hard disk drive 8 are shown. Additionally, an upper limit T.sub.limit of the operating temperature range stated by the manufacturer is illustrated by a dashed horizontal line. In this example, the operating temperature T.sub.op of the hard disk drive 8 is monitored and any time it reaches the upper limit T.sub.limit, operating temperature lowering action is taken. Thus, a fan or other cooling arrangement may be started, or cooling power may be increased. Alternatively, or additionally, the workload on the hard disk drive 8 may be reduced. In this manner, the operating temperature decreases. When the operating temperature T.sub.op has been lowered by a predetermined amount, the operating temperature lowering action ceases.

(20) As may be seen from the unregulated example in FIG. 2A, the operating temperature increases and decreases depending on ambient temperature and workload. It should be appreciated that the operating temperature does at times pass back below the upper limit T.sub.limit after having exceeded it, even without application of operating temperature lowering action, simply by workload going down by itself and by naturally occurring lowering of the ambient temperature. This may be used to advantage, reducing the need for active cooling and forced lowering of data storage device performance. The hard disk drive 8 may be allowed to operate at elevated operating temperatures for limited periods of time as long as the heat load above the upper limit is balanced historically by operation below the upper limit of the operating temperature range.

(21) With reference to FIG. 2C, this balancing of the heat load will now be described. Once more, an example of operating temperature variations is shown. A horizontal line marks the threshold temperature T.sub.th that is used in the operating temperature control scheme. This threshold temperature may or may not be the same as the upper limit T.sub.limit of the operating temperature range stated by the hard disk manufacturer. Shaded areas below the threshold temperature T.sub.th are marked V.sub.low, signifying the temperature load below the threshold temperature T.sub.th, whereas shaded areas above the threshold temperature are marked V.sub.high, signifying the temperature load above the threshold temperature T.sub.th. The temperature load below the threshold temperature T.sub.th may be represented by a low temperature accumulation value V.sub.low and the temperature load above the threshold temperature T.sub.th may be represented by a high temperature accumulation value V.sub.high. The low temperature accumulation value V.sub.low and the high temperature accumulation value V.sub.high may be determined in one of a few different ways, as will be discussed further below. No matter how they are determined or calculated, they do in one way or another represent the load or stress posed on the hard disk drive 8 by the operating temperature. The low temperature accumulation value V.sub.low and the high temperature accumulation value V.sub.high each reflect for how long and by how much the operating temperature T.sub.op has been below or above the threshold temperature T.sub.th, respectively.

(22) The operating temperature T.sub.op is monitored during operation and at a current time to, the possible need for operating temperature lowering action is determined based on a comparison of the low temperature accumulation V.sub.low and the high temperature accumulation value V.sub.high. If the high temperature accumulation V.sub.high is sufficiently small compared to the low temperature accumulation value V.sub.low, it is determined that there is no need to take any operating temperature lowering action. If, on the other hand, it is found that the high temperature accumulation value V.sub.high is too high compared to the low temperature accumulation value V.sub.low, an operating temperature lowering action is initiated. Thus, a fan may be started, or the speed of the fan may be increased if it is already running. If the hard disk drive is equipped with another cooling arrangement, such as a Peltier element, that may similarly be started or the performance of such a cooling arrangement may be increased. Another possible way of lowering the operating temperature of the hard disk drive 8 is to lower the workload on it. Thus, writing to the hard disk drive 8 may temporarily be stopped and data instead buffered in RAM or written to another hard disk drive. Similarly, reading of data from the hard disk drive 8 may be interrupted. Once the operating temperature Top has been lowered to a predetermined reduced temperature T.sub.red, the operating temperature lowering action ceases.

(23) The low temperature accumulation value V.sub.low and the high temperature accumulation value V.sub.high may be calculated as the integral of the measured operating temperature T.sub.op over time. The low temperature accumulation value V.sub.low is calculated as the integral of the operating temperature as a function of time when the operating temperature is below the threshold temperature T.sub.th. This may be expressed as:
V.sub.low=∫.sub.t=0.sup.t=t.sup.0T.sub.op(t),T.sub.op<T.sub.th

(24) The high temperature accumulation value T.sub.high is calculated as the integral of the operating temperature as a function of time when the operating temperature T.sub.op is above (or equal to) the threshold temperature T.sub.th. This may be expressed as:
V.sub.high=∫.sub.t=0.sup.t=t.sup.0T.sub.op(t),T.sub.op≥T.sub.th

(25) A ratio R between the high temperature accumulation value T.sub.high and the low temperature accumulation value T.sub.low is then calculated:

(26) R = V high V low

(27) The ratio R is compared to a reference ratio R.sub.ref and if the calculated ratio R is above the reference ratio R.sub.ref, the high temperature accumulation value V.sub.high is too high compared to the low temperature accumulation value V.sub.low. In other words, the temperature load on the hard disk drive 8 has up until the current time to been too high, meaning that the operating temperature T.sub.op needs to be reduced by one or more of the available operating temperature lowering actions. Conversely, if the calculated ratio R is below the reference ratio R.sub.ref, the temperature load on the hard disk drive 8 up until the current time is acceptable and there is no need to reduce the operating temperature T.sub.op.

(28) The low temperature accumulation value V.sub.low and the high temperature accumulation value V.sub.high need not be determined by calculation of integrals in the strictest mathematical sense. Similarly, the comparison thereof need not be done as the calculation of a ratio, strictly speaking. In a practical implementation, the determination of the low and high temperature accumulation values V.sub.low, V.sub.high and the comparison thereof may be done as will be described in the following with reference to FIGS. 2C and 4. A timer 21 in a temperature controller 30 is started, preferably at the time the hard disk drive 8 is put in operation. At predetermined time intervals, such as once a minute or once every five minutes, the operating temperature T.sub.op of the hard disk drive 8 is measured. A counter 22 is used for keeping track of the temperature load on the hard disk drive 8. Depending on whether the measured temperature T.sub.op is below or above the threshold temperature T.sub.th, the counter 22 is decremented or incremented. Thus, if at a first point in time t.sub.1, the measured operating temperature T.sub.op is above the threshold temperature T.sub.th, the counter is increased by one. Then, if at the next measurement, at a second point in time t.sub.2, the temperature is still above the threshold temperature T.sub.th, the counter 22 is increased by one again. If, on the other hand, the temperature at the second point in time t.sub.2, is below the threshold temperature T.sub.th, the counter 22 is decreased by one. For a more accurate monitoring of the heat load, the increments and decrements of the timer 21 should be done in proportion to how much the operating temperature is above or below the threshold temperature T.sub.th. For example, if the operating temperature T.sub.op at the first point in time is two degrees Celsius above the threshold temperature T.sub.th, the counter 22 is increased by two, and if the operating temperature T.sub.op at the second point in time is one degree Celsius above the threshold temperature T.sub.th, the counter is increased again by one, giving it a value of three more than before the first point in time t.sub.1. Decreasing the counter 22 may or may not be done with the same proportionality as the increases. In its simplest form, the counter 22 may be decreased by one if the operating temperature at the first point in time t.sub.1 is one degree Celsius below the threshold temperature T.sub.th, and it may be decreased by two if the operating temperature T.sub.op is two degrees Celsius below the threshold temperature. However, studies of the reliability of the hard disk drive may have shown that the proportionality should be different because each degree of excess temperature may need to be offset by a different number of degrees or minutes below the threshold temperature T.sub.th. Just as an example, it may be possible to compensate five minutes of time at an operating temperature T.sub.op that is one degree above the threshold temperature T.sub.th with five minutes of time at an operating temperature T.sub.op that is one degree below the threshold temperature T.sub.th. Continuing this example, it may not be possible to compensate five minutes of time at an operating temperature T.sub.op that is five degrees above the threshold temperature with five minutes of time at an operating temperature Top that is five degrees below the threshold temperature T.sub.th, or with 25 minutes of time at an operating temperature T.sub.op that is one degree below the threshold temperature T.sub.th. Instead, it may be necessary to compensate higher excess temperatures with longer periods of time below the threshold temperature T.sub.th. Just as an example, five minutes at an operating temperature five degrees above the threshold temperature T.sub.th may need to be compensated with ten minutes of at least five degrees below the threshold temperature T.sub.th, or one hour at an operating temperature T.sub.op that is at least one degree below the threshold temperature T.sub.th.

(29) The comparison of the high temperature accumulation value V.sub.high and the low temperature accumulation value V.sub.low is done by comparing the counter value C to a predetermined threshold counter value C.sub.th. If the counter value C at a given point in time is higher than the predetermined threshold counter value, this indicates that the historical temperature load on the hard disk drive 8 has been too high and that operating temperature lowering action is required. Again, if the counter value C is lower than the threshold counter value C.sub.th, this indicates that the historical temperature load on the hard disk drive is acceptable. In that case, operating temperature lowering action is not needed.

(30) Regardless of the exact methods used for determining the low and high temperature accumulation values V.sub.low, V.sub.high, and the comparison thereof, the temperature control methods described above may be supplemented by an absolute temperature limit in the form of a maximum allowed temperature T.sub.max, as indicated in FIG. 2D. The maximum allowed temperature T.sub.max is a temperature that the hard disk drive is not allowed to exceed, no matter the historical temperature load. Thus, control in relation to the maximum allowed temperature T.sub.max will essentially be done in the same way as the prior art temperature control approach described in the background section of the present application. If the operating temperature T.sub.op reaches the maximum allowed temperature T.sub.max, operating temperature lowering action is initiated and continues until the operating temperature has been lowered sufficiently.

(31) The new temperature control approach will now be summarised with the help of the flow chart in FIG. 3. In a first step S1, the threshold temperature T.sub.th for the hard disk drive 8 is set. This may be pre-programmed by the manufacturer of the hard disk drive 8. During operation of the storage drive, in step S2, the operating temperature T.sub.op of the hard disk drive 8 is measured at a plurality of points in time. Thereby, the operating temperature T.sub.op is monitored over time, giving a plurality of temperature measurements as a function of time. When the operating temperature T.sub.op measured in step S2 is above the threshold temperature T.sub.th, in step S3a, such threshold temperature measurements are accumulated to form the high temperature accumulation value V.sub.high. When the measured operating temperature T.sub.op is instead below the threshold temperature T.sub.th, such below threshold temperature measurements are accumulated to form the low temperature accumulation value V.sub.low in step S3b. The arrows returning from the accumulation steps S3a and S3b to the measurement step S2 indicate that these steps are repeated over time, updating the accumulation values V.sub.low, V.sub.high, in order to create a historical record of the operating temperature T.sub.op.

(32) In step S4, a comparison is performed where the low temperature accumulation value V.sub.low and the high temperature accumulation value V.sub.high are compared. If the outcome of the comparison is that the high temperature accumulation value V.sub.high is too high in relation to the low temperature accumulation value V.sub.low, an operating temperature lowering action is initiated in step S5.

(33) In a variant of the method described thus far, an additional step may be added making it possible to increase hard disk drive performance. In an optional step S6, if the outcome of the comparison in step S4 is that the low temperature accumulation value V.sub.low is sufficiently large in relation to the high temperature accumulation value V.sub.high, performance of the hard disk drive is increased, for instance increasing data writing or reading speed. In this way, if the historical heat load on the hard disk drive 8 has been low, the user can be afforded higher hard disk drive performance.

(34) The timer 21, or an additional timer, may also be used for keeping track of how well the operating temperature lowering actions work. By measuring the time from when the operating temperature passes the threshold temperature T.sub.th on the way down to when the operating temperature again passes above the threshold temperature T.sub.th it may be detected if the hard disk drive too quickly becomes too hot again after having cooled down. If the time interval during which the hard disk drive 8 operates below the threshold temperature T.sub.th is short, i.e., it is shorter than a predetermined minimum time interval, this may mean that the operating temperature lowering action taken has been insufficient. An indication to this effect may therefore be issued, making it possible to adjust the operating temperature lowering action in the future. This may be useful both to a user of the hard disk drive if the temperature control method can be adjusted by user input, and to a manufacturer of hard disk drives or temperature controllers for hard disk drives, as it may be used as input during design. Short intervals between periods of operation above the threshold temperature T.sub.th may be detrimental to the hard disk drive 8, as frequent temperature changes may put extra stress on the hard disk drive.

(35) Errors in the operation of the hard disk drive may be continuously or periodically monitored. If errors occur or if errors occur unacceptably frequently, adjustments to the temperature control scheme may be made. Thus, the threshold temperature T.sub.th may be adjusted, or more specifically lowered. Alternatively, or additionally, the temperature lowering actions may be adjusted, e.g., increasing cooling performance or further reducing hard disk drive performance.

(36) With reference to FIG. 4, a temperature controller 30 according to an embodiment of the invention will now be described. The temperature controller 30 has a temperature sensor 31. The temperature controller 30 also has circuitry 32 configured to execute a number of functions. The circuitry 32 may include a processor 33, such as a central processing unit (CPU), microcontroller, or microprocessor. The processor 33 is configured to execute program code performing functions of the temperature controller 30. These functions include a threshold temperature setting function 34 for setting the threshold temperature T.sub.th for the storage device 8, a temperature measurement function 35 for measuring over time, using the temperature sensor 31, the operating temperature of the storage device at a plurality of points in time during operation of the storage device 8, a high temperature accumulation function 36 for accumulating above threshold temperature measurements over time to form a high temperature accumulation value V.sub.high, a low temperature accumulation function 37 for accumulating below threshold temperature measurements over time to form a low temperature accumulation value V.sub.low, a comparing function 38 for comparing the low temperature accumulation value V.sub.low and the high temperature accumulation value V.sub.high, and an operating temperature lowering function 39 for initiating an operating temperature lowering action if an outcome of the comparison is that the high temperature accumulation value V.sub.high is too high in relation to the low temperature accumulation value V.sub.low.

(37) The temperature controller 30 in FIG. 4 operates in accordance with the methods described above.

(38) Optionally, the temperature controller 30 may be equipped with circuitry executing further functions, in line with the variations of the methods already described.

(39) Thus, in some embodiments, the temperature controller 30 comprises circuitry configured to execute a performance increasing function 40. This performance increasing function 40 increases the performance of the storage device 8 if the outcome of the comparison in the comparing function 38 is that the low temperature accumulation value V.sub.low is sufficiently high in relation to the high temperature accumulation value V.sub.high. As noted above, this makes it possible to get better performance from the storage device if it turns out the historical heat load on it has been low.

(40) An optional temperature comparing function 41 of the temperature controller may make it possible to compare the operating temperature T.sub.op to the maximum allowed temperature T.sub.max, thereby ensuring that operating temperature lowering action is initiated if the operating temperature exceeds the maximum allowed temperature T.sub.max for preventing damage to the hard disk drive 8.

(41) The temperature controller 30 may also have a first timer function 42 and a counter function 43 for performing the counter incrementation approach to accumulating low and high temperature measurements and comparing low and high temperature accumulation values V.sub.low, V.sub.high as described above in relation to the temperature control method. The first timer function 42 may employ the timer 21 and the counter function may employ the counter 22.

(42) Optionally, the temperature controller 30 may have a second timer function 44, a time comparing function 45, and an indicator function 46 for keeping track of how quickly the operating temperature T.sub.op exceeds the threshold temperature T.sub.th again after having been reduced. Thus, if the time comparing function 45 determines that the time interval from when the operating temperature was lowered to below the threshold temperature T.sub.th to when it once more exceeded the threshold temperature T.sub.th is shorter than the predetermined minimum time interval, the indicator function will issue an indication that further operating temperature lowering action may be needed, as discussed above in the context of the method. The second timer function 44 may employ the same timer 21 that the first timer function employs, or it may employ another timer (not shown).

(43) FIG. 5 is a block diagram of an embodiment of a storage device 8 including a temperature controller 30 according to an embodiment. By having the temperature controller 30 integrated in the hard disk drive, safe control of the operating temperature of the hard disk drive may be efficiently ensured. If the hard disk drive 8 is included in a recorder 7, the temperature controller may be integrated in the recorder 7 but separate from the hard disk drive 8. This may be particularly advantageous if the recorder 7 has more than one hard disk drive 8. In such case, one temperature controller 30 may control the operating temperature of two or more hard disk drives 8 in the recorder 7. This may make it possible to coordinate operating temperature lowering actions for two or more hard disk drives, such that it can be ensured that one hard disk drive is available for writing when another hard disk drive needs to lower performance for returning to a safe operating temperature T.sub.op. Pre-emptive cooling of one of the hard disk drives could in such case be initiated before the historical heat load thereon requires it.

(44) Alternatively, the temperature controller may be arranged separately and be operationally connected to one or more hard disk drives 8 whose operating temperature it should control.

(45) The temperature controller 30 may be embodied in hardware, firmware, or software or any combination thereof. When embodied as software, the temperature controller may be provided in the form of computer code or instructions that when executed on a device having processing capabilities will implement the temperature control method described above. Such device may for instance be, or include, a central processing unit (CPU), a graphics processing unit (GPU), a custom-made processing device implemented in an integrated circuit, an ASIC, an FPGA, or logical circuitry including discrete components.

(46) It will be appreciated that a person skilled in the art can modify the above described embodiments in many ways and still use the advantages as shown in the embodiments above. As an example, the temperature control method and temperature controller have mainly been described in relation to hard disk drives, but as noted above, it is equally applicable to other data storage devices, such as SSDs.

(47) Furthermore, although the description above is initially directed to a video surveillance system, this is but an example, to explain a context in which data may need to be stored safely and securely. The temperature control approach is by no means limited to storage of video data but can be applied to any situation in which data needs to be stored in a data storage device.

(48) As described above, the temperature controller and method start keeping track of the heat load below and above the threshold temperature at the time the storage device is taken into operation. In some variations, the temperature control may be applied using a sliding time window, such that the low and high temperature accumulation values are accumulated over the latest hour, day, or month, for instance, rather than the entire life of the storage device. This may be reasonable in situations where the temperature load on the storage device, from ambient temperature and workload, is fairly stable or cyclic. It may also be reasonable to restart the accumulation of the low and high temperature accumulation values if the storage device has been completely shut off for an extended time, or if it has been repaired or restored.

(49) It may be noted that although this disclosure relates to data storage devices, there may also be other electronic devices to which the disclosed temperature control may be applied. The prerequisite for such temperature control is that the device is of a type that can withstand temporary operation above the threshold temperature given sufficient periods of operation below the threshold temperature.

(50) Thus, the concepts should not be limited to the shown embodiments but should only be defined by the appended claims.