On 2021-03-06 01:55, John Botha (SourceForge) wrote:
Hi,
I am about to take the plunge with BackupPC, and would appreciate input
on the following three points regarding using btrfs for the data (bit
rot protection is key for me).
From what I've read, btrfs (like many file systems) suffers over time
when fragmentation increases. I have seen suggestions such as not to
put data bases on btrfs because of this, but that just seems silly at a
number of levels. At the least one should take special care with data
bases (know your data and adjust your maintenance accordingly), but
that holds for any data base on any FS. My question is how best to
approach this with a combination of rebalancing and scrubbing, or if
there is another way or other aspects to keep in mind.
I won't be using snapshots in btrfs since BackupPC effectively
implements its own. When I read up how btrfs implements COW I thought
it would be safest to use nodatacow, but then read that doing so would
also stop bit rot protection, so that's a real bummer. Am I missing
something, or do I have that right?
Given how I understand BackupPC implements compression, I'd rather have
btrfs handle de/compression, as that would seem to involve less time
doing redundant calculations. Does that make sense?
Thanks in advance for constructive input, as I have seen some flame
wars around the use of btrfs.
8-)
John
It all depends on what you mean by "suffers," but the BackupPC pattern
does not update individual files, and therefore does not cause the kind
of fragmentation that causes thrashing. To be succinct, it's not much
to worry about. I do scrub occasionally (every 6-12 months) but I don't
bother rebalancing unless the physical shape of the array changes. For
example after replacing a failed drive or adding capacity. It's not a
bad idea to monitor logs or btrfs itself for errors which can mean early
signs of drive failure, but presumably you'd also monitor the physical
devices.
What you are missing is that COW doesn't really happen with BackupPC, so
I wouldn't recommend taking any special precautions to turn it off. (In
fact, I'd go so far as to say don't ever do this unless you have a very
good reason, and I'd seriously question that reason, because most of the
reasons I've heard for doing so are based on magical thinking and
nonsense.)
In practice, it doesn't matter much whether BackupPC implements
compression or btrfs does. Don't do both, obviously, because that's
pointless. Because BackupPC has it on by default and BTRFS doesn't, I
went that way since further tweaking is not going to represent
significant incremental gains, but you may find doing so worthwhile._______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/