You are not logged in.

#1 2022-05-15 13:54:45

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 135
Website

[SOLVED]can't mount btrfs partition. error: mount: /mnt: wrong fs type

I have a btrfs partition which has been used for previous arch install. I am doing a new install and get surprising message error when mounting.
I did a clean new partition with fdisk, then did a fresh mkfs.btrfs. I can see my btrfs partition with lsblk and btrfs filesystemshow.
I created some btrfs subvolume on the partition this way:

# btrfs sub cr /mnt/@

and the btrfs sub l /mnt command returns correctly the subvolumes
Now comes the error:

# mount -t btrfs /dev/sdb2 /mnt
# ls -al /mnt/
drwxr-xr-x 1 root root  20 May 15 13:25 .
drwxr-xr-x 1 root root 100 May 15 13:34 ..
drwxr-xr-x 1 root root   0 May 15 13:26 @
drwxr-xr-x 1 root root   0 May 15 13:26 @home
drwxr-xr-x 1 root root   0 May 15 13:26 @var
# umount /mnt
# mount -o noatime,commit=120,compress=zstd,space_cache,ssd,subvol=@ /dev/sdb2 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error.

I ran btrfs check which did not show any error.

Why can't I mount the partition with all the btrfs options?

Last edited by gabx (2022-05-15 14:18:07)

Offline

#2 2022-05-15 14:07:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [SOLVED]can't mount btrfs partition. error: mount: /mnt: wrong fs type

Can you mount with just the subvol option?

Online

#3 2022-05-15 14:16:27

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 135
Website

Re: [SOLVED]can't mount btrfs partition. error: mount: /mnt: wrong fs type

I found this error when running dmesg:

[  226.484978] BTRFS error (device sdb2): cannot disable free space tree
[  226.486681] BTRFS error (device sdb2): open_ctree failed

Then googlin this error, I found this issue on btrfs github which solved my issue:

# mount -o noatime,commit=120,compress=zstd,space_cache,ssd,subvol=@,clear_cache LABEL=magnolia /mnt
# 

No more errors

Offline

Board footer

Powered by FluxBB