CentOS5 and XFS

From: barsalou <barjunk@attglobal.net>
Date: Fri Nov 16 2007 - 01:14:20 AKST

Unfortunately, CentOS5 (and I assume RedHat, et al) doesn't allow me to
install using an xfs filesystem on the first install.

One of the first things that needed doing was to ensure that I had
modules for xfs.

So what I ended up doing is making a 2G partition and installed
directly to that. No swap created...we aren't doing anything fancy, so
we didn't need any at first.

After I installed a very basic OS (I didn't want it to be bigger than
2G), I added the kmod-xfs-xen modules (this is going to be a Xen
machine, too).

Then, I created xfs partions. One 1G partition to hold / (root) and
some various other directories and an LVM that had /home(1G), /var(1G),
/usr(3G), /tmp(1G).

I then mounted my new root partition as /newroot and copied over
everything except for the four above. Now I have a copy of my old ext3
root (/) partition on the xfs partition. I then made mount points on
/newroot for the four partions above and mounted them...then copied the
data from the old / (root) partition.

I then modified the /newroot/etc/fstab to point to the new root
partition that would be xfs.

Here is the important part for CentOS5:

mkinitrd -f --fstab=/newroot/etc/fstab /newroot/boot/<imagefilename> `uname-r`

What this does is setup the initrd image so that it has the appropriate
modules (like xfs, for example) and mounts the root partition properly.
   If you don't do this last step, you'll end up with a kernel panic
and a few hours of chasing down the above command.

Now I have a machine that boots off of xfs and has an LVM for the four
main partitions that are also formatted as xfs. WEEEEEEEEE!

This is probably missing a little detail cause I'm kinda tired.

Hope to see some of you tomorrow...no wait, tonight at Highland Tech.

Mike B.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Fri Nov 16 01:14:39 2007

This archive was generated by hypermail 2.1.8 : Fri Nov 16 2007 - 01:14:40 AKST