× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: ReadyNAS RN 104 Automatic FAN-Control

moseleypj
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

xeltros wrote:
My RN104 is telling me FAN : 787 RPM, CPU : 53°c, HDD1 : 37°c, HDD2 : 41°c, HDD3 : 40°c, HDD4 : 37°c. He is sitting idle right now (not home) but I've never seen it going over 78°C.
I believe disks are quite tolerant to high temperature. I think I remember a google study saying that anything below 45°c is optimal to avoid disk failure, so 44°c is still good 😉 and even if it goes to 47-48 I don't think this will really matter. As for the SoC, I believe marvell took some margin when releasing the spec. I don't think we really risk anything with this (Netgear has a 3 year warranty on the hardware for the RN104 I recall). I believe if they were having any doubt they would have set the threshold 5°c lower and bump the fan speed by 50-100RPM just to be safe.


I agree that the drives can sit quite happily around 40°C and the SoC at 53°C for quite some time. The fact of the matter is that heat shortens the life of components though. With no modifications my drives and NAS may last 5 years each, but by that time the warranty on both items have expired 😞 If I can run the fan a little faster and replace it when the bearings are shot I may be able to get another year or two out of the drives and NAS 🙂
Message 26 of 39
StephenB
Guru

Re: ReadyNAS RN 104 Automatic FAN-Control

The google study xeltros referred to is here: http://static.googleusercontent.com/med ... ilures.pdf

Google found that disk failures due to temperature did not climb until > 40C. Note the 3-year data points in figure 5.

The study is dated (data was collected between December 2005 and August 2006, the oldest drives in the study were manufactured in 2002). I haven't seen anything similar published on modern drives though.
Message 27 of 39
dishmagic66
Guide

Re: ReadyNAS RN 104 Automatic FAN-Control

You just run it from the prompt?
example:
bash /pathtoscript/fan.sh

your lines in this script and chmod 755 fan.sh
I tried it like this, but not much happening.

Script is running:
root@Readynas:/data/gast# ps aux | grep fan.sh
root 3622 0.0 0.1 4092 784 pts/0 S+ 14:38 0:00 grep fan.sh
Message 28 of 39
moseleypj
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

dishmagic66 wrote:
You just run it from the prompt?
example:
bash /pathtoscript/fan.sh

your lines in this script and chmod 755 fan.sh
I tried it like this, but not much happening.

Script is running:
root@Readynas:/data/gast# ps aux | grep fan.sh
root 3622 0.0 0.1 4092 784 pts/0 S+ 14:38 0:00 grep fan.sh


Before I say anything else I'd just like to state that I'm no BASH or linux guru. The script I wrote above probably isn't the best and I'd appreciate any advice on improving it.

I placed the script at /root/fanoveride and then get it to start as a service. You need to put the following file in /etc/init.d/fanoveride
#!/bin/sh
### BEGIN INIT INFO
# Provides: FanOveride
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: FanOveride overides the default ReadyNAS fan control
### END INIT INFO

SCRIPT=~/fanoveride
RUNAS=root

PIDFILE=/var/run/fanoveride.pid
LOGFILE=/var/log/fanoveride.log

start() {
if [ -f /var/run/$PIDNAME ] && kill -0 $(cat /var/run/$PIDNAME); then
echo 'Service already running' >&2
return 1
fi
echo 'Starting service.' >&2
local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!"
su -c "$CMD" $RUNAS > "$PIDFILE"
echo 'Service started' >&2
}

stop() {
if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then
echo 'Service not running' >&2
return 1
fi
echo 'Stopping service.' >&2
kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE"
echo 'Service stopped' >&2
}

uninstall() {
echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
local SURE
read SURE
if [ "$SURE" = "yes" ]; then
stop
rm -f "$PIDFILE"
echo "Notice: log file is not be removed: '$LOGFILE'" >&2
update-rc.d -f <NAME> remove
rm -fv "$0"
fi
}

case "$1" in
start)
start
;;
stop)
stop
;;
uninstall)
uninstall
;;
retart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|uninstall}"
esac


Be sure to make sure both the script and the init.d script are executable, then run the last command:
chmod +x ~/fanoveride
chmod +x /etc/init.d/fanoveride
update-rc.d fanoveride defaults


You should then be able to run it as a service which starts automatically at boot. To start/stop manually simply run:
service fanoveride start
service fanoveride stop


I've been performing a large file transfer to the device for the last 12 hours or so and before the script the NAS was running at around 60°C and 1000 RPM. With the script and a little tuning I've got it running at 52°C and 1400 RPM. It doesn't seem to make much of a difference to the HDDs but then again they wern't above 40°C so they wern't really the problem anyway! :wink:
Message 29 of 39
dishmagic66
Guide

