[SOLVED] Unable to mount btrfs partition in user space since 6.8

Hi,

I’ve a LUKS partition with a BTRFS on it with multiple subvolumes.

My hardware-configuration.nix look like this:

hardware-configuration.nix
  fileSystems."/" =
    { device = "/dev/disk/by-uuid/e76a680e-8844-4e92-acdc-8037b5c15aa6";
      fsType = "btrfs";
      options = [ "subvol=@root" ];
    };

  boot.initrd.luks.devices."luks-7f99562e-6fdb-48af-915d-5ca988d73ec7".device = "/dev/disk/by-uuid/7f99562e-6fdb-48af-915d-5ca988d73ec7";

  fileSystems."/nix" =
    { device = "/dev/disk/by-uuid/e76a680e-8844-4e92-acdc-8037b5c15aa6";
      fsType = "btrfs";
      options = [ "subvol=@nix" ];
    };

  fileSystems."/home" =
    { device = "/dev/disk/by-uuid/e76a680e-8844-4e92-acdc-8037b5c15aa6";
      fsType = "btrfs";
      options = [ "subvol=@home" ];
    };

  fileSystems."/boot/efi" =
    { device = "/dev/disk/by-uuid/2E04-81BF";
      fsType = "vfat";
    };

  fileSystems."/home/alex/.local/share/containers" =
    { device = "/dev/disk/by-uuid/e76a680e-8844-4e92-acdc-8037b5c15aa6";
      fsType = "btrfs";
      options = [ "subvol=@alex_containers" ];
    };

I’ve added some options in another file like this:

my_hardware_configuration.nix
  fileSystems."/nix" = {
    options = [
      "noatime"
      "autodefrag"
    ];
  };

  fileSystems."/home/alex/.local/share/containers" = {
    options = [
      "noatime"
      "autodefrag"
      "uid=1000"
    ];
  };

No issues what so ever with kernel 6.7.7.

But since 6.8.{0,1} I’ve got issues at boot.

# journalctl -u home-alex-.local-share-containers.mount
[...]
-- Boot 0e56a8ef13fa41d18242118ff4e48cec --
mars 17 12:33:31 toto systemd[1]: Mounting /home/alex/.cache...
mars 17 12:33:31 toto mount[925]: mount: /home/alex/.cache: wrong fs type, bad option, bad superblock on /dev/mapper/luks-7f99562e-6fdb-48af-915d-5ca988d73ec7, missing codepage or helper program, or other error.
mars 17 12:33:31 toto mount[925]:        dmesg(1) may have more information after failed mount system call.
mars 17 12:33:31 toto systemd[1]: home-alex-.cache.mount: Mount process exited, code=exited, status=32/n/a
mars 17 12:33:31 toto systemd[1]: home-alex-.cache.mount: Failed with result 'exit-code'.
mars 17 12:33:31 toto systemd[1]: Failed to mount /home/alex/.cache.
mars 17 12:34:43 toto systemd[1]: Mounting /home/alex/.cache...
mars 17 12:34:43 toto mount[1102]: mount: /home/alex/.cache: wrong fs type, bad option, bad superblock on /dev/mapper/luks-7f99562e-6fdb-48af-915d-5ca988d73ec7, missing codepage or helper program, or other error.
mars 17 12:34:43 toto mount[1102]:        dmesg(1) may have more information after failed mount system call.
mars 17 12:34:43 toto systemd[1]: home-alex-.cache.mount: Mount process exited, code=exited, status=32/n/a
mars 17 12:34:43 toto systemd[1]: home-alex-.cache.mount: Failed with result 'exit-code'.
mars 17 12:34:43 toto systemd[1]: Failed to mount /home/alex/.cache.
mars 17 12:34:59 toto systemd[1]: Mounting /home/alex/.cache...
mars 17 12:34:59 toto mount[1227]: mount: /home/alex/.cache: wrong fs type, bad option, bad superblock on /dev/mapper/luks-7f99562e-6fdb-48af-915d-5ca988d73ec7, missing codepage or helper program, or other error.
mars 17 12:34:59 toto mount[1227]:        dmesg(1) may have more information after failed mount system call.
mars 17 12:34:59 toto systemd[1]: home-alex-.cache.mount: Mount process exited, code=exited, status=32/n/a
mars 17 12:34:59 toto systemd[1]: home-alex-.cache.mount: Failed with result 'exit-code'.
mars 17 12:34:59 toto systemd[1]: Failed to mount /home/alex/.cache.

But other partitions seams ok (I’ve not found any entries in journactl about).

Is ther an issue ? Am I doing something wrong here ?

Note: kernel output is available here: Issue with BTRFS · GitHub

I’ve open an issue on the github project: Unable to mount partition with specific UID since 6.8 · Issue #296851 · NixOS/nixpkgs · GitHub