In Linux, the full name of ext3 is "Third extended filesystem", which means "third generation extended file system" in Chinese. It is a log file system; its maximum supported capacity is 32TB, and the maximum limit for a single file is 16TB. , supports 32,000 subdirectories. The ext3 file system can greatly improve the integrity of the file system and avoid damage to the file system due to unexpected downtime.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
linux ext3 file
EXT3 is the third generation extended file system (English: Third extended filesystem, abbreviated as ext3), which is a log File system, commonly used in Linux operating systems. The maximum limit for a single file is 16TB, and the file system supports a maximum capacity of 32TB.
It is the default file system for many Linux distributions. Stephen Tweedie first showed his use of extended ext2 in the kernel mailing list in February 1999. The file system was merged into the mainline kernel starting with the 2.4.15 kernel.
Characteristics of EXT3 log file system
1. High availability
The system uses ext3 After the file system is installed, the system does not need to check the file system even after an abnormal shutdown. After a crash occurs, it only takes tens of seconds to restore the ext3 file system.
2. Data integrity
ext3 file system can greatly improve the integrity of the file system and avoid damage to the file system due to unexpected downtime. In terms of ensuring data integrity, the ext3 file system has 2 modes to choose from. One of them is the "maintain file system and data consistency simultaneously" mode. This way, you'll never see junk files stored on disk due to an abnormal shutdown.
3. File system speed
Although when using the ext3 file system, sometimes you may have to write data multiple times when storing data, but overall, , ext3 has better performance than ext2. This is because the logging function of ext3 optimizes the disk drive read and write heads. Therefore, the file system's read and write performance has not been reduced compared to the Ext2 file system.
4. Data conversion
It is very easy to convert the ext2 file system to the ext3 file system. The entire conversion process can be completed by simply typing two commands. The user does not need to Take the time to back up, restore, format partitions, etc. Use tune2fs, a small tool provided by the ext3 file system, which can easily convert the ext2 file system into an ext3 log file system. In addition, the ext3 file system can be directly loaded into an ext2 file system without any changes.
5. Multiple log modes
Ext3 has multiple log modes. One working mode is to log all file data and metadata (define the data in the file system). data, that is, the data of the data) for logging (data=journal mode); another working mode is to only log the metadata without logging the data, which is the so-called data=ordered or data=writeback mode. System administrators can choose between the system's working speed and the consistency of file data based on the actual working requirements of the system.
Why you need to migrate from ext2 to ext3 (Advantages of EXT3)
There are four main reasons: availability, data integrity flexibility, speed, and ease of migration.
1. Availability
After an abnormal crash (power outage, system crash), the ext2 file system can only be verified after consistency verification through e2fsck. Loaded for use. The time to run e2fsck mainly depends on the size of the ext2 file system. Verifying slightly larger file systems (tens of gigabytes) takes a long time. If there are many files on the file system, the verification will take longer. Verifying a file system of several hundred gigabytes can take an hour or more. This greatly limits usability. In contrast, unless a hardware failure occurs, ext3 does not require file system verification even if it is shut down abnormally. This is because data is written to disk in a manner that is consistent across the file system. After an abnormal shutdown, the time to restore an ext3 file system does not depend on the size of the file system or the number of files, but on the size of the "log" required to maintain consistency. With default log settings, recovery time is only one second (depending on hardware speed).
2. Data integrity
Using the ext3 file system, data integrity performance is reliably guaranteed during abnormal shutdown. You can choose the type and level of data protection. You can choose to keep the file system consistent, but allow the data on the file system to be damaged during an abnormal shutdown; this can provide some speed improvements in some situations (but not all situations). You can also choose to keep data reliability consistent with the file system; this means that after a crash, you won't see any data garbage in newly written files. This safe option, which maintains data integrity consistent with the file system, is the default setting.
3. Speed
Although ext3 writes data more times than ext2, ext3 is often faster than ext2 (high data flow). This is because the logging function of ext3 optimizes the rotation of the hard disk heads. You can choose from 1 of 3 logging modes to optimize speed, selectively sacrificing some data integrity.
4. Easy migration
You can easily migrate from ext2 to ext3 without reformatting the hard disk and enjoy the benefits of a reliable log file system. Yes, you can experience the advantages of ext3 without doing the long, boring, and potentially error-prone "backup-reformat-restore" operation.
There are two methods of migration: If you upgrade your system, the Red Hat Linux installer will assist with the migration. All you need to do is click the Select button for each file system.
Use the tune2fs program to add logging functionality to an existing ext2 file system. If the file system has been mounted during the conversion process, the file ".journal" will appear in the root directory; if the file system has not been mounted, the file will not appear in the file system.
To convert the file system, just run tune2fs –j /dev/hda1 (or any device name where the file system you want to convert is located), and change ext2 in the file /etc/fstab to ext3.
If you want to convert your own root file system, you must use initrd to boot. Run the program according to the manual description of mkinitrd, and confirm that initrd is loaded in your LILO or GRUB configuration (if it does not succeed, the system can still start, but the root file system will be loaded as ext2 instead of ext3. You can use the command cat / proc/mounts to confirm this.)
Extended knowledge: The main difference between EXT3 and EXT4
Linux kernel has been official since 2.6.28 Support new file system Ext4. Ext4 is an improved version of Ext3. It modifies some important data structures in Ext3, not just like Ext3 does to Ext2, it just adds a log function. Ext4 can provide better performance and reliability, as well as richer functions:
1. Compatible with Ext3
Execute several commands to get the Ext3 to Ext4 online migration without reformatting the disk or reinstalling the system. The original Ext3 data structure is still retained, and Ext4 acts on the new data. Of course, the entire file system thus obtains the larger capacity supported by Ext4.
2. Larger file systems and larger files
Compared with the maximum 16TB file system and maximum 2TB file currently supported by Ext3, Ext4 supports 1EB respectively. (1,048,576TB, 1EB=1024PB, 1PB=1024TB) file system, and 16TB files.
3. Unlimited number of subdirectories
Ext3 currently only supports 32,000 subdirectories, while Ext4 supports an unlimited number of subdirectories.
4.Extents
Ext3 uses indirect block mapping, which is extremely inefficient when operating large files. For example, for a 100MB file, a mapping table of 25,600 data blocks (each data block size is 4KB) needs to be established in Ext3. Ext4 introduces the popular concept of extents in modern file systems. Each extent is a set of continuous data blocks. The above file is expressed as "the file data is stored in the next 25,600 data blocks", which improves a lot of efficiency. .
5. Multi-block allocation
When writing data to the Ext3 file system, the Ext3 data block allocator can only allocate one 4KB block at a time. Writing a 100MB file requires calling the data block allocator 25,600 times, and Ext4's multiblock allocator "multiblock allocator" (mballoc) supports allocating multiple data blocks in one call.
6. Delayed allocation
The data 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 data blocks are allocated and written to the disk only after the file is written in the cache. This can optimize the data block allocation of the entire file, and can significantly improve performance when paired with the first two features.
7. Fast fsck
In the past, the first step of executing fsck would be very slow because it had to check all inodes. Now Ext4 gives the inode table of each group A list of unused inodes has been added to the fsck Ext4 file system. In the future, fsck Ext4 file system can skip them and only check those inodes in use.
8. Log verification
The log is the most commonly used part and can easily lead to disk hardware failure. Restoring data from a damaged log will cause more of data is corrupted. The log verification function of Ext4 can easily determine whether the log data is damaged, and it merges the two-stage logging mechanism of Ext3 into one stage, which improves performance while increasing security.
9. "No Journaling" mode
Logs always have some overhead. Ext4 allows you to turn off logs so that some users with special needs can borrow This improves performance.
10. Online defragmentation
Although delayed allocation, multi-block allocation and extents can effectively reduce file system fragmentation, fragmentation will inevitably occur. Ext4 supports online defragmentation and will provide the e4defrag tool for defragmentation of individual files or the entire file system.
11.inode related features
Ext4 supports larger inodes. Compared with Ext3’s default inode size of 128 bytes, Ext4 can accommodate more inodes. Extended attributes (such as nanosecond timestamp or inode version), default inode size is 256 bytes. Ext4 also supports fast extended attributes and inode reservation.
12. Persistent preallocation
In order to ensure that the downloaded file has enough space to store, P2P software often pre-creates a file with the same size as the downloaded file. empty file to avoid download failure due to lack 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
The disk is equipped with an internal cache to re-adjust the order of batch data write operations and optimize write performance, so the file system must be in The commit record can only be written after the log data is written to the disk. If the commit record is written first and the log may be damaged, data integrity will be affected. Ext4 enables barriers by default. Only when all the data before the barrier is written to disk can the data after the barrier be written. (This feature can be disabled through the "mount -o barrier=0" command.)
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of what is linux ext3. For more information, please follow other related articles on the PHP Chinese website!

