Skip to content

Instantly share code, notes, and snippets.

@gyfoster
Last active February 1, 2021 16:06
Show Gist options
  • Save gyfoster/0cf8c25e8b83cffabebbf6e3825f3347 to your computer and use it in GitHub Desktop.
Save gyfoster/0cf8c25e8b83cffabebbf6e3825f3347 to your computer and use it in GitHub Desktop.
# Run these commands after increasing the size of your volume in the AWS console to use the new space.
# list storage usage by volume
df -h
# let's say the filled up volume is called /dev/mapper/VolGroup00-rootVol
# list block devices to get the name of the filled up block device
lsblk
# let's say VolGroup00-rootVol is under nvme0n1p2
# extend the partition size of partition 2 of the nvme0n1 block device
growpart /dev/nvme0n1 2
# resize the physical volume
pvresize /dev/nvme0n1p2
# extend the logical volume to take up all avaialbe space within the resized physical volume
lvextend -r -l +100%FREE /dev/VolGroup00/rootVol
# run lsblk and df -h to see new sizes of volume/device
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment