Expand EBS volume and extend logical volume

 1. Modify the target EBS volume to increase it's size

2.  sudo pvs 

--> to check the pv that needs to be resized inside the instance


3. sudo pvresize /dev/xxxxxxx  displayed in the step 2

4. sudo pvs 

-> to the the new volume size

5. sudo vgs 

-> to see the detailed vgs

6. sudo lvextend -L +20G /dev/vg_name/lv_name

7. df -kh 

-> to check the current value before  extending

8. sudo xfs_growfs /dev/vg_name/lv_name

df -h

to check the current value after extending

#IF YOUR filesystem is ext4, please change the xfs_growfs to another value

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch