Change the values accordingly if you will increase the partition by a different value.
- Increase DS AMI /dev/sdb EBS volume depending on your required disk space.
The default size is 128GB which is already partitioned automatically during deployment. For example, if you need to increase /var partition by 20GB, change EBS size to 148GB. You can find the /dev/sdb EBS volume at EC2 description page.
After increasing EBS volume, it will take at least 1 minute to reflect in AMI, run the following command to verify:
lsblk
Expected output:
- Resize physical volume of /dev/sdb:
pvresize /dev/sdb
Expected output:
- Extend logical volume for /dev/mapper/hardenedpartitions-var:
lvextend -L 55G /dev/mapper/hardenedpartitions-var
Note that 55G means changing the partition size to 55GB. You may change the value depending on your requirements.
Expected output:
- Extend file system:
resize2fs /dev/mapper/hardenedpartitions-var
Expected output:
- Verify /var partition change:
df -h
Expected output: