DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-02-12 19:51:52

teebiss
Member
Registered: 2009-02-12
Posts: 18

RAID 0 Recovery?

I was having some trouble with my DNS-323 and the iTunes server, so I upgraded to firmware v1.06

That didn't work so I called D-Link tech support.  The tier 1 tech told me to downgrade to firmware v1.05

After the downgrade I lost all my settings.  Now my old RAID 0 volume is gone.

The DNS-323 configuration won't let me do anything but create a new RAID and reformat the drives.

How do I recover my old RAID 0 volume and get my old data back?

Offline

 

#2 2009-02-13 02:11:36

kimhav
Member
From: Klagshamn, Sweden
Registered: 2007-01-08
Posts: 56
Website

Re: RAID 0 Recovery?

What version of the firmware where you using before upgrading to v1.06? I've had a similar issue where I upgraded to version 1.05 and went back again to version 1.03. The box didn't respond to anything and I had to reset the unit and re-config the box. Worth a try to see if it helps out.

If above doesn't help out; suggestion is that you mount the disk into a linux system or to a XP using ext2ifs`drivers.


Kim Haverblad
Klagshamn, Sweden
http://kim.haverblad.se

Offline

 

#3 2009-02-13 02:33:34

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

I was using 1.05 before I upgraded to 1.06 then I downgraded back to 1.05

I'll try putting the drives in my desktop PC.  I dual boot XP and Ubuntu, hopefully I can find some sort of RAID recovery tools.

Offline

 

#4 2009-02-13 03:25:54

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: RAID 0 Recovery?

I would not 'play around' with those disks using Ubuntu or the ext2ifs drivers - you will probably do more harm than good.

This is not a simple recovery - half of the data is on each disk, you need to recreate the array using mdadm - there is one member of this forum who may be able to assist, if you value the data I suggest you wait for him to respond or send it to a professional recovery firm.

At the very least - find a tutorial on mdadm and get an idea of what you are dealing with - and learn from the experience, NEVER, EVER store data on a RAID0 array.

Last edited by fordem (2009-02-13 03:32:37)

Offline

 

#5 2009-02-13 07:03:14

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

Thank you fordem.  Yes, I've learned my lesson.  I'll never RAID 0 again with important data.

Offline

 

#6 2009-02-13 16:51:38

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: RAID 0 Recovery?

Are you still looking to recover the data?  I can help you with mdadm, but it is going to require another drive and a USB stick or drive.  the first thing you will need to do is to put both drives away in a safe place and make sure you lable them as to which drive is which.  The next step will be to put a new drive in the right slot and get the unit back up and running with ffp and telnet access.  You will also need to insert the kernel modual for usb access to drives.  Once you have that, you have a couple of options.  You can:
1) Follow the instructions / advice on getting ffp to run from a USB drive/stick.  This will allow you to unmount the hard drive, hot insert both your RAID0 drives, then assemble the array.

2) Put one or both of the hard drives in USB enclosures and connect to the DNS and assemble the array from the USB.  This may be the simplest.

Regardless of how you want to proceed, it will be relatively time consuming and you will absolutely need to backup all the data immediately after assembling the array, before any reboots.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#7 2009-02-14 02:09:31

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: RAID 0 Recovery?

^^ That's the guy I was talking about - if he can't help you, I don't think anyone else here can.

Offline

 

#8 2009-02-14 08:16:08

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

bq041 thank you very much for responding to my post

I'm not sure I'll be able to find any USB SATA HDD enclosures that support my 500 GB drives.  I'll have to go with option 1.  I'm comfortable with Linux, so I think I'll be OK.

How should we proceed?

Last edited by teebiss (2009-02-14 08:16:31)

Offline

 

#9 2009-02-15 01:43:58

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

I realized late last night that I don't have a spare drive to use while my old drives are out of the DNS.  I ordered a new one on NewEgg, should be here Wednesday.  And I have plenty of USB sticks to use, so I'll pass the time reading all the docs I can find on FunPlug and mdadm.

Offline

 

#10 2009-02-16 19:41:40

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: RAID 0 Recovery?

