Ext3 file systems in linux

Chapter 4. The ext3 File System

The ext3 file system is essentially an enhanced version of the ext2 file system. These improvements provide the following advantages:

After an unexpected power failure or system crash (also called an unclean system shutdown), each mounted ext2 file system on the machine must be checked for consistency by the e2fsck program. This is a time-consuming process that can delay system boot time significantly, especially with large volumes containing a large number of files. During this time, any data on the volumes is unreachable.

It is possible to run fsck -n on a live filesystem. However, it will not make any changes and may give misleading results if partially written metadata is encountered.

If LVM is used in the stack, another option is to take an LVM snapshot of the filesystem and run fsck on it instead.

Finally, there is the option to remount the filesystem as read only. All pending metadata updates (and writes) are then forced to the disk prior to the remount. This ensures the filesystem is in a consistent state, provided there is no previous corruption. It is now possible to run fsck -n .

The journaling provided by the ext3 file system means that this sort of file system check is no longer necessary after an unclean system shutdown. The only time a consistency check occurs using ext3 is in certain rare hardware failure cases, such as hard drive failures. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the journal used to maintain consistency. The default journal size takes about a second to recover, depending on the speed of the hardware.

Читайте также:  Linux расшарить папку smb

The ext3 file system prevents loss of data integrity in the event that an unclean system shutdown occurs. The ext3 file system allows you to choose the type and level of protection that your data receives. With regard to the state of the file system, ext3 volumes are configured to keep a high level of data consistency by default.

Despite writing some data more than once, ext3 has a higher throughput in most cases than ext2 because ext3’s journaling optimizes hard drive head motion. You can choose from three journaling modes to optimize speed, but doing so means trade-offs in regards to data integrity if the system was to fail.

It is easy to migrate from ext2 to ext3 and gain the benefits of a robust journaling file system without reformatting. For more information on performing this task, see Section 4.2, “Converting to an ext3 File System” .

Red Hat Enterprise Linux 7 provides a unified extN driver. It does this by disabling the ext2 and ext3 configurations and instead uses ext4.ko for these on-disk formats. This means that kernel messages will always refer to ext4 regardless of the ext file system used.

4.1. Creating an ext3 File System

After installation, it is sometimes necessary to create a new ext3 file system. For example, if a new disk drive is added to the system, you may want to partition the drive and use the ext3 file system.

Replace block_device with the path to a block device. For example, /dev/sdb1 , /dev/disk/by-uuid/05e99ec8-def1-4a5e-8a9d-5945339ceb2a , or /dev/my-volgroup/my-lv .

# e2label block_device volume_label

Configuring UUID

It is also possible to set a specific UUID for a file system. To specify a UUID when creating a file system, use the -U option:

Читайте также:  Linux mint пропал интернет

Replace device with the path to an ext3 file system to have the UUID added to it: for example, /dev/sda8 .

Источник

ext3

ext3 (third extended filesystem) is an open source disk filesystem created for Linux, and the third version of the extended series of filesystems. The ext3 driver was removed from Linux 4.3 [1] .

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

Installation

Kernel

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
Optional ext3 support definitions

Option Description
Default to ‘data=ordered’ in ext3
Ext3 extended attributes Extended attributes are name:value pairs associated with inodes by the kernel or by users.
Ext3 POSIX Access Control Lists Posix Access Control Lists (ACLs) support permissions for users and groups beyond the owner/group/world scheme.
Ext3 Security Labels Enables an extended attribute handler for file security.

Large drive support

When the system has large disks (2 TB or greater) and a 32-bit ( x86 ) kernel is being used, the following option must be enabled:

-*- Enable the block layer ---> [*] Support for large (2TB+) block devices and files

USE flags

The sys-fs/e2fsprogs package contains the utilities to work with the filesystem. In Gentoo Linux sys-fs/e2fsprogs is part of the system set and should be already installed on the system.

Читайте также:  Информация об linux ubuntu

USE flags for sys-fs/e2fsprogs Standard EXT2/EXT3/EXT4 filesystem utilities

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)
split-usr Enable behavior to support maintaining /bin, /lib*, /sbin and /usr/sbin separately from /usr/bin and /usr/lib*
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)
tools Build extfs tools (mke2fs, e2fsck, tune2fs, etc.)

Emerge

After setting the USE flag update the system so the changes take effect:

Usage

Creation

Warning
The mkfs.ext3 command irreversibly destroys any content of the partition it is told to format. Be sure to select the right partition!

To create an ext3 filesystem on the /dev/sda1 partition:

Please replace /dev/sda1 with the actual partition to format.

By default, 5% of available disk space is reserved for the root user. This is usually a good thing for the partition where the / directory is mounted, but it may be not desirable on other partitions. To lose reserve disk space for the root user use mkfs.ext3 ‘s -m 0 option:

See also

References

Источник

Оцените статью
Adblock
detector