[AWS] [AmazonLinux] Error analysis of insufficient disk space with docker-compose

background

I got angry when I tried to start the container

python


# docker-compose up
ERROR: failed to register layer: Error processing tar file(exit status 1): write /usr/sbin/mysqld: no space left on device

Apparently the device has no capacity

Cause analysis

View free space on all file systems df command ・ ・ ・ Display partition size and free space for each partition

python


# df -h
Filesystem     1K-blocks    Used Available Use% Mounted on 
devtmpfs          485220       0    485220   0% /dev 
tmpfs             503468       0    503468   0% /dev/shm 
tmpfs             503468     704    502764   1% /run 
tmpfs             503468       0    503468   0% /sys/fs/cgroup 
/dev/xvda1       8376300 7869788    506512  94% / 
tmpfs             100696       0    100696   0% /run/user/1000 

Probably / dev / xvda1 is using 94% and can't download docker image. So what are you eating up to? After investigating, it seems that the original library is consuming capacity. It seems that there is no room in the Amazon free frame du command ・ ・ ・ Command to display disk usage

python


# du -sh /usr/*
817M    /usr/bin 
0       /usr/etc 
0       /usr/games 
28M     /usr/include 
344M    /usr/lib 
613M    /usr/lib64 
90M     /usr/libexec 
12M     /usr/local 
1.9G    /usr/sbin 
355M    /usr/share 
0       /usr/src 
0       /usr/tmp

Solution

Expand the disk capacity from 8GB to 12GB as long as it can be used at a minimum. (Note that those using AWS will probably be charged) See below for how to expand the disk capacity of Amazon Linux https://qiita.com/Ponkotwo/items/fd87d356fd3a735fde99

Recommended Posts

[AWS] [AmazonLinux] Error analysis of insufficient disk space with docker-compose
Sentiment analysis of tweets with deep learning
[AWS] Summary of CLI installation error countermeasures