icordoba
icordoba

Reputation: 1899

docker start: no space left on device

I found one of my containers down. It is the second time I have this problem. When I try to bring it up with docker start I get:

Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:359: container init caused \\"rootfs_linux.go:89: jailing process inside rootfs caused \\\\"can't create pivot_root dir , error mkdir /var/lib/docker/devicemapper/mnt/da2101d43e6c8200eb22a4415b0aedf8033c7c701a19392217b8947738a723bf/rootfs/.pivot_root592021975: no space left on device\\\\"\\"\"\n" Error: failed to start containers: mydockername

Any idea why I am getting this no space left on device? Host volume is only 6% occupation.

I am using CentOS Docker version 1.12.3, build 6b644ec

Upvotes: 1

Views: 4889

Answers (2)

Amit Talmor
Amit Talmor

Reputation: 8184

on MAC OSX, this will help you out, deleting old, obsolete stuff:

docker rm $(docker ps -q -f status=exited)
docker rmi $(docker images -q -f dangling=true)
docker volume rm $(docker volume ls -qf dangling=true)

Upvotes: 1

simon lan
simon lan

Reputation: 21

Disk space of container is limited, not the host space. Default limit of container disk space is 10G. If docker storage is devicemapper, can mount the container filesystem and delete some logs. Then you can start the container.

~# docker start centos3_50_pay

Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused "rootfs_linux.go:89: jailing process inside rootfs caused "can't create pivot_root dir , error mkdir /var/lib/docker/devicemapper/mnt/96fd436942ce6c9a618ccea9c52f5e9b766065db9e7edf870967b27fbaf3f9bf/rootfs/.pivot_root558329180: no space left on device"

Error: failed to start containers: centos3_50_pay

~# docker inspect centos3_50_pay | grep Device  
        "Devices": [],
            "DeviceId": "467",
            "DeviceName": "docker-253:0-3222880762-96fd436942ce6c9a618ccea9c52f5e9b766065db9e7edf870967b27fbaf3f9bf",
            "DeviceSize": "10737418240"

~# cat /var/lib/docker/devicemapper/metadata/ \
       96fd436942ce6c9a618ccea9c52f5e9b766065db9e7edf870967b27fbaf3f9bf
{"device_id":467,"size":10737418240,"transaction_id":736,\
 "initialized":false,"deleted":false}

~# echo "10737418240/512" |bc
 20971520
~# dmsetup ls
 docker-thinpool (253:5)                           

~# dmsetup create tmp --table "0 20971520 thin /dev/mapper/ \
    docker-thinpool 467"
~# mount /dev/mapper/tmp /root/tmp
~# cd /root/tmp/rootfs/
~# ll
~# umount /root/tmp
~# dmsetup remove tmp
~# docker start centos3_50_pay
 centos3_50_pay

Upvotes: 2

Related Questions