How to recover files from Synology NAS HDD in Ubuntu
Forum rules
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
We've moved! Head over to Synology Community (community.synology.com) to meet up with our team and other Synology enthusiasts!
Re: How to recover files from Synology NAS HDD in Ubuntu
Your data are on the other ext partition on the disk. What you see here is only Synology DSM system files partition. Data files are on RAID parition. Recovering them is not so trivial. You can follow my guide to recover them. Good luck.
Upgrading a Hard drive - data not available via external usb
Hi,
I have a DS411j and I have upgraded a hard drive; from 1.5TB to 3TB. The drive had a single volume called music.
My plan was to install the new drives and then use an external usb dock to copy the data from the old drives but I cannot find the music folder.
There are 3 partitions on the drive (shown using external devices => Get Info. It seems that only partition 1 is being shown.There are various system folders and 4 empty volume folders; volume1 - volume4 but no music folder.
How do I get the music folder to show.
I understand that the music folder is one of the system default folders. Are there any issues I should be aware of when removing a drive that has one of the default folders?
I have a DS411j and I have upgraded a hard drive; from 1.5TB to 3TB. The drive had a single volume called music.
My plan was to install the new drives and then use an external usb dock to copy the data from the old drives but I cannot find the music folder.
There are 3 partitions on the drive (shown using external devices => Get Info. It seems that only partition 1 is being shown.There are various system folders and 4 empty volume folders; volume1 - volume4 but no music folder.
How do I get the music folder to show.
I understand that the music folder is one of the system default folders. Are there any issues I should be aware of when removing a drive that has one of the default folders?
Re: How to recover files from Synology NAS HDD in Ubuntu
Hello,
I have followed your guide completetly and it worked the first time. However, copying files was taking a unusual long time and it's because the other disk was NTFS. So I reformatted it to ext4, and tried again. But this time, Ubuntu will not mount the block disk no matter what I try. It only says it found one volume but it won't mount it. I tried vgscan, lgscan but it keeps saying no logical volume found.
I am doing it in a virtual machine but since it worked the first time I don't know what to do.
EDIT: I also tried running it on a normal computer with the disk connected through sata. Again, it finds the volume, but it won't mount it.
I have followed your guide completetly and it worked the first time. However, copying files was taking a unusual long time and it's because the other disk was NTFS. So I reformatted it to ext4, and tried again. But this time, Ubuntu will not mount the block disk no matter what I try. It only says it found one volume but it won't mount it. I tried vgscan, lgscan but it keeps saying no logical volume found.
I am doing it in a virtual machine but since it worked the first time I don't know what to do.
EDIT: I also tried running it on a normal computer with the disk connected through sata. Again, it finds the volume, but it won't mount it.
Re: How to recover files from Synology NAS HDD in Ubuntu
Can anyone give a detailed reply on how to fix the following problems when attempting this procedure?
From the NAS I can SSH into it, I see the vg1000 file in /etc/lvm/backup/. It's got info pertaining to my old volume.
I can also mdadm --examine /dev/sda[123] for all my disks a b c, and see all that info with UUID's ect.
Can anyone point me in the direction of restoring my volume w/o resorting to copying the data off it on another host? Ideally I'd like to learn how synology support would go about doing it. They have for me in the past, but I've since sold that NAS and running my current setup virtualized.
Code: Select all
Run sudo mdadm --assemble --scan
receive : mdadm: No arrays found in config file or automatically.
I can also mdadm --examine /dev/sda[123] for all my disks a b c, and see all that info with UUID's ect.
Can anyone point me in the direction of restoring my volume w/o resorting to copying the data off it on another host? Ideally I'd like to learn how synology support would go about doing it. They have for me in the past, but I've since sold that NAS and running my current setup virtualized.
Lost volume when attempting to expand volume
My array consisted of 3 disks, and it was running great for a while now so I decided to copy the rest of the data over and add the 4th disk. When attempting to expand the volume it gave me some kind of network error and didn't expand it. So I figured I'd reboot the NAS and try again, only it hung up.. so I let it go for a bit before powering it off. When it booted it back up my volume was gone.
I know my data is still there and I'd like to fix this myself, to learn how it's done, and because I can't use synology support.
I've SSH'd into the box and am able to see all my disk info.
fdisk -l
I've also located the backup of the config of my volume at /etc/lvm/backup/vg1000
I'm also about to see all the info on my drives using mdadm --examine:
Ignore the failed devices, it only uses 3 of possible 12 drives.
Can anyone tell me how to go about restoring my volume info? Pretty please
I know my data is still there and I'd like to fix this myself, to learn how it's done, and because I can't use synology support.
I've SSH'd into the box and am able to see all my disk info.
fdisk -l
Code: Select all
Disk /dev/sda: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 311 2490240 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary
/dev/sda2 311 572 2097152 fd Linux raid autodetect
Partition 2 does not end on cylinder boundary
/dev/sda3 588 243201 1948788912 f Win95 Ext'd (LBA)
Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 311 2490240 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary
/dev/sdb2 311 572 2097152 fd Linux raid autodetect
Partition 2 does not end on cylinder boundary
Disk /dev/sdc: 2000.3 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 311 2490240 fd Linux raid autodetect
Partition 1 does not end on cylinder boundary
/dev/sdc2 311 572 2097152 fd Linux raid autodetect
Partition 2 does not end on cylinder boundary
Code: Select all
# Generated by LVM2 version 2.02.38 (2008-06-11): Sun May 19 15:10:55 2013
contents = "Text Format Volume Group"
version = 1
description = "Created *after* executing '/sbin/lvcreate /dev/vg1000 -n lv -l100
%FREE'"
creation_host = "DiskStation" # Linux DiskStation 3.2.30 #12 SMP Mon Mar 11 20
:52:49 EET 2013 x86_64
creation_time = 1369001455 # Sun May 19 15:10:55 2013
vg1000 {
id = "unique_string_1"
seqno = 2
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "unique_string_2"
device = "/dev/md2" # Hint only
status = ["ALLOCATABLE"]
dev_size = 7795118592 # 3.62988 Terabytes
pe_start = 1152
pe_count = 951552 # 3.62988 Terabytes
}
}
logical_volumes {
lv {
id = "unique_string_3"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 951552 # 3.62988 Terabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
}
}
Code: Select all
DiskStation> mdadm --examine /dev/sda[123]
/dev/sda1:
Magic : a92b4efc
Version : 0.90.00
UUID : unique_UUID_1 (local to host DiskStation)
Creation Time : Fri Dec 31 19:00:03 1999
Raid Level : raid1
Used Dev Size : 2490176 (2.37 GiB 2.55 GB)
Array Size : 2490176 (2.37 GiB 2.55 GB)
Raid Devices : 12
Total Devices : 3
Preferred Minor : 0
Update Time : Tue Jun 11 19:19:38 2013
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 9
Spare Devices : 0
Checksum : 9d221d93 - correct
Events : 856722
Number Major Minor RaidDevice State
this 0 8 1 0 active sync /dev/sda1
0 0 8 1 0 active sync /dev/sda1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 33 2 active sync /dev/hdc1
...
/dev/sda2:
Magic : a92b4efc
Version : 0.90.00
UUID : unique_UUID_2 (local to host DiskStation)
Creation Time : Fri Dec 31 19:00:06 1999
Raid Level : raid1
Used Dev Size : 2097088 (2048.28 MiB 2147.42 MB)
Array Size : 2097088 (2048.28 MiB 2147.42 MB)
Raid Devices : 12
Total Devices : 3
Preferred Minor : 1
Update Time : Tue Jun 11 11:57:39 2013
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 9
Spare Devices : 0
Checksum : 764ec5ad - correct
Events : 97
Number Major Minor RaidDevice State
this 0 8 2 0 active sync /dev/sda2
0 0 8 2 0 active sync /dev/sda2
1 1 8 18 1 active sync /dev/sdb2
2 2 8 34 2 active sync /dev/hdc2
...
mdadm: No md superblock detected on /dev/sda3.
Code: Select all
DiskStation> mdadm --examine /dev/sdb[123]
/dev/sdb1:
Magic : a92b4efc
Version : 0.90.00
UUID : unique_UUID_3 (local to host DiskStation)
Creation Time : Fri Dec 31 19:00:03 1999
Raid Level : raid1
Used Dev Size : 2490176 (2.37 GiB 2.55 GB)
Array Size : 2490176 (2.37 GiB 2.55 GB)
Raid Devices : 12
Total Devices : 3
Preferred Minor : 0
Update Time : Tue Jun 11 19:20:26 2013
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 9
Spare Devices : 0
Checksum : 9d221e01 - correct
Events : 856744
Number Major Minor RaidDevice State
this 1 8 17 1 active sync /dev/sdb1
0 0 8 1 0 active sync /dev/sda1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 33 2 active sync /dev/hdc1
...
/dev/sdb2:
Magic : a92b4efc
Version : 0.90.00
UUID : unique_UUID_4 (local to host DiskStation)
Creation Time : Fri Dec 31 19:00:06 1999
Raid Level : raid1
Used Dev Size : 2097088 (2048.28 MiB 2147.42 MB)
Array Size : 2097088 (2048.28 MiB 2147.42 MB)
Raid Devices : 12
Total Devices : 3
Preferred Minor : 1
Update Time : Tue Jun 11 11:57:39 2013
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 9
Spare Devices : 0
Checksum : 764ec5bf - correct
Events : 97
Number Major Minor RaidDevice State
this 1 8 18 1 active sync /dev/sdb2
0 0 8 2 0 active sync /dev/sda2
1 1 8 18 1 active sync /dev/sdb2
2 2 8 34 2 active sync /dev/hdc2
...
mdadm: cannot open /dev/sdb3: No such device or address
Code: Select all
DiskStation> mdadm --examine /dev/sdc[123]
/dev/sdc1:
Magic : a92b4efc
Version : 0.90.00
UUID : unique_UUID_5 (local to host DiskStation)
Creation Time : Fri Dec 31 19:00:03 1999
Raid Level : raid1
Used Dev Size : 2490176 (2.37 GiB 2.55 GB)
Array Size : 2490176 (2.37 GiB 2.55 GB)
Raid Devices : 12
Total Devices : 3
Preferred Minor : 0
Update Time : Tue Jun 11 19:20:48 2013
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 9
Spare Devices : 0
Checksum : 9d221e41 - correct
Events : 856756
Number Major Minor RaidDevice State
this 2 8 33 2 active sync /dev/hdc1
0 0 8 1 0 active sync /dev/sda1
1 1 8 17 1 active sync /dev/sdb1
2 2 8 33 2 active sync /dev/hdc1
...
/dev/sdc2:
Magic : a92b4efc
Version : 0.90.00
UUID : unique_UUID_6 (local to host DiskStation)
Creation Time : Fri Dec 31 19:00:06 1999
Raid Level : raid1
Used Dev Size : 2097088 (2048.28 MiB 2147.42 MB)
Array Size : 2097088 (2048.28 MiB 2147.42 MB)
Raid Devices : 12
Total Devices : 3
Preferred Minor : 1
Update Time : Tue Jun 11 11:57:39 2013
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 9
Spare Devices : 0
Checksum : 764ec5d1 - correct
Events : 97
Number Major Minor RaidDevice State
this 2 8 34 2 active sync /dev/hdc2
0 0 8 2 0 active sync /dev/sda2
1 1 8 18 1 active sync /dev/sdb2
2 2 8 34 2 active sync /dev/hdc2
…
mdadm: cannot open /dev/sdc3: No such device or address
Can anyone tell me how to go about restoring my volume info? Pretty please

Re: Lost volume when attempting to expand volume
If I do : mdadm –Asf && vgchange -ay
as per http://www.synology.com/support/faq_sho ... u&q_id=579 will it restore my array back to normal, or will this just let me access my files via SSH?
Trying my best to resist trying stuff until I know what I should do. Don't want to do something that can't be undone
as per http://www.synology.com/support/faq_sho ... u&q_id=579 will it restore my array back to normal, or will this just let me access my files via SSH?
Trying my best to resist trying stuff until I know what I should do. Don't want to do something that can't be undone

Reading RAW partition from DS212j in Win7?
Hi
I recently bought a bigger hdd for my 212j, so i backed everything up overnight to 3 usb drives.
i then removed one of the drives from my nas and replaced with the new bigger one and started to replace all my files.
now one of the usb back up drives has failed...
I was thinking is it possible to see if any of the data that i lost is on the hdd that i removed from the nas ? the big partition on this shows as RAW ? can this be read on a windows pc ?
Tia
I recently bought a bigger hdd for my 212j, so i backed everything up overnight to 3 usb drives.
i then removed one of the drives from my nas and replaced with the new bigger one and started to replace all my files.
now one of the usb back up drives has failed...
I was thinking is it possible to see if any of the data that i lost is on the hdd that i removed from the nas ? the big partition on this shows as RAW ? can this be read on a windows pc ?
Tia
Re: Reading RAW partition from DS212j in Win7?
Thanks for that, will try it tonight.
Re: How to recover files from Synology NAS HDD in Ubuntu
After sudo mdadm --assemble --scan i keep getting "not enough to start the array" ?
It was a while ago when i setup the nas but im pretty sure it was RAID 0.
I can post a screeny tomorrow if needed.
Tia
It was a while ago when i setup the nas but im pretty sure it was RAID 0.
I can post a screeny tomorrow if needed.
Tia
Re: How to recover files from Synology NAS HDD in Ubuntu
sorry im a complete raid and linux noob but do i need both the hard drives from my nas to see files that are on 1 disk ? is this why i cant start the array ?
- HarryPotter
- 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
Sorry but If it was a RAID0, I would say forget it.
*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
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
-
- I'm New!
- Posts: 6
- Joined: Fri Jun 28, 2013 11:22 pm
How do I backup this server HDD? - SOLVED!!
Hey guys,
I have a server (Synology Diskstation DS112J - an NAS) that I absolutely cannot access via my network, and I'm wondering if there's any way I can back up the data on the HDD before I do a reset. When I plug the HDD into a computer, it isn't recognized because it has the server OS/firmware installed. Is there any other way I can access the data and/or back it up from the HDD?
Thanks.
I have a server (Synology Diskstation DS112J - an NAS) that I absolutely cannot access via my network, and I'm wondering if there's any way I can back up the data on the HDD before I do a reset. When I plug the HDD into a computer, it isn't recognized because it has the server OS/firmware installed. Is there any other way I can access the data and/or back it up from the HDD?
Thanks.
Last edited by NorthernEnd on Tue Jul 02, 2013 5:04 pm, edited 1 time in total.
Re: How do I backup this server HDD?
Check this thread: http://forum.synology.com/enu/viewtopic ... 60&t=51393
No longer using Synology NAS, moved to more open source solutions.
DS-106j > DS-210j > DS-411
DS-106j > DS-210j > DS-411
-
- I'm New!
- Posts: 6
- Joined: Fri Jun 28, 2013 11:22 pm
Re: How do I backup this server HDD?
For anyone with a similar problem, or anyone who needs to recover files from an inaccessible NAS hard drive, this is the solution and utility that I used:
Ext2read
http://ext2read.blogspot.dk/2010/04/ext ... 2-and.html
This utility makes it possible for your regular Windows PC to read an NAS hard drive (can't read it normally because the files are stored within a file type recognized by Linux but not Windows)
- Connect the NAS hard drive directly to the PC, as you would with any hard drive.
- Download Ext2read and run the application as administrator
- The NAS hard drive should be visible within Ext2read, so open it and all files will be visible
- click on the files you want and go down to "save"
- You are given the choice of where you want to save these files, so you can simply copy them onto your main PC hard drive, and voila! Everything is backed up and you don't have to worry about the HDD being formatted when you do a server reset.
Best of luck!
Ext2read
http://ext2read.blogspot.dk/2010/04/ext ... 2-and.html
This utility makes it possible for your regular Windows PC to read an NAS hard drive (can't read it normally because the files are stored within a file type recognized by Linux but not Windows)
- Connect the NAS hard drive directly to the PC, as you would with any hard drive.
- Download Ext2read and run the application as administrator
- The NAS hard drive should be visible within Ext2read, so open it and all files will be visible
- click on the files you want and go down to "save"
- You are given the choice of where you want to save these files, so you can simply copy them onto your main PC hard drive, and voila! Everything is backed up and you don't have to worry about the HDD being formatted when you do a server reset.
Best of luck!