Centos7 adjusts the size of the root directory mount partition

Centos7 adjusts the size of the root directory mount partition#

Label: Adjust centos partition sizecentos

  1. Situation preview​​

Second, the steps

  1. Terminate the /home process

fuser -m -v -i -k /home​

  1. Backup /home

cp -r  /home/  homebak/

  1. Uninstall​ /home

umount /home

​4. Delete the lv where /home is located

lvremove /dev/mapper/centos-home

  1. Extend the lv where /root is located, add 100G

lvextend -L +100G /dev/mapper/centos-root

​6. Extended/root file system

xfs_growfs /dev/mapper/centos-root

  1. Recreate home lv

lvcreate -L 40G -n home centos

​8. Create a file system

mkfs.xfs /dev/centos/home

  1. Mount

​mount /dev/centos/home /home

  1. Restore /home related files and corresponding directory permissions

  2. result:

​Three, attach a screenshot of the operation

Recommended Posts

Centos7 adjusts the size of the root directory mount partition
Centos7.5 expands the space size under the root directory
CentOS7.x system root directory partition expansion
How to extend the root directory of LVM under Ubuntu system
Centos install sshfs to achieve mount directory
Centos install the latest version of cmake
Centos 8.1.1911 solves the problem of yum reinstallation
The fourth installment of Zabbix under CentOs7
[Centos8] The bumpy process of installing docker
Expand the disk size of Ubuntu under VMware
Summarize the knowledge points of Centos7 system reinforcement
ubuntu adjusts the priority of swap swap space usage
The actual combat of rpm packaging under CentOS6
Mount the disk in a directory under Ubuntu 18.04
Explain the implementation of Centos8 static IP configuration
Modify the default encoding of mysql5.6 under CentOS7