<& xfsTemplate,top=>1,side=>1 &>
<!-- Start Project Content -->
<h2>
<b><font face="ARIAL NARROW,HELVETICA">Working with XFS filesystems</font></b></h2>
<h3>
<b><font face="ARIAL NARROW,HELVETICA">Partitioning</font></b></h3>
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 <tt>fdisk</tt> 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 <a href="http://oss.sgi.com/LDP/HOWTO/mini/Partition.html">Linux
Partition HOWTO</a> for more information if necessary.
<h3>
<b><font face="ARIAL NARROW,HELVETICA">Creating an XFS filesystem</font></b></h3>
You can create a new XFS filesystem in the same manner as you would any
other Linux filesystem, with the command:
<pre><tt> mkfs -t xfs /dev/foo
</tt></pre>
where <tt>/dev/foo</tt> is the partition where you wish to create the
filesystem (note that this will destroy any filesystem currently on that
partition).<p>
For example, to create a filesystem on the 3rd partition of your 2nd SCSI
drive, you would use the command:
<pre><tt> mkfs -t xfs /dev/sdb3
</tt></pre>
<p>
One important option that you may need is "<tt>-f</tt>" 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:
<pre><tt> mkfs -f -t xfs /dev/foo
</tt></pre>
<p>
You may also achieve better performance by increasing the logfile size
from the default size of 1000 blocks to, say, 8000 blocks. You can do this by creating the
filesystem with the command:
<pre><tt> mkfs -t xfs -l size=8000b /dev/foo
</tt></pre>
Other options are available for XFS filesystem creation; see
the <a href="manpages.html">man pages</a> for more information.<p>
<h3>
<b><font face="ARIAL NARROW,HELVETICA">Mounting an XFS filesystem</font></b></h3>
You can then mount the new filesystem with the command:
<pre><tt> mount -t xfs /dev/foo /somewhere
</tt></pre>
where <tt>/dev/foo</tt> is the device containing the filesystem, and
<tt>/somewhere</tt> is the mount point for the filesystem.<p>
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 <tt>fsck</tt>-free world!
<br>
<& xfsTemplate,bottom=>1 &>