How robust is the My Cloud OS?

Sorry wptski to quote you but you made me think.

When I was younger, I created turn key systems that had no buttons except the power button that turned the system on or off. I used debian and copied the OS to a ram disk on boot up to prevent OS write corruption. It was a company that provided service that played background music for large stores.

The player was built using old computers with old hard drives so as long as the system booted up with a quick fsck, the system was good to go. It didn’t matter if you pulled the plug or simply turn off the power in mid stream music playing, the system was robust.

However because of windows and all the systems that occasionally gets corrupted as well as myself getting older, I am much more careful with shutting down my systems.

So in thinking about this… just how robust is the Cloud OS.

  1. It has no power switch

  2. the shut down menu in 3.04 was buried under settings/Utilities/Device Maintenance/Device Power… and even then the device was still powered up until you pull the plug (possibly the drive has been unmounted and parked).

  3. we often just pull the plug when something goes wrong and I’ve done that at least a dozen times in my early days before I realize that I’m pulling the plug on a operating system.

  4. fsck’ing should correct all problems

  5. it is linux journaling file system that safeguards this.

    Updating file systems to reflect changes to files and directories usually requires many separate write operations. This makes it possible for an interruption (like a power failure or system crash) between writes to leave data structures in an invalid intermediate state.[1]

    For example, deleting a file on a Unix file system involves three steps:[4]

    Removing its directory entry.
    Release the inode to the pool of free inodes.
    Return all used disk blocks to the pool of free disk blocks.
    If a crash occurs after step 1 and before step 2, there will be an orphaned inode and hence a storage leak. On the other hand, if only step 2 is performed first before the crash, the not-yet-deleted file will be marked free and possibly be overwritten by something else.

    Detecting and recovering from such inconsistencies normally requires a complete walk of its data structures, for example by a tool such as fsck (the file system checker).[2] This must typically be done before the file system is next mounted for read-write access. If the file system is large and if there is relatively little I/O bandwidth, this can take a long time and result in longer downtimes if it blocks the rest of the system from coming back online.

    To prevent this, a journaled file system allocates a special area—the journal—in which it records the changes it will make ahead of time. After a crash, recovery simply involves reading the journal from the file system and replaying changes from this journal until the file system is consistent again. The changes are thus said to be atomic (not divisible) in that they either succeed (succeeded originally or are replayed completely during recovery), or are not replayed at all (are skipped because they had not yet been completely written to the journal before the crash occurred).

Thus with all that said, perhaps @wptski is right to put it on a power strip and simply power it off every night without consequences?

So what does Western Digital say? is the Cloud built to have the plug pulled? is it designed to be user proof?

What are your thoughts?

For me, I’m still safety conscious ever since the rampant firmware upgrade of 3.04 of which the blinking white light has left me damaged with caution. I am even afraid of turning off my Cloud in fear that it may red light on me due to OS and hardware corruption. Is it time to take off the gloves?

Surprised there isn’t an off/off button on the device.

I found that if I just pulled power that every once in a while I’d have a media file get corrupted and fail to play on my Roku(s). Since then I’ve been trying to remember to shut the unit down prior to pulling power. So far no more media file corruption since using the Dashboard or SSH to shut down the unit.

While “shut down” via the Dashboard or SSH the device is still drawing some sort of power as the Ethernet port LED’s indicate a connection/traffic. Before anyone gets all excited and thinks; “yay wake-on-lan to the rescue” to remotely power on the My Cloud, be advised the onboard NIC within the My Cloud apparently doesn’t support WOL. See this recent thread where this WOL issue was kicked around.

There are various methods to shut down the My Cloud via SSH. One such method was mentioned in this recent thread.

Currently using SSH Button for Android to one button touch shut down the My Cloud, usually overnight. Works fine.

that is too bad that the device is not more robust…

Was hoping to hear that everyone had the same experience as @wptski

For the most part the WD My Cloud is robust. And it probably works as designed for a great many people. However, once one changes or modifies the WD My Cloud that robustness gets lessoned. Change the hard drive, muck around the OS with SSH, add modules, edit files to fix the sleep or scanning problems, etc. can all contribute to reducing the robustness of the My Cloud and it’s OS. Of course poor coding or poor implementation of the firmware can also contribute to a lack of robustness.

Of course that robustness does have its limits, like say being knocked off a shelf, falling several feet and coming to an abrupt stop thanks to a solid floor, causing the WD My Cloud hard drive to become a erratically functioning paperweight…
:laughing:

1 Like

It might be that my usage is rather simple also, just data files. The only issue I’ve run into probably not not caused by my shutdowns is that I save OS images from Paragon Hard Disk Manager to it. Once HDM is open and looks for its created data files, it holds sole claim to the path. It happened twice where the image vanished from the MC. I think the MC went into power saving mode as I wasn’t around when it finished and it doesn’t close the folder properly. Since I shut off the power saving mode when backing up, I’ve never had it happen again.

I found a post here about someone trying to use plink to shut down a MC. Add your path to plink.exe and “plink.exe -ssh -l root -pw welc0me 192.168.1.72 /sbin/poweroff” with your IP. This can be ran from the run box, no need to use the Dashboard. Just takes the first time to get the string in the run box and Windows keeps it there and if used every day like me, it’s always on top! :+1:

1 Like

That may have been my post, which I mentioned and linked to above.
https://community.wd.com/t/disconnect-the-power-outlet-for-storm/96600/3?u=bennor
Here is that post in it’s entirety:

[quote]I will second this statement. Don’t simply unplug the power to the WD My Cloud without instructing the unit to go through a shut down procedure. I turn mine off from time to time and was having trouble with certain files (always video files for some reason). These troubles went away when I started to use the shut down option that one can trigger through the Dashboard. What I do is issue the shut down option through SSH. I currently use an app on my Android smartphone ( SSH Button) to send the SSH command. See the following WD Support document for more information on SSH: How to enable SSH (Secure Shell) on a My Cloud

The SSH command to issue a shutdown is “/sbin/shutdown -h -P now”

One can create a batch file that will run a command line SSH program like Plink ( see PuTTY) to issue that shutdown command from a Windows PC.

Note that even though the WD My Cloud is shut down the Ethernet port will still indicate a connection if the WD My Cloud is not unplugged (and no the WD My Cloud Ethernet port does not appear to support wake-on-lan). Once shut down either remove power or used a switched power strip (or switched surge protector) to turn off power. Personally I have lots of electronics on switched surge protectors that I turn off when not in use. Putting them all one one or two switched surge protectors makes it easy to turn them all off at once.[/quote]
Edit to add: Here are the call’s I use both in a batch (.bat) file and in SSH Button on my Android phone. In addition to a call to un-mount a an attached USB drive. Obviously replace the IP address and “sdb1” with the correct values for your setup.

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

Power off only:
plink.exe -ssh -l root -pw welc0me 192.168.1.10/sbin/poweroff

Reboot:
plink.exe -ssh -l root -pw welc0me 192.168.1.10/sbin/reboot

Un-mount USB drive:
“plink.exe -ssh -l root -pw welc0me 192.168.1.10 umount /media/usb”

Or

“plink.exe -ssh -l root -pw welc0me 192.168.1.10 umount /dev/sdb1”

No it was this threead: Remote shutdown with SSH - please help

What’s the difference MC wise between PowerOff and ShutDown?

Ah the WD ShareSpace (and its support forum), never heard of it. As to the Linux commands. From my somewhat limited experience with Linux, the Poweroff command supposedly tells the system to power down. Supposedly the equivelent of pressing the power button on a desktop PC. Where as the Shutdown command supposedly tells the system to close all running applications, un-mount any drives, then issue the command to power down.

Tried to create a batch file using the above but couldn’t get it to work thinking it was a syntax error. Finally tried the just power off only and that worked. Just using Shutoff from the Run box doesn’t work either. I use WinSCP, Poweroff and Reboot are links to Halt which like Shutdown are listed as files.

I was using the Start command in front of my file path.

EDIT: My bad! Shutdown alone from the Run box doesn’t work but adding the “-h -P now” does so that means I’m using the wrong command, I assume???

What follows is the basics. If you don’t know what a “.bat” file is then use Google to learn about what they are and how to create them with Windows. Same goes for SSH. Make sure SSH is enabled via: Dashboard > Settings > Network > Network Services.

First one has to create a “.bat” file using Windows Notepad or some similar program. The following is the basic code used but one has to change the IP address to match their own My Cloud IP address.

plink.exe -ssh -l root -pw welc0me 192.168.1.10 /sbin/shutdown -h -P now

First you need Plink which can be downloaded from this link: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

One can either download Plink all by itself or download the entire Puddy package which includes Plink.

Next, one has to change the 192.168.1.10 IP address to the IP address used by their own cloud. Then save the “.bat” file.

Make sure the “.bat” file is in the same directory as the plink.exe file, one runs the “.bat” file by double clicking on it with Windows Explorer. There are other way to run the “.bat” file but using Windows Explorer is the easiest.

If the My Cloud is sleeping the bat file may throw an error, just run it again when the My Cloud wakes up.

Attached is an example of the “.bat” file I created while fooling around to using SSH to issue commands. One can unzip the attached file into the same directory location as the plink.exe file, then edit the IP Addresses in the “.bat” file to match their own My Cloud IP address. Then run the “.bat” file to see how it works with shutting down or rebooting one’s My Cloud.

Note: Standard warning time. Use SSH, or use/edit the attached “.bat” file at your own risk!

Posted edited to include following link to “.bat” file example since this forum’s file attachment feature is borked.

Example “.bat” file: https://drive.google.com/open?id=0B_-h7I2b3MijdG90WVdQNFRReHc

Maybe you aren’t following my post. My “.bat” file works fine with “poweroff” but not with “shutdown -h -P now”.

EDIT:
Interesting! Because of the added commands with “shutdown”, it must be in the same folder as “pling.exe” to work but not the case with “poweroff” but does work from a shortcut to it on the Desktop.

What I posted was basic directions for all that worked in my instance. Plink or a similar program is needed to initiate the SSH call (with the login/password) to the My Cloud, so the system can send the command for power off or shut down (or any other My Cloud OS shell command). Unless one edits their batch file to include the file path to Plink or similar program the batch file generally must be in the same directory/folder as the Plink or similar program so it can call the program when run.

I had the file path to where I had “plink.exe” saved but the “.bat” file was on my Desktop which worked perfectly when “power off” was used. It didn’t work for “shutdown -h -P now” until the “.bat” file was saved to the same folder as “plink.exe”. Do you understand now?