Firmware 4.05.00-315 Discussion

Blktrace will give you the processes that write and the addresses that they write. I don’t see in your
file where you get the process name.
This is my latest sleep numbers. With most processes running. Was going to test the read/write speeds. But currently
streaming video on the same network.
05 13 03:27:22 08:01:11 16429 4:33:49
05 13 08:11:22 15:13:39 25337 7:02:17
05 13 15:25:52 16:01:21 2129 0:35:29
05 13 16:11:32 19:20:40 11348 3:09:08

Let me ask a question. I talk to many IT professionals who manage corporate NAS systems and they all say that spinning down and up of the drives is the #1 reason they fail over time. Almost all of them turn off any sleep feature the NAS has so they in fact stay online. So why is it a bad thing for the MyCloud to not sleep?

There isn’t really any definitive proof one way or the other on spinning up or down a hard drive affecting a drive failure rate or causing a failure. Many IT people “assume” that the constant power up/power down of a drive may or can impact or cause a drive failure.

The problem with the My Cloud, at least mine, is it constantly spins up and down if Drive Sleep is enabled through the Dashboard > Settings > General page. The drive would go to sleep every ten minutes, then spin up 7 or 8 seconds later for example, as indicated previously in the thread. It would do this all day long.

One advantage to spinning down a hard drive (one that isn’t a “green drive”) is the slight power/energy savings when the drive isn’t being used when its in sleep or off mode. Over time that energy savings could potentially (eventually) add up (if one was running a large server farm or the like). For people who don’t use their My Cloud for long periods of time during the day they may want to either spin down or power down the My Cloud (for what ever reason).

Performed Levent_Ozler method and noticed a few things using Windows 10. Comments are in no particular order. Note: I don’t have a WD Red drive in my unit, drive failed and it was replaced with a Seagate ST31000333AS 1TB drive.

Using Putty on Windows 10 the following errors were displayed during the edit process. Used WinSCP to perform various edits instead, particularly the file editing.

WDMyCloud:~# service stop
mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group?

WDMyCloud:~# service wdphotodbmergerd stop
[....] Stopping wdphotodbmerger: wdphotodbmergerstart-stop-daemon: warning: failed to kill 10280: No such process

WDMyCloud:~# service twonky stop
PID file /var/run/ not found, stopping server anyway...
twonkystarter: no process found

WDMyCloud:~# service lltd stop
cat: /sys/class/net/wifi0/operstate: No such file or directory
Shutting down lltd services: OK

WDMyCloud:~# service vsftpd stop
Stopping FTP server: No /usr/sbin/vsftpd found running; none killed.

WDMyCloud:~# service nspt stop
umount: /media/WDSAFE/*: not found

WDMyCloud:~# service commgrd stop
Sun May 14 08:16:53 EDT 2017 - %W - Communication Manager - process is not running

WDMyCloud:~# edit /etc/default/ramlog
Warning: unknown mime-type for "/etc/default/ramlog" -- using "application/octet-stream"
Error: no "edit" mailcap rules found for type "application/octet-stream"

WDMyCloud:~# edit /etc/init.d/samba
Warning: unknown mime-type for "/etc/init.d/samba" -- using "application/octet-stream"
Error: no "edit" mailcap rules found for type "application/octet-stream"

WDMyCloud:~# edit /etc/samba/smb-global.conf
Warning: unknown mime-type for "/etc/samba/smb-global.conf" -- using "application/octet-stream"
Error: no "edit" mailcap rules found for type "application/octet-stream"

WDMyCloud:~# edit /etc/nas/mDNSResponder.conf
Warning: unknown mime-type for "/etc/nas/mDNSResponder.conf" -- using "application/octet-stream"
Error: no "edit" mailcap rules found for type "application/octet-stream"

WDMyCloud:~# edit /etc/init.d/mDNSResponder
Warning: unknown mime-type for "/etc/init.d/mDNSResponder" -- using "application/octet-stream"
Error: no "edit" mailcap rules found for type "application/octet-stream"

WDMyCloud:~# edit /usr/local/sbin/
Error: no "edit" mailcap rules found for type "application/x-sh"

Left DHCP to auto since router reserves IP address for My Cloud.

Rebooted unit after making changes (approx 8:43am).

After reboot Dashboard Diagnosis field indicated “Warning” due to no temperature value because it was turned off.

Dashboard seems more responsive after reboot.

Didn’t test read/write speed prior to edit/updates. Forgot. Post edit/update reboot:

WDMyCloud:~# hdparm -Tt /dev/sda

 Timing cached reads:   512 MB in  2.00 seconds = 255.46 MB/sec
 Timing buffered disk reads: 304 MB in  3.01 seconds = 101.09 MB/sec

WDMyCloud:~# dd if=/dev/zero of=/tmp/output bs=8k count=10k; rm -f /tmp/output
10240+0 records in
10240+0 records out
83886080 bytes (84 MB) copied, 0.484201 s, 173 MB/s

Because USB edits were made it appears a USB drive is no longer mounted by My Cloud post edits/updates. So no Dashboard Safepoint access.

Windows 10 (didn’t reboot):
While the My Cloud shows up in Windows File Explorer, error is generated when trying to access it by name (assume due to no netbios).

Use My Cloud IP address for Windows File Explorer access.

Copying files across Gigabit network average about 30 Mb/s per Windows File Explorer which I think is where it was prior to the edit/changes.

Because Media Serving is off, My Cloud not seen as DLNA server. Enabled Media Serving through Dashboard > Settings > Media. Once enabled media files (video/music) played in DLNA client (Roku) including subtitles in SRT files.

Will be doing further testing throughout the day to see how it sleeps with Media Serving enabled.

I thought that the object of this exercise was to increase sleep time while maintaining the devices functionality. The
above mentioned changes disable a lot of the devices functions.

The above changes are extreme in the quest to get better sleep times. Unfortunately because of the way the firmware is coded one does have to perform some or many of those changes mentioned above to achieve better than 50% sleep time. On my unit and in my use the biggest thing to improve sleep time with the 315 firmware seems to be disabling Samba.

That is not entirely true. I used to get 80% before firmware 315. Currently I getting more than 80%. Using the chroot method allows for more sleep while leaving most processes running. When I say chroot I mean chroot to a USB disk with the current firmware installed. This stops most reads and writes to the hard disk. It is a little more involved than just chroot. But using a couple of scripts to do the mounts and stop then restart processes. It seems to make sleep better.

I often got better than 50% sleep time with previous firmware, with 315 I don’t. If I get better than 20% with stock 315 settings I’m lucky.

As shown in the previous post it sleep 4.5 ,7 and 3 hours. It woke up at 8AM to rotate the log. The same at 4PM. I’m still working on that. Right now the only thing doing disk I/O is mdadm and sshd. That is 19 I/O’s since 9:15 this morning. The I/O’s may not have been to physical disk. They may have been to cache.

Sorry about the edit lines, they’re not commands, you need to actually edit them. I used Coda (a Mac app), you can also use nano in bash.

Instructions are not destructive, you can take a screen shot of the rc2.d folder, and install services back using their priority number in their name.


I made two more changes. First of, in smb-global.conf

passdb backend = smbpasswd:/tmp/smbpasswd

which basically kill custom passwords for shares. You can add a line to samba init script that copies the file from private folder to the tmp folder. This method prevents Macs waking up the device when they wake up and poll the server (samba reads the file and wakes up the disk).

and I’m testing

swapoff -a

which disables swapping. After disabling all those services I’ve more than 50% memory free, and I’m gunning for 100% standby.

More experimentation on my end. Decided to re-flash with the 315 firmware and make a few modifications, did a soft reset (system only restore/40 second restore), then reconfiguration of My Cloud to try and keep most of the features working. Remote access disabled, Time Machine backup disabled.


# Attempts to fix sleep issue

/etc/init.d/samba stop
mount -t tmpfs -o mode=0700,noatime,nodiratime,size=1m tmpfs /etc/samba/msg.sock/
/etc/init.d/samba start

# Stop unwanted wakeups
mount -o remount,noatime,nodiratime /dev/root /

# Stop and disable indexing services (just stopping the service not disable)
/etc/init.d/wdmcserverd stop
/etc/init.d/wdphotodbmergerd stop

# For OS3 firmware only - stop RESTSDK server daemon
/etc/rc2.d/S20restsdk-serverd stop

/usr/local/sbin/ (starting at line 252 to replace existing section)

        touch /tmp/standby
        enterStandbyTime=`date +%s`
        echo "Enter standby"
        # turn on solid blue if applicable LED_EV_DISK_STBY LED_STAT_IN_PROG
        sleep 5			
        if [ "$1" == "debug" ]; then
                echo "`date`: Enter standby "
                dmesg -c > /dev/null
        for i in ${drivelist[@]}; do
                hdparm -y $i >/dev/null
        sleep 5		

My Cloud edits made and unit rebooted around 17:00 hours yesterday (5/15/17).

05 14 15:59:13 16:01:10   116  0:01:56
05 14 16:11:22 16:17:10   348  0:05:48
05 14 16:27:22 16:29:45   143  0:02:23
05 14 16:40:59 16:43:36   157  0:02:37  <-- reflashed with edits at 17:00 hours
05 14 18:19:44 15:31:18   694  0:11:34  
05 14 18:41:30 21:01:10 19180  5:19:40
05 14 00:11:22 21:30:09  1127  0:18:47
05 14 00:42:24 22:05:09  1365  0:22:45
05 14 01:15:21 22:22:52   451  0:07:31
05 14 01:34:06 23:17:09  2583  0:43:03
05 14 02:27:21 23:58:10  1849  0:30:49
05 15 03:19:34 00:20:01    26  0:00:26
05 15 03:30:13 00:34:03   230  0:03:50
05 15 03:44:15 01:17:09  1974  0:32:54
05 15 04:27:21 02:53:53  5192  1:26:32
05 15 06:04:05 03:05:09    63  0:01:03
05 15 06:15:22 05:01:09  6347  1:45:47
05 15 08:11:22 06:01:30  3008  0:50:08
05 15 09:11:43 08:31:50  8407  2:20:07
05 15 11:42:02 08:56:43   881  0:14:41
Total Sleep Time: 15:14:41
Start 1494782999
End 1494853003
Total Up Time: 19:26:44 77% Sleep 23% Wake

Probably going to stick with these edits for the time being as I’m now getting respectable sleep times on par with the prior firmware. Will continue to monitor to see if anything changes.

@Bennor, What the code above is doing? Can you explain this in some “normal” words ?

There is discussion about the Msg.sock thing up threat starting with this post:

And this post is where the discussion turned to mounting the Msg.sock to the ram disc to cut down on it writing to the hard drive waking or keeping awake the My Cloud:

For what it’s worth, it slept for 45 hours, until I logged in. Two of my Macs had the drive automounted. Transfer speeds vary between 90-100MB/s.

1 Like

So this is part of the firmware update

Enhanced SMB server (samba) to support Apple Time Machine protocol extensions.
Enhanced SMB server (samba) to operate using SMB-3 protocol by default.

So how does one setup Time Machine via SMB? Is there something that’s needed?

From Apple:

May or may not be of use if you haven’t seen it yet. There is also this that may or may not be of use.

Thanks for the info. On latest macOS Sierra here. So the apple document explains the requirements for SMB3 time machine. And I assume MyCloud now support that. However it selects afp when doing or starting a new backup. How can you get SMB3 to be the protocol of choice?

try mounting the device with its smb:// address and than select the mounted drive as time machine disk.

I don’t have access to a Mac to test but like Levent_Ozler indicated I’d do an SMB:// mount of the Time Machine Share on the My Cloud then select that mounted drive/share in the Time Machine program.

Okay - will I need to do this each time there’s a backup or just the initial?