Using XFS instead of ext3 (network performance boost)

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 03:26, 4 December 2006 by Davy gravy (Talk | contribs)

Jump to: navigation, search


Link.png This article is currently a stub. You can help this Wiki by expanding it

. This template will categorize articles that include it into Category:Stubs.

Contents

Why?

Because it improves the network performance. Some of us have found that moving to XFS from ext3 seems to remove a bottleneck on the transfers between the computer desktop and the Linkstation. The amount of improvement may vary but is significant and quite beneficial. Transfers for one user showed a tranfer rate about 2 to 2.5 time the original stock rate on an HG, upgraded to FreeLink, a 2.6 kernel and XFS.

Model ext3 XFS Difference (MB/s) Difference (%)
LS1:  ?  ?  ?  ?
HG:  ?  ?  ?  ?
HS:  ?  ?  ?  ?

Why Not?

ext3 has much better error recovery than xfs: ext3 is slower but safer. You've got to decide for yourself which one is right for you. As far as safety goes, it is important to remember that ext2, ext3, ReiserFS, XFS and JFS are all supported by some sort of Debian utility/tool package that can be used to at least attempt a fix of your hard drive if something goes wrong. It is a good idea to get to know the pertinent packages below and and their parent utilities before delving in to things.

•reiserfsck

•xfs_repair

•fsck.jfs

•e2fsck

Of course, a valid and reliable backup strategy should be in place before proceeding.

Prerequisites

Custom Kernel

You will need a custom kernel running in your LS1 or HG. The latest 2.6 kernels and modules available at this site feature such support for XFS, JFS and a variety of other formats. Both UBoot and bootloader.o are good options for making your LS1 or HG play nicely with the 2.6 kernels. (Currently, there is no support for this modification on the MIPsel-based LS2.)

Knowing the risks

IF something goes wrong then it is quite sure that you will have to connect the hdd to a workstation running Linux as there is no XFS-Support in EM Mode.

Mindbender is working on this:
The Linkstation Community Forum / General Development / Development of flash ramdisk from scratch - linux knowledge wanted!
The Linkstation Community Forum / General Development / (flash-development) telnet + ftp enabled flash images ready for testing(LS1, HG, HS)


Installation

Depending on which distro you have installed on your LinkStation, choose the FreeLink or OpenLink option below and install using the specified commands. The FreeLink options are from the stable branch.

FreeLink

apt-get update
apt-get install convertfs xfsprogs gettext

OpenLink

cd /tmp
wget http://downloads.linkstationwiki.net/packages/ppc/xfsprogs-2.8.16_ppc.tar.gz
tar -C / -xzvf xfsprogs-2.8.16_ppc.tar.gz
wget http://downloads.linkstationwiki.net/packages/ppc/gettext-0.16_ppc.tar.gz
tar -C / -xzvf gettext-0.16_ppc.tar.gz
wget http://downloads.linkstationwiki.net/packages/ppc/convertfs-13jan2005_ppc.tar.gz
tar -C ~ -xzvf convertfs-13jan2005_ppc.tar.gz

Loading the XFS-Kernelmodule

modprobe xfs

The preceding simple command both invokes and test if XFS is supported by your kernel. If it executes without error, you can then use the command "lsmod" gives an overview over all loaded modules. If XFS is shown there everything is alright, and you should be good to go on to the next step. If modprobe xfs returns an error such as this:

modprobe: QM_MODULES: Function not implemented 

modprobe: Can't locate module xfs


then you may not have your module-init-tools installed. Get them from Debian stable branch, using

apt-get install module-init-tools

and attempt the modprobe xfs again.

Conversion to XFS

this is the real conversion of the data-partition (/mnt) to XFS:

~/convertfs/contrib/convertfs /dev/hda3 ext3 xfs

Modification of /etc/fstab

at the end of convertfs you are told that you need to modify /etc/fstab because of the different file system. change the entry for /dev/hda3 from "ext3" to "xfs"

before:

/dev/hda3       /mnt            ext3    defaults,noatime                0 0

after:

/dev/hda3       /mnt            xfs     defaults,noatime                0 0
Link.png This article is currently a stub. You can help this Wiki by expanding it

. This template will categorize articles that include it into Category:Stubs.