bubbaQ Posted October 31, 2008 Share Posted October 31, 2008 We know that if you use smartctl to query the drive temp via SMART, it will spin up. With most script writers, we check the drive status before checking temp, so we don't spin up a sleeping drive. However, I've found that checking the temp of a drive that is already spun up, can prevent it from being spun down. Using smartctl apparently causes this behavior. Using hddtemp does not. As a test, I set a cron job to check a drive temp with smartctl every 10 minutes, and spun the disks down from the unRAID management console. Spindown was set to 1-hour in unRAID. I let it sit though 3 iterations, and each time the script said the drive was sleeping. I then spun the drives up, and let it sit. Every 10 minutes, the drive's temp was printed .... after 2 hours, the drive did not spin back down, but all of the other unRAID drives did. I tried the same experiment with hddtemp rather than smartctl, and got different results. After an hour of the temp being printed out each 10 minutes, the drive spun back down and was reported as sleeping along with all the other drives in unRAID. I have not tested this, but I also believe that if you refresh the temps in unRAID every 10 minutes, the drives will still spin down. Just a little FYI.... if you have a script that monitors drive temp, once a drive spins up, it may never spin back down if you check the temp with smartctl. Quote Link to comment
bubbaQ Posted October 31, 2008 Author Share Posted October 31, 2008 Over about an hour and a half, I refreshed the unRAID management screen every few minutes, and the drives that were spun up, did not spin down. I rese the stats, and they all still show 0, after over an hour and a half. So the temperature query by the unRAID management interface, will also prevent a drive from spinning down. Quote Link to comment
NAS Posted November 1, 2008 Share Posted November 1, 2008 We always suspected this but its nice we now have definitive proof. I always preferred hddtemp but for no other reason than i like the config file. Definitely worth moving to it now though. Nice work " Quote Link to comment
Joe L. Posted November 1, 2008 Share Posted November 1, 2008 This behaviour has probably changed with the newest release of unRAID. Since emhttp now monitors disk I/O and keeps track of the time since the last read or write for each disk internally, it should spin the disks down, when not being accessed otherwise, even if it is being checked for temperature. Joe L. Quote Link to comment
bubbaQ Posted November 1, 2008 Author Share Posted November 1, 2008 I noticed that spindown was under reconstruction and that unRAID was going to do its own monitoring of disk I/O..... and I am hoping that is the case. Quote Link to comment
Joe L. Posted November 2, 2008 Share Posted November 2, 2008 I noticed that spindown was under reconstruction and that unRAID was going to do its own monitoring of disk I/O..... and I am hoping that is the case. It is that case in unRAID 4.4-beta2. When the disk activity ceases, emhttp issues individual spin down commands. Here is the tail of my syslog after my monthly parity check finished using unraid 4.4beta2: Nov 1 11:33:51 Tower emhttp: shcmd (141): /usr/sbin/hdparm -y /dev/hda >/dev/null Nov 1 11:33:51 Tower emhttp: shcmd (142): /usr/sbin/hdparm -y /dev/sda >/dev/null Nov 1 12:34:51 Tower emhttp: shcmd (143): /usr/sbin/hdparm -y /dev/sdb >/dev/null Nov 1 18:11:52 Tower emhttp: shcmd (144): /usr/sbin/hdparm -y /dev/hdi >/dev/null Nov 1 18:31:52 Tower emhttp: shcmd (145): /usr/sbin/hdparm -y /dev/sdb >/dev/null Nov 1 18:35:52 Tower emhttp: shcmd (146): /usr/sbin/hdparm -y /dev/hda >/dev/null Nov 1 20:04:52 Tower emhttp: shcmd (147): /usr/sbin/hdparm -y /dev/hdc >/dev/null Joe L. Quote Link to comment
jimwhite Posted November 2, 2008 Share Posted November 2, 2008 doing a little research on hddtemp says that it uses smart interface as well.... Quote Link to comment
NAS Posted November 2, 2008 Share Posted November 2, 2008 To be sure we will need to test with the beta. A side project of adding identification regex to hddtemp would be an interesting one as well. Quote Link to comment
bubbaQ Posted November 2, 2008 Author Share Posted November 2, 2008 Yes, hddtemp uses the smart interface, but apparently does so differently than smartctl. Quote Link to comment
bubbaQ Posted November 2, 2008 Author Share Posted November 2, 2008 A side project of adding identification regex to hddtemp would be an interesting one as well. Since hddtemp source is available, the better path would be to just mod the source... add an additional command line parameter to return just the temp and no other text. The author has not modified the source in some time. I'm also looking at modifying the format of the database hddtemp uses, to add an indicator for what drives, (like WD Green 1TB) that will report temps w/o spinning up the drive. Quote Link to comment
NAS Posted November 2, 2008 Share Posted November 2, 2008 I reckon the drive databse could be coniderably improved in many ways. Your refinement would be an excellent start. More drives in the dbase would be a big improbement as well. This comunity could likely make a big dent in this workload quite easily since between the members we must have quite a fair cross section of the most popular global drives. Quote Link to comment
bubbaQ Posted November 22, 2008 Author Share Posted November 22, 2008 Something was acting flakey, so I redid my tests. It turns our that checking drive temps with hddtemp, will ALSO be seen as "activity" by the drive, preventing spindown by the internal drive spindown settings. As discussed previously, this problem goes away with future version of unRAID, but I wanted to correct the prior findings w/r/t hddtemp. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.