Btrfs best practices

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

Environment

SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 12 Service Pack 1 (SLES 12 SP1)

Situation

With the release of SUSE LInux Enterprise Server 12 btrfs became the default filesystem for the root partition.

This TID is about giving some ideas for working with this filesystem (btrfs).

Resolution

What does the warning in 'dmesg' mean about "barriers being disabled" while my btrfs is mounted?
This is message will be printed if it has been detected that your hard drive does not support barriers.
It is important to note that barriers make sure the data got written to disk before returning from the
I/O operation. In case the hard drive has no battery backed up unit, data which have not been written back will be lost. This can lead to a severe file-system corruption. In case such message is printed make sure to disable the write cache on each hard drive the message is printed for.
To do so, please run as root:
 'hdparm -W0 /dev/<devicename>'

============================================================================================================
Other topics:
  • What to do if btrfs claims it is running out of space but still plenty of space is available.
  • If there's a problem with resuming balance on mount, mount with -o skip_balance.
  • If there is a corrupted root on mount, mount with -o recovery to try backup roots.
  • If there are weird ENOSPC issues, mount with -o clear_cache (mount may take longer than is typical as the cache is rebuilt)
  • If there are wierd quota issues that prevent mounting, a newer fsck can repair them.  Otherwise, quota issues should be fixed with 'btrfs quota rescan'
  • As a last resort, btrfs check will identify if there are errors that need repairing.  It's typically a good idea to attempt a check without repair before repairing outright.

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:7018154
  • Creation Date: 14-Oct-2016
  • Modified Date:02-Aug-2021
    • SUSE Linux Enterprise Server

< 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