Recover Deleted top level folder when using SHR

Discuss backup and restore functions of the DiskStation with respect other DiskStations, USB/eSATA, network backup, or other rsync clients.
Forum rules
This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu
darkerbright
I'm New!
I'm New!
Posts: 7
Joined: Mon Mar 05, 2012 1:39 am

Recover Deleted top level folder when using SHR

Postby darkerbright » Wed Feb 15, 2017 2:24 pm

Hi People,

I'm hoping that someone might be able to help me out.

So the back story is fairly simple; while messing with Surveillance station, I placed the folder that I wanted the camera feed to save too in a already present folder on Volume1 of my DS412+. After realising this wasn't the best option I accidentally deleted the whole top level folder on my Volume. (I have to say although there was a warning it wasn't nearly bold enough in my mind!) Some of the data was being backed up to Dropbox, some to Glacier and I think some was in a holding folder waiting to be sorted for Galcier backup. There was probably 3TB of data in the folder as a whole. So great, I have the majority in the cloud, however I want to be sure what was deleted.
After realising what I had done (maybe 5 minutes later), and concerned that I might have 2 way syncing I shut the Synology down.

In the past I had the system set up with 4 x 3TB drives set to SHR (so at this stage RAID5) however I upgraded all the drives to 4TB's by removing each of the 3TB drives one by one allowing the new 4TB drive to be populated (this maybe bad practice, please don't judge).
So now my system is a 4 x 4TB SHR Raid setup.

I have no reason to believe that the drives are damaged at this stage.

I have since created images of 3 of the 4 drives (this is due to space issues that I have but figure this should be ok and a risk I can take)

I've now plugged all the drives into an external 4 bay drive and have tried to use several pieces of software to access the information on the array. I've used ReclaiMe to discover the disk properties (see below) however when trying to recover using UFS the properties don't work and I'm now assuming this is because of the SHR RAID type.

This is a plain-text general description of the reconstructed array layout. I can also send the UFS instructions etc:

The array type is RAID5.
The array consists of 4 disks.

The disks are ordered as follows:
#00: Disk 4 - JMicron Generic DISK00, Serial number 23456789ABCDEF, \\.\PhysicalDrive4
#01: Disk 6 - JMicron Generic DISK02, Serial number 23456789ABCDEF, \\.\PhysicalDrive6
#02: Disk 5 - JMicron Generic DISK01, Serial number 23456789ABCDEF, \\.\PhysicalDrive5
#03: Disk 7 - JMicron Generic DISK03, Serial number 23456789ABCDEF, \\.\PhysicalDrive7

Block size is 64.0 KB , same as 128 sectors.
The data starts at sector (LBA) 96 (this is often called "offset" or "start offset").

Block map is as follows:

1 2 3 P
5 6 P 4
9 P 7 8
P 10 11 12


Generated by ReclaiMe Free RAID Recovery build 2228, http://www.FreeRaidRecovery.com

This is the Disk layout:

Drive4: Fixed WDC WD40EFRX-68-WT0N0 (USB)
Ext2/3/4 partition (sector 256, 2.37GB)
Unknown partition (sector 4980736, 1.99GB)
Unknown partition (sector 9455328, 1858.45GB)
Unknown partition (sector 3907033152, 1862.95GB)

Drive5: Fixed WDC WD40EFRX-68-WT0N0 (USB)
Ext2/3/4 partition (sector 256, 2.37GB)
Unknown partition (sector 4980736, 1.99GB)
Unknown partition (sector 9455328, 1858.45GB)
Unknown partition (sector 3907033152, 1862.95GB)

Drive6: Fixed WDC WD40EFRX-68-WT0N0 (USB)
Ext2/3/4 partition (sector 256, 2.37GB)
Unknown partition (sector 4980736, 1.99GB)
Unknown partition (sector 9455328, 1858.45GB)
Unknown partition (sector 3907033152, 1862.95GB)

Drive7: Fixed WDC WD40EFRX-68-WT0N0 (USB)
Ext2/3/4 partition (sector 256, 2.37GB)
Unknown partition (sector 4980736, 1.99GB)
Unknown partition (sector 9455328, 1858.45GB)
Unknown partition (sector 3907033152, 1862.95GB)

I have also tried using Active@, Home Nas Recovery and I've installed Linux and tried using the instruction on the Synology website for building the array in Terminal. None have worked. I have also contacted Synology but they say they can't help me.

So there are a few questions, and I'm basing these on the idea that there is no recyclable bin for top level folders, (and i'm not sure if i had the feature turned on anyway):

1. Is there any software or method to mount an SHR array either in windows or Linux (i'm a Linux Nubee, I can follow instructions but that's about it!)
2. Is it possible to then search for deleted data on the Array?
3. If i plug the drives back into the DS (without it connected to the network) can I stop all write and delete tasks or boot into a safe mode (I believe I stopped the DS before it had chance to delete everything as the remaining disk space was slowly increasing before shut down!) so that I can grab other data on the drives without potentially overwriting the deleted info.
4. Relating to 3 can I stop the Glacier and Dropbox sync, I'm unsure if there was two way sync turned on - does deleting the top level folder stop the sync or tell the sync to delete everything?!! (I have checked my dropbox and Glacier and I think everything is ok I'm more concerned about when I plug the drives back in and it is connected to the network, hopefully after I have recovered the data!)

I'd really appreciate any help that anyone can give as I've reached the end of my ability to solve this without going to a specialist when I might not even need to!

Cheers for your time in advance.

Sam
darkerbright
I'm New!
I'm New!
Posts: 7
Joined: Mon Mar 05, 2012 1:39 am

Re: Recover Deleted top level folder when using SHR

Postby darkerbright » Fri Feb 17, 2017 4:20 pm

Hi People,

So I have some news - Good and Bad!

I read all 14 pages of this post: https://forum.synology.com/enu/viewtopic.php?t=51393

I really feel for all of those who have suffered data lose, I have to say it's fairly terrifying and has made me reassess the way we manage data here. Off topic there.

