HDD waking up from sleep every hour

firmware 5.12.108 still awake several times ex2 ultra

yep they still saying itā€™s resolved but itā€™s not
It must be a nice calm place to work.

Iā€™ve lost count of how many firmware updates supposedly fixed this sleep/wake issue and proudly mentioned it as opening line in release notes. Even the lowest quality developers should be able to fix this with so many retries, posers in this team who call themselves developers should be deeply ashamed and find another line of work. At this point I believe WD thinks people will just forget about it and either shut up or buy another NAS. Ridiculous!

The following issues have been addressed per firmware release thus far.

5.12.108 fixed the every 24 hour wake up
5.11.112 fixed the every 12 hour wake up
5.07.118 fixed the every 1 hour wake up

Third party apps such as GoodSync, Plex, Twonky, etc are managed by the app vendors and can also wake up the drives. SMB (samba), AFP, mobile app auto backups and anything scanning or polling the network attempting to access shares can wakeup the drives as well.

@SBrown I donā€™t have any apps installed and use the NAS purely for backup. Havenā€™t enabled cloud access so no question of mobile apps interfering. Drive isnā€™t mounted anywhere, manually mount it for backups. Have also set lease time on router to a week to prevent default 24 hour lease wakeup. Still the NAS keeps waking up randomly just like it did when I first installed OS5. Iā€™ve shared the logs 3 times with WD including once with you and so far no solution to this issue.

In my case still wake up avery hour and i donĀ“t have any apps installed

EX2 Ultra

what in logs ā€œSet check central server atā€ does?
I have everything OFF, NTP, cloud, etc.
Maybe here is the problem that itā€™s waking up?

New firmware release made the Drive sleep again, thank you WD

Unfortunately not my case

Not my case either, thereā€™s also no mention of this release targeting this particular issue.

Same issue. My disk worked fine until OS5 update. This is my test: no apps, alone in lan. Please, fix it!

I have also noticed that sometimes when I turn off the nas (due to this issue) the led turns off but the hard drive continues running. I am very unhappy with OS5. Last week it worked perfectly with OS3.

OS3 typically 105MB/s in LAN. OS5 70MB/s. Great update!

Please WD, it worked perfectly with OS3. Downgrade possible??

1 Like

Same here, disks wake up randomly several times a day with no apps installed and cloud access turned off. And here is the legendary developer response, theyā€™ve fixed 24h/12h/1h wake cycles so for a timeline to fix all the remaining random wake intervals your guess is as good as mine.

Also here, Disk in NAS never sleeps and USB Disks are waking up after they spin down.
So every 30 min they spin down and up again.
I think this is not good for the drives.
I will now try with stopping the services mentioned above.

I do not like to disable the cloud functionality but if there is no other way?
I still hope WD will find a way to fix this.

P.S: Just stopping the restsdk seems to do the trick for me.
At least for the USB disks.
I will monitor the main drive too and will update here.

So WD. Please check why restsdk keeps disks alive?
For me i have indexed only my main drive in the device, all USB attached Disks are not indexed at all or made available to the cloud.
Nevertheless they where waking up short after spinning down all the time when restsdk was running.

I hope this helps in finding out the root cause.
You can for sure contact me for details.
Would love to see a fix soon.

I do not like to disable the cloud Service.
I would love to use it with the new APP.

Hi,

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 :frowning:

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
sleep 180
# Copy my mountpoints
cp /mnt/HD/HD_a2/Nas_Prog/Debian/exports /etc/exports

# Kill NoIp2
killall noip2

# My hacks - restsdk prevents HD sleep
/usr/sbin/restsdk.sh stop
/usr/sbin/otaclient.sh stop
/usr/sbin/upnpnas.sh stop
killall ConnectivityService
killall atop
killall monit #test

# Remove some sh files
rm /usr/local/sbin/PullWdlogConfig.sh
rm /usr/local/sbin/getAgreement.sh
rm /usr/local/sbin/wdLogUploader.sh
rm /usr/local/sbin/cleanAlert.sh
rm /usr/local/config/wdlog.conf

# 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:

#/var/spool/cron/crontabs/root
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 &

# /etc/cron.d/wdlog 
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

# /etc/nas/wdlog.ini
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' 
'kern_upload.log' 'atop_upload.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')
LOGGING_NICE=19

# PERFORMANCE LOGGING (atop)
PERF_STATUS=disabled
INTERVAL=84000
LOGPATH="/var/log/atop"
PSACCTPATH="/tmp/atopacct"
PERF_CPU_MIN=3
PERF_DISK_MIN_BYTES=50000000
PERF_NETWORK_MIN_BYTES=1000000
DAILY_UPLOAD_HOUR="02"
DAILY_UPLOAD_MINUTE="25"
PIP_EXPIRED="1622233890"

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,
Stefan

2 Likes

Same issue with firmware 5.14.105

Canā€™t believe they wonā€™t fix it

1 Like