The key steps in Linux system management and maintenance include: 1) Master the basic knowledge, such as file system structure and user management; 2) Carry out system monitoring and resource management, use top, htop and other tools; 3) Use system logs to troubleshoot, use journalctl and other tools; 4) Write automated scripts and task scheduling, use cron tools; 5) implement security management and protection, configure firewalls through iptables; 6) Carry out performance optimization and best practices, adjust kernel parameters and develop good habits.

Linux maintenance mode is entered by adding init=/bin/bash or single parameters at startup. 1. Enter maintenance mode: Edit the GRUB menu and add startup parameters. 2. Remount the file system to read and write mode: mount-oremount,rw/. 3. Repair the file system: Use the fsck command, such as fsck/dev/sda1. 4. Back up the data and operate with caution to avoid data loss.

This article discusses how to improve Hadoop data processing efficiency on Debian systems. Optimization strategies cover hardware upgrades, operating system parameter adjustments, Hadoop configuration modifications, and the use of efficient algorithms and tools. 1. Hardware resource strengthening ensures that all nodes have consistent hardware configurations, especially paying attention to CPU, memory and network equipment performance. Choosing high-performance hardware components is essential to improve overall processing speed. 2. Operating system tunes file descriptors and network connections: Modify the /etc/security/limits.conf file to increase the upper limit of file descriptors and network connections allowed to be opened at the same time by the system. JVM parameter adjustment: Adjust in hadoop-env.sh file

