docker devicemapper data file size increasing exponentially and consuming my host disk 90%

2.9k views Asked by At

My Docker details

Client:

 Version:      1.11.0
 API version:  1.23
 Go version:   go1.7.1
 Git commit:   4dc5990
 Built:
 OS/Arch:      linux/amd64

Server:

 Version:      1.11.0
 API version:  1.23
 Go version:   go1.7.1
 Git commit:   4dc5990
 Built:
 OS/Arch:      linux/amd64

Docker Info:

Containers: 2
 Running: 2
 Paused: 0
 Stopped: 0
Images: 4
Server Version: 1.11.0
Storage Driver: devicemapper
 Pool Name: docker-8:4-265450-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: ext4
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 5.829 GB
 Data Space Total: 107.4 GB
 Data Space Available: 3.752 GB
 Metadata Space Used: 7.508 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.14 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.93 (2015-01-30)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge
Kernel Version: 4.4.21-gentoo
Operating System: Gentoo/Linux
OSType: linux
Architecture: x86_64
CPUs: 3
Total Memory: 2.935 GiB
Name: valor-app-6
ID: 3PRF:EPCR:CIT5:WJCZ:WVOJ:OGGA:X6MA:BRLT:L2YE:7KUO:XT6G:RAHJ
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Registry: https://index.docker.io/v1/

My /var/lib/docker showing:

492K    containers
8.8G    devicemapper
20M     image
40K     network
4.0K    tmp
4.0K    trust
28K     volumes
8.8G    total

Only 2 containers are running on the host however the disk size is increasing day by day. Same docker version is being used on the other host/vm where no issue reported. Please help me.

Followed docker devicemapper data file size increasing exponentially #22659 but nothing found helpful.

1

There are 1 answers

3
yamenk On

You can try to clean up unused containers, dangling images, unused volumes ... using:

docker system prune --volumes -f