I tried to mount this filesystem

mount /dev/md1 /data

but it failed, the error output of dmesg shows this

dmesg | tail

[98429.781111] BTRFS: failed to read the system array on md1
[98429.787302] BTRFS: open_ctree failed

the solution here might seem like you ought to do this: btrfs-zero-log /dev/md1
but dont do that, that might be dangerous and might destroy important log data
if you did accidentally run it. dont worry, you can still try the fix below.

the solution is to do this:
btrfs device scan
mount /dev/md1 /data

why? well it appears that the btrfs volume here is really part on /dev/md1 and also part on /dev/md2 and part on /dev/sda1 (just the fact that there is more than 1 btrfs devices)

Summary:
the message to take back if you have a multiple device btrfs volume, first run “btrfs device scan” before running the mount command

One thought on “BTRFS – another fix for “open_ctree failed” in multiple device btrfs volume

  1. Thanks! I’ve been trying to mount a btrfs RAID array from inside a docker container, got this error, and device scan fixed it.

Leave a Reply

Your email address will not be published. Required fields are marked *