• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

BTRFS: too many missing devices, writeable mount is not allowed

by admin

The Problem

Assembling a BTRFS device during boot fails with error

BTRFS: too many missing devices, writeable mount is not allowed

The disks have been mistakenly deleted

The Solution

The missing disks in the raid array do not allow the filesystem to be mounted.

Below are the logs from dmesg:

[ 44.706956] btrfs: disk space caching is enabled
[ 44.708006] btrfs: failed to read the system array on sdd1
[ 44.721272] btrfs: open_ctree failed
[ 45.437152] nr_pdflush_threads exported in /proc is scheduled for removal
[ 45.437280] sysctl: The scan_unevictable_pages sysctl/node-interface has been disabled for lack of a legitimate use case. If you have one, please send an email to linux-mm@kvack.org.
[ 109.750996] SELinux: initialized (dev tmpfs, type tmpfs), uses transition SIDs
[ 123.375147] device fsid 06182482-9e8c-4e92-a026-ee045ffa71df devid 1 transid 2351588 /dev/sdd1
[ 123.379134] btrfs: allowing degraded mounts
[ 123.379137] btrfs: enabling auto recovery
[ 123.379137] btrfs: disk space caching is enabled
[ 123.380401] warning devid 4 missing
[ 123.385362] btrfs: bdev (null) errs: wr 16, rd 0, flush 0, corrupt 0, gen 0
[ 123.385367] btrfs: bdev /dev/sde1 errs: wr 16, rd 0, flush 0, corrupt 0, gen 0
[ 123.446679] Btrfs: too many missing devices, writeable mount is not allowed
[ 123.457684] btrfs: open_ctree failed

The raid requires a certain number of devices for a successful mount. If some of the devices do not exist/have failed/have been replaced, you can try to mount the file system with the below option and continue updating the device set.

Try below options in the same order:

# mount -o degraded,ro /dev/sdd1 /u01
dmesg | tail
# mount -o degraded,recovery /dev/sdd1 /u01
dmesg | tail
# mount -o degraded,recovery,ro /dev/sdd1 /u01
dmesg | tail

Filed Under: CentOS/RHEL 5, CentOS/RHEL 6, CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. copyq: Clipboard manager with advanced features
  2. alias: command not found
  3. How to uninstall libcurl4-openssl-dev software package in Ubuntu
  4. How to Find Number of CPU Sockets on a CentOS/RHEL System
  5. ac – Print statistics on how long users have been connected (Command Examples)
  6. cloudflared: Command-line tool to create a persistent connection to the Cloudflare network
  7. How to get Fibre Channel HBA information from Linux SOSreport
  8. How to Install wine64-preloader software package in Ubuntu
  9. chisel: Create TCP tunnels. Includes both client and server
  10. Understanding TCP Wrappers (/etc/hosts.allow & /etc/hosts.deny) in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright