Skip to content

Commit

Permalink
types/lvm_vg: load mapper target kernel module before creating lv
Browse files Browse the repository at this point in the history
this fixes creating a logical volume of type raid0.
  • Loading branch information
networkException committed Sep 10, 2023
1 parent 2a02ccd commit 705c60c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/types/lvm_vg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
vgcreate ${config.name} \
"''${lvm_devices[@]}"
${lib.concatMapStrings (lv: ''
modprobe "dm-${lv.lvm_type}"
lvcreate \
--yes \
${if lib.hasInfix "%" lv.size then "-l" else "-L"} ${lv.size} \
Expand Down

0 comments on commit 705c60c

Please sign in to comment.