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.
[[Email protected] ~] # 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
}
[[Email protected] ~] #
[[Email protected] ~] # 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
[[Email protected] ~] # 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.
Red Hat/centos ext4 cannot format large partitions supplement ext4 formatting Method