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

Update path in udev rule of mdadm #6006

Merged
merged 1 commit into from
Jan 29, 2015
Merged

Update path in udev rule of mdadm #6006

merged 1 commit into from
Jan 29, 2015

Conversation

ts468
Copy link
Contributor

@ts468 ts468 commented Jan 27, 2015

Could you please check if that change makes sense? Something like that was required by nixos-rebuild.

@lucabrunox
Copy link
Contributor

cc @edolstra

@peti
Copy link
Member

peti commented Jan 28, 2015

👍

@domenkozar
Copy link
Member

Same should be done for udev-md-raid-arrays.rules

@ts468
Copy link
Contributor Author

ts468 commented Jan 29, 2015

udev-md-raid-arrays.rules does not contain any path that needs replacement, at least as far as I can see

@domenkozar
Copy link
Member

$ grep sbin /nix/store/2a1xnmzw1l1clm39r0ql2id02vvnjyp3-mdadm-3.3/lib/udev/rules.d/*
/nix/store/2a1xnmzw1l1clm39r0ql2id02vvnjyp3-mdadm-3.3/lib/udev/rules.d/63-md-raid-arrays.rules:IMPORT{program}="/sbin/mdadm --detail --export $devnode"
/nix/store/2a1xnmzw1l1clm39r0ql2id02vvnjyp3-mdadm-3.3/lib/udev/rules.d/64-md-raid-assembly.rules:ACTION=="add", RUN+="/sbin/mdadm --incremental $devnode --offroot"
/nix/store/2a1xnmzw1l1clm39r0ql2id02vvnjyp3-mdadm-3.3/lib/udev/rules.d/64-md-raid-assembly.rules:ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/sbin/mdadm -If $name --path $env{ID_PATH}"
/nix/store/2a1xnmzw1l1clm39r0ql2id02vvnjyp3-mdadm-3.3/lib/udev/rules.d/64-md-raid-assembly.rules:ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/sbin/mdadm -If $name"

@ts468
Copy link
Contributor Author

ts468 commented Jan 29, 2015

@iElectric, you're right, sorry, I didn't see the IMPORT rule. I've updated the PR.

domenkozar added a commit that referenced this pull request Jan 29, 2015
Update path in udev rule of mdadm
@domenkozar domenkozar merged commit 54f0b25 into NixOS:master Jan 29, 2015
@ts468
Copy link
Contributor Author

ts468 commented Jan 30, 2015

@aszlig, thanks for pointing that out! So what do you suggest?
Without the patch nixos-rebuild fails, at least for me, because it somehow checks whether all udev rules can at least find the referenced binaries. With it, the system may not boot anymore...

domenkozar added a commit that referenced this pull request Jan 30, 2015
@lucabrunox
Copy link
Contributor

@ts468 it's weird that it's not working for you, as it's patched by nixos: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/hardware/udev.nix#L52
Perhaps you messed up with something else.

@ts468 ts468 deleted the mdadm branch February 3, 2015 10:56
domenkozar referenced this pull request Mar 30, 2015
This reverts commit 1faf610. It
causes the size of the initrd to explode from ~6 MB to 19 MB:

  http://hydra.nixos.org/build/15728196

The reason is that mdadm now contains a self-reference:

  $ strings ./result/sbin/mdadm  | grep /nix/store
  ...
  ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="%s", ENV{ID_PATH}=="%s", RUN+="/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdadm --incremental $env{DEVNAME}"
  ACTION=="add", SUBSYSTEM=="block", ENV{ID_PATH}=="%s", RUN+="/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdadm --incremental $env{DEVNAME}"
/nix/store/y1ap6va0av6jhxf7ddnr8vdwxd7b44gd-mdadm-3.3.2/sbin/mdmon

(Previously, it referred to /sbin/mdadm.) This causes mdadm, glibc and
linux-headers to be added to the initrd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants