I just got a new 4TB MyCloud and also ran into the disconnect problem. I suspect the machine simply crashed hard, i.e. ran into a Linux kernel corruption. After rebooting I dug around the logs a little and noticed that, under heavy load (files being copied next to a content scan/twonky and WD’s media crawler running) the machine seems to run out of virtual (not physical) memory. If you look into /var/log/kern.log you should see "page allocation failure"s popping up. (looking closer this appeared for random apps such as afpd, twonkyserver, convert, etc.). This seems to confirm what some other posters have pointed out, i.e that crashes/disconnects have to do with heave loads.
I dug a little deeper and it seems the way the kernel is configured is a bit unusual. There is a parameter for setting how much memory the kernel reserves for some of its internal operations. WD sets it to its lowest value of ‘1 1’ (while Linux default is ‘256 32’). You can look at the value of the parameter via:
cat /proc/sys/vm/lowmem_reserve_ratio
If the value is too low, the kernel has enough memory reserved for itself, but regular applications may run out. Conversely, if it is set too high, the kernel may not get enough memory in critical situations. It seems correct that the default (256 32) would be too low for an embedded box like this (which doesn’t have a **bleep** lot of memory), but setting it all the way to the lowest value can exactly lead to the page allocation failures that regular apps are seeing on this machine now.
What I did on my box is to set the parameter to some higher value. For now:
echo ‘16 16’ > /proc/sys/vm/lowmem_reserve_ratio
You can see the effect of the change on how many pages are protected in the “protection:” entries under
cat /proc/zoneinfo
The change can be made persistent across reboots by editing the corresponding entry in /etc/sysctl.conf.
I am still experimenting, but for the time being I haven’t see any new page failures (even when stress testing under heavy load). For those of you with older firmwares, I am wondering whether WD modified the lowmem_reserve_ratio setting there? I am running the latest firmware. Note that there may still be other issues, e.g. related to sleeping, but I didn’t notice anything that would point to that for me. I have sleeping enabled, i.e. running with default settings otherwise.
With any of these changes: use at your own risk! Setting the parameter too high can result in the machine already crashing during boot, i.e. not coming up at all again…