Link to home
Create AccountLog in
Avatar of magbo99
magbo99

asked on

Data recovery from NAS initialized hard drive (QNAP TS-109II) using customized Linux boot disc

Hello Experts!

I have some trouble retrieving data from a QNAP TS-109II. QNAP support have the following article on the subject and I have followed it to the best of my understanding.

http://www.qnap.com/en/index.php?lang=en&sn=852&c=915&sc=2323&n=9492

Here's a copy of what I've earlier sent to QNAP Support, so far without any response:

Background:
Somewhere in the process of setting up a "Sonos Play 5" and a "Sonos Bridge" on my home network the Qnap NAS freaked out and disconnected itself. When I eventually got it back online it had changed it's name and insisted that I "initialized hard drive", which I wasn't very interested in since that particular drive holds backup of ALL my media dating back to at least 2003.

Solution:
I found and read the article in your Q&A on Qnap support about the recovery CD for accessing drives initialized with TS-109/209 et c and got under way. The amount of data needed to be recovered is something in the order of 400-500 GB. I only have access to a couple of (windows based) laptops (two LG's and one Samsung) and none of them will be able to recover that amount of data on their internal hard drives so the solution was to get a new hard drive and install that one into a casing and connect it via USB. I also got a USB casing for the drive I'm trying to recover data from.
Next I downloaded the .iso of "QNAP System Linux Live CD" and burned that to a CD.

Current status:
I'm now booting all computers successfully from your recovery CD, everything works just fine, I seem to be able to access both the old "NAS hard drive" and the new one which I'm trying to copy all the data to.
I try to follow your instructions in the .pdf and everything goes according to plan until the last command, the magical "rsync". When I press enter the system says something like "building file list..." and all of a sudden it starts flashing file names on the screen at a blinding speed. That goes on for about 20-30 seconds and then it stops dead. When I then type "ls" nothing from the old drive has been copied to the new one...

I have no knowledge of Linux, maybe there is just some trivial mistake I'm making that messes up the process? I don't even know where to look to see if I've done something wrong and would be eternally thankful for just a push in the right direction. Maybe there are some known issues or loopholes with your recovery CD or instructions?

Since basically all the data I'm interested in is located under the "Public" folder on my old drive, this is how my final command looks:

rsync -rav /media/Public/

Maybe there is something wrong with that?


Needless to say, I'm thankful for anything at this stage.

regards,
"Magbo99"
Avatar of rindi
rindi
Flag of Switzerland image

What about your backups? Just replace the bad drive with a good one (if it is the drive that is bad), and restore the data from your backups...

Does your NAS have just one drive, or more than one in a RAID array? If it is a RAID array, I don't think I'll be able to help.

If it is a single, unraided drive, remove the disk and connect it to another PC, then boot that PC using the PartedMagic LiveCD, and then try mounting the partitions of the drive and copying the data off. If it can't be mounted, try using testdiskphotorec to scan the drive and copy the data off. Both those tools are included on the CD:

http://distrowatch.com/table.php?distribution=partedmagic
Avatar of magbo99
magbo99

ASKER

Hi and thanks for the quick response!

However, some clarification seems needed.

Hard drive is ok, but I can't access my data due to the file structure, please have a look again at QNAPs support page in the link above and my description of the current state of the problem.

regards.
ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of magbo99

ASKER

Ok, I might give it a try, but you got it wrong with Qnap, they use Ext3 and TS-109II use a specific version of that which is not compatible with standard Linux. Basically ALL other Qnap NAS use standard Ext3 which is very neat since it enables you to just plug the hard drive to a Linux device.
It also supports ext3, ext4 and many other file-systems.
Avatar of magbo99

ASKER

Ok, so, now booted up Parted Magic, looks really sweet, Linux at it's finest.

However, as I tried to get across, the disc in question will not mount, and nor should it I guess, since it does not use any standard type of file system. Qnap them selves has this to say about their product:

"On TS-109/209 series, the file system on TS-109/209 is not standard ext3.  We have created a live CD for you to boot from the CD to access your data.  Please install the hard disk to your PC by internal SATA or external USB/eSATA connection and boot using our live CD.  The detail procedure can be referred here: ftp://csdread:csdread@ftp.qnap.com/NAS/live_cd/TS109-209_data_recovery_with_Live_CD.pdf

The live CD can be downloaded by the following link:

ftp://csdread:csdread@ftp.qnap.com/NAS/live_cd/Data_Recover_live-cd_2009-01-15_TS109-209.iso"

What I was after was actually a way to get the above procedure to work, I simply can not handle command line Linux very well and needed to understand what went wrong with the rsync command.

That said, PhotoRec turned out to be able to crack the case and in some primitive way just rip the files regardless of file system. It should be noted though that it messes up the filenames, but regarding the images I'm after I think the metadata will be sufficient to identify when-and-where. It works, so that's one huge leap forward...
Meanwhile I've downloaded the QNap iso and taken a look at it. If you have gotten as far as mounting your QNap file-System and the file-system of the drive you want to copy the data to, you can try the following:

First makes sure you have a valid IP. enter

dhclient eth0

for that, and when that is finished use

ifconfig

to show you what IP you got. If it is a valid IP within your LAN, you will now also have access to the internet. Now instal the Midnight Commander. That is a very easy to use file-manager with two panels, in my point of view it belongs to every Linux distro by default, but often it isn't there... On the QNap CD it isn't. To install it issue

apt-get install mc

This will get and install mc (temporarily, as it is a LiveCD) from the online repositories.

When that has finished you start the midnight Commander by entering

mc

Mc looks like the old Norton Commander for DOS. You can now navigate to the mount point of your destination copy location in one panel, and to the QNap mount point in the other (with tab you move between panels). After that you just select those file you want to copy, and with the F5 key copy the files / folders to the destination location.
Avatar of magbo99

ASKER

Thanks for all assistance, excellent speed of replies!

Parted Magic is a great toolbox, I'll be sure to keep a CD at hand at all times for future catastrophes...

The Midnight Commander solution above seems really neat though, had I known about that option I would have gone for that one first. PhotoRec is powerful indeed, but it has it's down sides as noted before. I'll be sure to check back with feedback if I still give the MC alternative a go!

Kudos rindi, you've been a great help, keep it up! :-)
Midnight commander is included on the PartedMagic LiveCD too, by the way. In a terminal just enter MC, and it opens up...