2. Preparation for XFS Installation

2.1. Downloading the Linux 2.4.x-XFS Kernel Source

Currently the only place to get the source code for the XFS enabled Linux kernel is straight from SGI's Open Source Development site via CVS.

NoteNote
 

two distinct trees are available:

  • linux-2.5-xfs: development tree

  • linux-2.4-xfs: stable bug fix only tree

My experience has been with the 2.4 tree, but I imagine everything will work the same with the development tree. Both trees are kept in sync with their respective mainline kernel tree at least to the point of major release numbers.

Here are the steps to download the kernel source tree:

A. Normally the linux kernel source is installed in the /usr/src directory, so you should start off by switching to that directory.

$ cd /usr/src   
   

B. Next, you should set the CVSROOT environment variable so that it points to the proper cvs server.

If you plan on updating your kernel often (to keep up with the latest changes) you might want to put this in your login script.

C. Then log in to the cvs server.

$ cvs login  (the password is "cvs")   
  

This needs to be done only ONCE, not everytime you access CVS.

D. Now grab linux-2.4-xfs. The first time you will want to do something like:

$ cvs -z3 co linux-2.4-xfs    
  

After you have checked the code out, you can use:

$ cvs -z3 update linux-2.4-xfs   
  

to update your copy to the latest version from the CVS server.

2.2. XFS Support as Modules or Compiled Into the Kernel?

The option to build XFS support for the Linux kernel as modules is available and will work (or so I am told) with the help of an initial RAM disk and a couple of additions to the lilo configuration. I have not tried this (yet), so I will not include documentation on how this is done other than just to qoute from a message to the development mailing list from Russell Cattelan:

 

Actually running xfs as a module isn't very hard. in the directory cmd/xfs/misc there is a modified mkinitrd the will always generate a ram disk with pagebuf xfs_support and xfs.

Once that is done just add the initrd line in lilo.conf AND

append = "ramdisk_size=25000"   
  

The default size is 4096 which isn't nearly large enough to hold xfs.

This is from my laptop.

punch[12:57am]-=>mount
/dev/ide/host0/bus0/target0/lun0/part8 on / type xfs (rw,noatime) 
none on /proc type proc (rw) 
/dev/ide/host0/bus0/target0/lun0/part6 on /boot type ext2 (rw,noatime) 
none on /dev/pts type devpts (rw,mode=0620)
/dev/ide/host0/bus0/target0/lun0/part1 on /mnt/windows type vfat (rw,nosuid,nodev,umask=0) 
/dev/ide/host0/bus0/target0/lun0/part9 on /blam type xfs (rw)   

punch[12:57am]-=>lsmod 
Module                  Size Used by 
autofs                 13180   1 (autoclean) 
usb-uhci               24918   0 (unused) 
usbcore                35339   0 [usb-uhci]
3c59x                  25149   1 (autoclean) 
maestro                29757   0 (unused) 
soundcore               6085   2 [maestro]
vfat                   13075   1 (autoclean) 
fat                    37733   0 (autoclean) [vfat] 
xfs                   447888   2 
xfs_support            13954   0 [xfs] 
pagebuf                39935   2 [xfs]   


image=/boot/vmlinuz-2.4.0-XFS-test13-pre4 
label=t13p4  
root=/dev/hda8
initrd=/boot/initrd-2.4.0-XFS-test13p4.img 
append="ramdisk_size=25000"
read-only   
  

 
-- Russell Cattelan  

It seems to me that compiling the support into the kernel would be much simpler, so that is how I am doing it at this point. I will try it as a module at a later time and add more detailed instructions then. If anyone has time to document this method before I get around to it please email it to me and I will include it with credit given where credit is due. :-)

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:11