On Sun, Oct 5, 2025, at 6:08 AM, Javier Perez wrote:
> Is there any link, tutorial, etc that explains what kind of btrfs maintenance 
> we are supposed to be doing?

I do no regular maintenance other than backup of important data.

Perhaps a few times a year I will scrub the file system, and check dmesg for 
errors.

Upstream maintainer also maintains 'btrfsmaintenance' which is packaged in 
Fedora. The 'btrfs-balance.timer' can optionally be enabled. This periodically 
runs a filtered balance. 

On the one hand prematurely running out of space is a bug, and in the unlikely 
case you experience it, don't try to fix it, we need a detailed bug report 
instead. On the other hand bug reporting is voluntary and it's reasonable to 
just avoid issues. And hence btrfs-balance.timer from the btrfsmaintenance 
package.

For those on the fence, I don't have a hard and fast rule of thumb but if you 
push storage beyond 90% full you may want to use it. (I do push some less 
active storage well beyond 90%, yet still do not balance at all.)

There is a newer feature built-in to the kernel called dynamic and periodic 
reclaim. They are safe to enable via the sysfs interface on a per block group 
basis. There's a proposal to enable them for data block groups by default in a 
future kernel, but is not yet merged. Note from the description it doesn't 
become active until unallocated space goes below 10G. This is the last reported 
type of space when using 'btrfs filesystem usage /'

https://lore.kernel.org/linux-btrfs/52b863849f0dd63b3d25a29c8a830a09c748d86b.1752605888.git.bo...@bur.io/

It's hoped this will obviate the btrfs-balance.timer but there's no conflict or 
incompatibility using both.

Fedora Btrfs matrix room to discuss specifics 
https://matrix.to/#/#btrfs:fedoraproject.org

> Long time btrfs user and have never knowingly performed any maintenance on my 
> btrfs filesystem except balancing after converting from single HDD to raid 1 
> my system.
> I wonder what I have been missing (ignorance is bliss :( )
> 

Yep. This is fine. I don't have a way to track this with any real basis except 
feels ... but I'm seeing fewer space related issues with Btrfs than memory bit 
flips and drive firmware bugs. So, not knowing what problem you might run into, 
backup your important data so you don't have to worry.

Any backup will do. Whatever you're familiar with and will use.

I myself prefer btrfs snapshot replication using send+receive. The incremental 
send is ridiculously cheap, almost magic. No deep traversal required on either 
source or destination. If you have many files with few changes, you will see a 
performance improvement just by entirely avoiding the scan needed to determine 
what few files need backing up. If you're not noticing this scan for file 
changes, then don't worry about it. Just keep doing what you're doing.

Chris Murphy
-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to