So you've given up, got a new NAS, but can it mount and run a recovery script for MCH for free?

So you’ve given up, bought a new NAS (Network attached storage) but can it mount and run a recovery script to recover the My Cloud Home (MCH) files? For free?

The answer is: Yes, with the right NAS it can be done for free.
Without having to buy any new Windows software which could cost $699 as some posts here on the forum have suggested. It is also faster than running the script from Windows because of NAS’s native EXT4 filesystem and it is also free assuming you bought or were going to buy a storage replacement anyway.

But before we cover that, if you intend to do a better recovery and keep using the MCH with a better hard drive (not SMR), then you may want to try this method of using a free linux cloning sofware. You will need to shuck the MCH and of course buy a same size or larger replacement HDD.

Most NAS are Linux based so yes you can use a NAS for recovery of the MCH HDD which has a Linux EXT4 partition #24 that has all the users’ data, divided between KDDFS files (folders 2~7, m~z, yours may differ) and the samba folders. The samba folder can be read directly, the KDDFS files folder however contained entirely renamed obfuscated files but kept their orginal formats, however if you use a recovery script provided gratis from Springfield recovery service, you can get about 80% of the files back to their original names and folder structure. So here goes, how it works:


First of all, this will depend on you being able to remove or ‘shuck’ the HDD from the MCH enclosure and place the HDD in a powered 3.5" SATA to USB3 enclosure, fairly inexpenive examples here and here from another WD subforum. You will get some unexpected errors if you don’t have sufficient power to the adapter to run the HDD. If you had recently shucked a WD Easystore or Element external desktop USB drive, the ‘shucked’ enclosure will work as well for recovery, so this is not completely free, but close.

The NAS DS220j used here or the more capable DS220+ are entry level NAS from another vendor; this is not an advertisement for any NAS and there are others that can do this recovery just as well. The 220j hardware is not any faster than the MCH but the software is running a more suitable and usable OS that is also Linux based and they all allowed SSH and Python3 to be run from a terminal. Be sure in the vendor’s package installer that the free USB HDD and Python3 support are installed. A free SSH terminal such as Putty is required to login into the 220j and you would initially log in by issuing the DS220j login which you set up for it and a second log in as root with the same password:

sudo -i
sudo fdisk -l

fdisk -l will show you where all the partitions are located and you can find for example that with the USB mounted (eject and re-mount if partition 24 does not show in the DiskStation Manager, aka DSM), that all the partitions on the USB can be seen.

root@DiskStation:~# sudo mkdir /media/mymch
root@DiskStation:~# sudo mount /dev/sdq24 /media/mymch
root@DiskStation:~# cd /media/mymch
root@DiskStation:/media/mymch# dir

What we have done above is to make directory that is easy to remember, such as /media/mymch then mounted the USB partition 24 to that folder. Changing (cd) to that folder and issuing the dir command, you can see all the files in the directory.

We would also like to do the same for the DS220j filesystem disk which you had to install in order to use the NAS. It is just the HDD that you bought in order to run the DS220j. But it turns out that you can’t just mount /dev/sda5 directly for example because of the particular pooling mechanism called LVM that DSM uses, so you have to issue the command to find the name to which DSM paritioned under LVM:

sudo lvdisplay

and this gives a LVM name of ‘vg1001’ and we use this to make directory /media/mydsm and then mount vg1001 to that directory.

root@DiskStation:~# sudo mkdir /media/mydsm
root@DiskStation:~# sudo mount /dev/vg1001/lv /media/mydsm
root@DiskStation:~# cd /media/mydsm
root@DiskStation:/media/mydsm# dir

So now we have mounted the two directories that we wanted, we need to change directory to the folders that we wish to do file operations (via Python script) and we need to take ownership of those folders and files by for example:

sudo chown -R -v username:username *

if you just do this with the subfolders, it will not take much time. For example there is this /media/mymch/restsdk/data folder that contains the renamed and obfuscated files, we will change directory and change ownership. And we do the same for for the /media/mydsm/dump folder. If you don’t do this, you will likely run into Python error opening database files.

cd /media/mymch/restsdk/data
sudo chown -R -v root:root *
cd /media/mydsm/dump
sudo chown -R -v root:root *

Finally, we are ready to run the Springfield recovery Python script by changing the first lines of the script (you can change the paths depending on your files’ location and also omit the extra # comments):

db='/media/mymch/restsdk/db/index.db'  #where the file DB is stored 
filedir='/media/mymch/restsdk/files'   #where the files are stored 
#dumpdir='/location/to/dump/files/to' #where you want the new files dumped

You should now be done in a few hours depending on the size of your KDDFS files folder. Please also note that you will likely only get about 80% of the files back because the Springfield script does not do a complete job of recovering every files and folder. To get every file, your best bet is still to do the free Linux disk cloning mentioned above.

1 Like

Hi everybody.
has anyone tried replacing the hard drive from the old my cloud home to the new my cloud home?
Will it run like normal after replacing it?
I’m just afraid that after replacing it, it will format the old drive. data will be lost