Differences between EXT4 and ext3ext4 migration

Source: Internet
Author: User

Differences between EXT4 and ext3ext4 migration

Http://fanli7.net/a/JAVAbiancheng/ANT/20101003/43604.html

Others: Moderate

Roderick W. Smith, analyst and writer

June 02, 2008

Is Ext4 a multi-region Linux? The latest version in the file system, which will be as important and popular as the previous version. As a Linux system administrator, you should know the missing points and baseline steps for migrating the cursor to ext4. This article describes when ext4 should be used, how to use the Unified File System indexing tool in ext4, and how to make full use of the file system.

Ext4 Functions

Linux supports several different file systems. Some of these file systems are website file systems or file systems developed for other operating systems, however, the kernel is mostly used as a Linux local file system-you can (/) And systems are stored in this file system. Currently, this File System includes ext2, ext3, ReiserFS, XFS, and Journaled File System (JFS ). However, file systems are still being designed and developed, and new file systems will be released.

The most important Linux File System that is currently being developed is ext4-which is the fourth version of the original extension File System (ext or extfs) developed for Linux. As a result, ext4 may soon become an important Linux Standard File System (possiblyYesStandard File System ).

Comparison between Ext4 and ext3

The reason for the fourth release of the extension File System (ext or extfs) is that the developer added the new high-availability feature in ext3. However, there are several problems in the current process:

  • Backend compatibility of some new features.
  • The Ext3 generation token becomes more dynamic and used as the token.
  • These changes make the original extremely reliable ext3 unreliable.

For these reasons, starting in May, the developers decided to extract ext4 from ext3 for further development. The development of Ext4 started from that time, but most Linux users and administrators did not pay much attention to this issue. According to the release of kernel 2.6.19 in November 2006, ext4 was found in the mainstream kernel for the first time, but it was still in the specified kernel segment (still ), so many people have ignored it.

Since it is still in the development phase, the function list of ext4 has been changing since kernel 2.6.24.4 was started. The Pre-and pre-release features of Ext4 include the features developed from ext3, as shown in table 1.


Table 1. The pre-release and future features of Ext4 surpass ext3 

Function Zookeeper
Larger file systems Ext3 supports up to 32 TiB file systems and 2 TiB files. The root servers use the specific architecture and system settings, in fact, the maximum capacity may be lower than this number-maybe only 2 TiB file systems and 16 giibyte (GiB) files can be stored. In contrast, the file system capacity of Ext4 is 1024 pebibyte (PiB), or 1 exbibyte (EiB), while that of Ext4 is 16 TiB. This may not be important for general desktop computing machines and service providers, but it is very important for the use of large magnetic compute columns.
Extent Extent is a method to improve the efficiency of magnetic file descriptors. It can reduce the time required for large files.
Persistent shard allocation If an application needs to be allocated to it before using the magnetic field, most file systems are allocated by entering 0 to unused magnetic fields. Ext4 allows allocation in advance and does not need to perform the above operations, which can improve the performance of some data transmission and multi-media tools.
Deferred allocation Ext4 can extend the allocation of magnetic fields to improve performance.
More Sub-Projects If a project in ext3 can only contain 32,000 sub-projects and cannot meet your needs, you do not have to worry about it because ext4 has canceled this restriction.
Daily daily checksum Ext4 adds the query and (checksum) functions to daily data records, which improves reliability and performance.
Sort in the ghost magnet Although ext3 is generally not affected by fragments, the files stored in it may produce fragments. Ext4 can be organized in a magnetic array, which can improve the overall performance.
Restore deleted objects Although this function has not yet been implemented, ext4 will support restoring and deleting files. This function will be useful when files are accidentally deleted.
Faster File System Tracing Ext4 adds a new data structure.fsckDuring the checking, the unused parts in the magnetic field are skipped, which speeds up the checking of file systems.
Second hour Timestamp Most file systems (including ext3) contain time stamps accurate to seconds, while ext4 increases precision to second. Some data also indicates that the date supported by the time stamp of ext4 is as old as April 25, 2514, while that supported by ext3 is only as old as January 18, 2038.