Hi,
I now installed the 5.15.106.
Starting the restsdk with
/usr/sbin/restsdk.sh start
and waiting a bit i can see that my HDDs are going to sleep now.

I have only a problem with one HDD now.
So I have the MyCloud 4TB one Bay and i have 3 USB HDD attached.
Only the MyCloud 4TB drive is indexed for Cloud.
The USB HDDs have only NFS enabled.

As USB i have only MyBooks from WD installed.

  1. 1TB
  2. 3TB
  3. 8TB

The problem now is that the USB 8TB HDD does not sleep with restsdk on.
I can hear it spinning down shortly and starting again.
With restsdk stopped the USB 8TB HDD is going to sleep.
I can not find any hint why this is happening in the logfiles under /var/log.

The only difference i can see in the logs is when the OS is starting and detecting the USB HDD.
The USB 8TB HDD is detected as:
Very big device. Trying to use READ CAPACITY(16).

But i do not see how this should make a difference when restsdk is started or stopped in the behavior of sleeping for this device.

Perhaps anyone has a idea what I can check further?

Thanks and best regards,
Stefan

See log from startup:
[ 3.056645] scsi 2:0:0:0: Direct-Access WD My Book 25EE 4004 PQ: 0 ANSI: 6
[ 3.065499] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 3.065783] sd 2:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 3.065947] sd 2:0:0:0: [sdb] 15628052480 512-byte logical blocks: (8.00 TB/7.28 TiB)
[ 3.065953] sd 2:0:0:0: [sdb] 4096-byte physical blocks
[ 3.066218] sd 2:0:0:0: [sdb] Write Protect is off
[ 3.066225] sd 2:0:0:0: [sdb] Mode Sense: 47 00 10 08
[ 3.066456] sd 2:0:0:0: [sdb] No Caching mode page found
[ 3.066462] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[ 3.067093] sd 2:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 3.124464] scsi 2:0:0:1: Enclosure WD SES Device 4004 PQ: 0 ANSI: 6
[ 3.158887] sdb: sdb1
[ 3.158962] scsi 2:0:0:1: Attached scsi generic sg2 type 13
[ 3.167782] sd 2:0:0:0: [sdb] Very big device. Trying to use READ CAPACITY(16).
[ 3.175714] sd 2:0:0:0: [sdb] Attached SCSI disk
[ 3.376933] scsi 3:0:0:0: Direct-Access WD 10EAVS External 1.65 PQ: 0 ANSI: 4
[ 3.385708] sd 3:0:0:0: Attached scsi generic sg3 type 0
[ 3.386290] sd 3:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 3.387020] sd 3:0:0:0: [sdc] Write Protect is off
[ 3.387027] sd 3:0:0:0: [sdc] Mode Sense: 21 00 00 00
[ 3.387766] sd 3:0:0:0: [sdc] No Caching mode page found
[ 3.387771] sd 3:0:0:0: [sdc] Assuming drive cache: write through
[ 3.426231] sdc: sdc1
[ 3.431521] sd 3:0:0:0: [sdc] Attached SCSI disk
[ 4.845206] EXT4-fs (sda3): couldnā€™t mount as ext3 due to feature incompatibilities
[ 4.946397] EXT4-fs (sda3): recovery complete
[ 4.976190] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[ 5.086393] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)
[ 5.836241] usb 3-1.1: new SuperSpeed USB device number 4 using xhci-hcd
[ 5.866353] usb 3-1.1: LPM exit latency is zeroed, disabling LPM.
[ 5.874192] usb-storage 3-1.1:1.0: USB Mass Storage device detected
[ 5.887675] scsi host4: usb-storage 3-1.1:1.0
[ 7.735595] scsi 4:0:0:0: Direct-Access WD My Book 1130 1012 PQ: 0 ANSI: 6
[ 7.745943] sd 4:0:0:0: Attached scsi generic sg4 type 0
[ 13.958795] scsi 4:0:0:1: Enclosure WD SES Device 1012 PQ: 0 ANSI: 6
[ 15.955650] SGI XFS with security attributes, no debug enabled
[ 15.980589] jnl: loading out-of-tree module taints kernel.
[ 15.987023] jnl: driver (UFSD_HEAD lke_9.7.0_b26) loaded at bf152000
[ 16.128561] ufsd: module license ā€˜Commercial productā€™ taints kernel.
[ 16.134955] Disabling lock debugging due to kernel taint
[ 16.146626] ufsd: driver (UFSD_HEAD lke_9.7.0_b26, acl, sd2(5), tr, car) loaded at bf162000
NTFSJ support included
Hfs+J support included
Build_for__WD_Glacier_k4.14.22_2020-03-31_lke_9.7.0_b26
[ 16.168151] ufsd: PAGE_SIZE=4K, THREAD_SIZE=8k
[ 16.172619] ufsd: Kernel .config hash: original 0x716b2005, current canā€™t check.
[ 16.180061] ufsd: Kernel .config hash: original 0x716b2005, current canā€™t check
[ 16.211718] tun: Universal TUN/TAP device driver, 1.6
[ 19.241740] sd 4:0:0:0: [sdd] 732558336 4096-byte logical blocks: (3.00 TB/2.73 TiB)
[ 19.242662] scsi 4:0:0:1: Attached scsi generic sg5 type 13
[ 19.258520] sd 4:0:0:0: [sdd] Write Protect is off
[ 19.263351] sd 4:0:0:0: [sdd] Mode Sense: 47 00 10 08
[ 19.263630] sd 4:0:0:0: [sdd] No Caching mode page found
[ 19.269045] sd 4:0:0:0: [sdd] Assuming drive cache: write through
[ 19.331034] sdd: sdd1
[ 19.335150] sd 4:0:0:0: [sdd] Attached SCSI disk

As WD is pushing its customers to upgrade to MY Cloud OS5, my biggest concern is this oneā€¦
Is this issue with HDDs waking up every hour solved with the latest firmware (and , of course, without the need of any extra config from our side, that is stopping services etc) ?

Short answer: No, the issue is not fixed.

With the latest updates the situation slightly improved for me, but still I can see my hard disks waking up randomly during the day even when all other devices in the LAN are all switched off.
I have to add that I have no apps installed on the NAS; that the DCHP renegotiation happens every 24h and that I have the cloud access completely disabled for all users. Still, I canā€™t explain why it wakes up the HDDs so often and itā€™s extremely annoying, other than letting them be more prone to failures.

The way Iā€™m mitigating this is by setting the energy saving options to have the NAS active only in the times where I really need it.

Iā€™d love this issue to be considered as critical but I see no interest on WD side to really take care of it fully. I see just random trial and error fixes from their end.

Hello!
So thereā€™s a WDMC Gen2 (a sort of selfmade NAS with a 1Tb WD Green HDD inside, runs under BusyBox v1.20.2) and basically I should have no complaints about anything here except for the same ā€œfeatureā€: waking up from standby every few hours without apparent reasons, and the timings are mostly exact (like 2:00, 5:00, or 7:50) so it must be scheduled somewhere. As you see the firmware is pretty obsolete although I doubt the pending update would fix this. It seems OK with me to do things via SSH (even though Iā€™m a noob) with some guidance.

  1. I canā€™t seem to find a way to stop ā€˜restsdkā€™ service, neither ā€˜restsdk.shā€™ is present in the system. Hereā€™s what Iā€™ve got so far:
/
root@WDMyCloud / # find . -name restsdk
./etc/sysinit.d/restsdk
./usr/local/modules/etc/sysinit.d/restsdk
./usr/local/restsdk
root@WDMyCloud / # cd /etc/sysinit.d && ls -al
drwxr-xr-x    2 root     root          1024 Sep  3  2015 .
drwxr-xr-x   23 root     root          2048 Oct  8 19:41 ..
-rwxr-xr-x    1 root     root          1299 Jun  9  2015 admin-rest-api
-rwxr-xr-x    1 root     root           733 Aug 19  2015 comm-manager
-rwxr-xr-x    1 root     root           468 Aug 19  2015 onbrdnetloc-comm
-rwxr-xr-x    1 root     root           110 Sep  3  2015 restsdk
-rwxr-xr-x    1 root     root          1991 Aug 28  2015 wdlog
-rwxr-xr-x    1 root     root           704 Aug 19  2015 wdmcserver
-rwxr-xr-x    1 root     root           929 Aug 19  2015 wdnotifier
root@WDMyCloud sysinit.d # cat restsdk
#!/bin/sh
mkdir -p /usr/local/restsdk
cp -a /usr/local/modules/localrestsdk/restsdk-server /usr/local/restsdk
root@WDMyCloud sysinit.d # cd /usr/local/modules/localrestsdk && ls -al
drwxr-xr-x    2 root     root            37 Sep  7  2015 .
drwxr-xr-x   45 root     root           979 Sep  7  2015 ..
-rwxr-xr-x    1 root     root       8008579 Sep  3  2015 restsdk-server

Hereā€™s the typical feed from ā€˜topā€™ command:

  1. ./var/spool/cron/crontabs/root - I tried commenting several lines and save but the file seems to get restored by the system in a matter of minutes.

There are also 2 more cron files that I found and commented successfully:

./etc/cron.d/rescan_internal_volumes

#10 3 * * * root  [ -f /tmp/wdmc_rescan ] && /usr/local/sbin/wdmc_rescan_volume.py

./etc/cron.d/wdlog

#01 3 * * * root /usr/local/sbin/PullWdlogConfig.sh
#01 3 * * * root /usr/local/sbin/LogDataSize.sh
#01 */8 * * * 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

Soā€¦ How should I proceed?

u/stefanru any suggestions please, how would I adapt your scripts to match this system?

So after the last update 5.18.117 hdd are waking up again every few hourse. Before this update it was ok. Now again theres problem with hdd waking up.