Mounting a BTRFS filesystem fails with "wrong fs type, bad option, bad superblock on /dev/<devicename>"

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

Environment

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

Situation

Trying to mount a BTRFS filesystem returns the following error:

mount: wrong fs type, bad option, bad superblock on /dev/<devicename>, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail  or so

Resolution

Check with 'dmesg' if BTRFS related messages have been logged. If something like the following is shown:

BTRFS: failed to read log tree

Or a kernel stack trace, containing lines similar to the following:
replay_one_dir_item+0xb5/0xb5 [btrfs]
walk_log_tree+0x9c/0x19d [btrfs]
btrfs_read_fs_root_no_radix+0x169/0x1a1 [btrfs]
btrfs_recover_log_trees+0x195/0x29c [btrfs]
replay_one_dir_item+0xb5/0xb5 [btrfs]

It is likely due to a corrupted BTRFS log, to clear the log run either (depending on the SLES version):

btrfs-zero-log /dev/<devicename>
or
btrfs rescue zero-log /dev/<devicename>

Where <devicename> in the above examples is the device containing the problematic BTRFS filesystem.

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:7018133
  • Creation Date: 10-Oct-2016
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@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