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 2007-01-09 13:35:05

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

OT: Anyone tested RAID funtionality?

Hi,

Sorry if this is O/T but I'm about to purchase a DNS-323 and use it with 2pcs of 320Gb discs in a RAID-1 setup. I've read a couple of reviews and browsed this forum (excellent work with all stuff going on here) but there is still one question I havn't seen any answers to.

If one of the drives crashes and is replaced, will the DNS-323 destroy data on both drives or will it actually re-mirror the working drive? As far as I understand, in the case of disc failure - you should backup the working disc to another device and then replace the failed drive and re-format. Is this correct?

What abolut the embedded scheduler? Is it any good? Thinking of skipping the RAID-1 setup and go for standard setup and schedule backups of the 'important' data (pictures, docuements, etc) but ignore the less important stuff (movies, etc). This will give me the 'security' I'm aiming for and in the case of disc failure, I will be up and running rather quickly.

Best Regards,

Apskaft

Offline

 

#2 2007-01-09 22:38:35

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

mdadm is a part of the firmware so unless D-Link engineers made a serious cock-up when compiling it you should be able to add a new hard drive with a few commands after fdisk partitioning (which currently fails with segfault :-(( )
I would altogether avoid GUI in this scenario
Unfortunately mdadm in D-link incarnation does not support --grow so you will not be able to resize the array after replacing it with bigger disks. Perhaps this can be done on a Linux machine.

When the disk fails (first disk in this scenario) you need to issue the following commands:

mdadm /dev/md0 --fail /dev/sda2 (this only when the disk did not fail but you want to take it out of the array)

mdadm /dev/md0 --remove /dev/sda2

replace the disk, fdisk create partitions (dd would be easier for copying the partition table but not included)


mdadm /dev/md0 --add /dev/sda2

------------------------

What I do want to know is what sits on the first partition and there is no way of listing it when fdisk fails in current firmware

Offline

 

#3 2007-01-10 07:01:04

jcatech
Member
From: Florida
Registered: 2006-12-20
Posts: 17

Re: OT: Anyone tested RAID funtionality?

Apskaft wrote:

Hi,

Sorry if this is O/T but I'm about to purchase a DNS-323 and use it with 2pcs of 320Gb discs in a RAID-1 setup. I've read a couple of reviews and browsed this forum (excellent work with all stuff going on here) but there is still one question I havn't seen any answers to.

If one of the drive crashes and is replaced, will the DNS-323 destroy data on both drives or will it actually re-mirror the working drive? As far as I understand, in the case of disc failure - you should backup the working disc to another device and then replace the failed drive and re-format. Is this correct?

When one of the hard drive fails on RAID 1, you need to replace it with the same or higher capacity, then you must put the working drive on the slot 1 (right side) and the new drive without formatting on the slot 2. Power on the unit and the re-mirror process will start running. This it will take a while. If you go the web interface you can see the progress. During that time you can read your files but it is going to be very slow.

My advice, always make a backup before any changes in the unit.

<jcatech>

Last edited by jcatech (2007-01-10 07:08:31)

Offline

 

#4 2007-01-10 07:14:18

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: OT: Anyone tested RAID funtionality?

skydreamer wrote:

mdadm is a part of the firmware

Ok, that's great. I've noticed in another thread that the unit doesn't not send a mail when the discs fails. Do you know if the included mdadm supports monitoring? I.e. mdadm --monitor  --mail=apskaft@fakemail.com --delay=1800 /dev/md2

Or, I might be totaly off by suggesting an external mail-address. What mail options are available in the unit? In sendmail included?

Damn, I need my unit now instead of posting these simple questions....

BR,
Apan

Offline

 

#5 2007-01-10 14:24:39

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

Do you know if the included mdadm supports monitoring?

yes, it does:


BusyBox v1.2.1 (2006.10.30-10:27+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# mdadm --monitor --help
Usage: mdadm --monitor options devices

This usage causes mdadm to monitor a number of md arrays by periodically
polling their status and acting on any changes.
If any devices are listed then those devices are monitored, otherwise
all devices listed in the config file are monitored.
The address for mailing advisories to, and the program to handle
each change can be specified in the config file or on the command line.
If no mail address or program are specified, then mdadm reports all
state changes to stdout.

Options that are valid with the monitor (-F --follow) mode are:
  --mail=       -m   : Address to mail alerts of failure to
  --program=    -p   : Program to run when an event is detected
  --alert=           : same as --program
  --delay=      -d   : seconds of delay between polling state. default=60
  --config=     -c   : specify a different config file
  --scan        -s   : find mail-address/program in config file
  --daemonise   -f   : Fork and continue in child, parent exits
  --pid-file=   -i   : In daemon mode write pid to specified file instead of stdout
  --oneshot     -1   : Check for degraded arrays, then exit
  --test        -t   : Generate a TestMessage event against each array at startup
#

Offline

 

#6 2007-01-13 22:12:50

LifeTap
Member
Registered: 2007-01-10
Posts: 30

Re: OT: Anyone tested RAID funtionality?

jcatech wrote:

When one of the hard drive fails on RAID 1, you need to replace it with the same or higher capacity, then you must put the working drive on the slot 1 (right side) and the new drive without formatting on the slot 2. Power on the unit and the re-mirror process will start running. This it will take a while. If you go the web interface you can see the progress. During that time you can read your files but it is going to be very slow.

My advice, always make a backup before any changes in the unit.

<jcatech>

I tried this and it did not work.

1.Shut down unit, and replaced the drive in the left slot.
2.Power up, web interface says "Click Next to begin formatting the replacement drive. Re-synch will take place after the restart."
3.Did that and restarted.
4.Next web interface asked me to set up raid type and format both disks.
Didn't want to do that just yet, so shut down unit and placed original disk back in left slot, web interface goes back to #2 above.

Tried to access the device via the volume1 share and it only has one directory listed.  Other 5 that were there are gone.  So it seems it does touch the first drive on resync, and unfortunately screws it up.

Does mdadm have to report a failure on a drive for this to work?  I would expect d-link to have tested this out as it is one of the big selling features.  The avg joe will not have telnet access nor will they want it.  Once I remove the partitions and reformat the array.  I'll try again but hotswap the drives.

Has anyone successfully replaced a drive in raid1 configuration?

Original used with resync and resynched drives show this when I mount and ls -la in another linux box.

total 16
drwxrwxrwx  11 root root 4096 Jan 13 12:56 .
drwxr-xr-x   6 root root 4096 Jan 13 15:10 ..
?---------   ? ?    ?       ?            ? Applications
?---------   ? ?    ?       ?            ? Home
?---------   ? ?    ?       ?            ? iTunes
drwxrwxrwx   2 root root 4096 Jan 11 16:28 .lpd
?---------   ? ?    ?       ?            ? Music
?---------   ? ?    ?       ?            ? Photos
?---------   ? ?    ?       ?            ? Store
?---------   ? ?    ?       ?            ? .systemfile
?---------   ? ?    ?       ?            ? Temp

Original pulled from unit has all data when mounted on my linux box. 

Also a note, this was done on a fresh format, no scripts or fun_plug copied to the drives.

Last edited by LifeTap (2007-01-13 22:36:45)

Offline

 

#7 2007-01-14 04:23:04

LifeTap
Member
Registered: 2007-01-10
Posts: 30

Re: OT: Anyone tested RAID funtionality?

I tried a hotswap.  From the web interface the unit didn't recognize the swap.  But must have behind the scenes.  Data was accessable, and it only read/wrote from the one drive.  It did not start a resync thou.  On reboot, started back with the format the replacement drive, then rsync, then reformat the array.

Offline

 

#8 2007-01-14 20:46:29

EndUser
Member
Registered: 2007-01-14
Posts: 22

Re: OT: Anyone tested RAID funtionality?

I tried the following and things don't seem right:

1.  running both with Raid 1
2.  Pulled out Left disc Hot -- noted files still accessible
3.  Re inserted.
4. Pulled out Right disc
5.  Files gor really slow, the left dic spun down.  Then I rebooted and files were there.
6.  Here's the big test:  I WROTE a file to the left disc only.
7.  Re-Inserted right disc hot.
8.  Reset unit: FILE IS MISSING that I wrote in step 6!
9.  Tired copying same file to same location from step 6:  FILE ALREADY EXISTS ERROR! (but I can't see the file), all the other files are there.

Also, I never got any emails from the NAS about a HDD failure.

Questions:

Is this how things are supposed to work?
How should I get things re-synced?
Why no Email?

Offline

 

#9 2007-01-14 21:23:25

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

The bottom line is that if you fail one of the disks by pulling it out you MUST wait for the array to reconstruct itself after inserting the disk back, which may take depending on your disk capacity and the speed of reconstruction 5-7 hours on 250 GByte disks (assuming 10 MB/s reconstruction speed). The interface should inform you about it, otherwise you can check the progress by issuing:
cat /proc/mdstat

Offline

 

#10 2007-01-14 21:38:11

LifeTap
Member
Registered: 2007-01-10
Posts: 30

Re: OT: Anyone tested RAID funtionality?

Skydreamer,

On my tests, I waited but there was no disk activity.  In fact, both disks spun down after the 5 minute idle period.  There was no reconstruction happening.  One test was an overnight wait because I got tired and went o bed.

I have written to d-link but have no reply yet.

Offline

 

#11 2007-01-14 22:20:31

EndUser
Member
Registered: 2007-01-14
Posts: 22

Re: OT: Anyone tested RAID funtionality?

skydreamer wrote:

The bottom line is that if you fail one of the disks by pulling it out you MUST wait for the array to reconstruct itself after inserting the disk back, which may take depending on your disk capacity and the speed of reconstruction 5-7 hours on 250 GByte disks (assuming 10 MB/s reconstruction speed). The interface should inform you about it, otherwise you can check the progress by issuing:
cat /proc/mdstat

The Web UI did not indicate it was resyncing or anything.  I think what I need to do is swap the left drive into the right and see what happens. The left drive has the secret extra file but Im guessing form the other posts that what ever is in the right slot is considered the "master" data drive. Then maybe by hidden secret file will show up.

Offline

 

#12 2007-01-15 00:00:18

EndUser
Member
Registered: 2007-01-14
Posts: 22

Re: OT: Anyone tested RAID funtionality?

Well, I tried turning the NAS off and swapping the two HDD's (left/right).  The web admin page reported that the drives were "installed incorrectly".  It would not allow a logon. 

So... It seems that if you have a drive go down and then you keep modifying files and re-plug the drive back in, your changes willk be lost! The I think the file is STILL there because if I try to copy a file with the same filename to the same location it refuses saying a file already exists! How so I make this invisible file come back?

Offline

 

#13 2007-01-15 01:33:34

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

You made me curious (and curiosity killed the cat ...) so I pulled out one of the disks and ouch- things are not as they should be:

First of all: the left disk is sdb, the right disk is sda.
I have unplugged the sda disk while the disks spun down due to inactivity timer and the RAID knows NOTHING about it:

Synchronizing SCSI cache for disk sda: <4>FAILED
  status = 0, message = 00, host = 1, driver = 00
 
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdb2[1] sda2[0]
      243272192 blocks [2/2] [UU]
     
unused devices: <none>

When I tried to stop the array the RAID driver finally got a wind of what is going on:

# raidstop
Refresh Shared Name Table version v1.04
mdadm: error opening /dev/: Is a directory
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdb2[1] sda2[2](F)
      243272192 blocks [2/1] [_U]
     
unused devices: <none>

You can see what happened in the log:
md: errors occurred during superblock update, repeating
scsi0 (0:0): rejecting I/O to dead device
md: write_disk_sb failed for device sda2
md: excessive errors occurred during superblock update, exiting
scsi0 (0:0): rejecting I/O to dead device
raid1: Disk failure on sda2, disabling device.
        Operation continuing on 1 devices
RAID1 conf printout:
--- wd:1 rd:2
disk 0, wo:1, o:0, dev:sda2
disk 1, wo:0, o:1, dev:sdb2
RAID1 conf printout:
--- wd:1 rd:2
disk 1, wo:0, o:1, dev:sdb2
  Vendor: Maxtor    Model: 7V250F0           Rev: VA11
  Type:   Direct-Access                      ANSI SCSI revision: 03

So far so good but what a surprise after inserting the disk back:

SCSI device sdc: 490234752 512-byte hdwr sectors (251000 MB)
SCSI device sdc: drive cache: write back
sdc:
#######################################
#              HD0 awake now !        #
#######################################
sdc1 sdc2
Attached scsi disk sdc at scsi0, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
ext3: No journal on filesystem on md0
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

It got attached to /dev/sdc instead of /dev/sda!!!!!

Tried to replug the disk with the same results. Finally the system froze on issuing the reboot command while still accepting ICMP packets.

So I was left with no option but to powercycle the DNS323 without the failed disk and what a surprise again:

md: bind<sda2>
raid1: raid set md0 active with 1 out of 1 mirrors
ext3: No journal on filesystem on md0
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

/dev/sdb2 became /dev/sda2 !!!

# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sda2[0]
      243272192 blocks [1/1] [u]
     
unused devices: <none>

Inserted the right disk (formerly known as /dev/sda) and it has become /dev/sdb, the disks are swapped in between now as far as system understands it.

Added /dev/sdb2 to the array:

# mdadm --add /dev/md0 /dev/sdb2
mdadm: hot added /dev/sdb2
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdb2[1] sda2[0]
      243272192 blocks [1/1] [u]
     
unused devices: <none>

But the array did not start the rebuild process as it is expected to????

Removed the drive from the RAID, both disks remain hardware-wise installed:

# mdadm --remove /dev/md0 /dev/sdb2
mdadm: hot removed /dev/sdb2

and rebooted to see what will happen next:

Adding 530104k swap on /dev/sda1.  Priority:-1 extents:1
Adding 530104k swap on /dev/sdb1.  Priority:-2 extents:1
md: bind<sda2>
md: bind<sdb2>
raid1: raid set md0 active with 2 out of 2 mirrors
ext3: No journal on filesystem on md0
md: md0 stopped.
md: unbind<sdb2>
md: export_rdev(sdb2)
md: unbind<sda2>
md: export_rdev(sda2)
md: md1 stopped.
md: bind<sda2>
md: bind<sdb2>
raid1: raid set md0 active with 2 out of 2 mirrors
ext3: No journal on filesystem on md0
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdb2[1] sda2[0]
      243272192 blocks [2/2] [UU]
     
unused devices: <none>

RAID started clean, which is obviously rubbish.

Assuming that the system understands both disks the same way as at the very start of my experiment, i.e. the failed one is /dev/sda2 and the good one is /dev/sdb2, the following set of commands should finally rectify the situation:

# mdadm --fail /dev/md0 /dev/sda2
mdadm: set /dev/sda2 faulty in /dev/md0
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdb2[1] sda2[2](F)
      243272192 blocks [2/1] [_U]
     
unused devices: <none>
# mdadm --remove /dev/md0 /dev/sda2
mdadm: hot removed /dev/sda2
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdb2[1]
      243272192 blocks [2/1] [_U]
     
unused devices: <none>
# mdadm --add /dev/md0 /dev/sda2
mdadm: hot added /dev/sda2
# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sda2[2] sdb2[1]
      243272192 blocks [2/1] [_U]
      [>....................]  recovery =  0.2% (581888/243272192) finish=55.6min speed=72736K/sec
unused devices: <none>
#

Yupeeee! The array is reconstructing itself and at SOME speed. When it finishes I will run e2fsck to verify that 100GBytes of data on /dev/md0 survived my experiments.

Conclusion: There is a number of issues with the current firmware and the hardware itself, which I am going to list in the next reply.

Last edited by skydreamer (2007-01-15 01:57:09)

Offline

 

#14 2007-01-15 01:48:01

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

Conclusions:

1. DNS 323 incorrectly assigns the disks to the linux devices in certain scenarios- it introduces /dev/sdc if the disk is plugged in prior to reboot after being previously hot removed and wrongly assigns the left disk to /dev/sda if it is the only disk in the system (it should be /dev/sdb)
2. If the DNS 323 starts with only left drive and a second disk is plugged into the running system the mdadm reconstruction process does not run at all because the drive devices are swapped in between (left becomes /dev/sda, right is /dev/sdb while it should have been the other way around)
3. RAID driver does not detect the hot unplugged hard drive immediately- perhaps it has no hardware support for that.
4. Worst of all- the RAID driver is incapable of detecting a failed drive and starting the reconstruction process.

I think that this explains a lot of issues reported in other threads.

The current state of affairs is such that when a single disk fails in RAID 1 DO NOT use the graphical interface, command line is your only friend until Dlink fixes its firmware.

What about a class law suit ;-))

Last edited by skydreamer (2007-01-15 02:03:05)

Offline

 

#15 2007-01-15 02:16:30

LifeTap
Member
Registered: 2007-01-10
Posts: 30

Re: OT: Anyone tested RAID funtionality?

Since the first time I turned on the unit, I upgraded to 1.02 firmware, did raid1 work on the 1.01b?  Does anyone know of an issue with downgrading the firmware so I can test?  Maybe when the ext3 options were pulled out they broke the raid functionality.

As always thanks everyone for looking into this.  Maybe I will send another email off to d-link support.  Still no reply from my first email.

As this is billed as a standalone unit, I do see this as a big issue.  The device should cleanly handle all possibilities no matter if I remove a drive and replace it or a drive fails.  I went back thru the manual and I see nothing about having to use one slot or the other when it comes to a failed drive.  Nowhere does it say power off first or hot swap the drive.  I see very little about the function of the unit.  It would be nice to see the d-link writeup on the full functionality of this device, or what they expected it to do.

Offline

 

#16 2007-01-15 02:44:54

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

LifeTap: A quick note- missing ext3 functionality has nothing to do with the RAID problems.
I also subscribe to your concern that things might have failed in the new FW 1.02, let's hope that somebody on this forum is still using the old firmware and can shed light on this.

Offline

 

#17 2007-01-15 03:08:28

EndUser
Member
Registered: 2007-01-14
Posts: 22

Re: OT: Anyone tested RAID funtionality?

Your experiement does not make me feel very good about this product, I bought it for the RAID 1 so I could have some fault tolerance.  I was able to install telnet access so now I am running an e2fsck on md0.  Maybe my missing/hidden file will come back with that? I hope D-link issues some new FW or someone here can devlope a replacement flash (with web interface for the non-linux hackers like me!)

Offline

 

#18 2007-01-15 03:15:57

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

Update: I have successfully downgraded to the 1.01b EU firmware and went through the above experiment with exactly the same results. The drives are now resyncing and when they finish I will go back to release 1.02.

We are STUCK.....

RAID1 is a joke and unless you know how to repair it from the command line do not use it.

Offline

 

#19 2007-01-15 08:02:54

Apskaft
Member
From: Karlskrona, Sweden
Registered: 2007-01-09
Posts: 165

Re: OT: Anyone tested RAID funtionality?

skydreamer wrote:

RAID1 is a joke

Thanks for your efforts.

I guess my initial post weren't O/T at all. I've now recevied my unit and will not use the RAID capabilities until it's been fixed in firmware. What I will do is to do a quick test, make sure _I_ have the problem and then issue a trouble ticket to D-Link.

I figure, the more tickets they get - the more attention it'll get.

Offline

 

#20 2007-01-15 10:21:14

Morris
Member
Registered: 2006-12-19
Posts: 13

Re: OT: Anyone tested RAID funtionality?

LifeTap wrote:

jcatech wrote:

When one of the hard drive fails on RAID 1, you need to replace it with the same or higher capacity, then you must put the working drive on the slot 1 (right side) and the new drive without formatting on the slot 2. Power on the unit and the re-mirror process will start running. This it will take a while. If you go the web interface you can see the progress. During that time you can read your files but it is going to be very slow.

My advice, always make a backup before any changes in the unit.

<jcatech>

I tried this and it did not work.

1.Shut down unit, and replaced the drive in the left slot.
2.Power up, web interface says "Click Next to begin formatting the replacement drive. Re-synch will take place after the restart."
3.Did that and restarted.
4.Next web interface asked me to set up raid type and format both disks.
Didn't want to do that just yet, so shut down unit and placed original disk back in left slot, web interface goes back to #2 above.

Tried to access the device via the volume1 share and it only has one directory listed.  Other 5 that were there are gone.  So it seems it does touch the first drive on resync, and unfortunately screws it up.

Does mdadm have to report a failure on a drive for this to work?  I would expect d-link to have tested this out as it is one of the big selling features.  The avg joe will not have telnet access nor will they want it.  Once I remove the partitions and reformat the array.  I'll try again but hotswap the drives.

Has anyone successfully replaced a drive in raid1 configuration?

Original used with resync and resynched drives show this when I mount and ls -la in another linux box.

total 16
drwxrwxrwx  11 root root 4096 Jan 13 12:56 .
drwxr-xr-x   6 root root 4096 Jan 13 15:10 ..
?---------   ? ?    ?       ?            ? Applications
?---------   ? ?    ?       ?            ? Home
?---------   ? ?    ?       ?            ? iTunes
drwxrwxrwx   2 root root 4096 Jan 11 16:28 .lpd
?---------   ? ?    ?       ?            ? Music
?---------   ? ?    ?       ?            ? Photos
?---------   ? ?    ?       ?            ? Store
?---------   ? ?    ?       ?            ? .systemfile
?---------   ? ?    ?       ?            ? Temp

Original pulled from unit has all data when mounted on my linux box. 

Also a note, this was done on a fresh format, no scripts or fun_plug copied to the drives.

I go ahead with Step 4 and after formatting the drive and restarting the unit. The re-sync starts and all the data is safe. So, I guess maybe the resync only occurs when a defective drive is replaced with a clean drive.

Offline

 

#21 2007-01-17 23:06:47

skydreamer
Member
From: At the Atlantic Coast
Registered: 2007-01-06
Posts: 232

Re: OT: Anyone tested RAID funtionality?

I have got a reply from the D-link support claiming that the RAID issues are being looked at but without any time commitment.
 
Looking at the firmware release cycle I would expect some sort of a fix before the end of February if we are lucky.

Offline

 

#22 2007-01-18 04:43:59

LifeTap
Member
Registered: 2007-01-10
Posts: 30

Re: OT: Anyone tested RAID funtionality?

Well thats really good news. 

I got a reply back from D-Link tech support via email that pointed to me a FAQ thats not related to raid at all.

I guess I'll reply shortly and see if I can get something related to raid.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB