Monday 27 July 2020

How to Resize EBS_data partition of AWS database instance









Modify configurations of live volumes with a simple few console clicks. Elastic Volumes makes it easy to dynamically increase capacity of any new or existing current generation volume with no downtime or performance impact.


Make note of pg_data Volume.

  1. Login to Instance using ssh.
  2. Please make a note of /dev/xvd<x>.

Make note of pg_data partition EBS ID.

  1. Login to the AWS EC2 console. https://console.aws.amazon.com/ec2
  2. In the left navigation pane, choose Instance.
  3. Select your instance.
  4. Under Block devices, click the device name, and note EBS ID. (Note EBS ID of device which you are going to increase, other than root device.)

Plan

Modify the Volume Size.

  1. Login to the AWS EC2 console. https://console.aws.amazon.com/ec2
  2. In the left navigation pane, choose Instance.
  3. Select your instance.
  4. In the left navigation pane, choose Volume.
  5. Select the currently attached volume with EBS ID which you have noted in Preparation step 4 and choose Actions, Modify Volume.
  6. In Size tab , Increase the size specify by DBA ( For eg: Current Size is 250GiB and DBA requested to increase by 50GiB then in Size tab the new size will be 300GiB )
  7. Click on Modify and Yes.

Resize the Volume.

  1. Login to Instance using ssh.
  2. Resize the file system.
    resize2fs /dev/xvd<x>