Score:2

how to migrate docker to use a different storage driver?

ly flag

I have a server running docker with btrfs storage driver. How can I migrate it to use a different storage driver? I would like to use overlay2.

I've tried to migrate using the instructions here:

  • stop docker

  • rename /var/lib/docker to /var/lib/docker.bak

  • add {"storage-driver": "overlay2"} to /etc/docker/daemon.json

  • copy /var/lib/docker.bak to /var/lib/docker (to "get rid" of any btrfs snapshots)

  • start docker

But after this migration, no containers are present anymore.

I suppose because the directory still has data in /var/lib/docker/btrfs, and not in /var/lib/docker/overlay2 (they have different "layout", renaming btrfs to overlay2 won't do).

How do I migrate from one storage driver to another, so that any containers which were starting automatically are still present and start automatically?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.