You are not logged in.

#1 2021-02-25 12:21:03

Yann21
Member
Registered: 2020-06-12
Posts: 28

[SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

After trying to compile a certain program for a long time, I restarted my computer and was greeted with the message:

wrong fs type, ... You are now being dropped into an emergency shell".

For reference I use an SSD with btrfs and I noticed that there was a new kernel update 5.11.1 before I rebooted my computer. I tried manually mounting /dev/sdX to new_root in the emergency shell but I get the same error. When I type in lsmod, it shows that btrfs is loaded. I tried arch-chrooting from my USB and btrfsck'ing but it didn't show any error. Lastly, when I look at the dmsg log I see written:

BTRFS error: device total_bytes sould be at most XXX but found XXX
failed to read chunk tree -22
open_ctree failed.

Could you please help me out? I'd be glad to give more information if needed.

Last edited by Yann21 (2021-02-25 19:49:32)

Offline

#2 2021-02-25 12:49:47

seth
Member
Registered: 2012-09-03
Posts: 51,055

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

We'll need more context. In doubt make a photo of the error and post a link.
To be sure, you can also mount the partition from the install iso?

Offline

#3 2021-02-25 12:55:16

Yann21
Member
Registered: 2020-06-12
Posts: 28

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

Thanks for your reply. Yes I can mount the partition from the install iso. Here are the logs I mentioned before:

dmesg:

GPT /dev/sdc (my USB) [...]
BTRFS info (device sdb1): disk space caching is enabled
BTRFS info (device sdb1): has skinny extents
BTRFS error (device sdb1): device total_bytes should be at most 982473768960 but found 998043025408
BTRFS error (device sdb1): failed to read chunk tree: -22
BTRFS error (device sdb1): open_ctree failed
logitech ....

Error when I boot my computer:

Starting version 247.3-1-arch
******** WARNING *******
The root device is not configured to be mounted read-write! It may be fsck'd again later.
******************************
mount: /new_root: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
You are now being dropped into an emergency shell.
sh: can't access tty: job controb turned off
[rootfs ]# mount /dev/sdb1 new_root/
mount: /new_root: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
[rootfs ]# _

Last edited by Yann21 (2021-02-25 13:02:06)

Offline

#4 2021-02-25 13:34:36

seth
Member
Registered: 2012-09-03
Posts: 51,055

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

******** WARNING *******
The root device is not configured to be mounted read-write! It may be fsck'd again later.
******************************

Please post the /etc/fstab of the installed system.

BTRFS error (device sdb1): device total_bytes should be at most 982473768960 but found 998043025408

https://www.spinics.net/lists/linux-btr … 10752.html

Offline

#5 2021-02-25 18:11:29

Yann21
Member
Registered: 2020-06-12
Posts: 28

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

I'm writing from my desktop after having found the solution. First of all thanks seth!

What happened is I maxed out on my drive memory after compiling the program.

df -h

was showing 200GB of available space whereas

btrfs filesystem usage 

was saying that in reality everything was _unallocated_.

btrfs resize max /

is a temporary fix which allowed me to log in. I'll upload a real solution as soon as I find it.

Last edited by Yann21 (2021-02-25 18:12:44)

Offline

#6 2021-02-25 18:37:18

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

That it shows your 200GB free space as "unallocated" is not a problem. It's normal. The unallocated parts are the free space in the filesystem (there is also a little bit of free space inside the "allocated" part).

Last edited by Ropid (2021-02-25 18:38:24)

Offline

#7 2021-02-25 19:43:51

Yann21
Member
Registered: 2020-06-12
Posts: 28

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

My bad. But in that case, I have no clue if and why btrfs sub resize max / solved my issue.

Offline

#8 2021-02-25 20:17:53

seth
Member
Registered: 2012-09-03
Posts: 51,055

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

Some error in the filesystem which apparently was 14.5GB bigger than the partition.
Either a bug in btrfs or did you maybe repartition the disk and forgot to shrink the FS?
(It's *exactly* 14.5GB which is a bit suspicious for a random error)

Offline

#9 2021-02-26 09:01:13

VGrol
Member
Registered: 2021-02-26
Posts: 1

Re: [SOLVED] mount: /new_root: wrong fs type, bad option... (btrfs)

I think it's a bug in BTRFS, as Seth implied it's a bit too large of an error.
I actually had an identical issue that was solved by a resize of root, which shrank the volume of the partition by 16GB,
where as nothing has changed in regards to the drive in the last year or two.

The trigger was updating to kernel 5.11.
Identical output to Yann.

Offline

Board footer

Powered by FluxBB