Main file system: btrfs

I’m using btrfs for a couple of reasons:

  • Snapshots and subvolumes. It’s piece of cake to create a snapshot, even of /
  • Checksums: It’s very easy to detect bit rot by regularly scrubbing the filesystem.
  • File System: Due to the snapshots it’s easy to incrementally backup remotely, which I do.

Unfortunately, btrfs is not (yet?) very good suited for databases like MariaDB or broadly speaking, for rapidly changing data like /var/tmp, even with the NoCow-Flag (+C) set on the respective directory, see Percona, EDB Postgres or Phoronix for an analysis and benchmarks.

MariaDB: XFS

So when I moved the hub to a new VPS, I choose to create a XFS partition for these kind of files. This was a non-issue, because I already had disabled the CoW-Flag, making the missing CoW feature irrelevant. As for snapshots: You cannot safely snapshot a database directory anyway, the database backups are stored on btrfs, anyway.