Views:
 
In the following example, /var partition is increased by 20GB causing the following values: EBS volume increased to 148GB, /var increased to 55GB.
Change the values accordingly if you will increase the partition by a different value.
 
  1. 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:

  2. Resize physical volume of /dev/sdb:

    pvresize /dev/sdb

    Expected output:

  3. 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:

  4. Extend file system:

    resize2fs /dev/mapper/hardenedpartitions-var

    Expected output:

  5. Verify /var partition change:

    df -h

    Expected output: