I heard that I should disable the btrfs CoW functionality for database files for some reasons.
In my case, this database runs within a docker container (a postgres image), creating a docker volume, and all is stored within the /var/lib/docker
directory on a btrfs
partition.
How can I disable CoW for my DB container?
Can I disable CoW for a specific docker volume? Should I put /var/lib/docker
on a separate btrfs subvolume which is mounted with the nodatacow
option? I heard that docker uses some features of the btrfs filesystem, would disabling CoW affect the docker performance or disk usage?