Stop services running. Eg. smb/apache Run:
Code: Select all
unmount /dev/md0
Code: Select all
tune2fs -O extents,uninit_bg,dir_index /dev/md0
Code: Select all
fsck -pDf /dev/md0
Code: Select all
mount -t ext4 /dev/md0 /share/MD0_DATA
Code: Select all
unmount /dev/md0
Code: Select all
tune2fs -O extents,uninit_bg,dir_index /dev/md0
Code: Select all
fsck -pDf /dev/md0
Code: Select all
mount -t ext4 /dev/md0 /share/MD0_DATA
It should be noted that the stock 2.6.26 ext4 has problems with delayed allocation and with filesystems with non-extent based files. So until Debian starts shipping a 2.6.27 based kernel or a 2.6.26 kernel with at least the 2.6.26-ext4-7 patchset, you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "mke2fs -t ext4dev". (Without these fixes, if you try to use an ext3 filesystem which was converted using "tune2fs -E test_fs -o extents /dev/DEV", you will probably hit a kernel BUG the moment you try to delete or truncate an old non-extent based file.)[/] # uname -a
Linux QNAP 2.6.24 #1 SMP Sat Jun 27 02:52:09 CST 2009 i686 unknown
[/] #
To be quite honest i didn't really quite get that except your saying EXT 4 may be buggy ?adamvh wrote:After a little more research running EXT4 on early kernels can be very unstable.
Depends if QNAP dev team applied specific kernel patches.
It should be noted that the stock 2.6.26 ext4 has problems with delayed allocation and with filesystems with non-extent based files. So until Debian starts shipping a 2.6.27 based kernel or a 2.6.26 kernel with at least the 2.6.26-ext4-7 patchset, you should mount ext4dev filesystems using -o nodelalloc and only use freshly created filesystems using "mke2fs -t ext4dev". (Without these fixes, if you try to use an ext3 filesystem which was converted using "tune2fs -E test_fs -o extents /dev/DEV", you will probably hit a kernel BUG the moment you try to delete or truncate an old non-extent based file.)[/] # uname -a
Linux QNAP 2.6.24 #1 SMP Sat Jun 27 02:52:09 CST 2009 i686 unknown
[/] #
Moogle Stiltzkin wrote: Whats the benefits of EXT4 over EXT3 by the way ?
yes this has been answered in this forum.GunRunner wrote:Moogle Stiltzkin wrote: Whats the benefits of EXT4 over EXT3 by the way ?
Is there an answer to this question anywhere on this forum please? With regards to the QNAP NASes that have this EXT4 I mean? Would QNAP staff please respond?
Thanks
Kind regards
Thanks for the reply. As you can see I was editing my post when you answered, so you will see some text differences. As I have nothing on my TS-439 yet, then I will format it to EXT4 and start to use it.niwa2 wrote:yes this has been answered in this forum.GunRunner wrote:Moogle Stiltzkin wrote: Whats the benefits of EXT4 over EXT3 by the way ?
Is there an answer to this question anywhere on this forum please? With regards to the QNAP NASes that have this EXT4 I mean? Would QNAP staff please respond?
Thanks
Kind regards
basicaly ext4 is a little faster than ext3, it supports bigger volumes than ext3 does and it is supposed to avoid fragmentation better than ext3.
that is all i an recall.
at the moment the only official way to get ext4 on a QNAP TS is to fully format your drives with ext4.
I tried this last night with my ext3-formatted QNAP TS-509, firmware 3.3.3 Build 0928T. The conversion seemed to have gone well.adamvh wrote:Current firmware version: 3.1.0 Build 0627T
Stop services running. Eg. smb/apache Run:You need to use the tune2fs and fsck tools in the filesystem, and that filesystem needs to be unmounted. Run:Code: Select all
unmount /dev/md0
After running this command you MUST run fsck. If you don't do it, Ext4 WILL NOT MOUNT your filesystem. This fsck run is needed to return the filesystem to a consistent state. It WILL tell you that it finds checksum errors in the group descriptors - it's expected, and it's exactly what it needs to be rebuilt to be able to mount it as Ext4, so don't get surprised by them. Since each time it finds one of those errors it asks you what to do, always say YES. If you don't want to be asked, add the "-p" parameter to the fsck command, it means "automatic repair":Code: Select all
tune2fs -O extents,uninit_bg,dir_index /dev/md0
There's another thing that must be mentioned. All your existing files will continue using the old indirect mapping to map all the blocks of data. The online defrag tool will be able to migrate each one of those files to a extent format (using a ioctl that tells the filesystem to rewrite the file with the extent format; you can use it safely while you're using the filesystem normally)Code: Select all
fsck -pDf /dev/md0
Code: Select all
mount -t ext4 /dev/md0 /share/MD0_DATA
Code: Select all
# uname -a
Linux QNAP509PRO 2.6.33.2 #1 SMP Tue Sep 28 04:00:46 CST 2010 i686 unknown
Code: Select all
# mount
/proc on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,size=32M)
none on /proc/bus/usb type usbfs (rw)
/dev/sda4 on /mnt/ext type ext3 (rw)
/dev/md9 on /mnt/HDA_ROOT type ext3 (rw)
/dev/md0 on /share/MD0_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc)
And here is a statically linked binary of e4defrag (since I've seen some people ask one)All your existing files will continue using the old indirect mapping to map all the blocks of data. The online defrag tool will be able to migrate each one of those files to a extent format