How to unbrick a totally dead My Cloud?

Hi MaxDemian,

Sorry, I’m not guru on linux so I may not be the best person to help you on this, but this is what I did on mine and worked fine:

(this was all done following cnlinya and other tutorials that are in this forum)

  1. Downloaded a virgin image as per Cnlinya’s intructions:

http://community.wd.com/t5/WD-My-Cloud/Here-is-WD-My-Cloud-2TB-virgin-disk-image/td-p/637769/highlight/true

  1. Deleted all partitions using parted:

(/dev/sdb being the path to the WDMycloud disk, check what’s the correct one and replace it there)

root@y-System-Product-Name:/# parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) select /dev/sdb 
Using /dev/sdb 
(parted) mklabel gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you
want to continue?
Yes/No? y 
(parted) quit 
Information: You may need to update /etc/fstab.
  1. Restored the partitions with the virgin image downloaded:

On terminal:

dd if=/mnt/usb/mybook.img of=/dev/sda bs=1M

/mnt/usb/mybook.img being the image file, check the full path of the file on your external disk and replace it there

/dev/sda being the path to the WDMycloud disk, check what’s the correct one and replace it there

  1. After it was done I plugged the hard disk back into the wd mycloud and turned on… white light for some seconds and then blue. As soon it is blue you can access the dashboard and do a Quick Factory Restore + enable SSH.

  2. After the restore if your hard-drive is bigger than 2TB you will still need to expand it since you used a 2TB virgin image… to do it you should login via SSH and do the following commands:

Cnlinya’s part:

Please use below script to catch the mount partitions

WDMyCloud:~# cat /etc/mtab

 Umount all the partitions related with  /dev/sda4  when you extend the last partition, for example:

/dev/sda4 /nfs/TimeMachineBackup ext4 rw,noatime,nodiratime,user_xattr,barrier=0,data=writeback 0 0/dev/sda4 /nfs/Public ext4 rw,noatime,nodiratime,user_xattr,barrier=0,data=writeback 0 0/dev/sda4 /nfs/SmartWare ext4 rw,noatime,nodiratime,user_xattr,barrier=0,data=writeback 0 0WDMyCloud:~# umount /nfs/Public/
WDMyCloud:~# umount /nfs/SmartWare/
WDMyCloud:~# umount /nfs/TimeMachineBackup/

nfodiz’s part:

Just a quick info before the commands that nfodiz posted in other topic… Doing the steps (in the code part) you will delete the ext4 partition and recreate it with a bigger size so I think that it’s worthy checking how they are before that to do this you need to type:

parted

unit s

p

You will see all the current partitions there, with start and end points.

In the code below, during the the “mkpart primary 9031680s -1” command you have to update to your own number’s… It’s the start point of this partition so if you do type (p) after deleting the partition (rm 4) just check the end point of the last partition and you start will be that end point + 1.

/etc/init.d/cron stop
/etc/init.d/monitorio stop
/etc/init.d/twonky stop
/etc/init.d/itunes stop
/etc/init.d/orion stop
umount /CacheVolume
umount /nfs
umount /shares
umount /DataVolume

parted
unit s
p

Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel?
OK

Warning: Not all of the space available to /dev/sda appears to be used, you can
fix the GPT to use all of the space (an extra 3907008000 blocks) or continue
with the current setting?
Fix/Ignore?
Fix

rm 4
Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda
(Device or resource busy). As a result, it may not reflect all of your changes
until after reboot.

mkpart primary 9031680s -1
Is this still acceptable to you?
Yes
quit
sync
reboot

 And then after reboot

/etc/init.d/cron stop
/etc/init.d/monitorio stop
/etc/init.d/twonky stop
/etc/init.d/itunes stop
/etc/init.d/orion stop
umount /CacheVolume
umount /nfs
umount /shares
umount /DataVolume

e2fsck -f /dev/sda4
Select yes to all fix prompts (There will be a ton of them)

resize2fs -p /dev/sda4
This command takes a long time

sync
reboot

After that it’s all done and you plug it back and turn it on.

Hope it works!

One more thing: If after all is fixed you play around more than you should and break it again (as I did)… if you still have SSH you can restore it without having to open it again and messing with partitions… you just need to download the latest firmware, place it on /CacheVolume and execute this script that will restore the firmware.

sh -x /usr/local/sbin/updateFirmwareFromFile.sh /CacheVolume/updateFile.deb
reboot

 updateFile.deb being the firmware.

1 Like