2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
It is recommended to back up important data in advance.
Take the expansion of the root directory to 50G as an example:
umount /home
lvremove /dev/mapper/centos-home
lvextend -L +50G /dev/mapper/centos-root
xfs_growfs /dev/mapper/centos-root
lvcreate -L 20G -n /dev/mapper/centos-home
mkfs.xfs /dev/mapper/centos-home
mount /dev/mapper/centos-home
Note: Different versions of the system may have different names for the files under /dev/. You can use the lsblk command to query the specific names and then perform corresponding operations.