Home  >  Article  >  System Tutorial  >  Analysis of the operation details of XFS file system in CentOS7 system

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

王林
王林forward
2023-12-29 10:31:201351browse

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!

Statement:
This article is reproduced at:jb51.net. If there is any infringement, please contact admin@php.cn delete