Nixpkgs: btrfs raid rootfs timing problem leads to mount fail

Created on 28 Nov 2019  路  5Comments  路  Source: NixOS/nixpkgs

Describe the bug
I see "btrfs device scan" in my stage 1 script. When I boot, it fails to mount the rootfs. When I drop into the initrd shell, run btrfs device scan and repeat the exact mount command that failed, it works.

To Reproduce
Steps to reproduce the behavior:

  1. install a system with btrfs raid as root
  2. have specific hardware I guess?
  3. see it fail to boot

Expected behavior
File system should be mounted

Screenshots
https://img.pbb.lc/id/Nk95LNx7nWQT623A

Metadata

  • system: "x86_64-linux"

    • host os: Linux 5.4.0, NixOS, 20.03.20191125.89b2c0b (Markhor)

    • multi-user?: yes

    • sandbox: yes

    • version: nix-env (Nix) 2.4pre20191022_9cac895

    • channels(root): "nixos-20.03pre202991.57cf4eb83bc"

    • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
- boot.initrd
bug nixos

All 5 comments

See if this helps: https://github.com/NixOS/nixpkgs/issues/32588. There are a few people who had the same/similar problems with Btrfs over the last few years.

Yes, I also knew about this workaround from IRC, but this obviously shouldn't happen in the first place. Probably there should be some loop doing "btrfs device scan" and trying to mount with a timeout.

I guess this is kind of a duplicate but I would like to keep it open until there is a proper fix. I might prepare a PR for this.

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

When did we add this annoying bot?
It's still an issue for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yawnt picture yawnt  路  3Comments

edolstra picture edolstra  路  3Comments

ob7 picture ob7  路  3Comments

rzetterberg picture rzetterberg  路  3Comments

langston-barrett picture langston-barrett  路  3Comments