Re: ReadyNAS RN 104 Automatic FAN-Control

I had to delete a tilde in /etc/init.d/fanoveride to make it work:

    SCRIPT=~/fanoveride   
RUNAS=root


when it is:
    SCRIPT=/fanoveride   
RUNAS=root


then it works.
Temperature is more stable now.
Pushing 10GB to the nas and the fan spins at 1400 rpm and the temp is 58 degrees.
When Idling then it spins at 850 - 1000 rpm and the temp is 50 degrees.
Not bad if you ask me.
Message 30 of 39
moseleypj
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

The fact you had to remove a tilde means you're now launching the file from the root directory which isn't advisable. I placed the script in /root folder which is the home folder for root which is what the tilde refers to. Anyhow, it shouldn't make much difference. My setup is currently running at 45C and 930RPM at idle and about 52C and 1500RPM under load.
Message 31 of 39
dishmagic66
Guide

Re: ReadyNAS RN 104 Automatic FAN-Control

Thnx, didn't know that. I'll change it back and put the script in /root
What temperature settings are you using in the script? Overhere i'm using the default one. 45 min and 65 max
Message 32 of 39
moseleypj
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

No problem, let me know if you need any more help with that script 🙂

Here's the settings I've currently got running on both my RN102 devices
MAXFAN=100   # Maximum operable speed
MINFAN=0 # Minimum operable speed
MINPWM=75 # PWM Limit
MAXPWM=255 # PWM Limit
MINTEMP=42 # Min temp -> Fan slowest
MAXTEMP=58 # Max temp -> Fan fastest
NEWSPEED=50 # Initial fan speed (%)


Here's the fan and temperature over the last 4 hours from my first RN102 with a 3TB WD Red. It's been used to play HD videos over the network to our Raspberry Pi for the last 5 hours or so.



This is the other NAS which is just idling at the moment with 2x 1TB WD Green HDDs:



On a different note do you know how to integrate those graphs in to the frontview/dashboard control panel as seen in Easy fix fan/temp OS6 issues on x86 legacy #no support thread?
Message 33 of 39
moseleypj
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

I forgot to add that if you want cooler operation or minimum noise you can do so by editing mainly the MINTEMP and MAXTEMP variables. The graph below shows two calibrations for both scenarios. Reducing both temperatures for a more conservative temperature results in the fan working faster across the range to move the operating temperature lower down the graph. Similarly for a quieter operation move the temperatures higher. Or if you're fancy, move just one of them :wink:

Message 34 of 39
c6p0
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

Thanks all for the previous scripts which help me a lot..

#!/bin/sh
# ReadyNAS 104 fan speed settings (forced)
#
# value 96 for 780 RPM
# value 128 for 960 RPM
# value 160 for 1280 RPM
# value 176 for 1555 RPM
# value 192 for 1950 RPM
# value 200 for 2220 RPM
# value 208 for 2600 RPM
# value 224 for 3600 RPM
# value 255 for 3600 RPM
#
echo -n "Current Fan speed is "; cat /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
chmod +w /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
echo 192 > /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
chmod -w /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
echo -n "New fan speed is now "; cat /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
exit 0


the above script override pwm1 file with my data (192 to get 1950RPM) and make pwm1 file read-only
one day, netgear will do a proper job.. the I do not need more
the script must be executed every time ReadyNAS is powered up



This is what I get after one hour of disk scrubbing in the background
Message 35 of 39
aks
Virtuoso
Virtuoso

Re: ReadyNAS RN 104 Automatic FAN-Control

These temps do not seem too high, but compared to my NV+ v2 they are!

I have 3 WD RED 2TB installed: Disk1=22C, Disk2=23C, Disk3=22C. Fan always runs at 1365rpm. Under extended heavy load (many hours) the temps crept up to 28-30C, I've never seen anything higher. (Room temp ~22C).
Message 36 of 39
c6p0
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

What is a Safe Hard Disk Temperature Range ?
Drawing conclusions from the Google paper, smaller independent studies and tech forum users:

Less than 25°C: Too cold
25°C to 40°C: Ideal
41°C to 50°C: Acceptable
More than 50°C: Too hot

See more at: http://www.buildcomputers.net/hdd-temperature.html

3TB red caviar have 3 platters. they use more watts than 2 platters 2TB. I also (nearly) disabled automatic parking of the drives
See https://www.readynas.com/forum/viewtopic.php?f=11&t=74601

I believe that 30-35 degrees C. for Hard disk is ideal. This my target
Message 37 of 39
StephenB
Guru

Re: ReadyNAS RN 104 Automatic FAN-Control

WDC has the precisely the same power specs for the 2 TB and 3 TB red drives. (http://www.wdc.com/wdproducts/library/S ... 771442.pdf)

4 TB is a bit higher, 1 TB is a bit less. Watts/TB are lowest for the 4 TB, and highest for the 1 TB.

Personally I think your temps are fine, I wouldn't put any effort in getting making them run 2 degrees cooler under that load. For what it's worth, the lowest failure rate in the Google study was 38 degrees C (see figures 4, 5 here: http://static.googleusercontent.com/med ... ilures.pdf). Though that data is getting pretty old now.
Message 38 of 39
townsmcp
Aspirant

Re: ReadyNAS RN 104 Automatic FAN-Control

Hi all
Sorry to sound dense, I have been trying to get this script going but to no joy 😞
When I do start I get the following:

root@JTS104:/# service fanoveride start
env: /etc/init.d/fanoveride: No such file or directory

so to confirm I have a file called fanoveride at /root/ with the following:

#!/bin/bash

## Variables ##
FANPWMPATH=/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
FANSPEEDPATH=/sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/fan1_input
CORETEMPPATH=/sys/devices/platform/axp-temp.0/temp1_input
MAXFAN=100 # Maximum operable speed
MINFAN=0 # Minimum operable speed
MINPWM=75 # PWM Limit
MAXPWM=255 # PWM Limit
MINTEMP=42 # Min temp -> Fan slowest
MAXTEMP=58 # Max temp -> Fan fastest
NEWSPEED=50 # Initial fan speed (%)

## Functions ##
function getReadings {
FANPWM=$(cat $FANPWMPATH)
FANSPEED=$(cat $FANSPEEDPATH)
CORETEMP=$(cat $CORETEMPPATH)
}

function setFanSpeed {
if [ $NEWSPEED -lt $MINFAN ]; then
NEWSPEED=$MINFAN
fi
if [ $NEWSPEED -gt $MAXFAN ]; then
NEWSPEED=$MAXFAN
fi
NEWPWM=$(expr $MAXPWM - $MINPWM)
NEWPWM=$(expr $NEWPWM \* $NEWSPEED)
NEWPWM=$(expr $NEWPWM / 100)
NEWPWM=$(expr $NEWPWM + $MINPWM)

echo $NEWPWM > /sys/devices/platform/mv64xxx_i2c.0/i2c-0/0-003e/pwm1
}

function calcFanPercent {
TEMPRAN=$(expr $MAXTEMP - $MINTEMP)
TEMPREL=$(expr $CORETEMP - $MINTEMP)
TEMPREL=$(expr $TEMPREL \* 100)
TEMPPER=$(expr $TEMPREL / $TEMPRAN)
NEWSPEED=$TEMPPER
}

###################################################################
echo "Automatically controlling fan speed..."
while true
do
getReadings
echo "Temp: $CORETEMP C FAN: $NEWSPEED% [$FANSPEED RPM] [$FANPWM]"

calcFanPercent
setFanSpeed

sleep 10
done
###################################################################


and I also have a file called fanoveride at /etc/init.d/ with the following in it:

#!/bin/sh
### BEGIN INIT INFO
# Provides: FanOveride
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: FanOveride overides the default ReadyNAS fan control
### END INIT INFO

SCRIPT=~/fanoveride
RUNAS=root

PIDFILE=/var/run/fanoveride.pid
LOGFILE=/var/log/fanoveride.log

start() {
if [ -f /var/run/$PIDNAME ] && kill -0 $(cat /var/run/$PIDNAME); then
echo 'Service already running' >&2
return 1
fi
echo 'Starting service.' >&2
local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!"
su -c "$CMD" $RUNAS > "$PIDFILE"
echo 'Service started' >&2
}

stop() {
if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then
echo 'Service not running' >&2
return 1
fi
echo 'Stopping service.' >&2
kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE"
echo 'Service stopped' >&2
}

uninstall() {
echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
local SURE
read SURE
if [ "$SURE" = "yes" ]; then
stop
rm -f "$PIDFILE"
echo "Notice: log file is not be removed: '$LOGFILE'" >&2
update-rc.d -f <NAME> remove
rm -fv "$0"
fi
}

case "$1" in
start)
start
;;
stop)
stop
;;
uninstall)
uninstall
;;
retart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|uninstall}"
esac


I have made sure both files are set to 755 permissions and also ran update-rc.d fanoveride defaults. Still no joy though

thanks in advance

Townsmcp
Message 39 of 39
Top Contributors
Discussion stats
  • 38 replies
  • 6593 views
  • 0 kudos
  • 13 in conversation
Announcements