By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Decrease the volume size of an EBS

0

Hello, I need support to reduce the volume size of an EBS from 1500gb to 100gb without losing data and system settings. Is it possible?

asked 21 days ago37 views
1 Answer
0

Using pure native tools you can only increase the size of your EBS volume, not decrease it. To decrease it we need to make a new volume then copy the data over. Please take additional considerations in case the volume is bootable, if so test for booting functionality in a test copy before committing to prod.

Typically I would:

  • -~~Take a snapshot of the volume after shutting down the instance. ~~(As Leo noted in the note, this is not needed in this case since it wouldn't help.)
  • -Use the snapshot to create a new volume to match the size (If it doesn't fit under 100GB you will have to manage data yourself to get to your ideal size of 100GB)
  • -Attach it to the instance
  • -Depending on our OS, use your appropriate tool to ensure it is recognized by the OS such as creating partitions using fdisk on Windows.
  • -Copy all teh data.
  • -Again if we are booting from this volume ensure you handle your boot loaders in this case.
  • -Finally shutdown the instance to deattach the old drives, handle any bootable drive items such as making it bootable.
  • -Reboot

Ensure you test this if you are on production on a non production environment if possible.

For more information check out these docs: https://docs.aws.amazon.com/ebs/latest/userguide/requesting-ebs-volume-modifications.html

AWS
answered 21 days ago
  • You can't create a 100-GiB volume from a 1500-GiB snapshot. Creating a snapshot before doing anything else is a good idea, but only for backup purposes. The resizing effort goes as you started to explain, but instead of creating a new volume from the snapshot, they should create an empty volume of 100 GiB, attach it to the instance, and while both the 1500-GiB old volume and the 100-GiB new empty volume are attached, copy the data over. Finally, unmount and detach the old EBS volume from the instance, and mount the file systems from the new volume.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions