NTFS to ext3 file system on my NAS

5 posts / 0 new
Last post
rbscairns
rbscairns's picture
NTFS to ext3 file system on my NAS

I recently set up a USB external HDD as a network attached storage (NAS) on my router using the Simple NAS Setup on the WNR3500L instructions.

In this initial set-up, I had my NAS HDD formatted to NTFS. Later research indicated to me that having the NAS HDD formatted to ext3 would be better. Ext4 was also considered (and would be even better), however that is not currently supported with my DD-WRT firmware. The problem for me with NTFS NAS HDD was possible excessive file fragmentation that could not easily be de-fragmented.

With ext3 it looked like I would get:

  • Faster HDD read/writes.
  • Much less file fragmentation.
  • A "lost+found" folder allowing for damaged file recovery.

Here is what I did to convert my NAS HDD from NTFS to ext3 file system. I used a separate Linux computer to do the ext3 formatting:

  1. Back up the entire contents of the NAS HDD to another HDD. The reformatting of a HDD will wipe all stored files on the HDD.
  2. Turn the power off to the router and disconnect the NAS HDD.
  3. Connect the NAS HDD to a Linux computer and format the NAS HDD to ext3.
  4. Disconnect the NAS HDD from the Linux computer and reconnect it back to the router.
  5. Turn the power on to the router and wait for a few minutes for everything to settle down.
  6. Restore all the backed-up files from the other HDD back onto your newly ext3 formatted NAS HDD.

I also understand that you can use a Windows computer to format the NAS HDD to ext3 by booting that computer using a Live Gparted CD/USB stick. I tried that first, but Gparted would not display my attached NAS HDD. Rather than try and work out how to get it displayed, I used one of my Linux computers for the ext3 formatting.

The results of this little exercise are:

  • I notice that read/writes the the NAS HDD appear to be faster, although I have not done any actual testing.
  • I have a "lost+found" folder.
  • I expect that file fragmentation should no longer be a problem for me.

There will probably be other advantages (say with permissions), now that the NAS HDD is using a file system that is native to the router firmware.

Brandon C
Brandon C's picture
Sounds like a good plan. Let

Sounds like a good plan. Let us know how it goes after more testing.
You may have been able to just use the router itself to format the Ext HD.
On mine I have Fdisk, mkfs.ext3 and more in the /sbin folder.

I have an old external lying around. For fun I will see if it can be done that way.

Brandon C
Brandon C's picture
Looks like it was no problem.

Looks like it was no problem. Unmount from GUI and run mkfs.ext3.
Here is an example on an old 10G HD I have.

# /sbin/mkfs.ext3 -b 4096 /dev/sda1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1219200 inodes, 2437855 blocks
121892 blocks (5.00%) reserved for the super user
First data block=0
75 block groups
32768 blocks per group, 32768 fragments per group
16256 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

gooffeyguy
gooffeyguy's picture
I use EASEUS Partition Master

I use EASEUS Partition Master (free Partition Magic alternative software) on my WinXP machine to partition/format my usb drive to ext3 then plug it into the router

revola
revola's picture
For technical details. I did

For technical details. I did the same test, transferring files to a NTFS usb drive, then format as EXT3 and try again. I doubled the speed. I noticed the limitation may come from the CPU, as writing to a NTFS drive adds some CPU work, while writing to the disk the process of writing to NTFS was about 70% of CPU usage while Samba (windows file sharing) was about 30%.
After changing the drive partition, i only got 30% of CPU usage by samba, nothing else.
It changed the write speed ratio from 1MB/sec to 2MB/sec (the speed may change depending on your config, but the imrpovement will work anyway)