Search code examples
dockerstoragecentos6.5

centos 6.5:Cannot connect to the Docker daemon, the storage issue


I was debugging my dockerfile and downloaded some huge packages too many times. Now everytime i run any docker instructions, there's always "Cannot connect to the Docker daemon". I checked a bit and I think it's because the storage is full. But I have no idea how to fix this. Can anyone help me out? Here's a snapshot of the error. A snapshot

INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
WARN[0000] You are running linux kernel version 2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.10.0.
INFO[0000] [graphdriver] using prior storage driver "devicemapper"
WARN[0000] Running modprobe bridge nf_nat failed with message: , error: exit status 1
ERRO[0001] Error during graph storage driver.Cleanup(): device or resource busy
FATA[0001] Error starting daemon: Some kind of disk I/O error occurred: disk I/O error

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvde       7.9G  7.9G     0 100% /

Solution

  • You should upgrade your kernel, Docker does not play too well with 2.6.

    Now, assuming it was working anyway, you partition as only 8Gb, which is very low. Once you run out of space, you can endup in a situation where you can't cleanup and reduce your disk usage. I know Docker did a lot of work over the past couple of years towards it, but Devicemapper (your storage driver) used to require some disk space in order to remove anything.

    In your current situation, you probably want to call it a day and destroy everything and start again with a bigger partition (and a newer kernel if possible).