Home > System Tutorial > Linux > body text

Analysis of the operation details of XFS file system in CentOS7 system

王林
Release: 2023-12-29 10:31:20
forward
1206 people have browsed it

Xfs is the default file system type of CentOS7.0. Different file system types have different creation, inspection, and adjustment commands. Pay attention to the distinction.

Adjust Xfs partition size (can only be increased):

lvextend -L 120G /dev/mapper/centos-root # Increase to 120G

lvextend -L 20G /dev/mapper/centos-root # Add 20G

xfs_growfs /dev/mapper/centos-root #Perform adjustments

Note: The adjustment command for ext2/ext3/ext4 is resize2fs, as follows:

lvextend -L 120G /dev/mapper/centos-root # Increase to 120G

lvextend -L 20G /dev/mapper/centos-root # Add 20G

lvreduce -L 50G /dev/mapper/centos-home # Reduce to 50G

lvreduce -L -8G /dev/mapper/centos-home # Reduce 8G

resize2fs /dev/mapper/centos-root # Execute adjustment

Repair command:

xfs_repair /dev/sdb1

Note: The following are the repair commands for Jfs, Ext2, and Ext3 respectively:

fsck.jfs -y /dev/sdb1

fsck.ext2 -y /dev/sdb1

fsck.ext3 -y /dev/sdb1

Problems encountered during adjustment:

1. After using the mke2fs command on the Xfs file system, it becomes ext2. You need to modify the corresponding file system type in the file /etc/fstab

2. Different file system types have different creation, inspection, and adjustment commands. Pay attention to the distinction

The above is the detailed content of Analysis of the operation details of XFS file system in CentOS7 system. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!