As ext4 is still in the development segment, this menu will change. Some functions in the function list are not backward compatible with ext3 in actual use-that is, they may not be able to use the ext3 file system. However, ext4 retains the forward compatibility-you can use the same strongswan ext4 file system as before ext3 file system.

Use object of ext4

Ext4 changes the size of files and file systems. Therefore, the use of ext4 is most likely the use of the magnetic memory space of several TB. However, the function list in table 1 shows other attractive improvements. For example, if your project contains a large number of sub-projects or requires that the precision of the timestamp be smaller than one second, you may want to use ext4 for the duration.

Because ext4 is currently used in the specified segment, you must use it to re-initialize the internal kernel. Otherwise, the problem may occur when you use ext4. In fact, when ext4 is used in the response segment, it means that you only want to compile the code for the development of ext4, or are eager for some of its functions, in these cases, it is necessary to use it. If you want to obtain reliable support for large magnetic fields before the specified ext4 release, you can use XFS or JFS.

Of course, ext4 cannot be permanently applied to the segment. It will soon become a customized file system. In other words, ext4 will become the best choice for all users like ext3, but you need to pay attention to several questions. First, there are some bugs in ext4. Therefore, when the first version of ext4 was released, you should pay more attention to it. Second, the use of ext4 may cause some old versions of tools to be unable to issue the magnetic resonance. This will involve the crash recovery tool, so do not update it before confirming that the tool you are using supports ext4. On the other hand, we should be able to move from the ext3 billing method to ext4. If we need to save the existing data, we will actually see the latest migration.

 



First reply



Supported by zookeeper and activating ext4

After learning about these content, you may want to understand ext4. However, you must re-compile the internal core and add necessary support before running the program. I recommend using the latest internal core (the latest version 2.6.24.4 was written in this article ). First, release the internal kernel source code and manually set all selected or optimized kernel versions..configFile.make oldconfigConfigure the previous settings, and then select the first configuration command (for examplemake xconfig) View the internal kernel selection. You willFile SystemsSelect ext4 from the region,Ext4dev/ext4 extended fs support development (EXPERIMENTAL)(This name may change in the future, especially after the expiration date of the ext4 statement is announced ). Note: You must viewGeneralRegionPrompt for development and/or incomplete code/driversSelect region. You can also see the ext4 option here.

After selecting the ext4 support option, save the modifications to the inner core.makeIndicates the internal core, and passes the inboundmake modules_installRun the following commandroot. Then, the completed core (inarch/i386/bootOr other objects) when the cursor is placed to the specified position (for example/boot), Too many GRand uniied Bootloader (GRUB) or Linux Loader (LILO) configuration and re-compile the computer. If you are using a dynamic RAM magnet, you need to use a real application in the memory compaction process.mkinitrd.

In addition to the kernel module, you can also viewe2fsprogs. You can download a local document (Subject 1 provides a link) or usegit, As shown in List 1.


Bill 1. PassgitObtain the latest versione2fsprogsCommand 

                $ git clone git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git$ cd e2fsprogs$ git checkout -b puSwitched to a new branch "pu"$ git branch master* pu$ git pull git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git pu

 

Note that you may need to use the release Package Manager Securitygit. These tools need to be further developed, so they are not used in production systems, and many ext4 tools are not added for the moment. Therefore, you may prefer the stock delivered together with the producer release.e2fsprogsPackage.

e2fsprogsIs very standard:cdPackage decoding refers to the generated object category../configure, Ingressmake, And merge (root)make install.This process will cover the general rules of the releasee2fsprogsPackageTherefore, this operation is performed only when you are sure to use the latest (or unconfirmed) version of these tools.

 



First reply



Move the ext3 cursor to ext4

When the system moves to the internal kernel with the support of ext4, you can use the new file system. Therefore, you must configure a Redundant Array (RAID) partition or other storage space for a specific shard. Then it can be used as the ext4 file system and used as the entire file system.

Configure a device

