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
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
Steph
Enlightened
Enlightened
Posts: 420
Joined: Wed Nov 22, 2006 12:26 pm

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

Unread post by Steph » Wed Sep 05, 2012 8:21 am

But I suppose you need to put the disks in the same order ?

I'm really surprise it was possible to restore a SHR volume of five disks ...

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

Unread post by damonnk » Wed Sep 05, 2012 8:28 am

Order doesn't matter at all.
mdadm(software raid used) has information stored in a superblock that exists on all your raid drives containing information on how the raid should be put back together.
Steph wrote:I'm really surprise it was possible to restore a SHR volume of five disks ...
See here why i loved mdadm software raid , it has proven itself for years and years in linux.
I work for the biggest ISP in the Netherlands and we even used it until a few years ago.

Also see http://en.wikipedia.org/wiki/Mdadm :)
[DS412+][DSM5][4x2T]
[DS213+][DSM5][2x1T]
[DS110j][DSM5][1x1T]
[Server][ESXi 5.5][Core i5/32G]

Steph
Enlightened
Enlightened
Posts: 420
Joined: Wed Nov 22, 2006 12:26 pm

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

Unread post by Steph » Thu Sep 06, 2012 12:24 pm

This looks great, thank you very much for sharing the information!

But I believe this is for software raid. What if the Synology has been configured in hardware raid 5 ?

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

Unread post by damonnk » Thu Sep 06, 2012 12:40 pm

Steph wrote:This looks great, thank you very much for sharing the information!

But I believe this is for software raid. What if the Synology has been configured in hardware raid 5 ?
Synology doesn't use hardware raid but mdadm software raid and lvm volume manager.
A powerful and flexable combination :)
[DS412+][DSM5][4x2T]
[DS213+][DSM5][2x1T]
[DS110j][DSM5][1x1T]
[Server][ESXi 5.5][Core i5/32G]

Steph
Enlightened
Enlightened
Posts: 420
Joined: Wed Nov 22, 2006 12:26 pm

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

Unread post by Steph » Thu Sep 06, 2012 2:08 pm

Oh ... so there is really no reason to prefer Raid 5 over SHR on a Synology ?

lorenzoips
I'm New!
I'm New!
Posts: 4
Joined: Sat Jan 05, 2013 12:42 pm

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

Unread post by lorenzoips » Sat Jan 05, 2013 12:52 pm

Hello, I hope you can help me with my problem:

I had a SHR raid formed by 2 Tb western green HDs and 1 Tb Seagate HD, and while I was upgrading the SHR adding a new 2 Tb western green the power turned off, so when the raid rebooted it appeared with the status "broken" and all my data was gone, can I recover my data with the system you used in this post?? or do you know any other way to recover my data?

Thank you for all!
Last edited by lorenzoips on Sat Jan 05, 2013 3:35 pm, edited 1 time in total.

User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
Posts: 19674
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

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

Unread post by HarryPotter » Sat Jan 05, 2013 2:35 pm

Did you replace the 1TB disk by a 2 TB one? Then you should be able to read data from the smaller disk with a linux live CD.
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS718+ / DSM 6.2-23511 / ST4000VN000-2AH166 / SA400S37120G SSD cache /16 GB RAM
DS415+ / DSM 6.2-23511

LMS 7.9.1-166, 2 Squeezebox 3 + Boom

APC Smart UPS SUA750i

lorenzoips
I'm New!
I'm New!
Posts: 4
Joined: Sat Jan 05, 2013 12:42 pm

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

Unread post by lorenzoips » Sat Jan 05, 2013 2:59 pm

No, I didnt replace it, I added a new 2 tb HD to the 3 previous I had.

User avatar
HarryPotter
Honorary Moderator
Honorary Moderator
Posts: 19674
Joined: Mon Oct 23, 2006 12:48 pm
Location: Switzerland

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

Unread post by HarryPotter » Sat Jan 05, 2013 3:39 pm

I suggest to contact Synology support and give them remote access. They may try to repair your volume.
*Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!*

DS718+ / DSM 6.2-23511 / ST4000VN000-2AH166 / SA400S37120G SSD cache /16 GB RAM
DS415+ / DSM 6.2-23511

LMS 7.9.1-166, 2 Squeezebox 3 + Boom

APC Smart UPS SUA750i

lorenzoips
I'm New!
I'm New!
Posts: 4
Joined: Sat Jan 05, 2013 12:42 pm

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

Unread post by lorenzoips » Sat Jan 05, 2013 4:55 pm

Ok, I did it but i'm waiting for their answer.

Thanks

lorenzoips
I'm New!
I'm New!
Posts: 4
Joined: Sat Jan 05, 2013 12:42 pm

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

Unread post by lorenzoips » Thu Jan 10, 2013 10:46 am

It was repaired by synology tech support, Perfect Work.

Thanks sinology

BarryT
I'm New!
I'm New!
Posts: 5
Joined: Wed Jan 16, 2013 7:11 pm

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

Unread post by BarryT » Wed Jan 16, 2013 7:17 pm

Gondy, I really want to thank you for putting this post together. I found it very helpful when pulling files from my DS211j Thank you, thank you, thank you!

I do have one question that, hopefully, somebody here can answer about the Ubuntu USB drive. For some reason, I get a kernal panic if I shut down the computer and then later try to reboot. I have to completely format and re-create the USB thumb drive on my other computer to get it to work again.

I'm guessing that this has to do with some kind of files that are added or changed on the thumb drive while I was using it the first time. If anybody has a solution that doesn't require me to completely start from scratch on the USB drive (maybe deleting some updated files or something?) every time, I'm interested in hearing it.

Thanks again!
Gondy wrote:Recently my Synology DS210j crashed after update and no longer boot (just orange status LED blinking). So I need to find a way to recover my files, because I was afraid re-installing DSM software will erase my data. After a few desperate hours fighting with Linux I found a way how to recover files for free using Ubuntu Linux.

DaveB
Beginner
Beginner
Posts: 21
Joined: Thu Jan 17, 2013 6:54 pm

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

Unread post by DaveB » Thu Jan 17, 2013 7:08 pm

I'm having trouble with the Ubuntu backup procedure.
Drive was removed from synoogy then LUNS were removed.

Run sudo mdadm --assemble --scan
receive : mdadm: No arrays found in config file or automatically.

In Disks window it shows Linux RAID auto. No VG1 in disks window

Thanks for any assistance
Dave

BarryT
I'm New!
I'm New!
Posts: 5
Joined: Wed Jan 16, 2013 7:11 pm

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

Unread post by BarryT » Fri Jan 18, 2013 6:05 pm

DaveB wrote:I'm having trouble with the Ubuntu backup procedure.
Hey there Dave,

The OP's step-by-step didn't work verbatim for me either, but it got me on the right track. Let me find my notes because you might be having the same issues I had. Hold tight!

BarryT
I'm New!
I'm New!
Posts: 5
Joined: Wed Jan 16, 2013 7:11 pm

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

Unread post by BarryT » Fri Jan 18, 2013 6:46 pm

DaveB wrote:In Disks window it shows Linux RAID auto. No VG1 in disks window
Hey Dave, I was never able to find a "vg1" when following this tutorial either but, ultimately, it wasn't necessary in my case. I have just posted a variant of Gondy's technique that worked for me with a two disk, RAID1 setup in a DS211j. You can check out my thread here: http://forum.synology.com/enu/viewtopic ... 60&t=62926

Good luck

Locked

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