How to recover files from Synology NAS HDD in Ubuntu

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
juha_j
I'm New!
I'm New!
Posts: 5
Joined: Thu Aug 09, 2012 6:36 pm

Re: How? Mount, Find & Recover DATA in HDD out of Synology B

Postby juha_j » Thu Aug 09, 2012 9:44 pm

Hi,

I recently bought second hand DS411 with 4pcs 500Gb drives. Now i have replaced 2 500Gb drives with 2 3Tb Seagates. Also before starting to move data from my PC-server to NAS I decided to study some worst case scenario like failure of NAS unit itself and how to get data out of drive/drives. After hours of Google search, trying and re-trying this method worked for me. I did not find any ready "monkey proof"-instructions so I decided to store my experience into this forum that I can find it out later if necessary and may it help you too.

1. Installed Ubuntu 11.10 (also tried with latest version 12.xx)into some spare SATA-drive. No updates needed to be installed. PC must have Internet connection.
2. Attached drive from DS411 which was configured as RAID-1 mirror into Ubuntu PC and booted up.
3. At "Dash Home" search 'disk utility' ans start it to see that attached drive exist and is visible in Linux.
4. Install 'Logical Volume Management' software from "Ubuntu Software Center"
5. Install 'mdadm'. At "Dash Home" search 'terminal' and start it. In terminal type: sudo apt-get install mdadm
6. mdadm installation on first pop-up press 'tab' to get cursor on 'OK' and hit enter, for email configuration choose 'no configuration'
7. After installation is complete type: sudo mdadm --assemble --scan After this command your attached Raid-1 mirror half should be visible on 'disk utility'-software.
8. On disk utility, find selection on attached drive 'start volume group' after all volumes and array should be running, if not try to start volumes separately.
9. Select volume where data is stored (biggest one) and below that click on 'mount'
10. Open 'home folder' attached Raid-1 mirror half should be visible and data can be accessed and copied to other locations.


I am not an Linux expert and if something does not go like "in movies" I'm afraid that I can't help you out, but I'm sure that this forum has helpful persons to help you out. Since I did not have any valuable data on drives on this moment I could study this method by try&error basis.

Hope this works for you,

-juha
funkylogic
I'm New!
I'm New!
Posts: 1
Joined: Mon Aug 06, 2012 3:22 pm

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

Postby funkylogic » Fri Aug 10, 2012 12:35 am

Brilliant post. Thanks
Steph
Enlightened
Enlightened
Posts: 416
Joined: Wed Nov 22, 2006 12:26 pm

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

Postby Steph » Fri Aug 10, 2012 11:04 am

I'm sorry to insist, but what if you Synology uses anything else than a simple HDD or a mirror raid ?

I recall reading somewhere that one would have to connect the hard drive to a sata NO-RAID controller, and then with a utility (Raid Constructor ???), rebuild the raid and then only could read it. Any ideas ?
crashnburn
Experienced
Experienced
Posts: 107
Joined: Thu Aug 07, 2008 7:38 pm

Re: How? Mount, Find & Recover DATA in HDD out of Synology B

Postby crashnburn » Sat Aug 11, 2012 1:06 pm

Thanks for the detailed steps Juha.

I guess this worked for you for RAID-1 Disks. I am wondering if this would work on JBOD/ SHR disks?
d-max
I'm New!
I'm New!
Posts: 4
Joined: Sun Aug 19, 2012 11:41 am

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

Postby d-max » Tue Aug 21, 2012 12:21 am

Thank you very VERY much.
You saves me.

Most of all, as the tuto mounts RAID systems, I can copy all recovered files on my RAID0 on the PC I use.

It is the only tutorial I found on internet that works.

Just a simple question : How did you do that ?
(I am a totaly noob in linux)
Are you a very good in linux ?

Again thank you.
User avatar
damonnk
Sharp
Sharp
Posts: 158
Joined: Fri Aug 03, 2012 1:45 pm
Location: Amsterdam

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

Postby damonnk » Tue Aug 21, 2012 6:53 am

This is why software raid with mdadm has my preference over hardware raid anytime (for personal use).
Recovering files is so easy and iv'e done it many times already but normally without a X GUI.
Put the disks in a random linux pc with mdadm(install if needed), Assemble array, mount, copy :)

Nice work on getting this on the forum, it will help many people!
[DS412+][DSM5][4x2T]
[DS213+][DSM5][2x1T]
[DS110j][DSM5][1x1T]
[Server][ESXi 5.5][Core i5/32G]
User avatar
Vaako
Versed
Versed
Posts: 229
Joined: Thu Jan 11, 2007 12:32 am

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

Postby Vaako » Sat Aug 25, 2012 8:12 pm

Hi,

I have 5 HDD's as single volumes formatted in SHR (Synology Hybrid RAID) and can not see any files with Ubuntu 12.04.1

Also I have two DX510 with all single volumes and they also can't be readed!

Any suggestions?
Regards,
Vaako

USB Station 2 with DSM 3.2-1979 (altenative firmware) + (IPKG)
DS101g+ with DS107 DSM 3.1-1636 firmware
DC406e with DSM 3.1-1635 (thanks to Alfredo)
DS1511+ 2Gb RAM with DSM 6.1-15047 Update 2
DS1515+ 8Gb RAM with DSM 6.1-15047 Update 2 + 2x DX510
Gondy
Trainee
Trainee
Posts: 19
Joined: Wed May 02, 2012 8:44 pm

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

Postby Gondy » Sat Aug 25, 2012 10:06 pm

Hi,
I don't really know, but I guess If you are using your 5HDD in Synology DSM, used file system should be very similar, if not same.

Try posting screenshot from Ubuntu Disk Utility. Is it similar with my screenshot? Can you see similar (or same) RAID components?
Gondy
Trainee
Trainee
Posts: 19
Joined: Wed May 02, 2012 8:44 pm

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

Postby Gondy » Sat Aug 25, 2012 10:12 pm

d-max wrote:Just a simple question : How did you do that ?
(I am a totaly noob in linux)
Are you a very good in linux ?
Again thank you.


No I'm not.. I have some experience with unix/linux and I have a lot of computer knowledge. Basically, it took me a lot of time (all day) and a lot of googling. I just didn't gave up! :)
User avatar
Vaako
Versed
Versed
Posts: 229
Joined: Thu Jan 11, 2007 12:32 am

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

Postby Vaako » Mon Aug 27, 2012 12:21 am

I have use Ubuntu 12.04.1 Live CD
And I have done the things you say:

Code: Select all

sudo apt-get install mdadm


Code: Select all

sudo mdadm --assemble --scan

nothing found

Code: Select all

sudo apt-get install lvm2
sudo vgscan --mknodes


Dont now what i'm doing wrong
Regards,
Vaako

USB Station 2 with DSM 3.2-1979 (altenative firmware) + (IPKG)
DS101g+ with DS107 DSM 3.1-1636 firmware
DC406e with DSM 3.1-1635 (thanks to Alfredo)
DS1511+ 2Gb RAM with DSM 6.1-15047 Update 2
DS1515+ 8Gb RAM with DSM 6.1-15047 Update 2 + 2x DX510
Gondy
Trainee
Trainee
Posts: 19
Joined: Wed May 02, 2012 8:44 pm

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

Postby Gondy » Mon Aug 27, 2012 10:17 am

I'm sorry I can't help you. Try posting screenshot of Disk Utility.
This is how to take screenshot in ubuntu:
http://www.addictivetips.com/ubuntu-linux-tips/three-ways-to-capture-screenshot-in-ubuntu-linux/
User avatar
Vaako
Versed
Versed
Posts: 229
Joined: Thu Jan 11, 2007 12:32 am

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

Postby Vaako » Tue Aug 28, 2012 1:28 am

Well I use just the Print Screen button on the keyboard for a screenshot, it then pop-up a window where you have the option to save it to location you want, but I cant find the screenshots I have taken, or there is something wrong.

I have tryed serval data recovery software (runtime live cd & testdisk) without any resuls so I guess it's all lost i'm afraid :(

But I dont give up yet !!!! :wink:
Regards,
Vaako

USB Station 2 with DSM 3.2-1979 (altenative firmware) + (IPKG)
DS101g+ with DS107 DSM 3.1-1636 firmware
DC406e with DSM 3.1-1635 (thanks to Alfredo)
DS1511+ 2Gb RAM with DSM 6.1-15047 Update 2
DS1515+ 8Gb RAM with DSM 6.1-15047 Update 2 + 2x DX510
User avatar
Vaako
Versed
Versed
Posts: 229
Joined: Thu Jan 11, 2007 12:32 am

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

Postby Vaako » Thu Aug 30, 2012 12:34 am

I have tried different Recovery Software and none could help me till I found this affordable
software Raise Data Recovery for Ext2, Ext3, Ext4 and now I'm so happy that I can see my files to recover :D
Regards,
Vaako

USB Station 2 with DSM 3.2-1979 (altenative firmware) + (IPKG)
DS101g+ with DS107 DSM 3.1-1636 firmware
DC406e with DSM 3.1-1635 (thanks to Alfredo)
DS1511+ 2Gb RAM with DSM 6.1-15047 Update 2
DS1515+ 8Gb RAM with DSM 6.1-15047 Update 2 + 2x DX510
Steph
Enlightened
Enlightened
Posts: 416
Joined: Wed Nov 22, 2006 12:26 pm

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

Postby Steph » Tue Sep 04, 2012 11:57 pm

Vaako > How did you connect your 5 disks on your computer ?
User avatar
damonnk
Sharp
Sharp
Posts: 158
Joined: Fri Aug 03, 2012 1:45 pm
Location: Amsterdam

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

Postby damonnk » Wed Sep 05, 2012 7:30 am

Most new motherboards on the market today have 4-8 sata ports , even older boards have usually 4 ports.
So you can use those connect your raid5 set of 5 disks.
If you only have 4 ports you could only connect 4 disks, but that's enough to get a raid5 set of 5 disks breathing and working though slowly.
Then you just need something else then sata to boot from :D
[DS412+][DSM5][4x2T]
[DS213+][DSM5][2x1T]
[DS110j][DSM5][1x1T]
[Server][ESXi 5.5][Core i5/32G]

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

Who is online

Users browsing this forum: No registered users and 4 guests