Jump to content
XPEnology Community

Hard drives spin down and random spin ups


redmessengerbag

Recommended Posts

I just wanted to see if anyone might know how the synology system determines to spin the drive backup and if it's controllable.

 

My drives spin down fine at the pre-determined time in the settings, however, once spun down, it sometimes randomly spins backup. I want to see what others' experience has been like on this subject.

 

I have a HP N40L with 6 x 2TB drives, running on DSM 4.2 Trantor 1.2 repack

 

Otherwise it's working well...minus OpenVPN, I've wasted a lot of time trying to get it to work with certificates and haven't had any luck.

Link to comment
Share on other sites

Otherwise it's working well...minus OpenVPN, I've wasted a lot of time trying to get it to work with certificates and haven't had any luck.

ipkg install openvpn

Put your config and cert to /opt/etc/openvpn

 

Add script /usr/syno/etc/rc.d/S99openvpn.sh

#!/bin/sh
#Script for use openvpn on Synology.
#Сначала грузим скрипт ovpnc.sh от разрабов.
action=$1
shift;

   logerr() { # [logger args] [msgs...]
           local TAG="vpn"
           [ ! -z $action ] && TAG="${TAG} (${action})"
           logger -p user.err -t "${TAG}" "$@"
   }
#Indus mode on
start_openvpn() {
    /usr/syno/etc/synovpnclient/scripts/ovpnc.sh start
    if [ `ps|grep openvpn|grep -v '.sh'|grep -v grep|wc -l` -eq 0 ]; then
    logerr "openvpn is started"
    echo "openvpn is started"	    
    /opt/sbin/openvpn --daemon --config /opt/etc/openvpn/openvpn.conf
    else
    logerr "openvpn already started"
    echo "openvpn already started"
    fi
    #Запускаем для части сети
    #/opt/etc/init.d/S50quagga
}

stop_openvpn() {
    if [ `ps|grep openvpn|grep -v '.sh'|grep -v grep|wc -l` -eq 0 ]; then
    logerr "openvpn is not started"
    echo "openvpn is not started"
    else
    killall openvpn
    logerr "openvpn killed"
    echo "openvpn killed"
    fi
   }

restart_openvpn() {
    if [ `ps|grep openvpn|grep -v '.sh'|grep -v grep|wc -l` -eq 0 ]; then
    logerr "openvpn is not started"
    echo "openvpn is not started"
    else
           killall openvpn
    /opt/sbin/openvpn --daemon --config /opt/etc/openvpn/openvpn.conf
           logerr "openvpn restarted"
    echo "openvpn restarted"
    fi
   }

   case "$action" in
           start)
                   start_openvpn
                   ;;
           stop)
                   stop_openvpn
                   ;;
           restart)
	    restart_openvpn
                   ;;
           *)
                   echo "Usage: $0 [start|stop|restart]"
                   ;;
   esac

   exit 0

Link to comment
Share on other sites

I just wanted to see if anyone might know how the synology system determines to spin the drive backup and if it's controllable.

 

My drives spin down fine at the pre-determined time in the settings, however, once spun down, it sometimes randomly spins backup. I want to see what others' experience has been like on this subject.

 

I have a HP N40L with 6 x 2TB drives, running on DSM 4.2 Trantor 1.2 repack

 

Otherwise it's working well...minus OpenVPN, I've wasted a lot of time trying to get it to work with certificates and haven't had any luck.

 

May be "Download Station" is running...

Link to comment
Share on other sites

HDD hibernation (and System hibernation (for native-syno users)) issue is one of the biggest problem on syno devices.

 

proof-link http://forum.synology.com/enu/viewforum.php?f=83

 

I played around it several weeks (N40L, Win enviroument, Trantor's 3211 1.2). And now I can share some tweaks.

First of all you should stop all packages. Then check hdd spinup.

 

If it exists at random times probably you have "bad" network traffic:

 

1. You should disable all NetBios services on Win PC. Or just create blocking firewall rules for 137,138,139 ports in DSM.

Now your NAS will be lost at network places. To prevent it you can edit /etc/hosts file with appropriate NAS ip.

 

2. Block 1900 UPnP port in firewall rules.

 

3. (Not sure about this point) Disable WinMediaPlayer Sharing features and stop WMPNetwork service too.

 

Then check hdd spinup again. If problem is exist in certain time:

 

1. Disable NTP service in DSM and check crontab file for any tasks.

 

Start appropriate package and check again.

There is some packages which prevent hdd hibernation/generate random spinup.

http://www.synology.com/en-global/support/faq/568

 

For example Plex package. It wakes up NAS every hour. With some tweaks of settings Plex wakes up NAS every 24h (actually this is still bad). (Long story is here https://forums.plexapp.com/index.php/to ... s-running/ )

 

P.S. It's is really sad that power schedule is not working now (bios resets)...

This can help prevent spinup at night.

 

P.P.S. My NAS still has random wakeup. How to debug it ?

1. You can use Wireshark for network activity monitoring.

2. syno_hibernate_debug_tool can help too. Keep in mind that syno_hibernate_debug_tool can perform hdd wakeup by itself. So use it carefully.

Link to comment
Share on other sites

×
×
  • Create New...