WD Cloud Home shut down - is it harmful to unplug and then plug power back in again?

Is it harmful to unplug and then plug in the power to the device and will it be damaged in any way?

The reason I ask is because I lost power in my apartment today for a little, and when it came back I didnt have connection to the device. I then unplugged the power and plugged it back in again after a few seconds. Then I got access again and now it seems to be normal. But I am afraid this has damaged it in some way.

YES.

The MyCloud is actually an embedded linux computer, and makes of the EXT4 file system to store your files. While this filesystem has provisions to help prevent corruption from such a power failure (namely, it is a journalling file system), and the system performs a filesystem check when it detects an unclean shutdown has occurred, simply yanking the power out from under the system is a good way to corrupt any file not fully written, and a great way to lose data in general. (On linux systems, disk writes are performed more or less sensibly, in queued operations, so that disk activity is kept to a minimum. To accomplish this, a filesystem cache is used. Basically, writes are first done to reserved memory, then the file system driver writes the data as the drive becomes available, or as queued up operations align with physical disk structures, to minimize otherwise unnecesary write or read operations. If you just wrote a bunch of small files to the device over the network, it is likely that most of them are just in the filesystem cache, and have not yet been comitted to disk by the FS driver because creating all the structures needed for many small files is a slow operation. The FS driver will see to that task in the background, while the publically presented from will write to and read frot the filesystem cache until it is done. This means that if you yank the power out in such a circumstance, those files will not have been committed to disk yet, and will be lost!!)

The fact that WD has not given us a quick and easy way to shutdown the MyCloud without using their software tools has rubbed most of us here the wrong way at one point or another.

I personally send a “reboot now” to the device over SSH, then pull the power when I see the LEDs on the front flash. (since all data will have been committed to disk before the reboot, and the LED flashing is from the boot loader, which does not make changes to the disk while it is running-- making it the ideal time to yank the power) There is a shutdown option in the WD software that comes with the device, but I prefer not to use proprietary software. The web-based dashboard has an option to reboot the device (which does the same thing as sending the command I use over ssh), but you have to be right there next to the thing to catch it at the boot loader to pull the power.