SUSE Support

Here When You Need Us

Btrfs balance schedule changed unexpectedly

This document (000021842) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 SP6
SUSE Linux Enterprise Server 15 SP5
SUSE Linux Enterprise Server 15 SP4
SUSE Linux Enterprise Server 15 SP3
SUSE Linux Enterprise Micro 5.5
SUSE Linux Enterprise Micro 5.4
SUSE Linux Enterprise Micro 5.3


Situation

The balance schedule changed unexpectedly when editing the file /etc/sysconfig/btrfsmaintenance or when applying a btrfsmaintenance package update.

Resolution

If the btrfs balance schedule has changed unexpectedly, then editing the appropriate lines in /etc/sysconfig/btrfsmaintenance can be done to reset the schedule to the desired frequency e.g.:

     BTRFS_BALANCE_PERIOD="monthly"

The syntax used for the variable can be a simple word as shown above or can be more complex. Examples can be found in the "Calendar Events" section of the systemd.time man page.

Cause

The balance timer configuration stored in /etc/sysconfig/btrfsmaintenance is initially not active. It becomes active by editing /etc/sysconfig/btrfsmaintenance or updating the btrfsmaintenance rpm. If the current balance timer schedule does not match the schedule defined in the /etc/sysconfig/btrfsmaintenance file, then the balance schedule can change.

Additional Information

This problem should only happen once on any given server, either when the /etc/sysconfig/btrfsmaintenance file is edited for the first time, or the first time that the btrfsmaintenance package is updated. After this, the server's btrfs balance schedule should always be dictated by what is present in the /etc/sysconfig/btrfsmaintenance file.

The default btrfs balance schedule is monthly.
The default btrfs balance schedule defined in the /etc/sysconfig/btrfsmaintenance file is weekly.

It is possible to avoid any unwanted change to the balance schedule by stopping the btrfs watcher process before applying any btrfsmaintenance package update and restarting it after patching e.g.:

     # systemctl stop btrfsmaintenance-refresh.path
     # rpm -Uvh btrfsmaintenance-<version>.noarch.rpm
     # systemctl start btrfsmaintenance-refresh.path


The btrfsmaintenance 'watcher' process (btrfsmaintenance-refresh.path):
The purpose of this systemd unit process is to watch for changes made to the /etc/sysconfig/btrfsmaintenance configuration file and then trigger a process to reflect those changes in the btrfs scrub, balance, trim and defragment related maintenance tasks/units.

Note:  Due to the same issue laid out in the cause section of this document, it may be possible for a 'disabled' btrfs balance schedule to again become active. In this event, manual intervention will be required to disable the balance schedule.

See related TID:    000021692 Multiple btrfs balance schedules are present
Master btrfs TID:  000018779 BTRFS Master TID

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021842
  • Creation Date: 20-May-2025
  • Modified Date:20-May-2025
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.