btrfsmaintenance

How to completely forbid installation of btrfsmaintenance package? Every time i remove it, add “protect” on it, so it won’t be installed. But after a few updates this old evil awakes again.
Is there other way to bury it forever?
I’m doing it through GUI right now, just adding flag “Protect - do not modify” with the right click on it.

Just disable services, there is no harm to have it installed. Edit /etc/sysconfig/btrtfsmaintenance, set BTRFS_*_PERIOD to “none”.

The issue here is, the Btrfs package dependencies –

  • “btrfsmaintenance” is recommended by the “btrfsprogs” package, which is suggested by the “os-prober” package, which is recommended by the “grub2” package.

The package dependency chain is fairly short and, it contains a basic required package – GRUB2 …

  • Even if, you do not have any partitions which use Btrfs, attempting the lock the related filesystem maintenance packages may be successful but, no guarantees.

Personally, I simply mask all the systemd timer and refresh services related to Btrfs – the Btrfs services themselves are “static” and therefore, are never called – because the timer services are never executed –


 > systemctl list-unit-files | grep -i 'btrfs'
btrfsmaintenance-refresh.path                                             masked          enabled      
btrfs-balance.service                                                     static          -            
btrfs-defrag.service                                                      static          -            
btrfs-scrub.service                                                       static          -            
btrfs-trim.service                                                        static          -            
btrfsmaintenance-refresh.service                                          masked          disabled     
btrfs-balance.timer                                                       masked          enabled      
btrfs-defrag.timer                                                        masked          enabled      
btrfs-scrub.timer                                                         masked          enabled      
btrfs-trim.timer                                                          masked          enabled      
 > 

Ok i’ll just disable it’s “services”. Thanks guys!

I do have btrfs, and that package causes a lot of troubles coz of that. Thats the reason i want to avoid it altogether.

My experience is – on an older Laptop which has some missing hardware features modern Btrfs needs – Btrfs without regular maintenance is slow …

  • The machine with the masked Btrfs services doesn’t have any Partitions at all which use Btrfs as the filesystem – a machine without any Btrfs whatsoever …