A couple of notes on sleep and AFP

After a decade of coveting the My Cloud EX2/Mirror Raid I finally bought two EX2 Ultra Diskless enclosures along with two WD 10TB Gold drives to give me an upgrade to 20TB/10TB mirrored. After spending several days on copying the data over from my 8TB My Cloud, everything is finally quiet now.

I do have tentative plans to strip the single bay 8TB My Clouds to be used in my second EX2 enclosure to sell? to backup my other EX2? to test and play around? no idea, but substituting a 2TB drive into the empty My Clouds might be an tempting adventure.

So apparently the EX2 ultra runs the same OS3 Busybox as My Cloud Gen2, because my sleep script does work on the EX2, that was until I decided to post about it and the drive woke up. I had to SSHed in and killed the openVPN and anything I thought might be the culprit; the thing is, after half a decade, I still don’t know why our clouds wake up and I don’t think WD knows either.

However, this I do know, is that if you connect via AFP to the device and leave it mapped as a drive on your Mac Desktop, it will never sleep until you eject the drive. Connected via SMB and left mapped on your desktop, is ok. Although I don’t have any sleep and wake up logs, every time I wake up to go pee I have never seen it awake over the last two years.

I am also pretty sure that any WD program that is running on your laptop would probably wake the drive just to see if it was sleeping.

One thing to note that my script isn’t permanent. It is run every time I turn on sleep in the dashboard. It is run whenever I think it needs to be run, like after accessing the drive via my iPhone, it is run when you first turn on your My Cloud. WD is notorious for starting up the various scan servers even when you have disabled them.

Right now my new EX2 is blinking its lazy blue eye and I am pretty stoked about the fact it asleep.

About AFP
Now the only reason that I was using AFP was because when I was using SMB for copying files from old My Cloud to new EX2 My Cloud, it locked itself one night. SMB has problems in reading a directory that has 20,000 files and other directories in it, like my Midi file collection that is in the range of over 200,000 files, or my ebook directory. When I say locked, it is more like waiting. It just sat there in its copying process; no cloud activity, in fact my EX2 fell asleep during this process.

So I switched to AFP and that got it through the file copy process without a hitch. I am no longer sure if AFP is slower than SMB, but I like to switch back to SMB when possible.

The EX2 is about twice as fast as the single drive My Cloud, clocked at around 100MB/s read/write in comparison to 48MB/s read/write 8TB My Cloud.

Right now my EX2 is still sleeping all through the duration of typing up this post. I did kill the OpenVPN service by do PS -A to see what is running, then using the command kill xxxx where xxxx is the job id number on the leftmost column.

Here is my script for both the Gen2 Cloud and EX2.

/etc/init.d/wdphotodbmergerd stop
/etc/init.d/wdmcserverd stop
/etc/init.d/wdnotifierd stop
/etc/init.d/wddispatcherd stop
killall crond
drive_sleep.sh off
sleep 1
drive_sleep.sh on
hd_standby.sh 5

Remember that this isn’t a permanent script and it needs to run every time you do something with the My Cloud or EX2 like mapping the my cloud to your Mac. Use it afterwards when you eject the drive.

So that is it… I’m moving over to the EX2 forum now… good bye…

Since you left the forum. I guess I won’t respond.

I won’t either…

But you did. Check out the funplug 0.7. It allows a busybox to run off of a USB memory stick. Which
allows the disk to sleep most of the time.


Also I need a link to rebuilding a gen 2 my cloud as I’m thinking of doing this but not sure. I just bought a 6TB My Book Duo and it is the last of its kind. Thinking of swapping out the my clouds 8TB drives into the My Book Duo and taking the pair of 3TB drives and sticking them into the My Clouds to sell; so I need a procedure to rebuild the gen2.

I searched but the links that keeps coming back are broken especially to fox_exe txt file on rebuilding gen 1.

Thank you Rac.

This talks about how to do it for a DNS-323 Dlink NAS. The Gen2 does look for the fun_plug file.
What I’ve been playing with is using chroot to a USB memory stick with the Gen1 file system. It does
help with the sleep issue.

Here is one procedure.

  1. Download these files:
    http://support.wdc.com/downloads.aspx?g=904 (Original firmware)
    https://ftp.anionix.ru/WDMyCloud/WDMyCloud-Gen2/usbrecovery.tar.gz (WD Recovery + My miniOS)

  2. Use any USB Flash drive, format it to FAT32 (Important!)

  3. Unpack usbrecovery.tar.gz to this drive (You will get “boot” folder and 4 files inside)

  4. Plug this USB drive to WD MyCloud, turn on power. Wait yellow-red (blinking) light.

  5. Connect via Telnet (Search IP in your router, unde DHCP section.)

  6. Format HDD if need:
    parted /dev/sda
    mklabel gpt
    mkpart primary 1049kB 2149MB
    mkpart primary 8591MB -1MB
    mkpart primary 7517MB 8591MB
    mkpart primary 2149MB 3222MB
    mkpart primary 3222MB 4296MB
    mkpart primary 4296MB 6443MB
    mkpart primary 6443MB 7517MB
    mkswap /dev/sda1
    mkfs.ext4 /dev/sda3

  7. Install original WD recovery and reboot:
    mkdir -p /mnt/usb /mnt/root
    mount /dev/sda3 /mnt/root
    mount /dev/sdb1 /mnt/usb
    cp -r /mnt/usb/boot /mnt/root/
    cd /mnt/root/boot
    rm uImage uRamdisk
    mv uImage-wdrecovery uImage
    mv uRamdisk-wdrecovery uRamdisk
    cd /
    umount /mnt/root /mnt/usb
    reboot -f

  8. After reboot device get old IP address and accessable via Web-GUI (Recovery mode). Use original firmware (.bin file) here.


1 Like

that is the domain that has expired, or maybe not? not sure what to download here…:frowning:

ok found another site that has the same files…


Thank you Rac… now to decide whether or not I really want to do this…

One last item on the Wake up list is Openvpn. I saw this years ago and it occurs whenever you set up your cloud access and for some reason it wakes up your cloud every 30 minutes, back in the old days as I don’t know how often these days as I have no logs in gen2 (WD removed them because we all were complaining how often the Cloud doesn’t sleep).

Now the only way to shut this down on a gen2 is to do a PS -A via SSH and to kill xxxx (no not bill) the job number which is the number leftmost on the list.

So that is it for my two single Bay My Clouds. They have been shut down today and stored unpowered for now on a lower shelf.

I had been having a lot of difficulties letting go as I am stuck at a quandary of trying to maintain 3 copies of my data (4 if you want to count the mirror copy). I don’t trust the EX2 yet because of WD. In one fell swoop the EX2 can lock you out forever from your data and there is nothing you can do about it. Had this happen with the My Clouds 4 years ago when it locked up every time you booted the My Cloud with a USB drive attached.

However, I knew that I had to let go somehow so I decided to remove my trusty My Clouds and only depend on the new EX2. It is strange feeling that I now have dual copies (mirrored) of my data and I don’t trust the device at all.

The one test that would have changed this feeling would have been the USB mount readability test where mounting one of the mirror drive on a USB dock could have been readable on my Mac. Perhaps it is in a non-regular mount format that someone know of? speak up if you do.

Time to go back to my new EX2 forum where it is ever so quiet. It seems nobody over there has any problems… none whatsoever…