Red Flag asianux Server 3 System Management: Ext3 file system

Source: Internet
Author: User
Keywords ASIANUX EXT3 File System
Tags added aliyun create data data integrity default file html

Ext3 is the log file system, which is designed as a ext2 http://www.aliyun.com/zixun/aggregation/6453.html "> upgraded version, ext3 added logging on ext2 basis. The default file system type in Redflag asianux Server 3 is ext3.

Characteristics of 2.3.1 Ext3

Usability

When an abnormal power outage or system crash occurs, ext2 can easily cause the file system to be in an inconsistent state. Rebooting requires a E2FSCK program to check the consistency of each ext2 file system that is mounted on the system, which not only delays a lot of time, but can also have serious consequences.

Because the Ext3 file system provides logging files, consistency checks occur only in rare hardware failures, and after a system outage or crash, the recovery time of the Ext3 file system typically takes only a few seconds to a few minutes.

Data integrity

The Ext3 file system provides more robust data integrity, which allows you to select the type and level of protection that data accepts.

Speed

Ext3 's logging mechanism optimizes the head movement of the hard drive, so although Ext3 writes data more than once, its total processing power is still higher in most cases than the ext2 system.

Compatibility

Backward-compatible EXT2,EXT2 file systems can be easily converted to ext3 systems, thus gaining the advantage of robust log file systems.

2.3.2 Create a Ext3 file system

The steps for creating the Ext3 file system are as follows:

1 Create partitions with parted or Fdisk partitioning tool;

2) using MKFS to format the partition into Ext3 file system;

3 Create mount points in the system tree;

4 Add the partition information to the Fstab file.

For a detailed explanation of the above steps, please refer to section 2.1.2: File system creation, loading, and unloading.

2.3.3 Conversion to ext3 file system

The TUNE2FS program can add a log file to the existing Ext2 file system without altering the existing data, and convert the Ext2 file system to the EXT3 format.

To convert the Ext2 file system to ext3, users are required to have superuser privileges, and the commands are as follows:

# tune2fs-j/DEV/HDB1

In the above command, suppose/DEV/HDB1 is the device name of the file system that you want to convert.

If you are converting a root file system, you also need to create a INITRD image file for booting the system. Use the MKINITRD program to create the Initrd file. For information about the MKINITRD command, please refer to its man page.

2.3.4 Restore to Ext2 file system

If you want to restore the Ext3 file system to the EXT2 format, you must first uninstall the partition. Enter command:

# UMOUNT/DEV/HDB1

In the above command, suppose/DEV/HDB1 is the device name of the file system that you want to convert.

Next, change the file system type back to ext2.

# Tune2fs-o ^HAS_JOURNAL/DEV/HDB1

Type the following command as Superuser to check for partition errors:

# e2fsck-y/DEV/HDB1

Then, mount the partition as the Ext2 file system by typing the following command:

# mount-t Ext2/dev/hdb1/mount/point

Next, delete the. journal file under the root directory. The method is to convert to the partition's Mount directory, and then type:

# rm–f Journal

When the above steps are complete, the file system is restored to ext2. If you want to permanently change the partition to the Ext2 file system, remember to update the Fstab file.

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.