Podman: how do I switch to the btrfs driver?

By default Fedora users overlay(fs) driver for podman. When on Btrfs and XFS, overlayfs will automatically do a more efficient copy-up operation by using reflink copies. Some workloads might perform better by using the btrfs driver, which will use btrfs specific features including snapshotting.

But how to switch to the Btrfs driver?

6 Likes

Notes.

I had to run podman system reset first. (prevents some errors).

Then modified file:

This shoud be changed to nano ~/.config/containers/storage.conf

1 Like

Before getting started, you may want to save/export your images and containers. Then proceed with steps to switch drivers, and finally load/import to restore your images and containers.

Steps to switch to the btrfs driver:

Create a file:
nano ~/.config/containers/storage.conf

[storage]

driver = "btrfs"

Reset podman (NOTE this will delete all containers and images):
podman system reset

Optionally confirm it’s working:

$ podman info | grep btrfs
  graphDriverName: btrfs
3 Likes