Cloud Insidr

Cybersecurity in the Age of the Machine

  • Subscribe!
  • Privacy Policy
  • Legal
  • Contact Us

Join us on Twitter: @CloudInsidr

  • news & alerts
    • events
    • industry analysis
    • industry gossip
    • people
  • cloud, edge & co.
    • AWS
    • administration & orchestration
      • web servers in the cloud
      • mail servers
      • databases
  • cybersec & warfare
    • encryption
  • blockchain
Home cloud, edge and everything in between tips and tricks How to expand the EBS boot volume of a Linux-based EC2 instance
Symantec Code Signing (728*90)
How to expand the EBS boot volume of a Linux-based EC2 instance

Cloud Insidr 2018-06-10 Leave a Comment

How to expand the EBS boot volume of a Linux-based EC2 instance

This is easier than you probably think: AWS will expand the EBS boot volume of an EC2 instance running Linux automatically when you launch a new instance off of it with the desired capacity.

Here is how it works in more detail.

Step 1. Check storage space utilization

Check the storage space utilization using the command:

df -h

This gives you an output in a human-readable form.

Check storage space utilization on Linux
Check storage space utilization on Linux before you expand the EBS boot volume

If you would rather check the size of individual items in the root directory, use this command (add the -x flag to skip items located on other file systems):

du -hs /* | sort -h

The du command shows you the totals (-s) for each item (*) at root (/) in a human-readable form (-h), and pipes its output to the sort command. The sort command orders the results in human-readable form (-h).

Step 2. Create a new AMI based on the instance you want to modify.

Stop any services on the instance you want to modify, then stop the instance (any data on ephemeral storage will be lost). Create a new AMI based on the stopped instance. This ensures that any data you saved will persist to the new instance.

Step 3. Launch a new instance based on the AMI

Launch a new instance based on the newly created AMI.

When configuring the storage details of the new instance, increase the size of the boot volume. If you want to use an existing reservation to cover the costs, make sure you select the same settings as for the original instance (instance type, region/zone, etc.).

Step 4. Reassign EIP and terminate the old instance

Reassign your EIP to the new instance and restart any services that need restarting.

Step 5. Terminate the old instance

Terminate the old instance. Remember to delete any leftover resources which you no longer need.

Filed Under: tips and tricks Tagged With: AMI, AWS, EC2, Linux

Comodo Elite SSL (OV) (728*90)

Join Cloud Insidrs!

Symantec Code Signing (200x200)

Tag Cloud

#1 on the TOP500 super computer list AMI AWS AWS CloudHSM AWS EC2 AWS EFS AWS RedShift CentOS certificate cipher suites cryptography cyber security cybersecurity Diffie-Hellman DNS EC2 ECDHE edge devices email encryption Fedora Google HSTS HTTP/2 HTTPS IBM IPv4 kernel Linux mail Mellanox MFA MITM NGINX NVIDIA OpenSSL perfect forward secrecy RSA rsync SSL TLS TLS 1.2 TLS 1.3 TLS vulnerabilities Windows
Secure Site with EV (160x600)

Pearson Education (InformIT)

Pearson Education (Peachpit)

Thawte Code Signing (200x200)

  • Content purchasing and syndication