# Ubuntu updates intefere with Docker and AUFS?

**URL:** https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039
**Category:** Self-hosting
**Created:** [9 februari 2015 om 20:56 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039 "2015-02-09T20:56:55Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [9 februari 2015 om 20:20 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/1 "2015-02-09T20:20:45Z")

</div>

This was going fine for me until the last moment, when I got the following super-useful error message:

```
Error response from daemon: Cannot destroy container 1cd705ffc49f5ce0622614316e3a742b8e6c8a77362528338db30a6f352477d2: Driver devicemapper failed to remove root filesystem 1cd705ffc49f5ce0622614316e3a742b8e6c8a77362528338db30a6f352477d2: Device is Busy
FATA[0014] Error: failed to remove one or more containers 
Invalid cid file, deleting, please re-run

```

1. How to recover?
2. How to make this more reliable and easier for users/admins?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [9 februari 2015 om 20:22 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/2 "2015-02-09T20:22:33Z")

</div>

Device mapper is not supported, please get aufs working.

You could probably recover by rebooting, but you are on your own here.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [9 februari 2015 om 20:23 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/3 "2015-02-09T20:23:06Z")

</div>

> [@Manually update Discourse and Docker image to latest](https://meta.discourse.org/t/manually-update-discourse-and-docker-image-to-latest/23325/11):
>
> but you are on your own here

I’m using the standard “by the book” installation using the docs provided here and a Digital Ocean server, as recommended.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [9 februari 2015 om 20:24 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/4 "2015-02-09T20:24:04Z")

</div>

Nope, device mapper is not supported, never was. You MUST get aufs working.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [9 februari 2015 om 20:25 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/5 "2015-02-09T20:25:07Z")

</div>

> [@Manually update Discourse and Docker image to latest](https://meta.discourse.org/t/manually-update-discourse-and-docker-image-to-latest/23325/13):
>
> Nope, device mapper is not supported, never was. You MUST get aufs working.

I have no idea what either of those are. I only followed the official directions for the docker installation, and the only changes we’ve made were to add SSL & adding a few plugins.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [9 februari 2015 om 20:36 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/6 "2015-02-09T20:36:10Z")

</div>

Looks like I have the same problem reported here:

[https://meta.discourse.org/t/discourse-did-not-restart-after-system-crash/24494/5?u=downey](https://meta.discourse.org/t/discourse-did-not-restart-after-system-crash/24494/5)

So be careful installing normal updates to your OS, apparently it breaks Discourse. 😛

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [9 februari 2015 om 20:37 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/7 "2015-02-09T20:37:24Z")

</div>

Supposedly docker 1.5 will make device mapper more reliable, on the fence on this cause I heard this many time before.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [9 februari 2015 om 21:13 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/8 "2015-02-09T21:13:05Z")

</div>

I am curious, how were you updating Ubuntu?

I tend to update Docker on mine every few months so perhaps that’s why I didn’t see any regression on kernel / aufs:

```
apt-get update
apt-get dist-upgrade lxc-docker

```

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [9 februari 2015 om 21:58 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/9 "2015-02-09T21:58:48Z")

</div>

I think to recover, you’ll have to manually `docker rm/rmi` the leftovers, then rebuild.

Quick overview of that:

```bash
docker images -a
# identify useless images (old discourse base, untagged), then
docker rmi d25ec275fb1d 818beea55263 cdb5237bc8a7

docker ps -a
# identify dead/defunct containers, then
docker rm 7f32e8715c89

```

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [9 februari 2015 om 22:01 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/10 "2015-02-09T22:01:51Z")

</div>

> [@codinghorror](#):
>
> I am curious, how were you updating Ubuntu?

Just using `apt-get upgrade ` and upgrading all packages every few weeks. As mentioned in the other thread, it’s hard to say when aufs went away, it was surely in a kernel upgrade at some point, and then this is likely the first docker image upgrade since then.

> [@riking](#):
>
> I think to recover, you’ll have to manually docker rm/rmi the leftovers, then rebuild.

Yes, I had to follow the same steps as @danwad. I imagine we won’t be the only ones so I’m glad this is documented. 🙂

---

<div class="post-metadata">

### Author: ![renoirb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renoirb/32/114880_2.png) [@renoirb](https://meta.discourse.org/u/renoirb)
#### Post date: [2 april 2015 om 19:15 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/11 "2015-04-02T19:15:02Z")

</div>

Hi folks. I’ve hit that snag too.

Basically,

1. ensure you have `linux-image-extra-virtual` and `aufs-tools` installed

2. add to `/etc/default/docker` something like this

I [wrote a blog post about it here](https://renoirboulanger.com/blog/2015/04/install-discourse-docker-ubuntu-14-04-aufs-enabled/) but the steps above is all you need. really.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [8 mei 2015 om 20:10 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/12 "2015-05-08T20:10:53Z")

</div>

> [@downey](#):
>
> Just using apt-get upgrade and upgrading all packages every few weeks [causes Docker to break]

Ok, I just did

```
apt-get update
apt-get upgrade
reboot

```

And nothing broke on my Digital Ocean instance. Site is still up: [http://discourse.codinghorror.com](http://discourse.codinghorror.com)

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [12 mei 2015 om 16:21 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/13 "2015-05-12T16:21:06Z")

</div>

I haven’t noticed this problem lately but not sure when the last updates were run on the server. Will keep an eye on it and remember to come back here if we see any more problems.

---

<div class="post-metadata">

### Author: ![eschipul](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eschipul/32/116116_2.png) [@eschipul](https://meta.discourse.org/u/eschipul)
#### Post date: [13 mei 2015 om 18:31 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/14 "2015-05-13T18:31:38Z")

</div>

Disappearing Dockers on Ubuntu after updates only happens when the kernel is upgraded. While your solution worked this time, it might not the next time given you had just done an update previously. This is the line you want to run specifically after a kernel upgrade.

```
sudo apt-get -y install linux-image-extra-$(uname -r) aufs-tools

```

or bundle them with your update with something similar to this:

```
sudo apt-get update && sudo apt-get upgrade -yy && \
sudo apt-get -y install linux-image-extra-$(uname -r) aufs-tools

```

Then you do have to reboot unfortunately. It happens on our Ubuntu servers all of the time. Worst case scenario it doesn’t find an update and just jumps past the line. Perhaps not perfect but effective and fast. I hope this helps!

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [14 mei 2015 om 01:53 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/15 "2015-05-14T01:53:31Z")

</div>

What about installing the `linux-image-extra-virtual` metapackage so it stays updated, too?

Actually @codinghorror that should go in the install docs.

---

<div class="post-metadata">

### Author: ![danwad](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danwad/32/33426_2.png) [@danwad](https://meta.discourse.org/u/danwad)
#### Post date: [4 juli 2015 om 09:26 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/16 "2015-07-04T09:26:56Z")

</div>

I just upgraded the lxc-docker package from 1.4.1 to 1.7.0 and was greeted with this afterwards:

```
Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

```

Rebooting did not help. Trying to run docker manually I find out why:

```
$ sudo /usr/bin/docker -d
FATA[0000] Error starting daemon: error initializing graphdriver: "/var/lib/docker" contains other graphdrivers: devicemapper; Please cleanup or explicitly choose storage driver (-s <DRIVER>)

```

Added the line as suggested by @renoirb to `/etc/default/docker` and issued a sudo service docker restart and all was fine.

```
DOCKER_OPTS="-s aufs"

```

Not sure exactly why it was necessary but happy nonetheless.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [6 juli 2015 om 15:41 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/17 "2015-07-06T15:41:46Z")

</div>

Odd aufs is still priority 1

---

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [2 maart 2016 om 19:41 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/18 "2016-03-02T19:41:56Z")

</div>

> [@downey](#):
>
> So be careful installing normal updates to your OS, apparently it breaks Discourse. 😛

This just happened on my Linode ([+ AUFS support](https://meta.discourse.org/t/how-to-install-docker-with-aufs-on-linode/39831)) too. I had updated with `apt-get dist-upgrade -y` and rebooted.

Running `docker daemon` showed

> [graphdriver] prior storage driver “aufs” failed: driver not supported

What fixed it was `$ sudo apt-get install linux-image-extra-`uname -r` && sudo modprobe aufs` as [suggested](https://meta.discourse.org/t/discourse-did-not-restart-after-system-crash-aufs-missing/24494/5) by @danwad .

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [25 december 2018 om 02:54 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/19 "2018-12-25T02:54:44Z")

</div>



---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [25 december 2018 om 03:50 UTC](https://meta.discourse.org/t/ubuntu-updates-intefere-with-docker-and-aufs/25039/20 "2018-12-25T03:50:02Z")

</div>


