Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZFS legacy mounting not working after recent version update (zfs: 2.0.0 -> 2.0.1) #110376

Closed
Philipp-M opened this issue Jan 21, 2021 · 9 comments · Fixed by #111375
Closed

ZFS legacy mounting not working after recent version update (zfs: 2.0.0 -> 2.0.1) #110376

Philipp-M opened this issue Jan 21, 2021 · 9 comments · Fixed by #111375

Comments

@Philipp-M
Copy link
Member

Describe the bug

When booting with ZFS legacy mountpoints like this:

{
  fileSystems."/tank/media" = {
    device = "tank/media";
    fsType = "zfs";
  };
  boot.supportedFilesystems = [ "zfs" ];
  boot.zfs.enableUnstable = true; # this doesn't seem to matter
}

the boot fails as described in this post:
https://discourse.nixos.org/t/since-updating-zfs-recently-one-of-my-volumes-fails-to-mount-at-boot/11054

To Reproduce
I guess this is difficult if not anyone is having this issue with legacy mountpoints, but it seems that in the linked discourse post, I'm not the only one with this issue.

But I've tested it just on this commit: e44a4ab
where it fails, and on this (just one commit before): c92a996
And there everything works.

Expected behavior

Mounting of legacy ZFS mountpoints succeeds while booting.

Notify maintainers
@hmenke @jcumming @jonringer @wizeman @fpletz @globin @Mic92

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/since-updating-zfs-recently-one-of-my-volumes-fails-to-mount-at-boot/11054/9

@Mic92
Copy link
Member

Mic92 commented Jan 23, 2021

Can you check if this is fixed by openzfs/zfs@03f036c ?

@edmundmiller
Copy link
Contributor

@Mic92 I tried with this overlay:

self: super: {
  zfs = super.zfs.overrideAttrs (old: {
    extraPatches = (old.extraPatches or [ ]) ++ [
      (super.fetchpatch {
        url =
          "https://github.com/openzfs/zfs/commit/03f036cbccdd8699f5fe8540ef317595a35bceb8.patch";
        sha256 = "07sx98d422589gxr8wflfpkdd0k44kbagxl3b51i56ky2wfix7rc";
      })
    ];
  });
}

Not sure if that's the way to do it, but it didn't work.

@jonringer
Copy link
Contributor

it should probably be

self: super: {
  zfs = super.zfs.overrideAttrs (old: {
    patches = (old.patches or [ ]) ++ [
      (super.fetchpatch {
        url =
          "https://github.com/openzfs/zfs/commit/03f036cbccdd8699f5fe8540ef317595a35bceb8.patch";
        sha256 = "07sx98d422589gxr8wflfpkdd0k44kbagxl3b51i56ky2wfix7rc";
      })
    ];
  });
}

@edmundmiller
Copy link
Contributor

Thanks I tried that, and it didn't work. Not sure how to confirm the patch got applied properly though.

@jonringer
Copy link
Contributor

if you have the log output, you will have something like:

patchPhase
applying patches to ....

@bryanasdev000
Copy link
Member

Guys, just to report, I'm in the latest zen with ZFS 2.0.1-1 with encryption, unstable channel and I'm not having any problems.

@Philipp-M
Copy link
Member Author

I've just found time to test this, thanks for the research.

The patch did indeed fix the issue for me!
(I've checked the log output for the application of the patch).

For the sake of completeness the overlay I've applied (needed a slightly different sha256 sum for me):

{
  nixpkgs.overlays = [
    (self: super: {
      zfs = super.zfs.overrideAttrs (old: {
        patches = (old.patches or [ ]) ++ [
          (super.fetchpatch {
            url =
              "https://github.com/openzfs/zfs/commit/03f036cbccdd8699f5fe8540ef317595a35bceb8.patch";
            sha256 = "0b2p8ylhm5dgscjmr650gx1f3lnsvkz4hb9nlx2hllm8v50z3fl2";
          })
        ];
      });
    })
  ];
}

@Mic92
Copy link
Member

Mic92 commented Jan 29, 2021

I've just found time to test this, thanks for the research.

The patch did indeed fix the issue for me!
(I've checked the log output for the application of the patch).

For the sake of completeness the overlay I've applied (needed a slightly different sha256 sum for me):

{
  nixpkgs.overlays = [
    (self: super: {
      zfs = super.zfs.overrideAttrs (old: {
        patches = (old.patches or [ ]) ++ [
          (super.fetchpatch {
            url =
              "https://github.com/openzfs/zfs/commit/03f036cbccdd8699f5fe8540ef317595a35bceb8.patch";
            sha256 = "0b2p8ylhm5dgscjmr650gx1f3lnsvkz4hb9nlx2hllm8v50z3fl2";
          })
        ];
      });
    })
  ];
}

Could you make a PR adding the patch to zfs?

Philipp-M added a commit to Philipp-M/nixpkgs that referenced this issue Jan 31, 2021
hmenke pushed a commit to hmenke/nixpkgs that referenced this issue Feb 1, 2021
Closes NixOS#110376

(cherry picked from commit c67f9d2)
NeQuissimus pushed a commit that referenced this issue Feb 1, 2021
Closes #110376

(cherry picked from commit c67f9d2)
jb55 pushed a commit to jb55/nixpkgs that referenced this issue Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants