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

#26 2008-05-30 07:40:02

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

bomaroast wrote:

What exactly is the "hiddin way" of formatting using ext3?

WARNING:  BACK UP YOUR DATA BEFORE PROCEEDING  :WARNING

DOING THESE STEPS ON A DNS-323 RUNNING FIRMWARE < 1.03 HAS PROVEN TO VERY EASILY CAUSE DIRECTORY AND/OR FILE CORRUPTION ON THE EXT3 MOUNTED FILE SYSTEMS!!!!

Bomaroast,
There is more than one way to go about migrating to EXT3.  It also depends on the disk configuration and which mount point is to be EXT3.  The way I have been doing it has been with telnet and utility access via the busybox3 and usb-storage.ko found elsewhere on the wiki.  You can convert the current EXT2 file systems to EXT3 or reformat to EXT3.  I prefer converting the FS so I don't have to backup and restore the .systemfile tree and converting the FS does not erase the data.  (as always, BACK YOUR DATA UP FIRST!!!)


I have my fun_plug script set up to copy the usb-storage.ko to /tmp and then run "insmod /tmp/usb-storage.ko".  This installs the USB support into memory so the file systems are not prevented from unmounting by the USB support.  After that, the fun_plug mounts a USB thumb drive to /mnt/ext and starts telnet from the thumb drive.  Again, this is to allow the file systems on the hard drives to be unmounted (not busy) and does not waste memory for the busybox3 utilities.  I found that a 10 second delay was necissary after loading the usb-storage library for it to be fully available for mounting.  See below:

  #
  # fun_plug
  #
  DIR=/mnt/HD_a2
  dmesg > $DIR/dmesg.boot
  cp $DIR/lnx_bin/usb-storage.ko /tmp
  insmod /tmp/usb-storage.ko
  sleep 10
  mkdir /mnt/ext
  mount -t ext3 /dev/sdc1 /mnt/ext
  /mnt/ext/starttelnet.sh

My busybox3 lives in /mnt/ext/lnx_bin and has symbolic links to it for e2fsck, fdisk, fsck.ext3 mkfs.ext3, tune2fs, umount, etc....

Now telnet in and execute "mount" and look for the /dev mounts.

  %root% on / type unknown (rw)
  proc on /proc type proc (rw)
  /image.cfs on /sys/crfs type cramfs (rw,loop=/dev/loop0)
  /dev/md0 on /mnt/HD_a2 type ext2 (rw,usrquota,grpquota)
  /dev/sda4 on /mnt/HD_a4 type ext2 (rw)
  /dev/sdb4 on /mnt/HD_b4 type ext2 (rw)
  none on /proc/bus/usb type usbfs (rw)
  /dev/sdc1 on /mnt/ext type ext3 (rw)

Look at the /mnt/HD_## mounts.  If you are using RAID 0 or 1 as the above example shows, you will be working with /dev/md0.  If you are using Individual disks or the "hidden" partitions, it will be /dev/sda# or /dev/sdb#.

Next you need to make sure the DNS is quiet.  Shut off all the services that could lock the file systems from being unmounted.  (ie UPnP, FTP, iTunes, etc...)  Unmount the FS.

"umount /dev/md0"

Convert the FS to EXT3

"tune2fs -j /dev/md0"

  tune2fs 1.38 (30-Jun-2005)
  Creating journal (8192 blocks): done
  This filesystem will be automatically checked every 23 mounts or
  180 days, whichever comes first.  Use tune2fs -c or -i to override.


If this FS if for one of the Volume_# exports, the DNS config files must be updated to mount the FS as EXT3.  By default they will still mount the Volume_# EXT3 FS as EXT2.  The hidden partitions are mounted in their native format.  Use the find command to find all the copies:

"find / -name raidtab2web"

  /etc/raidtab2web
  /etc/tmp_raid_table/raidtab2web      <--   ignore this one
  /mnt/HD_a4/.systemfile/raidtab2web
  /mnt/HD_b4/.systemfile/raidtab2web

edit the /etc/raidtab2web and the /mnt/HD_##/.systemfile/raidtab2web files and change the EXT2 to EXT3.

Now reboot your DNS and telnet in make sure everything is mounted right:

"mount"

  %root% on / type unknown (rw)
  proc on /proc type proc (rw)
  /image.cfs on /sys/crfs type cramfs (rw,loop=/dev/loop0)
  /dev/md0 on /mnt/HD_a2 type ext3 (rw,usrquota,grpquota)
  /dev/sda4 on /mnt/HD_a4 type ext2 (rw)
  /dev/sdb4 on /mnt/HD_b4 type ext2 (rw)
  none on /proc/bus/usb type usbfs (rw)
  /dev/sdc1 on /mnt/ext type ext3 (rw)


Note:  Every time you access the Web interface, you will get a nasty-gram saying you need to convert the filesystem from EXT3 to EXT2.  Clicking [OK] will take you to the standard logon screen.


Cheers!
bspvette

Offline

 

#27 2008-05-30 18:43:52

marinalink
Member
Registered: 2008-04-13
Posts: 56

Re: Anyone using EXT3 on DNS-323

Interesting that the new kernel (2.6.12) seems to solve the issue with EXT3. Dlink didn't give any information, what the source of the problems with EXT3 was, correct?

Which kernel version does FW 1.05 have? Still 2.6.12?

The second issue I was wondering is, if the automatic mount check (every 23 mounts or 180 days) is performed when the disks are format with EXT3. In the case of EXT2 this is not the case, correct?

Thanks for letting us know, what you experience with EXT3, but to be honest, I would like to see that Dlink releases a note that states it is safe to use EXT3 with the new Firmware.

marinalink

Offline

 

#28 2008-05-30 21:27:42

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

Marinalink,
Running "uname -a" on firmware 1.05 returns:
Linux Media1 2.6.12.6-arm1 #29 Wed Apr 30 10:03:59 CST 2008 armv5tejl unknown

I'll have to reboot my box a few times to check on the auto mount check....   Haven't had one version of the firmware on there for more than a couple of days lately... big_smile

I completely understand not wanting to use EXT3 until official support comes.  I'm providing this information:
  a) in case someone on the inside at Dlink is watching, with hopes that they will consider doing some in house EXT3 tests of there own and bring native support back.
  b) For those of us hacks that are interested in using EXT3 now but haven't had time or thought to do any tests with the newer firmware. 

Please remember that virtually nothing on this site is supported or in any way recommended by the manufacturer. 

Cheers!
bspvette

Last edited by bspvette86 (2008-05-30 23:38:23)

Offline

 

#29 2008-05-30 23:52:34

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

marinalink wrote:

The second issue I was wondering is, if the automatic mount check (every 23 mounts or 180 days) is performed when the disks are format with EXT3. In the case of EXT2 this is not the case, correct?

Did a quick test script to unmount and remount a bunch of times.  Checked dmesg on next reboot and found:

  EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
  EXT3 FS on md0, internal journal
  EXT3-fs: mounted filesystem with ordered data mode.


So no, it does not auto mount check EXT3 either.


Regards,
bspvette

Offline

 

#30 2008-05-31 03:07:39

hawk82
New member
Registered: 2008-05-31
Posts: 1

Re: Anyone using EXT3 on DNS-323

Is there an easier way to format the partition(s) to ext3 without following the steps listed above, bspvette86 or others? I do not care if I wipe the data clean off the drives. I just got my first 323 today and so far am loving it. I did upgrade the firmware to 1.05, and installed fun_plug 0.4 if that matters. Thanks in advance.

Offline

 

#31 2008-06-03 23:16:24

marinalink
Member
Registered: 2008-04-13
Posts: 56

Re: Anyone using EXT3 on DNS-323

@bspvette86:
Do you have any new results from your tests with EXT3?

I would really like to use EXT3 just to be a bit more robust against sudden power failure. ...and a proper NAS should have a journaling file system, isn't it smile?

marinalink

Offline

 

#32 2008-06-04 01:42:42

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

marinalink wrote:

Do you have any new results from your tests with EXT3?

