GithubHelp home page GithubHelp logo

ebs-shrinker's Introduction

Ansible Playbook for reducing AWS EBS volume size

EC2 instances use EBS volumes as storage. While AWS supports increasing volume size, size decrease is not supported.

Tasks

create a new volume of smaller size, tag it

attach the new volume to the instance

create a filesystem and mount it

rsync -avzh /data to new disk

stop the instance

detach an old volume

detach a new volume

attach new volume and mount into the correct drive

start instance

Few things to consider

If your instance have a lof of new data coming in and you want min donwtime, you can rsync all your data first, then stop your application and rsync data again.

The second start instance attempt can be removed if you're sure that the first will succeed.

You might want to check that your app is up after starting the instance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.