bcachefs icon indicating copy to clipboard operation
bcachefs copied to clipboard

Error reading superblock: ENOENT

Open neilg opened this issue 1 year ago • 5 comments

Every time I mount a bcachefs filesystem I get the following error logged:

[   53.354188] bcachefs (UUID=5d6aa8ff-60bf-4b55-af22-1733959235e4): error reading superblock: error opening UUID=5d6aa8ff-60bf-4b55-af22-1733959235e4: ENOENT
[   53.354621] bcachefs: bch2_fs_get_tree() error: ENOENT

The filesystems all seem to mount ok, and I've run an offline fsck on each of them.

neilg avatar Jan 08 '25 17:01 neilg

Anything previous in the dmesg log?

koverstreet avatar Jan 09 '25 02:01 koverstreet

Nothing that stands out to me. I've attached the full log. dmesg.txt

neilg avatar Jan 09 '25 09:01 neilg

It seems you pass the source ("UUID=5d6aa8ff-60bf-4b55-af22-1733959235e4") as the mount device after decrypting. According to your dmesg log, it showed:

[   19.566897] stage-1-init: [Thu Jan  9 09:40:34 UTC 2025] enter passphrase for /: unlocking successful.
[   19.582355] stage-1-init: [Thu Jan  9 09:40:34 UTC 2025] mounting UUID=5d6aa8ff-60bf-4b55-af22-1733959235e4 on /...

After you enter passphrase, the app executes the mount with the wrong source. May be you can check the transition of stage-1-init process for handling the mount parameters.

hb-lee avatar Jan 18 '25 08:01 hb-lee

I just found a possible solution: Check your hardware-configuration.nix and see if it like this:

fileSystems."/" =
    { device = "UUID=5d6aa8ff-60bf-4b55-af22-1733959235e4";
      fsType = "bcachefs";
    };

if so, change fileSystems.device to "/dev/disk/by-uuid/5d6aa8ff-60bf-4b55-af22-1733959235e4". That works for me.

IntangibleW avatar Feb 07 '25 09:02 IntangibleW

That seems to work for me. No more errors on mounting.

neilg avatar Feb 07 '25 10:02 neilg