Failure copy container with docker inside to another host with btrfs fs


(Thomas P ) #1

If two servers with ubuntu 18.04 and lxd installed.
on the second server I’ve created a storage with btrfs volume.

I copied the containers with following command

lxc copy srv1:<containername> srv2: --mode=push --no-profiles -p btrfs-storage

This worked with all my containers, but not with the conainter with docker inside. After copy this container, the docker deamon don’t startup the container.

docker container ls

lists no containers.

When I copy it from srv1 to srv2 with a profile point to the default filesystem storage (ext4), all works fine.

Are there some additional task to do, to let docker work inside lxd with btrfs storage backend?


(Stéphane Graber) #2

So in the case which didn’t work, were both servers using btrfs for storage?

If not, then your btrfs backed container would have been transferred over rsync, the data would have made it just fine to the target, but if docker in the container expects subvolumes to be present, it will be disappointed which would explain what you’re seeing.

ext4 to ext4 works because docker is likely running in aufs/overlay mode in that case and does not rely on btrfs subvolumes.