<?xml version='1.0' encoding="UTF-8"?>
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-filesystems.xml,v 1.13 2013/02/23 18:38:22 swift Exp $ -->
<!DOCTYPE included SYSTEM "/dtd/guide.dtd">

<included>

<version>11</version>
<date>2013-02-23</date>

<section id="filesystemsdesc">
<title>Filesystems</title>
<body>

<p test="contains('x86 Alpha',func:keyval('arch'))">
The Linux kernel supports various filesystems. We'll explain ext2, ext3, ext4,
ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux
systems.
</p>

<p test="func:keyval('arch')='IA64'">
The Linux kernel supports various filesystems. We'll explain vfat, ext2, ext3,
ext4, ReiserFS, XFS and JFS as these are the most commonly used filesystems on
Linux systems.
</p>

<p test="func:keyval('arch')='AMD64'">
Several filesystems are available. Some of them are found stable on the amd64
architecture, others aren't. The following filesystems are found to be stable:
ext2, ext3, ext4 and XFS. JFS and ReiserFS may work but need more testing. If
you're really adventurous you can try the other filesystems.
</p>

<p test="func:keyval('arch')='arm'">
Several filesystems are available. Some of them are found stable on the arm
architecture, others aren't. ext2, ext3 and ext4 are found to be stable. JFS,
XFS and ReiserFS may work but need more testing. If you're really adventurous
you can try the other filesystems.
</p>

<p test="func:keyval('arch')='HPPA'">
Several filesystems are available. Ext2, ext3, ext4, XFS and reiserfs are found
stable on the HPPA architecture. The others are very experimental.
</p>

<p test="func:keyval('arch')='MIPS'">
Several filesystems are available. ReiserFS, EXT2, EXT3 and EXT4 are found
stable on the MIPS architectures, others are experimental.
</p>

<p test="func:keyval('arch')='PPC'">
Several filesystems are available for use on the PowerPC architecture including
ext2, ext3, ext4, ReiserFS and XFS, each with their strengths and faults.
</p>

<note test="func:keyval('arch')='PPC64'">
Several filesystems are available. ext2, ext3, ext4 and ReiserFS support is built in
the Installation CD kernels. JFS and XFS support is available through kernel
modules.
</note>

<p test="func:keyval('arch')='SPARC'">
Several filesystems are available, some are known to be stable on the
SPARC architecture.  Ext2, ext3 and ext4, for example, are known to work well.
Alternate filesystems may not function correctly.
</p>

<note test="func:keyval('arch')='Alpha'">
<c>aboot</c> only supports booting from <b>ext2</b> and <b>ext3</b>
partitions.
</note>

</body>
<body>

<p test="func:keyval('arch')='IA64'">
<b>vfat</b> is the MS-DOS filesystem, updated to allow long filenames. It is
also the only filesystem type that the EFI firmware on ia64 systems
understands. The boot partition on ia64 systems should always be vfat, but for
your data partitions you should use one of the other filesystems listed below.
</p>

<p>
<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
journaling, which means that routine ext2 filesystem checks at startup time can
be quite time-consuming. There is now quite a selection of newer-generation
journaled filesystems that can be checked for consistency very quickly and are
thus generally preferred over their non-journaled counterparts. Journaled
filesystems prevent long delays when you boot your system and your filesystem
happens to be in an inconsistent state. If you intend to install Gentoo on a
very small disk (less than 4GB), then you'll need to tell ext2 to reserve enough
inodes when you create the filesystem. The <c>mke2fs</c> application uses the
"bytes-per-inode" setting to calculate how many inodes a file system should have.
By running <c>mke2fs -T small /dev/&lt;device&gt;</c> the number of inodes will
generally quadruple for a given file system as its "bytes-per-inode" reduces from 
one every 16kB to one every 4kB. You can tune this even further by using
<c>mke2fs -i &lt;ratio&gt; /dev/&lt;device&gt;</c>.
</p>

<p>
<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
journaling for fast recovery in addition to other enhanced journaling modes like
full data and ordered data journaling. It uses an HTree index that enables high
performance in almost all situations. In short, ext3 is a very good and
reliable filesystem. If you intend to install Gentoo on a
very small disk (less than 4GB), then you'll need to tell ext3 to reserve enough
inodes when you create the filesystem. The <c>mke2fs</c> application uses the
"bytes-per-inode" setting to calculate how many inodes a file system should have.
By running <c>mke2fs -j -T small /dev/&lt;device&gt;</c> the number of inodes will
generally quadruple for a given file system as its "bytes-per-inode" reduces from 
one every 16kB to one every 4kB. You can tune this even further by using
<c>mke2fs -j -i &lt;ratio&gt; /dev/&lt;device&gt;</c>.
</p>

<p test="contains('x86 Alpha MIPS AMD64 arm IA64 SPARC HPPA PPC PPC64',func:keyval('arch'))">
<b>ext4</b> is a filesystem created as a fork of ext3 bringing new features,
performance improvements and removal of size limits with moderate changes
to the on-disk format. It can span volumes up to 1 EB and with maximum file
size of 16 TB. Instead of the classic ext2/3 bitmap block allocation ext4 uses
<uri link="http://en.wikipedia.org/wiki/Extent_%28file_systems%29">extents</uri>,
which improve large file performance and reduce fragmentation. Ext4 also provides  
more sophisticated block allocation algorithms (delayed allocation and multiblock 
allocation) giving the filesystem driver more ways to optimise the layout of data
on the disk. The ext4 filesystem is a compromise between production-grade code 
stability and the desire to introduce extensions to an almost decade old
filesystem. Ext4 is the recommended all-purpose all-platform filesystem.
</p>

</body>
<body test="not(func:keyval('arch')='SPARC')">

<p test="not(func:keyval('arch')='PPC')">
<b>JFS</b> is IBM's high-performance journaling filesystem. JFS is a light,
fast and reliable B+tree-based filesystem with good performance in various
conditions.
</p>

<p>
<b>ReiserFS</b> is a B+tree-based journaled filesystem that has good overall
performance, especially when dealing with many tiny files at the cost of more
CPU cycles. ReiserFS appears to be less maintained than other filesystems.
</p>

<p>
<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
feature-set and is optimized for scalability. XFS seems to be less forgiving to
various hardware problems.
</p>

</body>
</section>
</included>
