Operations on the Xfs file system in CenOS7

Source: Internet
Author: User
Xfs is the default file system type of CentOS7.0. different file system types have different creation, check, and adjustment commands. Adjust the Xfs partition size (can only increase): lvextend-L120G/dev/mapper/centos-root # increase to 120Glvextend-L + 20G/dev/mapper/centos-root & nb

Xfs is the default file system type of CentOS7.0. different file system types have different creation, check, and adjustment commands.

Adjust the Xfs partition size (only increase ):

Lvextend-L 120G/dev/mapper/centos-root # increase to 120G

Lvextend-L + 20G/dev/mapper/centos-root # increase by 20G

Xfs_growfs/dev/mapper/centos-root # execute the adjustment

 

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 # increase by 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 the adjustment

 

Repair Command:

Xfs_repair/dev/sdb1

 

Note: the repair commands for Jfs, Ext2, and Ext3 are as follows:

Fsck. jfs-y/dev/sdb1

Fsck. ext2-y/dev/sdb1

Fsck. ext3-y/dev/sdb1

 

 

Problems encountered during adjustment:

1. run the mke2fs command on the Xfs file system and change it to ext2. you need to modify the file system type in the file/etc/fstab.

2. different file system types correspond to different creation, check, and adjustment commands.

Related Article

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.