[Bjonnh.net]# _

# Articles/ Using BTRFS for Docker in LXC/LXD containers


Published on
Categories: computer hack Tags: linux lxd docker

When using docker in LXD/LXC, the FS performance is really really bad.

Found a solution at GitHub LXC/LXD Issue 2305

Creating a volume in my ZFS Pool and formating it as btrfs, then giving that to the container.

zfs create -V 10GB lxd/newfs
mkfs.btrfs /dev/zvol/lxd/newfs
mount /dev/zvol/lxd/newfs /mnt/newfs
chown 165536:165536 /mnt/newfs
umount /mnt/newfs
lxc config device add docker-container docker disk source=/dev/zvol/lxd/newfs path=/var/lib/docker