This guide will guide you to learn how to use Syslog in Debian systems. Syslog is a key service in Linux systems for logging system and application log messages. It helps administrators monitor and analyze system activity to quickly identify and resolve problems. 1. Basic knowledge of Syslog The core functions of Syslog include: centrally collecting and managing log messages; supporting multiple log output formats and target locations (such as files or networks); providing real-time log viewing and filtering functions. 2. Install and configure Syslog (using Rsyslog) The Debian system uses Rsyslog by default. You can install it with the following command: sudoaptupdatesud

When choosing a Hadoop version suitable for Debian system, the following key factors need to be considered: 1. Stability and long-term support: For users who pursue stability and security, it is recommended to choose a Debian stable version, such as Debian11 (Bullseye). This version has been fully tested and has a support cycle of up to five years, which can ensure the stable operation of the system. 2. Package update speed: If you need to use the latest Hadoop features and features, you can consider Debian's unstable version (Sid). However, it should be noted that unstable versions may have compatibility issues and stability risks. 3. Community support and resources: Debian has huge community support, which can provide rich documentation and

This article describes how to use TigerVNC to share files on Debian systems. You need to install the TigerVNC server first and then configure it. 1. Install the TigerVNC server and open the terminal. Update the software package list: sudoaptupdate to install TigerVNC server: sudoaptinstalltigervnc-standalone-servertigervnc-common 2. Configure TigerVNC server to set VNC server password: vncpasswd Start VNC server: vncserver:1-localhostno

Configuring a Debian mail server's firewall is an important step in ensuring server security. The following are several commonly used firewall configuration methods, including the use of iptables and firewalld. Use iptables to configure firewall to install iptables (if not already installed): sudoapt-getupdatesudoapt-getinstalliptablesView current iptables rules: sudoiptables-L configuration

The steps to install an SSL certificate on the Debian mail server are as follows: 1. Install the OpenSSL toolkit First, make sure that the OpenSSL toolkit is already installed on your system. If not installed, you can use the following command to install: sudoapt-getupdatesudoapt-getinstallopenssl2. Generate private key and certificate request Next, use OpenSSL to generate a 2048-bit RSA private key and a certificate request (CSR): openss


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version
Useful JavaScript development tools