How To Build xfstools, xfsprogs And xfsdump From Source On Ubuntu

This short guide explains how you can build xfstools, xfsprogs, and xfsdump from the sources on an Ubuntu system.

In certain instances, running the xfs_fsr utility from the packaged version of xfstools can cause corruption on an XFS filesystem.

This is by no means a catch-all solution, only a guide to help those who are having trouble installing the updated tools.

Install the prerequisites:

The install guide says to run make install-dev and make install-qa, but this did not add the needed libraries, libattr1-dev and libacl1-dev allow the build to complete.

# sudo apt-get install git-core libtool libattr1-dev libacl1-dev build-essential automake autoconf uuid-dev

Download the Git source trees:

# cd ~
# git clone git://oss.sgi.com/xfs/cmds/xfsprogs
# git clone git://oss.sgi.com/xfs/cmds/xfsdump
# git clone git://oss.sgi.com/xfs/cmds/xfstests

Compile source and install:

Install xfsprogs:

# cd ~/xfsprogs
# make
# make install

Install xfsdump:

# cd ~/xfsdump
# make
# make install

Install xfstests:

# cd ~/xfstests
# make
# make install

Share this page:

10 Comment(s)

Add comment

Comments

From:

Thanks, I didn't encounter this, but I did add the package to the instructions.

From:

Unfortuantely, I don't have a comprehensive list of the affected versions, only from what I experienced with a relatively large array (18TB) and testing against file archives that were modified after running xfs_fsr.   I was using the packaged versions of xfstools on Ubuntu 8.04 and 8.10 with the same results. 

I'm far from an expert on XFS and simply added this guide to help those who need it.

From: john

Could you be more specific about the issue?  Which versions of xfs_fsr are affected and fixed the issue?

Also do you know if the XFS development team understands that this issue is very serious?  I browsed the archive of the XFS mailing list for past several months but I didn't see any discussions on xfs_fsr causing a volume corruption.

From: Anonymous

I found that I also needed:

apt-get install uuid-dev

From: Derek Van Treese

There are a number of known bugs with the packaged versions of XFS and the associated tools.  The XFS defragmenter (xfs_fsr) can cause corruption on some volumes.  Just thought I would make the information available to those interested.

From:

Since this tutorial is for an Ubuntu system, and one of Ubuntu's greatest strengths is its package management system, why install software without rolling it into a proper .deb package?

 To do this, simply:

sudo apt-get install build-essential checkinstall

Then, replace all of your "make install" commands above with "checkinstall".  So, a from-source installation would look like this:

# ./configure ; make ; checkinstall

checkinstall provides a wrapper around the "make install" process, asking you a few simple questions, then creating and installing a .deb, which is manageable via apt-get like everything else provided by official Ubuntu packages.

From:

I will update the instructions.  This is why I like this site so much.  Always learning something new.  Thanks!

From: Raskhan

I couldn't fine what those tools will do and how to use them

Thanks

 

From: nbensa

Why would you want to do this? Is there something bad with the binaries provided by Canonical?

From: Anonymous

These instructions need to be updated. They do not work when using checkinstall