Btrfs filesystem goes "read only" after a failed balancing operation

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

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 11
 

Situation

This article only covers the situation described in the SUSE knowledgebase article  TID 000019789 - During btrfs balance "enospc" errors are reported.

In short the situation is that errors similar to this are seen in the logs:

BTRFS info (device sda1): 1 enospc errors during balance
BTRFS info (device sda1): balance: ended with status: -28
And subsequently there is an issue mounting the filesystem. In the most severe case this can prevent a boot, particularly if the root filesystem is affected.

For other btrfs mounting/read only errors refer to TID 000019843 - Btrfs Master TID

Resolution

The skip_balance mount option can help work around this issue:
mount -o remount,rw,skip_balance <mountpoint>

This mount option doesn't prevent balancing entirely, rather it skips automatic resume of an interrupted balance operation.

The operation can later be resumed with btrfs balance resume, or the paused state can be removed with btrfs balance cancel. The default behavior is to resume an interrupted balance immediately after a volume is mounted, which can cause issues for filesystems which encountered enospc issues during balancing and on striped volumes.

Before resuming or attempting a balancing operation, make sure that there is in fact enough space for a balance operation. More information is provided in: TID 000019789 - During btrfs balance "enospc" errors are reported

Cause

The cause for the filesystem going into read only in this case is that there was a failed enospc and the system tries to resume a balance upon mount, only to fail again.

Additional Information

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:000019843
  • Creation Date: 27-Jan-2021
  • Modified Date:27-Jan-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications
    • SUSE Manager

< Back to Support Search

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

SUSE Support Forums

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

Join Our Community

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.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

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

Go to Customer Center