On 2018-01-09 03:33, Marat Khalili wrote:
On 08/01/18 19:34, Austin S. Hemmelgarn wrote:
A: While not strictly necessary, running regular filtered balances (for example `btrfs balance start -dusage=50 -dlimit=2 -musage=50 -mlimit=4`, see `man btrfs-balance` for more info on what the options mean) can help keep a volume healthy by mitigating the things that typically cause ENOSPC errors.

The choice of words is not very fortunate IMO. In my view volume stopping being "healthy" during normal operation presumes some bugs (at least shortcomings) in the filesystem code. In this case I'd prefer to have detailed understanding of the situation before copy-pasting commands from wiki pages. Remember, most users don't run cutting-edge kernels and tools, preferring LTS distribution releases instead, so one size might not fit all.
I will not dispute that the tendency of BTRFS to end up in bad situations is a shortcoming of the filesystem code. However, that isn't likely to change any time soon (fixing it is going to be a lot of work that will likely reduce performance for quite a few people), so there is absolutely no reason that people should not be trying to mitigate the problem.

As far as the exact command, the one I quoted has worked for at least 2 years worth of btrfs-progs and kernels, and I think far longer than that (the usage and limit filters were implemented pretty early on). I agree that detailed knowledge would be better, but that doesn't exactly fit with the concept of a FAQ in most cases, and most people really don't care about the details as long as it works.

On 08/01/18 23:29, Martin Raiber wrote:
There have been reports of (rare) corruption caused by balance (won't be
detected by a scrub) here on the mailing list. So I would stay a away
from btrfs balance unless it is absolutely needed (ENOSPC), and while it
is run I would try not to do anything else wrt. to writes simultaneously.

This is my opinion too as a normal user, based upon reading this list and own attempts to recover from ENOSPC. I'd rather re-create filesystem from scratch, or at least make full verified backup before attempting to fix problems with balance.
While I'm generally of the same opinion (and I have a feeling most other people who have been server admins are too), it's not a very user friendly position to recommend that. Keep in mind that many (probably most) users don't keep proper backups, and just targeting 'sensible' people as your primary audience is a bad idea. It also needs to work at at least a basic level anyway though simply because you can't always just nuke the volume and rebuild it from scratch.

Personally though, I don't think I've ever seen issues with balance corrupting data, and I don't recall seeing complaints about it either (though I would love to see some links that prove me wrong).
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to