Handbook:Parts/Installation/Disks/fr

Les périphériques découpés en blocs
Nous allons étudier en profondeur les aspects de Gentoo qui concernent les disques, y compris les systèmes de fichiers de Linux, les partitions et les périphériques découpés en blocs. Une fois que les tenants et les aboutissants des disques et des systèmes de fichiers seront compris, nous configurerons les partitions et les systèmes de fichiers pour l'installation de Gentoo Linux.

Pour commencer, regardons les périphériques découpés en blocs. Le plus connu des périphériques découpés en blocs est sans doute le premier disque sur un système Linux, à savoir. Les disques SCSI et Serial ATA sont tous les deux étiquetés ; même les disques IDE sont étiquetés avec la nouvelle structure de libata  dans le noyau. Avec l'ancienne structure des périphériques, le premier disque IDE est étiqueté.

Les périphériques découpés en blocs ci-dessus représentent une interface abstraite pour le disque. Les programmes utilisateurs peuvent utiliser ces périphériques découpés en blocs pour interagir avec votre disque sans se soucier de savoir s'il est IDE, SCSI ou quelque chose d'autre. Le programme peut simplement adresser le stockage sur le disque comme un groupe de blocs contigus de 512 octets, accessibles aléatoirement.

Introduction
Now that the partitions are created, it is time to place a filesystem on them. In the next section the various file systems that Linux supports are described. For readers that already know which filesystem to use can continue with Applying a filesystem to a partition. Otherwise read on to learn about the available filesystems...

Filesystems
Several filesystems are available. Some of them are found stable on the architecture - it is advised to read up on the filesystems and their support state before selecting a more experimental one for important partitions.


 * ext2
 * This 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 the system is booted and he filesystem happens to be in an inconsistent state.


 * ext3
 * 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.


 * ext4
 * Initially created as a fork of ext3, ext4 brings 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 extents, 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 optimize the layout of data on the disk. Ext4 is the recommended all-purpose all-platform filesystem.


 * JFS
 * IBM's high-performance journaling filesystem. JFS is a light, fast and reliable B+tree-based filesystem with good performance in various conditions.


 * ReiserFS
 * 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.


 * XFS
 * 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.


 * vfat
 * Also known as FAT32, is supported by Linux but does not support any permission settings. It is mostly used for interoperability with other operating systems (mainly Microsoft Windows) but is also a necessity for some system firmware (like UEFI).

When using ext2, ext3 or ext4 on a small partition (less than 8GB), then the file system must be created with the proper options to reserve enough inodes. The  application uses the "bytes-per-inode" setting to calculate how many inodes a file system should have. On smaller partitions, it is advised to increase the calculated number of inodes.

On ext2, this can be done using the following command:

On ext3 and ext4, add the  option to enable journaling:

This will generally quadruple the number of inodes for a given file system as its "bytes-per-inode" reduces from one every 16kB to one every 4kB. This can be tuned even further by providing the ratio:

Applying a filesystem to a partition
To create a filesystem on a partition or volume, there are tools available for each possible filesystem:

For instance, to have the root partition  in ext4 as used in the example partition structure, the following commands would be used:

Now create the filesystems on the newly created partitions (or logical volumes).

Activating the Swap Partition
is the command that is used to initialize swap partitions:

To activate the swap partition, use :

Create and activate the swap with the commands mentioned above.

Mounting
Now that the partitions are initialized and are housing a filesystem, it is time to mount those partitions. Use the  command, but don't forget to create the necessary mount directories for every partition created. As an example we mount the root partition:

Later in the instructions the proc filesystem (a virtual interface with the kernel) as well as other kernel psuedo-filesystems will be mounted. But first we install the Gentoo installation files.