Anyway the first Variant that Gondy offered did not work for me, at least not the first time around (i haven't tested again yet) but in this feed there is mention of a second Variant by 'Barry T' here: https://forum.synology.com/enu/viewtopi ... 60&t=62926

Now I tested this version however there was one major difference to how I tested this compared the to the original variant and it was that I ran Ubuntu differently from the Memory Stick as opposed to installing it on a drive. Why this should, or even if this did, make a difference I don't know, but for those willing to try everything it's worth a shot.

Also to note, I'm using Ubuntu 16.'something' (Latest release as of Feb 2017)

I think because of this, although again I'm not certain as my linux knowledge is non existent, the Disk Utility is now just called Disk. Barry T's instruction refer to a difference between Ununtu 12.10 and 12.04, with 12.10 not having the Utility option, however i can't download his image (broken link) so I can't compare 'Disk' in 16.... to 12.04!

Ok so I followed the instructions as best I could as per Gondy and Barry T:

".....you have to open up terminal. Press the Windows key on your keyboard, or go to the upper left corner of the screen and search for "terminal". Start it up.

- Enter the following

Code: Select all

sudo apt-get install mdadm


NOTE: Here things are now different. I was not prompted to install Postfix or anything further at all, my terminal installed mdadm and that was that?!

- Then enter the following

Code: Select all

sudo mdadm --assemble --scan


Next

- Hit the windows button on your keyboard again and now search for "disk" rather than "terminal". Run "Disk" (NOTE: As I mentioned I think Disk and Disk Utilities are the same thing now, if not can someone point out where to find Disk Utilities!?)

Now I have to do the rest from memory, for reasons I will explain in a momnet. I believe that I did one of two things here.
1. I double clicked a device in Disk that showed to have the full 12GB drive - then went to the 'Explorer/Finder' and my drive was there with all the files available however no deleted folders!
2. I clicked new device to select it, then clicked on the gear icon in the right panel and click something like Mount. - then went to the 'Explorer/Finder' and my drive was there with all the files available however no deleted folders!

Either way, after running terminal I found the SHR Raid and all the files!

I then ran RTT to search the raid for the deleted files, it was going to take longer than I had time for, (the expiry time kept creeping up!) so I stopped it after about 30 mins, low and behold it had found some stuff including the first item, a 'temp' folder and that had a folder in it by the name of my deleted top level folder, and in that was all my data!!

At this point you can imagine i was pretty happy, however I didn't have time to explore this more nor copy the data in an organised fashion so I stopped everything and figured i'd restart Ubuntu follow the steps, make sure I could access the data again so when i had more time I could do it all properly with out rush and messing it up! This was a huge mistake, when i tried again following all the steps I now disk shows the 4 drives of 4TB as sdf1, sdh1, sdi1, sdg1 & two volumes of 6TB as /dev/md/2 and /dev/md/3 and the option to mount is now greyed out.

What has happened or have I missed something, can anyone explain?

Hopefully this is helpful to some, if others have an answer to my question I'd be very grateful! I will do more testing this weekend and will correct any error to my description as best I can.

Cheers

Sam
darkerbright
I'm New!
I'm New!
Posts: 7
Joined: Mon Mar 05, 2012 1:39 am

Re: Recover Deleted top level folder when using SHR

Postby darkerbright » Thu Mar 16, 2017 2:17 pm

Hi Everyone,

So I've been a little busy and not had chance to look at the issues I've been having till now.

I've tried to replicate the ability to create a single 12TB volume but I'm still getting 2 x 6TB volumes from my 4 x 4TB drives.

Here's a little more information about the two 6TB volumes:

ubuntu@ubuntu:~$ sudo mdadm -D /dev/md/2
/dev/md/2:
Version : 1.2
Creation Time : Thu Jun 23 23:57:53 2011
Raid Level : raid5
Array Size : 5846338944 (5575.50 GiB 5986.65 GB)
Used Dev Size : 1948779648 (1858.50 GiB 1995.55 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent

Update Time : Wed Feb 15 23:28:33 2017
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

Name : DiskStation:2
UUID : 7f38b020:5afc4652:e99a9282:3aa00bb9
Events : 20712

Number Major Minor RaidDevice State
7 8 133 0 active sync /dev/sdi5
6 8 85 1 active sync /dev/sdf5
5 8 117 2 active sync /dev/sdh5
4 8 101 3 active sync /dev/sdg5
ubuntu@ubuntu:~$ sudo mdadm -D /dev/md/3
/dev/md/3:
Version : 1.2
Creation Time : Thu Jun 5 12:08:37 2014
Raid Level : raid5
Array Size : 5860484352 (5588.99 GiB 6001.14 GB)
Used Dev Size : 1953494784 (1863.00 GiB 2000.38 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent

Update Time : Wed Feb 15 22:44:10 2017
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

Name : DiskStation:3
UUID : c07b4fbd:9032b27c:87ab46bc:2592e621
Events : 17338

Number Major Minor RaidDevice State
0 8 102 0 active sync /dev/sdg6
1 8 118 1 active sync /dev/sdh6
2 8 86 2 active sync /dev/sdf6
3 8 134 3 active sync /dev/sdi6


If any one can help me within the next 7 days I will donate 100 British Pounds to Comic Relief helping Desperate Children in the UK and Africa.

Cheers

Sam
darkerbright
I'm New!
I'm New!
Posts: 7
Joined: Mon Mar 05, 2012 1:39 am

Re: How to recover files from Synology NAS HDD in Ubuntu

Postby darkerbright » Thu Mar 16, 2017 2:55 pm

Hi Everyone,

I'm offing to donate 100 British Pounds to the Charity Comic Relief if someone can workout what I'm doing wrong within the next 7 days from today the 16th March 2017. Please see my post on this forum here: https://forum.synology.com/enu/viewtopi ... 03#p471103

Brief explanation is that I deleted a top level folder that I need to recover.
(edit) I have removed the drives from the synology and have them attached to the laptop via a 4 bay IcyBox and I would like to compile these disk into their RAID Array so that I can recover the delete files.
I've read all 14 pages of this post and many other posts. I've used Gondy's method and the variation by Barry T with which I managed to get access to all 12TB of the Raid and using R-Studio could see the data I needed to recover however due to time constraints I had to abort in the knowledge that I could access the data however on returning and attempting to access a second time I'm left with 2 x 6TB volumes that can not be mounted rather than a single 12TB volume that can be mounted. I go into a great deal more depth (and some waffle I'm afraid) in my post.

If anyone can help I would greatly appreciate your help. I'm very much a linux novice but can follow instruction.

Cheers

Sam
Last edited by darkerbright on Thu Mar 16, 2017 6:14 pm, edited 1 time in total.
sincarne
Versed
Versed
Posts: 247
Joined: Wed Feb 15, 2017 9:57 pm

Re: How to recover files from Synology NAS HDD in Ubuntu

Postby sincarne » Thu Mar 16, 2017 5:28 pm

darkerbright wrote:Hi Everyone,

I'm offing to donate 100 British Pounds to the Charity Comic Relief if someone can workout what I'm doing wrong within the next 7 days from today the 16th March 2017. Please see my post on this forum here: https://forum.synology.com/enu/viewtopi ... 03#p471103

Brief explanation is that I deleted a top level folder that I need to recover. I've read all 14 pages of this post and many other posts. I've used Gondy's method and the variation by Barry T with which I managed to get access to all 12TB of the Raid and using R-Studio could see the data I needed to recover however due to time constraints I had to abort in the knowledge that I could access the data however on returning and attempting to access a second time I'm left with 2 x 6TB volumes that can not be mounted rather than a single 12TB volume that can be mounted. I go into a great deal more depth (and some waffle I'm afraid) in my post.

If anyone can help I would greatly appreciate your help. I'm very much a linux novice but can follow instruction.

Cheers

Sam


if you make new RAID you need data recovery business not guy on internet. why not restore from backup?
darkerbright
I'm New!
I'm New!
Posts: 7
Joined: Mon Mar 05, 2012 1:39 am

Re: How to recover files from Synology NAS HDD in Ubuntu

Postby darkerbright » Thu Mar 16, 2017 6:06 pm

Hi Sincarne

You are correct I could use a data recovery firm however following the instructions on this site I have managed to access the data however for some reason I now can't replicate what I did. I'm hoping I'm doing something fairly silly due to my lack of Linux knowledge and that someone might be able to help. I'm not offering a reward to the person but would like to thank whoever helps me with a goodwill gesture to a charity, if no one can help, which I doubt is the case, I will seek out a service provider.

I could restore the data from the Cloud Backup,however i can't be sure that all the data in that folder was synced and I'd like to confirm this.

Cheers

Sam
darkerbright
I'm New!
I'm New!
Posts: 7
Joined: Mon Mar 05, 2012 1:39 am

Re: Recover Deleted top level folder when using SHR

Postby darkerbright » Wed Mar 22, 2017 5:18 pm

Hi everyone,

New update. After chatting to a friend we came to the conclusion that the mdadm config file or that I was running Ubuntu off a memory stick might be causing issues.

I have now installed Ubuntu onto a drive. Immediately in disk I can see the 12TB volume but now I can't mount it. I get the following error:

Error mounting /dev/dm-2 at /media/sam/1.41.10-2660: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/dm-2" "/media/sam/1.41.10-2660"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/mapper/vg1000-lv,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
(udisks-error-quark, 0)

Any ideas how I can over come this and mount the drive without damaging the data that is on it?

Cheers

Return to “Backup/Restore for DiskStation to DiskStation/USB/eSATA/Off-site backups”

Who is online

Users browsing this forum: No registered users and 5 guests