Red Hat/CentOSext4 cannot format large partitions supplement ext4 formatting Method

Source: Internet
Author: User

Red Hat/CentOSext4 cannot format large partitions supplement ext4 formatting Method

In general, XFS may cause data loss in the case of massive small file I/O scenarios. In this scenario, inode occupies a large amount of teaching resources.

The above method is used for formatting, and the number of inode is small. Through a large number of tests, you can use the following method to improve the file system performance after mkfs. ext4.

Method: In the/etc/mke2fs. conf file and ext4 configuration, enable the 64-bit function.

[Root @ node21 ~] # Cat/etc/mke2fs. conf
[Defaults]
Base_features = sparse_super, filetype, resize_inode, dir_index, ext_attr
Blocksize = 4096
Inode_size = 256
Inode_ratio = 16384

[Fs_types]
Ext3 = {
Features = has_journal
}
Ext4 = {
Features = has_journal, extent, huge_file, flex_bg, uninit_bg, dir_nlink, extra_isize
Auto_64-bit_support = 1 ### Add a new row, telling the system to format in 64-Bit mode. Avoid error directly reported by mkfs. ext4.
Inode_size = 256
}
Ext4dev = {
Features = has_journal, extent, huge_file, flex_bg, uninit_bg, dir_nlink, extra_isize
Inode_size = 256
Options = test_fs = 1
}
Small = {
Blocksize = 1024
Inode_size = 128
Inode_ratio = 4096
}
Floppy = {
Blocksize = 1024
Inode_size = 128
Inode_ratio = 8192
}
News = {
Inode_ratio = 4096
}
Largefile = {
Inode_ratio = 1048576
Blocksize =-1
}
Largefile4 = {
Inode_ratio = 4194304
Blocksize =-1
}
Hurd = {
Blocksize = 4096
Inode_size = 128
}
[Root @ node21 ~] #

[Root @ node21 ~] # Df-h
Filesystem Size Used Avail Use % Mounted on
/Dev/sda3 259G 29G 217G 12%/
Tmpfs 16G 0 16G 0%/dev/shm
/Dev/sda1 194 M 34 M 151 M 19%/boot
/Dev/sdf1 39 T 21 T 18 T 54%/mnt/source
/Dev/md127 5.4 T 1.8 T 3.4 T 35%/public
/Dev/sdg1 22 T 42G 21 T 1%/mnt/public_back
[Root @ node21 ~] # Df-I
Filesystem Inodes IUsed IFree IUse % Mounted on
/Dev/sda3 17195008 383263 16811745 3%/
Tmpfs 4106354 1 4106353 1%/dev/shm
/Dev/sda1 51200 41 51159 1%/boot
/Dev/sdf1 8203124224 34192419 8168931805 1%/mnt/source ### XFS file system, 40 TB capacity.
/Dev/md127 366288896 2338559 363950337 1%/public
/Dev/sdg1 1464844288 295 1464843993 1%/mnt/public_back ### ext4 file system, with a capacity of 22 TB.

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.