Increase disk space of a new AWS instance
The following topic explains how to increase the disk space of a newly deployed AWS instance (running CentOS 7) by extending your out-of-the-box storage device.
The AlgoSec AMI comes with 250 GB in the data partition. After you deploy it in a AWS environment, according to your sizing, you may need to increase the disk space of your newly deployed AWS instance.
Do the following:
During the Add Storage phase of the setup process, increase disk space on your AWS instance.
-
Set volume to the disk size you want (up to 6TB)
-
Run lsblk to check that the disk size was changed:
-
Start the machine and run the following command:
fdisk -l
Verify the disk is 6TB (for example) and take note of its name.
-
Run the following:
parted /dev/nmve1n1 (should be as the name in fdisk)
-
Run the following"
mklabel gpt
unit TB
mkpart primary 0.00TB 6.00TB
print
Notice that the partition size has been increased.
-
Quit the parted, run:
quit
-
Run:
vgextend centos /dev/nvme1n1
Then run:
vgdisplay
You maybe asked to wipe signatures. In this case run:
yes
-
Run:
lvdisplay
Take note of LV path
-
Run:
lvextend /dev/centos/data /dev/nvme1n1
Then run:
lvdisplay
-
Run:
xfs_growfs /dev/centos/data
-
Verify /data is now 6TB (for example):
-
Perform a reboot
-
check using the df -h command that the /data partition shows the additional storage.