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:
- Go to your EC2 instance and click Storage
- Click on the Action and modify the EBS volume size(eg.30G to 100G)
-
Reboot EC2 instance (Important! or you wonโt see it any changes!)
-
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!