Tag Archives: docker

Enable btrfs storage driver with Docker and Fedora 20

In order to enable btrfs storage driver instead of AUFS in Fedora 20 we have to:

1) Create a partition or logical volume with btrfs and mount it in /var/lib/docker, for example in my case:

 # yum install -y btrfs-progs
 # lvcreate -l 100%FREE -n docker fedora
 # mkfs.btrfs /dev/fedora/docker
 # echo '/dev/mapper/fedora-docker /var/lib/docker                   btrfs    defaults        1 2' >> /etc/fstab 

2) Install Docker

# yum -y install docker-io
# mount -a
# vi /usr/lib/systemd/system/docker.service
  ExecStart=/usr/bin/docker -d -s btrfs
# systemctl start docker
# systemctl enable docker

3) Check that Docker is using btrfs as storage driver

# docker info
Containers: 0
Images: 4
Storage Driver: btrfs
Execution Driver: native-0.1
Kernel Version: 3.13.9-200.fc20.x86_64