Why is docker image eating up my disk space that is not used by docker

0 votes

I have setup docker and I have used completely different block device to store docker's system data:

[root@blink1 /]# cat /etc/sysconfig/docker
# /etc/sysconfig/docker
other_args="-H tcp://0.0.0.0:9367 -H unix:///var/run/docker.sock -g /disk1/docker"
Note that /disk/1 is using a completely different hard drive /dev/xvdi
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      7.8G  5.1G  2.6G  67% /
devtmpfs        1.9G  108K  1.9G   1% /dev
tmpfs           1.9G     0  1.9G   0% /dev/shm
/dev/xvdi        20G  5.3G   15G  27% /disk1
/dev/dm-1       9.8G  1.7G  7.6G  18% /disk1/docker/devicemapper/mnt/bb6c540bae25aaf01aedf56ff61ffed8c6ae41aa9bd06122d440c6053e3486bf
/dev/dm-2       9.8G  1.7G  7.7G  18% /disk1/docker/devicemapper/mnt/c85f756c59a5e1d260c3cdb473f3f4d9e55ac568967abe190eeaf9c4087afeac

The problem is that when I continue download docker images and run docker containers, it seems that the other hard drive /dev/xvda1 is also used up.

Jul 31, 2018 in Docker by Hannah
• 14,080 points
71 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

It's a kernel problem with devicemapper, which affects the RedHat family of OS (RedHat, Fedora, CentOS, and Amazon Linux). Deleted containers don't free up mapped disk space. This means that on the affected OSs you'll slowly run out of space as you start and restart containers.

uninstall docker, then delete all its files, then reinstall:

sudo yum remove docker
sudo rm -rf /var/lib/docker
sudo yum install docker
answered Jul 31, 2018 by Kalgi
• 35,750 points
0 votes

Move the /var/llib/docker directory.

Assuming the /root directory has enough room, if not, substitute for one that does,

sudo systemctl stop docker
mv /usr/lib/docker /root
ln -s /root/docker /var/lib/docker
systemctl start docker
answered Aug 6, 2018 by Nilesh
• 6,900 points

Related Questions In Docker

0 votes
1 answer

Why is my docker installation failing?

First off check if virtualbox is running; ...READ MORE

answered Jul 31, 2018 in Docker by Sophie may
• 9,050 points
11 views
+1 vote
4 answers

COPY is not working in Docker

I had the exact same issue. I ...READ MORE

answered May 6 in Docker by Emilia
612 views
0 votes
1 answer
0 votes
1 answer

Slave image does not support running docker

You need to install docker client and ...READ MORE

answered Jul 19, 2018 in Docker by Kalgi
• 2,620 points
168 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,120 points
56 views
0 votes
6 answers

docker: executable file not found in $PATH

file not found in $PATH READ MORE

answered May 9 in Docker by anonymous
4,664 views
0 votes
1 answer

How to push a docker image to a private repository

You need to tag your image correctly ...READ MORE

answered Jul 26, 2018 in Docker by Kalgi
• 35,750 points
44 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.