Docker Community Forums

Share and learn in the Docker community.

Docker BTRFS driver FS - is Chattr +C recommended for mariaDB volumes?

Short version: do I need to disable CoW for mounted volumes that store MariaDB/MySQL/PostgreSQL files?
I know for sqlite I should only change its journal mode to WAL.

Long version:
I run Docker on Ubuntu 20.10, my filesystem is BTRFS and Docker is using its BTRFS driver.
I noticed Docker automatically creates lots of subvolumes in /var/lib/docker. I am sure that’s normal.

I have 23 containers running via Docker-Compose. They have been up for 2 weeks now. Everything runs smoothly.
All of my containers have a volume mapped to $HOME/docker/{container-name}
So if I ever have to reinstall my whole system, I just backup that $HOME/docker (it’s actually a BTRFS subvolume) folder, erase disk, reinstall Ubuntu and Docker, run my Docker-Compose script and everything is just like it was (I tested this successfully).

Question 1:
I also have one MariaDB container. Should I use chattr +C on its mounted volume ($HOME/docker/MariaDB) or not?

Question 2:
Do I also need to do it on its container folder, which is probably one of the folders in /var/lib/docker?

Nobody?
Is BtrFS that unpopular?