26.12.2014 Views

Gentoo Linux AMD64 Handbook

Gentoo Linux AMD64 Handbook

Gentoo Linux AMD64 Handbook

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Preparing the Disks<br />

ext3 is the journaled version of the ext2 filesystem, providing metadata journaling for fast recovery<br />

in addition to other enhanced journaling modes like full data and ordered data journaling. It uses an<br />

HTree index that enables high performance in almost all situations. In short, ext3 is a very good and<br />

reliable filesystem. If you intend to install <strong>Gentoo</strong> on a very small disk (less than 4GB), then you'll<br />

need to tell ext3 to reserve enough inodes when you create the filesystem. The mke2fs application<br />

uses the "bytes-per-inode" setting to calculate how many inodes a file system should have. By running<br />

mke2fs -j -T small /dev/ the number of inodes will generally quadruple for a given file<br />

system as its "bytes-per-inode" reduces from one every 16kB to one every 4kB. You can tune this<br />

even further by using mke2fs -j -i /dev/.<br />

ext4 is a filesystem created as a fork of ext3 bringing new features, performance improvements and<br />

removal of size limits with moderate changes to the on-disk format. It can span volumes up to 1 EB and<br />

with maximum file size of 16 TB. Instead of the classic ext2/3 bitmap block allocation ext4 uses extents<br />

[http://en.wikipedia.org/wiki/Extent_%28file_systems%29], which improve large file performance<br />

and reduce fragmentation. Ext4 also provides more sophisticated block allocation algorithms (delayed<br />

allocation and multiblock allocation) giving the filesystem driver more ways to optimise the layout<br />

of data on the disk. The ext4 filesystem is a compromise between production-grade code stability and<br />

the desire to introduce extensions to an almost decade old filesystem. Ext4 is the recommended allpurpose<br />

all-platform filesystem.<br />

JFS is IBM's high-performance journaling filesystem. JFS is a light, fast and reliable B+tree-based<br />

filesystem with good performance in various conditions.<br />

ReiserFS is a B+tree-based journaled filesystem that has good overall performance, especially when<br />

dealing with many tiny files at the cost of more CPU cycles. ReiserFS appears to be less maintained<br />

than other filesystems.<br />

XFS is a filesystem with metadata journaling which comes with a robust feature-set and is optimized<br />

for scalability. XFS seems to be less forgiving to various hardware problems.<br />

Applying a Filesystem to a Partition<br />

To create a filesystem on a partition or volume, there are tools available for each possible filesystem:<br />

Filesystem<br />

ext2<br />

ext3<br />

ext4<br />

reiserfs<br />

xfs<br />

jfs<br />

Creation Command<br />

mkfs.ext2<br />

mkfs.ext3<br />

mkfs.ext4<br />

mkreiserfs<br />

mkfs.xfs<br />

mkfs.jfs<br />

For instance, to have the boot partition (/dev/sda1 in our example) in ext2 and the root partition<br />

(/dev/sda3 in our example) in ext4 (as in our example), you would use:<br />

Example 4.17. Applying a filesystem on a partition<br />

# mkfs.ext2 /dev/sda1<br />

# mkfs.ext4 /dev/sda3<br />

Now create the filesystems on your newly created partitions (or logical volumes).<br />

Activating the Swap Partition<br />

mkswap is the command that is used to initialize swap partitions:<br />

30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!