Re: [HELP] open_ctree failed when mounting RAID1

David Sterba
2022-06-06T11:24:14Z

On Tue, May 31, 2022 at 09:50:52PM +0200, Lucas Rückert wrote:
> Hi,
>
> i run two HHD's(sda;sdb) in RAID1.
>
> Kernel: 4.9
>
> Distro: Linux odroid 4.9.277-83 #1 SMP PREEMPT Mon Feb 28 15:16:26 UTC
> 2022 aarch64 aarch64 aarch64 GNU/Linux
>
> btrfs-progs: 5.4.1
>
> I created the filesystem with:
>
> mkfs.btrfs -d raid1 -m raid1 -L somelable -f /dev/sda /dev/sdb
>
>
> And added it to my fstab:
>
> UUID=<uuid>        /mnt/somefolder     btrfs compress=zstd   0       2
>
>
> When running:
>
> mount -a
>
> i get an error:
>
> mount: /mnt/backup: wrong fs type, bad option, bad superblock on
> /dev/sda, missing codepage or helper program, or other error.
>
>
> and dmesg reports:
>
> BTRFS error (device sdb): open_ctree failed

I got pointed to this report. First I suspected that there are some
lines missing from the dmesg log, like what was the error but it turns
out that almost all invalid option values lack any message, which makes
the error analysis hard. Thanks for your report, I've sent a patch that
adds the missing messages, there's a lot of them.