If you want to start with the release list, you can use the new or release versione2fsprogsPackage (that ismkfs.ext3Ormkfs.ext4) The attached tool formats the partition or other settings. For example,mkfs.ext4 -j /dev/sda6Expired/dev/sda6Zones for use. Usemkfs.ext4A file system can be generated and many ext4-specific functions can be activated.

Currently,e2fsprogsThe program has not fully kept up with the internal core file system. Fortunately, most of the functions of the Inner-core mobile program do not need to bemkfs.ext4Or other real-world applications. When the quota file system is running, the ext4 function is activated. If you want to use ext4 on a large media set, you must explore the big data set and confirm the problems you encounter!

If you want to use the existing ext2 or ext3 file system as the ext4 file system, it is not feasible. You only need to configure the hosts according to the method described later. However, if you use some new functions, such as extent, the file system cannot be used together with the ext2 or ext3 mobile program.

Use ext4

To use a preset as an ext4 file system, you must useext4devFile System-class generation when copying it (when ext4 becomes ready, file system-class generation will changeext4). For example,mount -t ext4dev /dev/sda6 /mnt/pointIn/mnt/point/dev/sda6Optimized to the ext4 file system. These are the basic usage of ext4. Note: If the optionalist selects extent, the file system becomes unavailable when used as the ext3 file system. If you want to limit the value of ext4 to ext3 at the same time, you can use-o noextentsSelect to disable the extent function.

Once the quota is reached, you can use the ext4: Quota file, directly upload the file, and so on, just like any other file system. You will not notice any difference except when you encounter a bug or when the baseline is fixed.

Optimized integer ext4 performance Selection

Availabletune2fsProgram quota ext4 file system, the same way as the quota ext2 or ext3 file system. Currently,tune2fsNo selection specific to ext4 is provided, but standard-OSet the parameter value to ext4, for exampleextent.

When the file system is converted to ext4, the internal core starts to use functions specific to the file system, such as extent. As a result, the file system cannot be copied to the ext3 file system, which at least becomes very difficult.

The render manager uploads the ext3 File System to ext4 which can implement ext4-specific functions. The Compiler does not parse the data structure into a new format. For example, existing files are allocated in the distributed allocation mode instead of using extent. Therefore, the hosts file is not ready from the new function. However, the developers of ext4 have already considered this situation and provided a solution (HandlingSegment)e4defragThe tool (which will be introduced later) uses the extent function to allocate memory. Another new tool (not available) will change the inode size to a new format.

 



First reply



Ext4 File System

You can usee2fsprogsUsed to compile the ext4 file system. For exampletune2fsAfter the file system is created, the system selects an integer and usesfsck.ext4Checks the file system of the specified row. These programs are not very different between ext4 and ext3. However, as mentioned above, ext4 includes some features that can improve the latency.fsckPerformance Enhancement function.

In addition to these tools, a new tool is worth noting:e4defrag. This program can perform magnetic fragmentation on existing ext4 file systems. This can improve performance, especially when the file system space is about to run out. At the same time, it is also advantageous to allocate the ext2/3 Allocation Scheme Based on the ext4 allocation of extent, therefore, it can improve the performance of file systems that were previously used as ext3 file systems. Unfortunately,e4defragNot standard yete2fsprogsA part of the package. Therefore, you need to submit the package separately ).



Additional information

Student 

  • You can refer to the original article on the developerWorks global site.

  • We can see that the main ext4 wiki provides external information and links.

  • You can find more information about Linux developers in the developerWorks Linux region. Zookeeper's most popular articles and tutorials.

  • View All Linux tips and Linux tutorials on developerWorks.

  • Pay attention to developerWorks technical activity and online broadcast.


Products and technologies 

  • Eclipeclipsek for Linux contains two DVDs, which are from DB2? , Lotus? , Rational? Tivoli? And WebSphere? For Linux's latest IBM license.

  • Use an IBM repository built on developerWorks to create your next Linux development project.


Comment 

    • Join the developerWorks community with blog, forum, podcast, and community topics in the new developerWorks space.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.