DevOps: Diffusion Marketplace Extending and Resizing Root volume dev xvda within Server - department-of-veterans-affairs/diffusion-marketplace GitHub Wiki
Extend root volume (AWS Dashboard)
- Check the box for the instance you want to extend
- Click on the storage tab below and find the volumes
- Click on the volume hyperlink and select the checkbox
- Select modify and add the additional storage desired
Steps to extend the Root Volume (AWS CONSOLE)
Ensure you have extended the volume within the AWS EBS dashboard to be larger than the default 32 GiB.
- Check the allocation and available disk space
df -hT
- Checks how much disk space is available, mount points, and type of storage device
lsblk
- Check the size of the root volume group
sudo vgs
- Grow the partition that is housing the volume group from the newly added storage
sudo growpart /dev/xvda 2*To check that the storage has been increasedlsblk- Should look similar to this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 100G 0 disk
├─xvda1 202:1 0 8G 0 part /
└─xvda2 202:2 0 28G 0 part
├─rootvg-tmp 253:0 0 5G 0 lvm /var/tmp
├─rootvg-var 253:1 0 5G 0 lvm /var
├─rootvg-varlog 253:2 0 5G 0 lvm /var/log
├─rootvg-varaudit 253:3 0 10G 0 lvm /var/log/audit
└─rootvg-home 253:4 0 1G 0 lvm /home
- Resize the volume specific in the /dev directory
sudo pvresize /dev/sda2
- Confirm a size increase for the root volume
sudo pvs
- Allocates ALL the available free space to the root volume
- IF you only want a certain amount allocated then use
-L #GB /path sudo lvextend -l +100%FREE /dev/rootvg/var
- IF you only want a certain amount allocated then use
- Extend the root volume with the allocated free space
sudo xfs_growfs /dev/rootvg/var