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

(k)vdo: init #154981

Merged
merged 9 commits into from
Apr 5, 2022
Merged

(k)vdo: init #154981

merged 9 commits into from
Apr 5, 2022

Conversation

ajs124
Copy link
Member

@ajs124 ajs124 commented Jan 14, 2022

Motivation for this change

I'm thinking about using this (cc @Mr-Pi)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@@ -7,17 +7,18 @@ in {
options.services.lvm = {
package = mkOption {
type = types.package;
default = if cfg.dmeventd.enable then pkgs.lvm2_dmeventd else pkgs.lvm2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need a corresponding change to LVM2 package choice somewhere else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I don't think so. lvm2_dmeventd is only referenced by the dmraid package and in this line, AFAICT.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I am not sure what dmeventd does, but it seems plausible that when it enabled you need to use a build of LVM that includes it…

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sure. lvm2_vdo also includes dmeventd support. The package option is just set lower in the module now, in lines 44 and 89.

I think this should work, but if you think something is wrong here or this code is unclear, I'm open to suggestions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it dependent on vdo, so that dmeventd-only case is not handled?

The problem is that I of course don't use dmeventd so I do not know what is a good enough easy check…

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a link to the wrong file? (package not test)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, you said that dmeventd gets used when resizing happens? Does it happen here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I meant we as in @helsinki-systems use it for that. I can put that into the thin test or vdo test in the next few days/weeks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those were more "few" weeks than I intended, but now it's done.

@7c6f434c
Copy link
Member

7c6f434c commented Apr 5, 2022

@ofborg test lvm2

@7c6f434c
Copy link
Member

7c6f434c commented Apr 5, 2022

@ofborg test lvm2.lvm-vdo-linux-5_15

@7c6f434c
Copy link
Member

7c6f434c commented Apr 5, 2022

Hm, maybe add a comment in tthe test how to run the test quickly?

(in the sense of being able to run it ffor whatever reason on some update without figuring out how the tetst matrix generation works)

@7c6f434c
Copy link
Member

7c6f434c commented Apr 5, 2022

@ofborg test lvm2.lvm-thinpool-linux-latest

@7c6f434c 7c6f434c merged commit e2fd601 into NixOS:master Apr 5, 2022
@ajs124 ajs124 deleted the feat/lvm2-vdo branch April 5, 2022 13:37
let
tests = let callTest = p: lib.flip (import p) { inherit system pkgs; }; in {
thinpool = { test = callTest ./thinpool.nix; kernelFilter = lib.id; };
# we would like to test all versions, but the kernel module currently does not compile against the other versions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we mark the kernel module as broken then for other kernel versions? Took me an hour to see my error…

@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/lvm-vdo-on-nixos/16143/2

@ajs124
Copy link
Member Author

ajs124 commented May 14, 2022 via email

})
(mkIf cfg.boot.vdo.enable {
boot = {
initrd = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test in the installer.nix tests to make sure this initrd stuff actually works?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants