Search     or:     and:
 File system
 Linux daemons
Последние статьи :
  Rust 07.11   
  Go 25.12   
  EXT4 10.11   
  FS benchmark 15.09   
  Сетунь 23.07   
  Trees 25.06   
  Apache 03.02   
  SQL 30.07   
  JFS 10.06   
  B-trees 01.06   
TOP 20
 Go Web ...554 
 Steve Pate 3...452 
 Rodriguez 6...422 
 TCP 3...385 
 Rodriguez 2...372 
 Rubni-Corbet -> Глав...358 
 Steve Pate 1...347 
 B.Blunden 1...344 
 Daniel Bovet 3...343 
 UML 3...339 
 Стивенс 9...338 
 Robert Love 3...338 
 Robert Love 2...333 
 Максвелл 1...331 
 Максвелл 1...331 
 Mod_perl 2...330 
 Daniel Bovet 4...330 
 Robbins 1...327 
 C++ Templates 1...324 
  01.04.2017 : 2166403 посещений


Что нужно для работы с ext4?

Please see the Ext4 Howto page for information on getting started using ext4.

Где взять последнюю версию e2fsprogs?

The latest version of e2fsprogs can be found at Soureforge or at

Как собрать e2fsprogs?

The INSTALL file in the top of the source tree gives more detailed information, but e2fsprogs uses a standard configure script, so the standard "./configure; make" will build the e2fsprogs binaries. Note that if you wish to build the ELF shared libraries, you need to add the "--enable-elf-shlibs" option to the configure invocation.

Как примонтировать ext4 ?

First, make sure that you have e2fsprogs 1.41.0 or later installed on your system. This is required for ext4 support. If the new partition where you would like to create the ext4 filesystem is /dev/sdb1, then all you have to type is:

/sbin/mke2fs -t ext4dev /dev/sdb1

Then to mount this new filesystem, all you need to do is:

mkdir /mnt/test
mount -t ext4dev /dev/sdb1 /mnt/test

For more information, please see the Ext4 Howto document.

Что означает ошибка "EXT4-fs: sdb1: not marked OK to use with test code." ?

Ext4 is currently in development, and as a safety measure, it requires that filesystems that it mounts have a flag indicating that it's OK for in-development code be able to mount the filesystem. This requirement will be dropped relatively soon, once the ext4 developers are confident that ext4 is stable.

The test_fs flag can be set by using the command "tune2fs -E test_fs /dev/sdb1". Filesystems which are created using the command "mke2fs -t ext4dev /dev/sdb1" will automatically have the test_fs flag set. When the ext4 filesystem has become stable, the command "mke2fs -t ext4 /dev/sdb1" will create a filesystem with all of the appropriate filesystem options suitable for the ext4 filesystem, but without the test_fs flag.

История ext2, ext3, ext4

В чем разница между ext2, ext3, ext4?

The ext2, ext3, and ext4 file systems are a family of file systems that have a strong amount of backwards and forward compatibility. In fact, they can be considered a single filesytem format with a number of feature extensions, and ext2, ext3, and ext4 are merely the names of the implementations found in the Linux kernel. This way of looking at things is supported by the fact that they share the same userspace utilities (e2fsprogs), and that many filesystems can be mounted on different filesystems. For example, a filesystem which is created for use with ext3 can be mounted using either ext2 or ext4. However, a filesystem with ext4-specific extensions can not be mounted using ext2 or ext3, and the ext3 and ext4 file systems code in the kernel (at least of this writing) require the presence of a journal, which is generally not present in partitions formatted for use by the ext2 file system.

История создания ext2 ?

In April 1992, the ext filesystem was written by Remy Card to address two key limitations with the Minix filesystem, which had previously been the only filesystem available to Linux: filenames could be only 14 characters, and the maximum file system size supported by Minix was 64MB. The ext filesystem supported block devices up to 2GB, and file names up to 255 characters, but (like Minix) it only had a single timestamp for last modification time, last access time, and inode change time. It also used linked lists to store free blocks, which meant that files tended to get fragmented very easily. In January, 1993, the ext2 filesystem was released which further increased the maximum block size to 4TB, added POSIX timestamps, and supported variable block sizes. More importantly, it added support for extensibility so that new features could be added to the filesystem.

File System Features

Какие фичи поддерживает ext2 ?

As of this writing, the ext2 filesystem supports the following features:

  • EXT2_FEATURE_RO_COMPAT_BTREE_DIR (note: the ext2 filesystem only btree directories in that it knows how to clear the indexed directory flag when it modifies a btree directory)

Какие фичи поддерживает ext3 ?

As of this writing, the ext3 file system supports the following features:

  • EXT3_FEATURE_COMPAT_HAS_JOURNAL (note: this feature *must* be set)

Какие фичи поддерживает ext4?

As of this writing, the ext4 file system supports the following features:

  • EXT4_FEATURE_COMPAT_HAS_JOURNAL (note: this feature *must* be set)

Как это работает

Что нового в Ext4 (vs Ext2/3)?

Check here:

Как протестировать Ext4?

Как протестировать быстродействие Ext4 ? Какие для этого средства ?

There exists a wide variety of tools and comparison, for more information on the different performance testing tools available: [1]

