Skip to content

Instantly share code, notes, and snippets.

@AndreySemechkov
Last active March 4, 2021 12:53
Show Gist options
  • Save AndreySemechkov/ee2eeb5a45d9e7ea5dea735557c269d6 to your computer and use it in GitHub Desktop.
Save AndreySemechkov/ee2eeb5a45d9e7ea5dea735557c269d6 to your computer and use it in GitHub Desktop.
Resize storage volumes available on an EC2
# commands to resize volumes, for example useful to utilize more storage after resizing an attached EBS manually
# Expand the PV on /dev/sda1 after enlarging the partition with fdisk:
pvresize /dev/sda1
# Extends the size of the logical volume "vg01/lvol10" by 1GiB
# on physical volume /dev/sda1. This is only possible if /dev/sda1 is a member of volume group vg01 and there are enough free physical extents in it:
lvextend -L +1024 /dev/vg01/lvol10 /dev/sda1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment