Safe shutdown

What are the actual path(s) and filename(s) you edited? I’d like to try that myself.

Is this on a single-bay My Cloud, is it a 2.n firmware version?

Thanks hugely!

Jim “JR”

Well, If you like DIY Projects you may try this :grinning: -

you can find all the details at this link -

Hi Arquimaes. I have tried your step and it works. But how do I save it? Everytime when I wanna turn off the hard drive (My CLoud 4TB), I have to manually follow your steps. Is there a way to permanently save the “Inspect Element” file/log? Thanks.

@Bennor

I finally had time to do some searching, and this is what I found on my 2nd Gen, single drive, version of the My Cloud:

halt:

root@Storage2 /usr # find -name "halt"
./sbin/halt
./local/modules/usrsbin/halt'

shutdown.sh

root@Storage2 /usr # find -name "shutdown.sh"
./sbin/shutdown.sh
./local/modules/script/shutdown.sh

Likewise, the only instances of “id_shutdown_td” or “dev_shutdown()” are in /usr/local/modules.
Viz.:

root@Storage2 / # grep -rnsl '/usr' -e "dev_shutdown"
/usr/local/modules/web/pages/function/function.js
/usr/local/modules/web/pages/home.php
root@Storage2 / # grep -rnsl '/usr' -e "id_shutdown_td"
/usr/local/modules/web/pages/setting/diagnostics.html

The icing on the cake is that the /usr/local/modules portion of the filesystem is a loop-mounted squashfs filesystem. Viz.:

/dev/loop0 on /usr/local/modules type squashfs (loop)

Translation:

  1. It’s a “virtual” filesystem segment loaded from a squashfs file located somewhere on the system.
  2. It’s not writable, so even if you COULD edit the file, you can’t save it to see if it works!

The only way to play with this would be to find the actual squashfs filesystem file, copy it, un-pack it with 7Zip, edit it, and (somehow or other), put it back where you found it.

I haven’t figured this out yet.

BTW, on MY My Cloud device, the “style.css” file I have doesn’t even bear a remote resemblance to the one @Arquimaes found. I don’t know what his system is, or whatever, but it does not resemble my system at all. . . .

I’m going to keep plugging at this, and I will report more when I know more.

Jim “JR”

Same problem here with my new Mycloud device, Firmware V2.

If you have a Mac or Linux box, there is a simple script solution. Just make sure that you can login with ssh. My script uses “expect”-shell, which is standard available on Mac and Linux. No idea about Windows.

OK, it comes here:

#!/usr/bin/expect
spawn  ssh root@mycloud "halt -p"
expect "password:"
send "PASSWORD\n“;
interact

Just edit this script with the correct password and server name (IP address).
Make it executable with chmod 755.

This will shutdown the device cleanly.

To restart the device, you must power off/on. Why is there no switch??? :rage:

1 Like

Because the My Cloud is designed (apparently) to be left on 24/7.

Is that stupid? In some respects yes. But that’s how WD designed the single bay My Clouds. Wake on Lan would be nice too but that also is not available, at least in the v4.x My Cloud’s.

Hi there Bennor,
I just discovered this “feature” in the new firmware yesterday, having bought a MyCloud 4TB single bay, and then mistakenly thinking I should upgrade the firmware first.

Dumb question: how do I turn the unit back on, after I use the Shutdown and Power Off command, since (after all) there is no power on switch? Assuming I wait till the light goes out, etc., does a simple unplug of the AC power, then plug it back in, do the trick?

Thanks!

Hi Bennor,
I’d like to explore this further with you. Yes, 24/7 on cloud products are nice, but the underlying assumption is that your electrical power is also 24/7. And that lightning storms, etc., in your surroundings don’t cause you to want to safely shut down everything before you lose it.

Yes, I can (and am going to) find an UPS to help me out. But still… shut down, and turn it back on. Not having those fundamental features seems bizarre. How do we call WD’s attention to this?

Thanks!

Because there is no physical power button and no apparent way (that anyone’s found so far) to turn the My Cloud on after being shut down, the standard way is simply to remove power then reapply power to the My Cloud.

Thanks! Brute force cybernetics rules!

Hi all.
I was bored last night and somehow ended preparing a little browser extension to enable the buttons with one clic. It needs to be applied everytime you open the webpage, but is easier than inspecting the element and changing the css by hand.
I’ve only tested on Opera with a dummy page with the bare required elements to show the change.

The zip contains the compressed extension ready to use and the source code. GitHub page

extension.zip (54.3 KB)

Change css - is “Workaround” better - enable this feature in configs.

Hello,

[quote]Shutdown and power off:
plink.exe -ssh -l root -pw welc0me 192.168.1.10 /sbin/shutdown -h -P now

Shutdown only:
plink.exe -ssh -l root -pw welc0me 192.168.1.10 /sbin/shutdown -r now[/quote]

I do not understand what is the difference between “shutdown” and “power off”. Can you explain it ?

Thanks in advance.

Regards,

There are various web links that explain the shutdown command, here is one such link: https://www.techonthenet.com/linux/commands/shutdown.php

But because of the way (at least the first gen v4.x firmware My Cloud units) work power isn’t fully shut off to the My Cloud. Power remains to the NIC port on the My Cloud. And no Wake-On-LAN isn’t available either (at least the first gen v4.x firmware My Cloud units). So at best one is instructing the single bay My Cloud OS to try and perform a shutdown and power off or just a shutdown depending on which command is issued. It may be personal preference on which to use. Currently I use the “shutdown -h -P now” from an Android device to shut down the My Cloud from time to time.

It’s now called Hybernate how knows why. If you choose that and walk over to the NAS it will say Shutting down and then go dark after a few minutes.

What My Cloud model are you using that indicates on a screen on the unit that it is “shutting down”?

The single bay My Cloud units do not have a screen on the unit. Just LED lights to indicate unit status. Currently the single bay second generation My Cloud v2.x firmware is what is being discussed in this topic as lacking a “shut down” option on the WD My Cloud Dashboard even though it is mentioned several times in the My Cloud User Manual. The button is apparently hidden by the Dashboard CSS code for some reason and WD has issued several v2.x firmware updates without fixing this issue for the single bay gen 2 My Cloud units.

I’ve got the Ex4100. I didn’t see a specific model so I assumed this was a generic topic. I had the same problem and couldn’t find shutdown but hibernate in it’s place. But even without a screen the LEDs went dark along with no sound from the drives. I replaced the drive, turned it back on and everything worked. If that didn’t work I was just going to hold down the power button and turn it off that way.

It’s a decent NAS but wow they do make you wonder what they are thinking.

This subforum (My Cloud) is generally for the single bay My Cloud models that are typically called “My Cloud” (https://www.wdc.com/products/personal-cloud-storage/my-cloud.html).

@everybody

On the 2.n (second gen) My Cloud devices, the shutdown command does NOT shut the device down, nor does it unmount the hard drive(s) cleanly, no matter how you run it, or what parameters you use.

The best way I have found to do this is to execute the “halt” command via a SSH session (I use PUTTY, but any other SSH client should work.)

Re: The thinking that went on when WD came up with the way these thing are designed.
Unfortunately, if I were to set down my actual, literal opinion of all this, the posting would either get deleted, or it would be 99% bleeps. My (heavily censored) opinion is too long to include in a posting like this.

What say ye?

Jim (JR)

I’d start with a big stick. One of the Big Pappi’s baseball bats should be just about the right size. :rage:

Other than that, you could hard-wire a switch, or put it on a power-strip with a switch.

Jim (JR)