<& xfsTemplate,top=>1,side=>1 &>

Working with XFS filesystems

Partitioning

You will need a partition to create your new XFS filesystem on. This partition could be from a new disk, unpartitioned space on an existing disk, or you could overwrite an existing partition. In general, use the fdisk command to create or set the partition to "Linux Native (83)*", and follow the instructions below to make an XFS filesystem on that partition. See the Linux Partition HOWTO for more information if necessary.

*There is currently no partition type allocated for XFS.

Creating an XFS filesystem

You can create a new XFS filesystem in the same manner as you would any other Linux filesystem, with the command:
	mkfs -t xfs /dev/<devfile>
where /dev/<devfile> is the partition where you wish to create the filesystem (note that this will destroy any filesystem currently on that partition).

For example, to create a filesystem on the 3rd partition of your 2nd SCSI drive, you would use the command:

       mkfs -t xfs /dev/sdb3

One important option that you may need is "-f" which will force the creation of a new filesystem, if a filesystem already exists on that partition. Again, note that this will destroy all data currently on that partition:

       mkfs -t xfs -f /dev/<devfile>

You may also achieve better performance by increasing the logfile size from the default size of 1200 blocks to, say, 8000 blocks. You can do this by creating the filesystem with the command:

       mkfs -t xfs -l internal,size=8000b -d name=/dev/<devfile>
Other options are available for XFS filesystem creation; see the man pages for more information.

Mounting an XFS filesystem

You can then mount the new filesystem with the command:
	mount -t xfs /dev/<devfile> /<mount_pt>
where /dev/<devfile> is the device containing the filesystem, and /<mount_pt> is the mount point for the filesystem.

Since XFS is a journaling filesystem, before it mounts the filesystem, it will check the transaction log for any unfinished transactions, and bring the filesystem up to date. Welcome to a fsck-free world!
<& xfsTemplate,bottom=>1 &>