When deleting files in a docker container, the DM pool doesn’t free up space

System: long-running container that creates/delete files. Host is a RHEL7.2 (kernel 3.10.0-327.el7.x86_64) machine, with Docer v1.8.2 backed by a “loop-lvm” devicemapper pool.

Symptom: despite the container also deletes files, the available space in the devicemapper pool only shrinks and never increases.

Possible solution: run “fstrim /” from inside the container. Note that this requires you to run it in ‘privileged’ mode.


Tweaking docker devicemapper storage in Red-Hat based distributions

If you are using docker on Red-Hat based distributions, then devicemapper is your default filesystem for backing docker.

In case you want to change some of its default settings (i.e. if pool size of 100Gb is not enough), have a look at the “real docs” for RH7 or at this page for other distributions.

If you want to dig deeper, in this other page you will find a pretty detailed comparison of the different filesystems options available for RH.

Executing a shell in a running docker container

In case you have a docker container on which you need a shell, and you don’t have it (e.g. it runs in the background, no sshd runs on it, …), you can have a shell on it by executing:

docker exec -it <container_name> /bin/bash



Checking what Jenkins is actually doing

If you have a fancy jenkins configuration, and your jobs don’t behave as you expect, you might use this nice feature of Jenkins for obtaining the thread dump of the Jenkins threads.

Just go to the URL: