ok good news. Got my WD My Cloud sleeping now.
First of all many thanks to all the contributors here. Especially to [Rumaben].
With your findings i could do it!
I have created a startup script in the init.sh of Debian Chroot installation, which does the modifications necessary to get the WD My Cloud sleeping.
I have Twonky and Plex Media Server and Debian chroot installed as sideloads.
Twonky does not prevent sleeping as often said by WD!
But you have to check that it is not writing errors in the logs.
It normally will not but if you have something misconfigured or so it could happen and than the disk will not sleep because of the error logging.
For Debian Chroot you have to disable atop. That’s it.
Plex is logging from time to time, so your disk will wake up every hour or so.
I did not find a way to prevent this. A possible solution would be to move plex_conf folder to a tmp space.
But i think plex_conf is to big for this…
So here now the tweaks on the WD System.
Regretfully you have to disable the cloud access and can not use the nice new OS5 App on your mobile
Here are the parts of my init.sh in Debian.
You could use any init.sh or other script which is executed directly after startup of the NAS.
# Own startup scripts
# Sleep long enough to have the default restored from configdb
# Copy my mountpoints
cp /mnt/HD/HD_a2/Nas_Prog/Debian/exports /etc/exports
# Kill NoIp2
# My hacks - restsdk prevents HD sleep
killall monit #test
# Remove some sh files
# Copy edited system files
cp /mnt/HD/HD_a2/Nas_Prog/Debian/edited_system_files_wd/root /var/spool/cron/crontabs/root
cp /mnt/HD/HD_a2/Nas_Prog/Debian/edited_system_files_wd/wdlog.ini /etc/nas/wdlog.ini
cp /mnt/HD/HD_a2/Nas_Prog/Debian/edited_system_files_wd/wdlog /etc/cron.d/wdlog
chmod 444 /var/spool/cron/crontabs/root
chmod 444 /etc/nas/wdlog.ini
chmod 444 /etc/cron.d/wdlog
The script is also copying 3 WD system files including, crontab:
Here is the content of the 3 Files:
0 3 * * * /usr/sbin/quota_monitor &
0 3 * * * /usr/sbin/rlog -s /usr/local/modules/files/syslog_rotate.conf
0 3 * * * /usr/local/sbin/ssl_cert_job.sh start > /var/log/ssl_cert_cron.out 2>&1
#0 3 * * * random_chk_central -s &
0 3 * * 1 logwdmsg -e &
0 3 * * * logwdmsg -o &
0 3 * * * /usr/local/sbin/LogDataSize.sh
0 3 * * * /usr/sbin/rt_script.sh &
0 3 * * * /usr/sbin/stime&
0 3 * * * wd_crontab.sh&
0 3 * * * auto_fw -a -c&
0 3 * * * auto_clear_recycle_bin.sh &
0 3 * * * /usr/sbin/chk_wfs_download&
0 3 * * * random_check -s &
0 3 * * * auto_fw -c 1 &
0 3 * * * expire.sh
0 3 * * * /usr/local/sbin/PullWdlogConfig.sh
0 3 * * * sysinfo_update.sh
0 3 * * 1 getHddWhiteList.sh
0 3 * * * sync_tm_to_hd.sh &
01 3 * * * root /usr/local/sbin/PullWdlogConfig.sh
01 3 * * * root /usr/local/sbin/LogDataSize.sh
#01 3 * * * root [ -f /etc/init.d/atop ] && /etc/init.d/atop rotate
01 3 * * * root [ -f /usr/local/sbin/deviceInfoCollect.py ] && /usr/local/sbin/deviceInfoCollect.py -c
01 3 * * 2 root [ -f /usr/local/sbin/deviceInfoCollect.py ] && /usr/local/sbin/deviceInfoCollect.py -s
@reboot root /usr/local/sbin/PullWdlogConfig.sh
declare -a LOG_LIST_sq=('mycloud.log' 'atop_upload.log' 'access.log' 'access.log.1' )
#declare -a LOG_LIST_MyCOS=('analyticpublic.log' 'wdpublic.log' 'otaclient.log' 'nasAdmin.log'
declare -a LOG_LIST_MyCOS_DEV=('analyticpublic.log' 'analyticprivate.log' 'wdlog.log'
'otaclient.log' 'nasAdmin.log' 'nasAdmin_private.log' 'kern_upload.log' 'atop_upload.log')
# PERFORMANCE LOGGING (atop)
Ok, so my disc is now only waking up at 3:01 every day one time to do all the cronjob tasks.
So now we figured out what is preventing the sleeping.
Now it is WD’s turn.
The restsdk is the main problem.
Cloud is not working without it.
It must be ensured that there is no writing activity involved in a not /tmp space.
At least this should be true as long as there is no new data to be scanned.
Please WD check this and fix your stuff. I really would like to use the cloud services!
Thanks to all here and best regards,