Marinalink,
So far I have yet to find any problems with EXT3 on 1.03 and above.  I did a few perfomance tests comparing the different drive and EXT configs available using the Quickie NAS tester found here in another thread.  In all cases (standard, jbod, Raid-0, and Raid-1) EXT3 had a slight performance impact  (don't have the results with me at the moment to give the %).   I have had my box in a 1.05 Raid-0 EXT3 config since last friday.  I have put my standard media collection back on (roughtly 600GB at the moment) and have been using it lightly compared to the previous weeks testing.  I've been busy around the house and yard so testing has not been high on my list this week.

Regards,
bspvette

Offline

 

#33 2008-07-31 19:07:35

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

Long term EXT3 update:
Have had all disk mount points (including usb flash drive) configured as EXT3 since the end of may (2 months) with no detected problems.

# mount
%root% on / type unknown (rw)
proc on /proc type proc (rw)
/image.cfs on /sys/crfs type cramfs (rw,loop=/dev/loop0)
/dev/md0 on /mnt/HD_a2 type ext3 (rw,usrquota,grpquota)
/dev/sda4 on /mnt/HD_a4 type ext3 (rw)
/dev/sdb4 on /mnt/HD_b4 type ext3 (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/sdc1 on /mnt/ext type ext3 (rw)


Cheers!
BV

Offline

 

#34 2008-09-22 23:29:36

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Anyone using EXT3 on DNS-323

Couple of thoughts and questions:
1. First, I don't think you need to edit the /etc/raidtab2web file since it is on ramdisk and gets recreated anyway each time (presumably from mnt/HD_a4/.systemfile/raidtab2web and /mnt/HD_b4/.systemfile/raidtab2web

2. What would happen if you didn't edit *ANY* of the raidtab2web files?

3. Is there any reason not to similary change /mnt/HD_a4 and /mnt/HD_b4 to ext3?
    Since they are not RAID, presumably all you need to do is tune2fs and no need to change raditab2web or any other file

4. Has the ext3 implementation continued to be stable for you all these months?

5. Finally, I would think that anybody using fun_plog or other mods should definitely consider changing to EXT3 due to the better stability in the face of the  (almost) inevitable unclean power-down or reboot.

Offline

 

#35 2008-09-23 07:00:20

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

puterboy wrote:

Couple of thoughts and questions:
1. First, I don't think you need to edit the /etc/raidtab2web file since it is on ramdisk and gets recreated anyway each time (presumably from mnt/HD_a4/.systemfile/raidtab2web and /mnt/HD_b4/.systemfile/raidtab2web

2. What would happen if you didn't edit *ANY* of the raidtab2web files?

3. Is there any reason not to similary change /mnt/HD_a4 and /mnt/HD_b4 to ext3?
    Since they are not RAID, presumably all you need to do is tune2fs and no need to change raditab2web or any other file

4. Has the ext3 implementation continued to be stable for you all these months?

5. Finally, I would think that anybody using fun_plog or other mods should definitely consider changing to EXT3 due to the better stability in the face of the  (almost) inevitable unclean power-down or reboot.

1&2) The DNS-323 uses the config on the disks and the file systems will mount as EXT2 if you don't modify the raidtab2web files.

3) I changed everything to EXT3 with no problems.  See output of mount command in previous post.

4) I just updated my drives from 500GB to 1TB drives after running for several months on EXT3 with no detected problems.  I went back to standard EXT2 when formatting the new drives for performance reasons.  EXT3 has a bit of a performance hit, especially on writes.  My 323 is used for  a central media/download server and all the data on my box is backed up in several places.  I'd rather have better performance.

Cheers!
BV

Offline

 

#36 2008-09-24 10:08:29

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Anyone using EXT3 on DNS-323

Thanks.
With regards to #1, I still maintain that the file /etc/raidtab2web doesn't need to be edited since it is stored in volatile memory anyway. It seems that on reboot, it is read from the hd_a4/hd_b4 versions.

Note I never touched that file and it still has EXT3 (not EXT2) in the file system field

Offline

 

#37 2008-09-24 21:47:05

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

I mis-read #1 to the context of not needing to edit the HD_a4 and HD_b4 files.  My bad.

Cheers!
BV

Offline

 

#38 2008-09-24 23:20:21

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Anyone using EXT3 on DNS-323

good - then we are in total agreement

Offline

 

#39 2008-09-29 15:21:29

caio
Member
Registered: 2008-09-26
Posts: 10

Re: Anyone using EXT3 on DNS-323

bspvette86 wrote:

I went back to standard EXT2 when formatting the new drives for performance reasons.  EXT3 has a bit of a performance hit, especially on writes.  My 323 is used for  a central media/download server and all the data on my box is backed up in several places.  I'd rather have better performance.

hello,
thank you for your work, I think it will be useful to a lot of users.

How many the performance get worse after the upgrade to ext3?

I would like to have a journaled filesystem on my nas, but I have bad performance now with ext2 and I can't accept a worse situation than now.
Does somedoby tried a forced shutdown (in example dued to power lack)? What about the filesystem (ext2) damage?

Offline

 

#40 2008-09-29 15:49:29

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

Re: Anyone using EXT3 on DNS-323

The performance with ext3 will degrade because of the extra processing required to create the journals and the time required to write them to disk.

Offline

 

#41 2008-09-29 16:14:07

caio
Member
Registered: 2008-09-26
Posts: 10

Re: Anyone using EXT3 on DNS-323

fordem wrote:

The performance with ext3 will degrade because of the extra processing required to create the journals and the time required to write them to disk.

yes is clear,
I would only know how the performance slows after have enabled ext3 (in terms of MB/s, or %).

Because I think that the nas performance is very important,
but I don't have an UPS and have a corrupted (or worse, unreadable) file system could be a bigger problem.

Offline

 

#42 2008-09-29 17:18:37

bspvette86
Member
Registered: 2008-05-09
Posts: 81

Re: Anyone using EXT3 on DNS-323

Caio,
It really depends on your I/O.  If you are not doing many writes, the performance is negligable.  With many writes, the performance hit could be significant.

Regards,
bspvette86

