WD My Cloud hangs with external USB storage

I have observed that if external drive is used less than 50-60% then My cloud works well. If it is more than that then it hangs within 2-3 minutes.

Can you confirm the same?

I have escalated this issue with WD techinical support team. They are communicating this issue with development team.

Can you do the same so that if multiple persons are escalating issue then they will look in to it?

Thanks.

I reported this to WD level II support months ago. I provided significant time and data for them to pass to engineering.  They never had any solutions and in the end, they traded my My Cloud for a My Cloud Mirror and the USB problem went away.  I also could never get a Safepoint to work. With the Mirror, I have RAID 1 automatic backup to the second internal drive and also backup schedules to my external My Book.

Hello all, 

We have passed this along to support.

Kiran_Nevaskar, 

I’ve encountered this problem well over a year ago and WD has never updated their firmware to fix this problem. At that time I had already discover a workaround and it really does involve SSH’ing into the device to fix it. DO NOT swap your brand new drive with a refurbish replacement drive as the same problem will occur; go figure if it is the same firmware.

WD called me regarding this problem and had me reboot my device multiple times, soft reset my devices and even made me update the firmware to my USB drive;

Soft resets and firmware updates are not the solution to this problem. The problem is an Operating System process lock that somehow one process is locking out the other; it could be as simple as the scans, or a process that is waiting for another process to complete but the process lock is so complete that both devices drops out of the network shortly after locking.  They have not resolved this problem in any of their firmware as I’ve been watching this same problem over and over on this forum.

I’ll post up a link to my post shortly,  but I’ll give you a summary the short version first.

Workaround without SSH (should work provided that your cloud is not locked in scans).

  1.  Boot up the Cloud drive first WITHOUT any USB drive attach. (Always detach the USB when rebooting especially when you do a firmware update).

  2. wait for a few minutes for your cloud drive to settle. Now this might be difficult since the scanning process will begin and start thrashing your drive but if you don’t SSH into the drive to kill the scan process, this is the way it is and forever will remain so. 

  3. when it is quiet (around 5 minutes) attach the USB drive. It should attach and you should be able to map it without problems.

Always detach the USB if you are rebooting the USB or starting it up. I made the mistake of attaching the two when booting both up at the same time when I moved the two units over to my bookshelf, they ended up locking and disappearing from the network a few minutes later.  

Alright, here is the post that fixes and solves everything back in 2014. 

My Solution to My Cloud is disconnecting from the Network and disappears when connecting USB hdd

Hi Ralphael,

I read your post but I’m confused. Are you saying that the solution is to run the following commands:

etc/init.d/nfs-kernel-server stop

/etc/init.d/nfs-common stop

/etc/init.d/upnp_nas stop

/etc/init.d/mDNSResponder stop

/etc/init.d/wdphotodbmergerd stop

/etc/init.d/wdmcserverd stop

then:

/etc/init.d/wdnotifierd stop

/etc/init.d/wddispatcherd stop

/etc/init.d/wdnotifierd start

/etc/init.d/wddispatcherd start

Is that right?

You don’t explain the purpose of stopping “nfs-kernel-server”, “nfs-common”, “upnp_nas” and “mDNSResponder”. Do I still need to run these first four commands to fix the USB issue? 

Ahh, I remember those first days fondly as I willy-nilly killed all the processes that I thought were high on cpu :stuck_out_tongue:

All the processes can be stopped in any order and you don’t need to stop the nfs-kernel-server or nfs-common. I was stopping as many processes as I can back then to get the device to sleep.

Final Fix

Anyways it always boils back down to 

/etc/init.d/wdphotodbmergerd stop

/etc/init.d/wdmcserverd stop

and detaching the USB drive before reboot and attaching it after the Cloud boots up.

i have had problem with USB drive hangs on copy functions caused by overly long pathnames…the only symptom is a hang with no error message

I also has this issue. Not sure what is the fix. When ever I connect my USB for backup NAS hangs and no errors…

i discovered my hang problem may have been caused by long filenames in
which the aggregated length of share/directory/subdirectory/filename
exceeded a system amount

i discovered this, when in frustration, i did a volume copy over the
network from a Windows system which gave me explicit error message(s)
rather than simply hanging & spinning

1 Like

mkrosse https://community.wd.com/users/mkrosse - Do you know if there
is any tool which can help finding long path issues??

i would not be surprised if googling would answer this for you; i can’t

