Created
December 5, 2019 19:58
-
-
Save ptheofan/ff9ab5eb99ca328e16fe2f9ba3c063f9 to your computer and use it in GitHub Desktop.
Resize AWS EBS volume
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. First go to the console, click the volume, actions and grow it. | |
2. ssh to the machine | |
```bash | |
> lsblk | |
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
loop0 7:0 0 89.1M 1 loop /snap/core/8039 | |
loop1 7:1 0 18M 1 loop /snap/amazon-ssm-agent/1480 | |
loop2 7:2 0 89.1M 1 loop /snap/core/8213 | |
nvme0n1 259:0 0 40G 0 disk | |
└─nvme0n1p1 259:1 0 40G 0 part / | |
# grow the partition to the new disk size (DEVICE is nvme0n1 - withought the p1) | |
> growpart /dev/nvme0n1 1 | |
# Resize the partition to the new size (notice the p1 this time) | |
> resize2fs /dev/nvme0n1p1 | |
# done. | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment