Fix docker

I used docker for building Yocto linux images and it used up the space.

# docker info
...
 Data Space Used: 107.4 GB
 Data Space Total: 107.4 GB
 Data Space Available: 0 B
...

The thin pool (?) is 100GB (107.4GB) and it is full.

I found this dicussion on github.

You need to increase the pool allowed for your containers. To do this , you will need to remove your var/lib/docker which will destroy all your containers and images.

Devicemapper running out of space can be very tricky indeed; We’re tracking issues around this in docker#20272.

For Docker 1.11, there’s a new option to specify a minimum amount of free space to be kept, and would prevent you from arriving in this situation; see docker#20786

# docker version
Client:
 Version 1.12.6
 ...

I could fix the issue by following the instruction on docker site (Manage application data / Store data within containers / Use the Device mapper storage driver # Increase capacity on a running device).

I didn’t do everything it says though.

# ls -lh /var/lib/docker/devicemapper/devicemapper/
total 100G
-rw-------. 1 root root 100G Dec 27 02:49 data
-rw-------. 1 root root 2.0G Dec 31 19:41 metadata
# cd /var/lib/docker/devicemapper/devicemapper/
# truncate -s 200G data
# ls -l
total 104443200
-rw-------. 1 root root 214748364800 Dec 31 20:01 data
-rw-------. 1 root root   2147483648 Dec 31 19:41 metadata
# systemctl restart docker
# docker info
 ...
 Data Space Used: 107.4 GB
 Data Space Total: 214.7 GB
 Data Space Available: 107.4 GB