moby: docker 1.4 and "Driver aufs failed to remove root filesystem", "device or resource busy"
I don’t think I saw this under docker 1.3.x on aufs (boot2docker on OSX), though I have with devicemapper on centos server. Got this error after upgrading docker server, retrying the fig up
worked.
I use brew
and my docker client is still 1.3.2. Just saw the warning in the log below, I guess that’s not really supported? I’ll try upgrading docker client manually.
$ docker version
Client version: 1.3.2
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): 39fa2fa
OS/Arch (client): darwin/amd64
Server version: 1.4.0
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 4595d4f
$ fig -f dns-fig.yml -p dns up -d
Recreating dns_hardfile_1...
Recreating dns_dnsmasq_1...
Cannot destroy container 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: Driver aufs failed to remove root filesystem 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: rename /mnt/sda1/var/lib/docker/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727 /mnt/sda1/var/lib/docker/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727-removing: device or resource busy
time="2014-12-14T20:21:27Z" level="info" msg="Container 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727 failed to exit within 10 seconds of SIGTERM - using the force"
time="2014-12-14T20:21:27Z" level="debug" msg="Sending 9 to 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727"
time="2014-12-14T20:21:28Z" level="info" msg="+job log(die, 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727, dns_dnsmasq:latest)"
time="2014-12-14T20:21:28Z" level="info" msg="-job log(die, 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727, dns_dnsmasq:latest) = OK (0)"
time="2014-12-14T20:21:28Z" level="info" msg="+job release_interface(07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727)"
...
time="2014-12-14T20:21:29Z" level="debug" msg="Calling DELETE /containers/{name:.*}"
time="2014-12-14T20:21:29Z" level="info" msg="DELETE /v1.12/containers/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727?link=False&force=False&v=False"
time="2014-12-14T20:21:29Z" level="info" msg="+job rm(07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727)"
Cannot destroy container 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: Driver aufs failed to remove root filesystem 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: r
ename /mnt/sda1/var/lib/docker/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727 /mnt/sda1/var/lib/docker/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727
-removing: device or resource busy
time="2014-12-14T20:21:29Z" level="info" msg="-job rm(07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727) = ERR (1)"
time="2014-12-14T20:21:29Z" level="error" msg="Handler for DELETE /containers/{name:.*} returned error: Cannot destroy container 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: Driver a
ufs failed to remove root filesystem 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: rename /mnt/sda1/var/lib/docker/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9
dd727 /mnt/sda1/var/lib/docker/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727-removing: device or resource busy"
time="2014-12-14T20:21:29Z" level="error" msg="HTTP Error: statusCode=500 Cannot destroy container 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: Driver aufs failed to remove root file
system 07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727: rename /mnt/sda1/var/lib/docker/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727 /mnt/sda1/var/lib/docker
/aufs/mnt/07ba11ca55a87ec6556a27007dd56a42da370ed8d78b34aed2f573266e9dd727-removing: device or resource busy"
time="2014-12-14T20:24:15Z" level="debug" msg="Calling POST /containers/{name:.*}/exec"
time="2014-12-14T20:24:15Z" level="info" msg="POST /v1.15/containers/dns_dnsmasq_1/exec"
time="2014-12-14T20:24:15Z" level="debug" msg="Warning: client and server don't have the same version (client: 1.3.2, server: 1.4.0)"
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 82 (19 by maintainers)
Commits related to this issue
- adds a pause to prevent the docker issue #9665 #3968 etc https://github.com/docker/docker/issues/9665 https://github.com/docker/docker/issues/3968 — committed to reyesr/dockenv by deleted user 9 years ago
- Retry stopping 5 times, because https://github.com/docker/docker/issues/9665 and friends. — committed to ClusterHQ/dvol by deleted user 9 years ago
- redirect stderr to devnull, to workaround https://github.com/docker/docker/issues/9665 — committed to ClusterHQ/dvol by deleted user 9 years ago
- Work around docker rm errors This is a hopefully temporary work around this issue: https://github.com/docker/docker/issues/9665 This means that docker rm is unreliable. All we really care about whe... — committed to twc-openstack/garethr-docker by deleted user 8 years ago
- Work around docker rm errors This is a hopefully temporary work around this issue: https://github.com/docker/docker/issues/9665 This means that docker rm is unreliable. All we really care about whe... — committed to twc-openstack/garethr-docker by deleted user 8 years ago
- Work around docker rm errors This is a hopefully temporary work around this issue: https://github.com/docker/docker/issues/9665 This means that docker rm is unreliable. All we really care about whe... — committed to twc-openstack/garethr-docker by deleted user 8 years ago
- Work around docker rm errors This is a hopefully temporary work around this issue: https://github.com/docker/docker/issues/9665 This means that docker rm is unreliable. All we really care about whe... — committed to twc-openstack/garethr-docker by deleted user 8 years ago
I hit this on
docker version: 1.6.0
.I was able to remove the container with
docker rm -f
Faced similar issue in deleting an old docker images directory , not in use by new docker-machine installation.
Solved by :
I got a similar issue with docker
1.8.0-dev
.Below some useful info:
And here the description of my issue:
I had a running consul container. It was started with this command:
I tried to remove it with:
And:
And:
But got the same issue:
Then I restarted the docker service:
After that the container was in the Exited state:
But I still couldn’t remove it:
Here is the content of this directory:
lsof
returned nothing:I also couldn’t remove it manually:
Then I found out that the consul process was still running:
After killing the process manually I could remove the directory and the container