The first thing you need to do is get ffp running from the USB stick ( this includes all apps) and make sure there are no processes running that prevent you from unmounting the primary disk.  I cannot help you with that part, as I have never tried it, but there are several people on the forum who have.

So you know, I am traveling this week and next for work, so I will be very limited in my ability to assist you during this time.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#11 2009-02-17 09:50:02

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

My new drive will be here in a few days.  I'll use that get ffp running, then I'll get ffp running from a USB stick, then I'll get mounting and unmounting and hotswapping working.  THEN I'll be ready for some mdadm.

At least that's how I understand things right now.

Offline

 

#12 2009-02-17 23:09:29

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: RAID 0 Recovery?

Not hot swapping, hot plugging; there is a differance.  The key right now is to get to the point where you can unmount the main drive (sda2 and sda4 -- and swapoff sda1).  At that point, you can hot plug (and unplug) the drive.  Once we get to that point, we can begin to work on the RAID 0.  Don't forget, you will need someplace to transfer your data to once we get the array back up and working.  A USB drive would be the best and easiest, but we can use samba if we have to (it just adds a little complexity).


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#13 2009-02-18 00:10:18

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

I used Samba for network storage on my Linux box for years before buying the DNS, so I'm liking that idea.

Offline

 

#14 2009-02-19 11:43:35

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

I made pretty good progress today.  I got ffp up and running.  I got my USB stick working.  I got ffp copied over to the USB stick.  Not sure how to tell if ffp is running from the USB stick and not the HDD.

Offline

 

#15 2009-02-20 09:48:17

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: RAID 0 Recovery?

Your fun_plug script needs to point to the USB stick.  Search the forum for info, there may even be info on the wiki.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#16 2009-02-20 14:43:01

fordem
Member
Registered: 2007-01-26
Posts: 1938

Re: RAID 0 Recovery?

Essentially fun_plug is a script located on HD_a2 that calls whatever application(s) you want, from where ever you put them, so after you copy ffp (fonz fun_plug) to the USB key, you need to edit fun_plug (or the scripts that it calls) so that it starts the code necessary to mount the USB key from the disk and then sets the path or points to the USB key so that everything else in else will run from there.

If I understand what's being attempted, you'll boot the system with the "temporary" drive, which will start fun_plug from the drive and then transfer to ffp on the USB key, allowing the "temporary" drive to be dismounted and removed, still leaving access to ffp.

You then install the original drives and through a series of commands issued at the telnet prompt, manipulate mdadm to reassemble the RAID0 array.

Offline

 

#17 2009-02-20 20:05:01

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

fordem: that's exactly the plan

Offline

 

#18 2009-02-22 10:51:26

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

Well, I'm a standstill.  I can get ffp installed on the temp drive.  I can get my USB stick working.  I can get ffp running off the USB stick.  But I can't get the temp drive umounted.  I think it has something to do with reloading the USB module from the USB key.  I'm at the limits of knowledge and experience.

Offline

 

#19 2009-02-22 20:09:02

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: RAID 0 Recovery?

Did you stop samba?  Samba is sharing out your hard drive, and unless it is stopped, the drive cannot be unmounted.  Also make sure ftp, upnp, and iTunes are also stopped.  The key here is to look for anything that is running that is dependant upon the hard drive.

As I said at the beginning, USB enclosure is the easiest.  Do you happen to have 1 SATA USB enclosure?  With 1, we can also do this very easily.  The array can be setup with 1 disk in the unit and 1 on USB.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#20 2009-02-23 05:20:06

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

I was thinking that I could just put the drives in my Linux box under my desk and use mdadm, instead of trying to do it through the DNS-323.  If you recommend against that, one USB SATA enclosures is my next option.

Last edited by teebiss (2009-02-23 05:20:38)

Offline

 

#21 2009-02-23 16:09:19

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: RAID 0 Recovery?

You should be able to use your Linux box, depending on the mdadm version and a few other things.  It certainly will not hurt to try.  I'll give you the command now, so you can try it.  Assuming that the superblocks on each disk are intact, the command you will execute to assemble thwe array is as follows:

mdadm -A /dev/md0 /dev/sda2 /dev/sdb2

Please note that the /dev/md0 may be different (md1, md2, etc.) as md0 may already be used by other arrays.  Also, /dev/sda2 and /dev/sdb2 may be different, as they are the partitions containing your raid 0 information.  On your linux box, these may be hd (hard disk) instead of sd (scsi device).  Just use whatever is applicable to the second partiton on your disks with the raid 0.  Once the array is started, then mount /dev/md0 (or whatever md you use) in a normal fashion.  Below is a telnet log from me doing it.  Note: I was working with partitions 1 and 4 on the disks because of my testing setup.  Yours will be both on partition 2.

Code:

/ # mdadm -A /dev/md0 /dev/sdc1 /dev/sdd4
mdadm: /dev/md0 has been started with 2 drives.
/ # mount /dev/md0 /1
/ # cd 1
/1 # ls
lost+found      usb-storage.ko
/1 # cd ..
/ # umount /dev/md0
/ # mdadm -S /dev/mdo 0
mdadm: stopped /dev/md0
/ # exit

Don't forget to unmount and stop the array before you remove the drives.

Last edited by bq041 (2009-02-23 16:10:06)


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#22 2009-02-24 10:49:26

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

Well, I found a nice SATA USB unit from Thermaltake.  http://www.thermaltakeusa.com/product/s … c/blac.asp 

$30 at NewEgg after rebate.  http://www.newegg.com/Product/Product.a … 6817153066

I know I'll have much use for this in the future, and it's much easier than mucking around in my PC cases for the umpteenth time this month. 

It should be here later this week.  This seems like the most convenient solution.

Offline

 

#23 2009-02-27 08:02:52

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

Got my SATA USB external enclosure unit today.  I was able to insmod the usb-storage.ko module.  I inserted my first HDD in the DNS, so far so good.  I turned on the USB SATA unit, it was recognized.

Good.  Now I'm ready to try mdadm.




/mnt # mdadm -A /dev/md0 /dev/sdb2 /dev/sdc2
mdadm: /dev/md0 has been started with 2 drives.
/mnt # mount /dev/md0 /mnt/recovery
mount: mounting /dev/md0 on /mnt/recovery failed: Invalid argument




here is the output from dmesg




md0: setting max_sectors to 128, segment boundary to 32767
raid0: looking at sdb2
raid0:   comparing sdb2(486544512) with sdb2(486544512)
raid0:   END
raid0:   ==> UNIQUE
raid0: 1 zones
raid0: looking at sdc2
raid0:   comparing sdc2(486544512) with sdb2(486544512)
raid0:   EQUAL
raid0: FINAL 1 zones
raid0: done.
raid0 : md_size is 973089024 blocks.
raid0 : conf->hash_spacing is 973089024 blocks.
raid0 : nb_zone is 1.
raid0 : Allocating 4 bytes for hash.
SCSI error : <4 0 0 0> return code = 0x8000002
sdc: Current: sense key=0x3
    ASC=0x11 ASCQ=0x0
end_request: I/O error, dev sdc, sector 1060402
EXT3-fs: can't read group descriptor 29
SCSI error : <4 0 0 0> return code = 0x8000002
sdc: Current: sense key=0x3
    ASC=0x11 ASCQ=0x0
end_request: I/O error, dev sdc, sector 1060402
EXT2-fs: unable to read group descriptors




I think this means my array is not recoverable?

Last edited by teebiss (2009-02-27 08:04:26)

Offline

 

#24 2009-02-27 08:33:24

teebiss
Member
Registered: 2009-02-12
Posts: 18

Re: RAID 0 Recovery?

It appears that I have a bad sector on my second drive (/dev/sdc)

I'm looking at how to mount my array anyway, ignoring that bad sector.  I'm sure I've lost some data, but I can't have lost ALL of it?

Offline

 

#25 2009-02-28 23:16:05

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: RAID 0 Recovery?

Try running e2fsck on the array.  You can look up the man page on the internet, or just type the command at the telnet prompt for a list of options.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB