The following commands are rquiered to expoand a partition and resize the file system of an EBS volume. Those steps work in EBS volumes including root volumes and can be done while they are attached to a running instance (zero downtime)
df -H
lsblk
Skip this step if the disk has no partitions (e.g. /dev/xvdf
)
sudo growpart /dev/xvda 1
lsblk
Use xfs_growfs
for XFS partitions (common in RHEL)
sudo resize2fs /dev/xvda1
df -H
If the disk has no partitions the
growpart
command is not necessary. See rancher/rancher#10203