[Smaug] XFS-How-To

Phil White cerise at littlegreenmen.armory.com
Tue, 4 Jun 2002 20:19:00 -0700 (PDT)


So after probably a month or so to struggle to get my system onto XFS
and then the struggle to get everything working again, littlegreenmen
has been reformed back to my liking.  I thought that other prosumers
might want to know what they're in for when migrating.

1) XFS has no support anywhere.
   You can't convert an ext2fs to an XFS partition.  You can't resize
partitions.  You can't do an awful lot of anything with an XFS
partition except create it.  Quotas are still experimental (but seem
pretty stable).  It also isn't in the mainstream kernel source.

2) SGI's CVS sucks.
   I attempted a couple different compilations with success, however,
it succeeded in freezing my system around 10 mins after bootup.  It
seemed due to disk access.  I tried several different configurations
&c. with little to no success.

3) SGI's patch wants to believe that it's a whole new kernel version.
   For 2.4.18 it swaps over to 2.4.18-xfs-1.1 which doesn't seem too
awful.  Heck, it even seems cool until you realize that all your
modules start whining at you about it.

So, with those warnings in mind, here's how to do it.

First off, a Gentoo CD is handy to have around for emergency boots.  It
groks XFS and was the only distro that I had handy which did.

Get the latest stable kernel and the SGI patch for it.  untar both and
apply the patch by cd /usr/src/linux ; patch -p1 <the-sgi-patch

run make config or menuconfig depending on your preferences then make
dep.  DO NOT proceed to make the kernel image, nor modules

vi /usr/src/linux/include/linux/version.h and change the UTS name back
to 2.4.18!  the patch will change it to 2.4.18-xfs-1.1 which will mess
up your modules!  If you're feeling really paranoid, you could grep -R
2.4.18-xfs-1.1 | xargs sed 's/2.4.18-xfs-1.1/2.4.18/'  FAILURE TO
CHANGE VERSION.H WILL CAUSE HEADACHES.  TRUST ME.  I KNOW FIRST HAND.

Continue with make bzImage modules install modules_install ;
/sbin/lilo.  Snag the SGI XFS tools to tweak XFS.

Start migrating accordingly.  Having an extra disk is almost the only
way to do it.  I did, fortunately.  I suppose you could do it with
CD-Rs.  That's not a bad method either.  There's some suggested args to
mkfs.xfs on SGI's site.  Probably not a bad idea to go with.

Once you've got your nice and shiny new XFS based system, proceed to
snag the latest set of quota tools and such.  compile/apt-get/upgrade
-c/whatever/

At this point, life should be good.  Disk access is light speed to
ext2/3 and faster to the trained eye than ReiserFS.  So far, in my
trials, I've found only two annoyances with XFS:
1) Recovery of a deleted file is highly improbable.
2) After an improper termination of service, you might find some files
   are now full of binary nulls.  As SGI rather callously puts it, if
   it hurts, STOP DOING IT!

-Phil/CERisE