Offline

 

#43 2008-09-30 00:57:29

caio
Member
Registered: 2008-09-26
Posts: 10

Re: Anyone using EXT3 on DNS-323

bspvette86 wrote:

Caio,
It really depends on your I/O.  If you are not doing many writes, the performance is negligable.  With many writes, the performance hit could be significant.

Regards,
bspvette86

ok,
is clear. I suppose I will have many write access to my disk array so probably I could have a noticeable performance hit.
So I think that for the moment I will keep my filesystem in ext2...

thank you

Offline

 

#44 2008-10-05 09:09:55

rek075
Member
Registered: 2008-10-04
Posts: 7

Re: Anyone using EXT3 on DNS-323

I'm having some issues trying the umount /dev/md0 - it keeps saying the drive is busy.  I shut down all the services from the web configuration.  Is it because I'm logged in through ssh using ffp?

Offline

 

#45 2008-10-07 07:28:11

rek075
Member
Registered: 2008-10-04
Posts: 7

Re: Anyone using EXT3 on DNS-323

rek075 wrote:

I'm having some issues trying the umount /dev/md0 - it keeps saying the drive is busy.  I shut down all the services from the web configuration.  Is it because I'm logged in through ssh using ffp?

I figured out the answer to my question, but there are a few others I haven't been able to answer:

1. Do I need to edit any files for converting sda4 and sdb4 from ext2 to ext3?  I'm assuming I won't be editing raidtab2web, but something else.

2. My current mount looks like this:

rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw)
proc on /proc type proc (rw,nodiratime)
/dev/loop0 on /sys/crfs type cramfs (ro)
/dev/md0 on /mnt/HD_a2 type ext3 (rw)
/dev/sda4 on /mnt/HD_a4 type ext2 (rw)
/dev/sdb4 on /mnt/HD_b4 type ext2 (rw)
none on /proc/bus/usb type usbfs (rw)
devpts on /dev/pts type devpts (rw)

how would I go about converting /dev/root to ext3?  It doesn't even show up in the /dev folder.

3. You mentioned in an earlier post that when you simulated a drive crash that:

bspvette86 wrote:

The DNS mounted the EXT3 raid partition as EXT2 (there was a message about this in the dmesg)  The "new" disk was formatted as EXT2 and synced ok.  Raid partition would no longer mount as EXT3.  (probably due to the removal of "standard" ext3 support and the fact that half the raid was now ext2).

In case this happens to me in the future, how do you fix it so that the new raid partition gets formatted and mounted as EXT3?

Offline

 

#46 2008-11-07 10:43:02

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Anyone using EXT3 on DNS-323

Warning - Ext3 may not be as stable as it seems even with 1.05.
At least when used with kernel nfsd, one repeatedly gets large numbers of randomly dropped directories and files. (see http://dns323.kood.org/forum/viewtopic. … 630#p22630 for details).

Given the critical importance of having a rock-solid and reliable file system, I would suggest that unless you know what you are doing, the risks of using EXT3 and corrupting your data outweigh the benefits of journalling. YMMV.

Offline

 

#47 2008-11-07 10:58:59

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Anyone using EXT3 on DNS-323

puterboy wrote:

Warning - Ext3 may not be as stable as it seems even with 1.05.

When the early firmwares allowed to format as ext3, similar problems were reported with samba access. Actually, I don't find it surprising that it still doesn't work - it's still the same kernel.

Offline

 

#48 2008-11-07 14:30:52

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

Re: Anyone using EXT3 on DNS-323

puterboy wrote:

Warning - Ext3 may not be as stable as it seems even with 1.05.
At least when used with kernel nfsd, one repeatedly gets large numbers of randomly dropped directories and files. (see http://dns323.kood.org/forum/viewtopic. … 630#p22630 for details).

Given the critical importance of having a rock-solid and reliable file system, I would suggest that unless you know what you are doing, the risks of using EXT3 and corrupting your data outweigh the benefits of journalling. YMMV.

Given the fact that you first reported this "randomly dropping files" as occuring with nsfd - should you not attempt to isolate the problem to one or the other?

Offline

 

#49 2009-01-05 16:30:54

PeterZ
Member
From: Bratislava, Slovakia
Registered: 2008-11-10
Posts: 10

Re: Anyone using EXT3 on DNS-323

Hello all,

does anyone tried ext3 with new fw 1.6? I guess there is newer kernel and perhaps that ext3 bug has been fixed.

Cheers,
Peter


DNS-323 • 2x WD RE3 (WD5002ABYS) SATAII 7200RPM 16MB • RAID1 • FW1.10 • ext2

Offline

 

#50 2009-01-05 18:46:40

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Anyone using EXT3 on DNS-323

my understanding is kernel is unchanged

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB