Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recovering Data from N2310 HDD
#1
I've successfully recovered data from my single HDD that was inside a failed N2310. The N2310 died after a power outtage and I was unable to restore it.

Two options are available here: 1) Recover on Windows with a PAID program 2) Recover for free with Linux

1)
I used Disk Drill and recovered the entire contents with ease - HOWEVER, I lost all metadata. So I had ~1000 files that would need to be manually renamed and sorted. If you do some research, I believe there are paid programs that can detect the filesystem correctly and keep the metadata YMMV

2)
Using a linux PC, I recovered everything and maintained metadata and folder structures. You can likely do this using a Ubuntu Live CD/USB, but I have a purpose built Linux machine that I used.

From what I've read the N2310 is a powerPC based unit so it's filesystems are kind of goofy and not easily registered by Linux. In Ubuntu I was absolutely not able to mount the drive no matter what I did, but that doesn't prevent you from recovering the data. Instructions are as follows:

Install the drive, and make sure you have a destination with enough room for the files to be recovered to (I used an external hard drive USB 3.0)
I then opened up the terminal and changed my permissions to root (if you're unfamiliar with linux, be careful cause you can cause some damage while in root)

Quote:sudo -i

Next I installed mdadm and lvm2

Quote:apt-get install mdadm
apt-get install lvm2

Use mdadm to reassemble your raid (if you had a two HDD raid this should also work if both drives are installed), recursive is optional.
Quote:mdadm --assemble --scan --recursive

If you open up the disks appication you should see a few RAID array's. My HDD was 3 TB and I had an array "3.0 TB Raid Array" the device was called /dev/md0. Yours may be called something else but it will be along the lines of /dev/mdX
This is where all the files are. The other arrays are used by the N2310 for operational purposes and won't contain any data you would need to recover.

Next we need to check the block size, it's easiest to try to mount first then check.

Quote:mount /dev/md0 /mountlocation
mount: /mountlocatin: wrong fs type, bad option, bad superblock on /dev/md0, missing code page or helper program, or other error.
dmesg | tail
With mountlocation being a location I created to mount my drive, the message in red is the error you get. After doing the dmesg you'll get a response with a few lines. At the end you will see something along the lines of:
Quote:[449.322010] EXT4-fs (md0)" bad block size 65536
The numers in brackets likely wont be the same, but what we see here is that the block size for this file system is 65536 - again, I think this relates to the powerPC architecture. 65536 will be the same for all N2310s and likely most Linux Thecus rigs.

Next we debug the filesystem to recover our data
Quote:debugfs
open -b 65536 /dev/md0
ls

You'll now be in a window where it will list the folders in this root of md0, I had to hunt and guess here but there was a folder called "data" so I decided to look in there. Hit q to exit the ls

Quote:cd "data"
ls

At this point I could see all the folders I had placed in my NAS - and thus am ready to recover. Hit q to exit the ls

Quote:rdump "folder you want to recover" /location of dump

In my case it looked like this:

Quote:rdump "Movies" /media/username/TOURO

Since I had my external HDD mounted I dumped there, if you do the same you will need to use the similar format, /media/username/name of external HDD.

At this point debugfs will do it's thing and you wont be able to type anything in terminal. The cursor will return when it's done.

If your folders have spaces in their name, I believe you'll need to use a backslash like this:

Quote:rdump "folder\with\spaces /media/username/Touro

I spent way too long trying to figure this out - so I wanted to post a thread to give future users some guidance.

This same method should work for other NAS machines as well - most of these instructions I pulled from a guide on recovering from an LG branded NAS
Reply
#2
Dear Sir,

It is a nice post, and N2310 have no LVM thus could skip the lvm or lvm2.
Yvon.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  NAS N2310 using hard disk with my data paolopix 2 1,352 05-12-2015, 12:22 PM
Last Post: Thecus - Yvon
  NAS N2310 using hard disk with my data paolopix 3 1,219 04-08-2015, 11:44 AM
Last Post: Lasersage
  NAS N2310 using hard disk with my data 0 585 Less than 1 minute ago
Last Post:
  NAS N2310 using hard disk with my data 0 691 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)