Thursday, 18 September 2014

XFS on Red Hat Enterprise Linux 6

This is just a quick post. I've used the XFS filesystem on many, many Linux hosts for a great many years now. I've used it on CentOS6 since that OS was first released, and XFS is now the default filesystem for RHEL7.

Yay, XFS Logo

So, I went to make a new XFS filesystem on a new Red Hat Enterprise Linux 6 system in the past week, I more than a little bit surprised to find that XFS is not shipped as part of the base OS. More than that - it is simply not installable/obtainable without paying an extra subscription fee per host/CPU. (How did I not know this after 4+ years of using this OS??). So, I pay for an OS, and consequently I get less than if I had chosen a free equivalent?

At first I thought I was wrong, but no, XFS which is mainline-kernel, the base-default in RHEL7, and available in all downstream free versions of RHEL, is simply not built into the base of RHEL6 (and 5 and below, for that matter).

Or is it?

'locate xfs' shows that the kernel modules are actually shipped within the default RHEL6 kernel. So, in that case, what then does one get for one's per-CPU licence fee? Answer: the filesystem utilities such as mkfs & dumpfs. The base system is more than capable of reading & supporting and XFS filesystem, it just can't make a new one.

So, if you find yourself in such a position, there is a clever way around this. Whilst will doubtless invalidate your RHEL support agreement, which, let's face it, is what you are paying for*, this is quite easy to do, so why not do it?

* Yes, this is clearly a self-defeating argument.

Simply download the latest xfsdump and xfsprogs RPM packages from your friendly local CentOS repository and install them on your shiny newly-invalidated RHEL box, and you can make as many XFS filesystems as you wish!

Other clever ways include:
  • Typing "yum install $URL1 $URL2" for the above two .rpm URLs
  • Typing "yumdownloader xfsdump xfsprogs" on a CentOS6 box and copying the packages across to the RHEL6 machine.
  • Install CentOS
  • Install RHEL7 (or CentOS7)
Depending on what you need the FS created for, you could even choose to remove said packages, and re-validate your RHEL Support.

And if Red Hat asks, I didn't tell you this.

3 comments:

  1. Very microsoft like thing to do with an extra subscription fee !

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. There seems to be some confusion on XFS for RHEL 6. Red Hat lets you setup XFS file systems while installing RHEL 6 but Red Hat does not give you the tools to manage or maintain the XFS file systems unless you subscribe to their ScalableFileSystem repository.

    Quick and easy solution, If the RHEL 6 installer can create and format the XFS file systems during the install, you would have to think that the packages are on the DVD, right? Yes, you would be correct. If you mount the RHEL 6 DVD ISO you will see a \ScalableFileSystem directory with the packages you need. You can copy the packages that you need to another location or install them from the ISO. I usually install all three at once because xfsdump has a dependency on xfsprogs.

    # From my RHEL 6.9 ISO
    yum localinstall xfsprogs-3.1.1-20.el6.x86_64.rpm xfsdump-3.0.4-4.el6_6.1.x86_64.rpm xfsprogs-devel-3.1.1-20.el6.x86_64.rpm

    Hope this helps.
    /Raj W.

    ReplyDelete