In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "what are the functions of the CentOS EXT4 file system", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "what are the functions of the CentOS EXT4 file system" bar!
Linux kernel has officially supported the new file system Ext4 since 2.6.28. Ext4 is an improved version of Ext3 that modifies some of the important data structures in Ext3, rather than just adding a logging function as Ext3 did to Ext2. Ext4 provides better performance and reliability, as well as richer features:
1. Compatible with Ext3. By executing several commands, you can migrate from Ext3 to Ext4 online without reformatting the disk or reinstalling the system. The original Ext3 data structure remains the same, and Ext4 acts on the new data, which, of course, gives the entire file system the larger capacity supported by Ext4.
two。 Larger file systems and larger files. Compared with the largest 16TB file system and the largest 2TB file currently supported by Ext3, Ext4 supports 1EB (1048576TB, 1EB=1024PB, 1PB=1024TB) file systems and 16TB files, respectively.
3. An unlimited number of subdirectories. Ext3 currently supports only 32000 subdirectories, while Ext4 supports an unlimited number of subdirectories.
4. Extents . Ext3 uses indirect block mapping, which is extremely inefficient when manipulating large files. For example, for a 100MB-sized file, you need to create a mapping table of 25600 blocks (each of which is 4KB) in Ext3. While Ext4 introduces the popular concept of extents in modern file system, each extent is a group of continuous data blocks, and the above file is expressed as "the file data is saved in the next 25600 data blocks", which improves a lot of efficiency.
5. Multi-block allocation. When writing data to the Ext3 file system, Ext3's block allocator can only allocate one 4KB block at a time. Writing a 100MB file calls the 25600-degree data block allocator, while Ext4's multi-block allocator "multiblock allocator" (mballoc) supports the allocation of multiple blocks in one call.
6. Delayed allocation. The block allocation strategy of Ext3 is to allocate as soon as possible, while the strategy of Ext4 and other modern file operating systems is to delay allocation as much as possible until the file is written in cache, so that the block allocation of the whole file can be optimized and the performance can be significantly improved when combined with the first two features.
7. Fast fsck. In the past, the first step in performing fsck would be slow because it checks all inode. Now Ext4 adds a list of unused inode to the inode table of each group, so that the fsck Ext4 filesystem can skip them and check only those inode that are in use.
8. Log check. Logs are the most commonly used part and can easily lead to disk hardware failures, while recovering data from corrupted logs can lead to more data corruption. The log verification function of Ext4 can easily determine whether the log data is corrupted, and it combines the two-phase logging mechanism of Ext3 into one phase, which not only increases security but also improves performance.
9. No log (No Journaling) mode. Logging always has some overhead, and Ext4 allows logging to be turned off so that some users with special needs can use it to improve performance.
10. Online defragmentation. Although delayed allocation, multi-block allocation, and extents can effectively reduce file system fragmentation, fragmentation is inevitable. Ext4 supports online defragmentation and will provide e4defrag tools to defragment individual files or entire file systems.
11. Inode-related features. Ext4 supports a larger inode, which is 256bytes by default for Ext4 to accommodate more extended attributes (such as nanosecond timestamps or inode versions) in inode than Ext3's default inode size of 128bytes. Ext4 also supports rapid extension attributes (fast extended attributes) and inode retention (inodes reservation).
twelve。 Persistent pre-allocation (Persistent preallocation). In order to ensure that the downloaded file has enough space to store, P2P software often creates an empty file of the same size as the downloaded file in advance, so as to avoid the download failure caused by the shortage of disk space in the next few hours or days. Ext4 implements persistent pre-allocation at the file system level and provides the corresponding API (posix_fallocate () in libc), which is more efficient than the application software itself.
13. Barrier is enabled by default. There is an internal cache on the disk to re-adjust the write order of bulk data and optimize write performance, so the file system can write commit records only after the log data has been written to disk. If the commit records are written first, and the logs may be corrupted, then data integrity will be affected. Ext4 enables barrier by default. Only when all the data before barrier is written to disk can the data after barrier be written. (this feature can be disabled through the "mount-o barrier=0" command. )
Thank you for your reading, these are the contents of "what are the functions of the CentOS EXT4 file system?" after the study of this article, I believe you have a deeper understanding of what the functions of the CentOS EXT4 file system have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.