failed to read the system array: -2 / open_ctree failed

Started by Christoph Anton Mitterer on Aug 18, 2021 · 4 messages from 3 authors · Last reply Aug 19, 2021

open the first message on its own page

Message details and related content
Hey.

I have a (physically not accessible) server that runs Debian unstable
with a 5.10 kernel and two SATA HDDs which have a RAID1 btrfs.

Every now and then the server ... well I don't know, but it probably
crashes and then hangs at boot when it tries to mount the root fs
(which is the aforementioned btrfs RAID) with the error shown in the
screenshot.


When I boot from a rescue system (kernel 5.13.1, but only btrfs-progs
v4.20.1) and do a normal and lowmem fsck, nothing is found:
root@rescue ~ # btrfs check /dev/sda2  ; echo $?
Opening filesystem to check...
Checking filesystem on /dev/sda2
UUID: 67e35b5c-3dfd-4b00-909d-88308e6b8d85
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 42220433408 bytes used, no error found
total csum bytes: 38246716
total tree bytes: 389464064
total fs tree bytes: 213270528
total extent tree bytes: 110657536
btree space waste bytes: 91413374
file data blocks allocated: 2509346316288
 referenced 27977461760
0
root@rescue ~ # btrfs check --mode=lowmem /dev/sda2  ; echo $?
Opening filesystem to check...
Checking filesystem on /dev/sda2
UUID: 67e35b5c-3dfd-4b00-909d-88308e6b8d85
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space cache

72 more lines

Message details and related content

On 19.08.21 г. 2:36, Christoph Anton Mitterer wrote:
Hey.

The system array is the array which holds the chunk maps i.e it's the
first thing which needs to be read from the super block (housed at
offset 64k in the device). So the error basically tells you that this
cannot be read and return -ENOENT. If the system chunk array is broken
then you can't really do anything with the filesystem. But given your
other explanation - that the system doesn't really have corrupted trees
(as visible from btrfs check output) then this is indeed caused by some
timing issues with the hard drives not being able to be brought up.
Message details and related content
Hey Nikolay, Anand.

After some further testing last night, it seems that a rootdelay=60
options solves the whole issue (and turning it off again, brings it
back in most boots).

So in the end, no btrfs issue at all.

Still a bit strange the whole thing - I'd have expected the device file
to appear only once after the device is really usable.


Thanks,
Chris.
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help