Another reference here:

Можно ли восстановить удаленный файл в Ext4?

No, in the same way that the ext3 journal requirements to be consistent after a crash prevent undelete of ext3 files, it isn't possible to undelete ext4 files.

Можно ли примонтировать Ext2 или Ext3 как Ext4?

You can mount any ext3 filesystem as ext4 without any changes. If the filesystem is mounted as ext4 using the "extents" mount option (the default), this will enable the INCOMPAT_EXTENTS feature, and prevent the filesystem from being mounted as ext3 again. If you mount with the "-o noextents" option this will not happen.

For ext2 the filesystem would first need to have a journal created using tune2fs before it can be mounted as ext3 or ext4. At that point the filesystem is an ext3 filesystem and the above comments apply.

# tune2fs -j /dev/XXX

Для чего нужен /proc/fs/jbd2/<partition>/history?

Executing "cat /proc/fs/jbd2/<partition>/history" gives:

R/C  tid   wait  run   lock  flush log   hndls  block inlog ctime write drop  close
 R    2     0     107692 0     0     0     1      1     2    

The purpose of this history is to provide a capture of the statistical properties on the performance of the Ext4 filesystem. It can be observed that the entries are added after a file has been copied to the file system - not immediately, but delayed by a short while, due to the asynchronous mechanism of jbd2 logging(*FIXED ME*).

Для чего нужен /proc/fs/jbd2/<partition>/info?

Executing "cat /proc/fs/jbd2/<partition>/info" gives:

56 transaction, each upto 2048 blocks average:

 0ms waiting for transaction
  57671ms running transaction
  0ms transaction was being locked
  28ms flushing data (in ordered mode)
  14ms logging transaction
  2383 handles per transaction
  6 blocks per transaction
  7 logged blocks per transaction

Как на ходу изменить размер Ext4 filesystem?

Online resizing of ext4 works in a similar manner as ext3, using either resize2fs or ext2resize, but there is currently a limit (around 4TB or so) to the maximum filesystem size. Implementing online resize with the META_BG feature would allow this limit to be exceeded.

В чем разница между расширенным mapping и обычным indirect block mapping?

To quote from the paper:

Currently, the ext2/ext3 п¬Ѓlesystem, like other traditional UNIX п¬Ѓlesystems, uses a direct, indi-
 rect, double indirect, and triple indirect blocks to map п¬Ѓle offsets to on-disk blocks. This
 scheme, sometimes simply called an indirect block mapping scheme, is not efficient for large
 п¬Ѓles, especially large п¬Ѓle deletion. In order to address this problem, many modern п¬Ѓlesystems
 (including XFS and JFS on Linux) use some form of extent maps instead of the traditional
 indirect block mapping scheme.
 Since most filesystems try to allocate blocks in a contiguous fashion, extent maps are a more efficient 
 way to represent the mapping between logical and physical blocks for large п¬Ѓles. An extent is a single 
 descriptor for a range of contiguous blocks, instead of using, say hundreds of entries to describe 
 each block individually.

Что такое delayed allocation и в чем его преимущество в Ext4?

Delayed allocation worked by deferring the allocation of new blocks in the п¬Ѓlesystem to disk blocks until writeback time. This helps in three ways:

1. Reduced fragmentation.
2. Reduced CPU cycles spent in get_block() calls.
3. It may avoid the need for disk updates for metadata creation, which in turn reduces impact on fragmentation.

Что такое multiblock allocation (mballoc)?

mballoc is a mechanism to allow many blocks to be allocated to a file in a single operation, in order to dramatically reduce the amount of CPU usage searching for many free blocks in the filesystem. Also, because many file blocks are allocated at the same time, a much better decision can be made to find a chunk of free space where all of the blocks will fit.

The mballoc code is active when using the O_DIRECT flag for writes, or if the delayed allocation (delalloc) feature is being used. This allows the file to have many dirty blocks submitted for writes at the same time, unlike the existing kernel mechanism of submitting each block to the filesystem separately for allocation.

Что такое bitmap allocator?

История Ext4?

Check here:

В чем разница между ext3 и ext4?

The main new features in ext4 are below, and are described more fully in New_ext4_features:

  • extent-mapped files for more efficient storage of file metadata (EXTENTS)
  • multi-block and delayed allocation for faster/better file allocations
  • support for larger filesystems (up to 2^48 blocks, currently 2^60 bytes) (64_BIT)
  • optimized storage of filesystem metadata like bitmaps and inode table (FLEX_BG)
  • less overhead for e2fsck, on-disk checksum of group descriptors (GDT_CSUM)
  • removed 32000 subdirectory limit (DIR_NLINKS)
  • nanosecond inode timestamps (EXTRA_ISIZE)

В чем разница между jbd и jbd2?

The code between jbd and jbd2 is nearly identical, but jbd2 adds a few new features in a compatible way:

  • support for 64-bit filesystems (64_BIT)
  • checksumming of journal transactions (CHECKSUM)
  • asynchronous transaction commit block write (ASYNC_COMMIT)
Оставьте свой комментарий !

Ваше имя:
Оба поля являются обязательными

 Автор  Комментарий к данной статье