Enabling deferred device removal and deferred device deletion in docker 1.9 and later.
Issue
An error message similar to the following is logged in the journal of systemd after a container has been terminated.
Cannot destroy container 6434dc504279b61e12717a82ae080eae67ac08ddf11b26b47804b31638bd1063: Driver devicemapper failed to remove root filesystem 6434dc504279b61e12717a82ae080eae67ac08ddf11b26b47804b31638bd1063: Device is Busy
The issue occurs if some non-privileged application containers and a Super Privileged Container are launched and terminated in the following order.
- launch application container 1
- launch application container 2
[...] - launch application container N
- launch Super Privileged Container
- terminate any of the application containers 1..N
The error message is logged for any of the application containers 1..N, if the application container is terminated while the Super Privileged Container is still active. Due to this error condition, the docker daemon leaves a stale device behind as shown in the following example (excerpt of dmsetup ls command output).
docker-253:1-12606456-6434dc504279b61e12717a82ae080eae67ac08ddf11b26b47804b31638bd1063 (253:5)
The stale device will be cleaned up automatically during the next reboot of the Red Hat Enterprise Linux Atomic Host.
Environment
- Red Hat Enterprise Linux Atomic Host release 7.1.x
- Red Hat Enterprise Linux Atomic Host release 7.2.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