Max filename length is 255 characters. Max path name is 4096 characters.

RAC

as has been pointed out, the 2 USB ports on the MCM are totally useless. Adding 2 MYBOOKS totally disables MCM functionality. It still shows up in the router’s attached devices, but the GUI is inaccessible. Total junk. I sent logs off to WD at their request months ago and never heard back.

I’ll be buying some new NAS boxes, one to replace the MCM and the others for incremental growth. Fortunately, it’s easy to remove the HDDs on the MCM.

What WD needs to do, really, is implement something similar to ROBOTS.TXT in their firmware.

Basically, when the media scanning daemon starts crawling the device, it looks for some file (analogous to robots.txt), which if it finds it, it knows not to index that folder or its contents. This would allow more fine control over the silly thing, as it would not waste hundreds of hours of disk access crawling every single file in every single folder, and indexing things that you will not want to have show up in your media archive. (Like button images and the like.)

Even better would be an IndexMe.txt magic file, where if it finds that, it will index, and otherwise just passes over the folder and subfolders.

There is a significant problem in regards to the indexing service: It pretends that it has infinite memory available, and pretends that its scans will proceed quickly. These are both incorrect assumptions. The MyCloud devices are memory constrained embedded devices, having either 256mb (gen1) or 512mb (gen2) of RAM installed. The MyCloud caches the index in memory, (and apparently never writes it to disk except if you count swap operations…) so it has to rebuild the index all the darn time. If there is a very large and complex file system attached, crawling that will take AAAAGGGEEES. If it finds lots and lots of files to index, the index will swell to absurd sizes, will compete with valuable system daemons for RAM, and cause I/O contention as the SATA controller gets hammered between having to shuttle data in and out of swap like a crack monkey, while trying to continue hammering on the filesystem to keep indexing.

Here is my suggestion to you, WD:

Step 1) Enable zmalloc and zram in the kernel.
Step 2) Enable Zram as a swap backend device with a higher priority than the internal HDD’s swap partition.
Step 3) Change the indexing service’s behavior to check for magic files to control indexing behavior
Step 4) Change the default max memory used line for your daemon’s invocation to something sensible for your hardware, like 100mb, instead of 300mb.

This will have the following effects for your hardware:

  1. The device will try to use compressed swap first, until it exhausts it. Compressed swap comes at a CPU hit, but the myclouds are dual core SoCs. The performance hit of using compressed ram backed swap is significantly lower than hitting external storage, and it does not incur the same IO penalties.
  2. Because the compressed ram backed swap is not stored on the HDD, the occasional blip on it will not wake the drive from sleep.
  3. The “magic files” control method will permit the indexing service to look only in places the user specifies, greatly improving the completion speed of the indexing pass.
  4. Limiting the amount of memory your daemon can use to a sensible amount will assure that your daemon does not saturate the compressed ram backed swap, and will allow the system to quiesce more reliably. (at the possible expense of having a smaller realistic index size.)

I have pulled the sources for your 2.xxx firmwares, and the zram sources are present. You just need to enable the necessary kernel options, and then push a new firmware that has zram enabled. Granted, it is a staging driver in the ancient source tree you are using-- but in just a few minor revs, it was promoted. The version you forked has it as a fairly reliable staging driver, that should be useful in production.

Make these changes, and your issue will be greatly alleviated.

2 Likes

This. So much this.

For zram, Is there no way to get a working kernel with zmalloc enabled without WD building it? The other suggestions obviously mean updated binaries from WD for some of their closed source daemons.

WD does provide GPL versions of the firmware so users can build their own versions. Perhaps that is the route you need to take (build your own) to get Zram enabled.

Looks like that has been attempted, unsuccessfully so far, within this thread:

https://community.wd.com/t/guide-building-packages-for-the-new-firmware-someone-tried-it

Maybe some progress towards the right kernel in this thread:

https://community.wd.com/t/mainline-kernel-4-11-x-for-wd-my-cloud-gen2

me too… same thing
connected a 4TB drive that’s normally connected to my computer… has just under 2TB of files on it.
everything hangs indefinitely

Make sure the external USB hard drive is formatted in a My Cloud supported format and has only one single partition.

https://support.wdc.com/knowledgebase/answer.aspx?ID=15124

I stopped below services and everything started working with external USB drive.

/etc/init.d/wdphotodbmergerd stop

/etc/init.d/wdmcserverd stop