This is my third laptop using btrfs exclusively. The first ran 12.1 and
had a spinning rust drive. The second was 12.2 or something and also had
spinning rust. I was much more-diligent about backups back then, fearing
imminent death to data using something that was barely considered ready
for general use.
Today I have had 13.1 (current laptop) on my SSD-based laptop that I
bought (no longer a work-provided laptop) in 2012 (obviously had an
earlier openSUSE version back then) and, again, this is my primary system.
My current install was done in 2013-11 so after over two years, things
are still fine. SSDs help all systems, and btrfs is no exception, but I
kind of guess that Copy-on-Write (CoW) filesystems are helpful to SSDs
since they naturally (due to snapshots) do not overwrite the same blocks a
million times in a row as much as other filesystems do, not that that
potentially problem isn’t already solved usually anyway.
As others have mentioned, if you want to store databases, VMs, or other
big files that change within regularly you should disable CoW on those
files or directories, or use another filesystem (XFS is my next favorite).
The reason is because of how CoW works and how those big variable files
work, which is not a happy combination. Disabling CoW on a directory or
subvolume before putting files within is trivial though:
chattr +C /path/to/the/vm/directory
The biggest caveat with this is that it only works on files that are new
and have zero bytes (no blocks allocated yet), or to directories with
nothing in them yet. Sure, you can set the ‘C’ flag on an existing file
with data, or an existing directory with files, but it does not apply
until you move the file out of, and then back into, place, because at that
point the file is rewritten in a way that is not going to use CoW.
General best practice: create the directory and set the no-CoW attribute
with the command above and then start using it for VMs, databases, etc.
SLES 12 SP1, for what it is worth, automatically sets this attribute out
of the box on various directories that could be used for databases,
including /var/lib/pgsql, /var/lib/mariadb, and /var/lib/mysql so that is
pretty nice. I have not seen if Leap does that yet, but would not be
surprised if it did.
Summary: Go with btrfs; the advantages are great, and the first time a
snapshot saves your system you’ll never go back.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…