The open blogging platform. Say no to algorithms and paywalls.

Fast Way to Fix AWS EC2 Instance Error: 'No space left on the disk'

A step-by-step guide to fixing AWS EC2 instance error: 'No space left on the disk'.

When I run my Jenkins job which is hosted on an AWS EC2 as the build server, it shows an error, “No space left on the disk.” This message is quite straightforward since when you check your instance disk space with

df -h 

there is no space left on the disk. (/dev/nvme-n1p1 shows 100% usage)

The goal is to increase the EBS volume size. There are many ways to solve this, but I found the following solution is the most concise.

Steps:

  1. Go to your EC2 instance and click Storage

  1. Click on the Action and modify the EBS volume size(eg.30G to 100G)

  1. Reboot EC2 instance (Important! or you won’t see it any changes!)

  2. Check again with

df -h

for your instance, the disk size should be changed to what you newly set. (/dev/nvme-n1p1 shows 27% usage).

All Done!




Continue Learning