Ext4
ext4 (fourth extended file system, quarto file system esteso) è un open source filesystem e la versione più recente della serie estesa di filesystem. È il file system principale in uso da molti sistemi Linux, rendendolo probabilmente il file system più stabile e ben testato supportato in Linux.
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 16TB. 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.
Installazione
Kernel
Attivare le seguenti opzioni del kernel per abilitare il supporto ext4:
File systems --->
<*> The Extended 4 (ext4) filesystem
Supporto per funzionalità ext4 opzionali:
File systems --->
[*] Ext4 POSIX Access Control Lists
[*] Ext4 Security Labels
[ ] EXT4 debugging support
Ext3
A normal ext4 system will not need to enable ext3 or ext2 options. These options are here solely for historical purposes.
Activate the following kernel options for ext3 support:
File systems --->
<*> Ext3 journalling file system support
Support for optional ext3 features:
File systems --->
[*] Default to 'data=ordered' in ext3
[*] Ext3 extended attributes
[*] Ext3 POSIX Access Control Lists
[*] Ext3 Security Labels
Ext2
Ext2 does not have journaling, support for this was added in Ext3
Activate the following kernel options for ext2 support:
File systems --->
<*> Second extended fs support
Support for optional ext2 features:
File systems --->
[*] Ext2 extended attributes
[*] Ext2 POSIX Access Control Lists
[*] Ext2 Security Labels
The original ext3 filesystem code was removed from the Linux Kernel with version 4.3, instead the ext4 filesystem code can now handle ext2, ext3 and ext4 filesystems. It will maintain compatibility if the filesystem is mounted as ext2 or ext3, and will provide upgradability when mounted as ext4. Additionally tune2fs can be used to add ext3- and ext4-specific features to an existing ext2 or ext3 filesystem, though certain hard limits will remain.
The original ext2 filesystem code remains available.
Both ext2 and ext3 file timestamps are affected by the year 2038 problem, while ext4 is Y2k38-safe since 2016, Kernel 4.3.6 and e2fsprogs 1.43.
Supporto per unità di grandi dimensioni
-*- Enable the block layer --->
[*] Support for large (2TB+) block devices and files
USE flags
USE flags for sys-fs/e2fsprogs Standard EXT2/EXT3/EXT4 filesystem utilities
+tools
|
Build extfs tools (mke2fs, e2fsck, tune2fs, etc.) |
archive
|
Add support for mke2fs to read a tarball as input. This allows not needing privileges. Needs app-arch/libarchive. |
cron
|
Install e2scrub_all cron script |
fuse
|
Build fuse2fs, a FUSE file system client for ext2/ext3/ext4 file systems |
nls
|
Add Native Language Support (using gettext - GNU locale utilities) |
static-libs
|
Build static versions of dynamic libraries as well |
test
|
Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently) |
Emerge
The sys-fs/e2fsprogs package and should be available as part of the default system set.
root #
emerge --ask sys-fs/e2fsprogs
Utilizzo
Creazione
Il comando mkfs.ext4 distrugge irreversibilmente ogni contenuto della partizione che sarà per essere formattata. Assicurati di selezionare la partizione giusta!
Per creare un filesystem ext4 nella partizione /dev/sda1:
root #
mkfs.ext4 /dev/sda1
Mounting
See filesystem.
Utilities
Utilities included in the package consist of:
Utility | Description | Man page |
---|---|---|
badblocks | A small program for stress testing block devices. | badblocks(8) |
debugfs | An ext2/ext3/ext4 file system debugger. | debugfs(8) |
dumpe2fs | A tool to dump ext2/ext3/ext4 filesystem information. | dumpe2fs(8) |
e2fsck | A tool for checking ext2/ext3/ext4 filesystems. | e2fsck(8) |
e2image | A tool for saving critical ext2/ext3/ext4 filesystem metadata to a file. | e2image(8) |
e2label | A tool to change the label on an ext2/ext3/ext4 filesystem (symlinks to tune2fs). | |
e2undo | A tool to replay an undo log for an ext2/ext3/ext4 filesystem. | e2undo(8) |
fsck.ext2 | Checks, specifically, an ext2 filesystem (symlinks to e2fsck). | |
fsck.ext3 | Checks, specifically, an ext3 filesystem (symlinks to e2fsck). | |
fsck.ext4 | Checks, specifically, an ext4 filesystem (symlinks to e2fsck). | |
fsck.ext4dev | Checks, specifically, an ext4dev filesystem (symlinks to e2fsck). | |
logsave | A tool to save the output of a command in a logfile. | logsave(8) |
mke2fs | The base program for creating ext2/ext3/ext4 filesystems. Creation commands symlink here. | mke2fs(8) |
mkfs.ext2 | Creates, specifically, an ext2 filesystem (symlinks to mke2fs). | |
mkfs.ext3 | Creates, specifically, an ext3 filesystem (symlinks to mke2fs). | |
mkfs.ext4 | Creates, specifically, an ext4 filesystem (symlinks to mke2fs). | |
mkfs.ext4dev | Creates, specifically, an ext24dev filesystem (symlinks to mke2fs). | |
resize2fs | An ext2/ext3/ext4 filesystem resizer. | resize2fs(8) |
tune2fs | Adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems. | tune2fs(8) |
chattr | Change file attributes on a Linux filesystem. | chattr(1) |
lsattr | List file attributes on a Linux second extended filesystem. | lsattr(1) |
e2freefrag | Report free space fragmentation information. | e2freefrag(8) |
e4defrag | An online defragmenter for ext4 filesystem. | e4defrag(8) |
filefrag | Report on file fragmentation. | filefrag(8) |
mklost+found | Create a lost+found directory on a mounted Linux second extended filesystem. | mklost+found(8) |
Vedere anche
- Ext4 encryption — provides instructions on encrypting files in a home partition using the ext4 filesystem's built-in file based encryption.
- JFS — un filesystem journaling a 64 bit creato da IBM
- Btrfs — un filesystem CoW (copy-on-write, copia-in-scrittura) adatto a Linux che mira ad implementare funzionalità avanzate, concentrandosi sulla tolleranza agli errori, la riparazione e la facilità di amministrazione.
- XFS — un filesystem journaling ad alte prestazioni
- F2FS — un filesystem progettato per dispositivi basati su flash NAND.