DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-06-27 01:13:06

cinergi
Member
Registered: 2011-01-02
Posts: 14

Fan on and off with hard drives

Hello,

I'm currently running a custom fan control script which works OK.  However, I'm wondering whether there's a way to force the fan on when the hard drives are spinning, and off when they're not?  The reason being that electronics are generally more heat-tolerant than hard drives so I want to allow a higher unit temperature when the hard drives aren't spinning.

I could accomplish this very simply with a script running from crontab IF I had a command that determined whether the drives are currently spinning (e.g. a command that returns 1 when they're spinning and 0 when they're not or something like that).  Is there such a command?

Thanks
cinergi

Offline

 

#2 2011-06-27 01:24:21

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: Fan on and off with hard drives

You can monitor the system log via 'dmesg' to see if the drives are sleeping or not. You'd have to get a bit creative in your script, but it is fairly straight forward. Although, basing the fan off of the temperature should be sufficient as the drives will bump the heat up pretty quick when running.

My 3 units sit about 32-34 degrees when the drives are idle.

Last edited by FunFiler (2011-06-27 01:27:08)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#3 2011-06-29 15:59:43

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Fan on and off with hard drives

there is a ffp package named dns323-utils. I believe there are functions to check hd state within also for controlling fan and reading temp.

Offline

 

#4 2011-06-29 21:53:56

cinergi
Member
Registered: 2011-01-02
Posts: 14

Re: Fan on and off with hard drives

Thanks to all who replied.  I will look into dns323-utils.  As a potentially simpler solution, I've found the hdparm command which, when used with the -C flag, returns the current drive power status.  I don't know whether the command is supported on the DNS-323 (can't check it now) but I will see tonight.

The dmesg solution is feasible, but a bit beyond my limited script-writing skills.

Regards,
cinergi

Offline

 

#5 2011-06-30 20:02:58

cinergi
Member
Registered: 2011-01-02
Posts: 14

Re: Fan on and off with hard drives

OK, quick update.  hdparm didn't work for me because it didn't recognize any of the hard drives as valid devices (I tried all the /dev/hd*, sd*, and md* one by one).

The dns323-spindown command in the dns323-utils package works, but the problem is that it accesses the hard drive with every call, which defeats the purpose.  I tried moving it from /ffp/bin to /usr/bin but it still accesses the hard drive, probably because it calls some FFP libraries.  Not sure what to try next.

-cinergi

Offline

 

#6 2011-06-30 23:52:12

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Fan on and off with hard drives

move ffp to usb stick, there are guides.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB