How to extend filesystem on Linux (root and other)
How to extend filesystem on Linux (root and other)
===================================================
Install command tools growpart :
# yum -y install cloud-utils-growpart
Check the condition of the disk and its structure
# lsblk # df -h
Extend your desired disk size (root partition or other)
and scan your changes on disk storage :
# $ ls /sys/class/scsi_device/ 0:0:0:0 1:0:0:0 # echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan # echo 1 > /sys/class/scsi_device/1\:0\:0\:0/device/rescan
Check your changes size disk :
# lsblk
Growth your partition LVM root (/dev/sda2) :
# growpart /dev/sda 2
Resize root logical volume to occupy all space :
# pvresize /dev/sda2 # lvextend -r -l +100%FREE /dev/name-of-volume-group/root
Update changes on the filesystem
# df -h # xfs_growfs /