lvm2: fix lvresize with filesystem

- move to libexec from lib/libexec
- add path to config, if services.lvm.enable is set
This commit is contained in:
ajs124
2026-02-09 13:10:23 +01:00
parent 529c52fbd3
commit a0eed32cb5
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -51,7 +51,7 @@ in
config = mkMerge [
{
# minimal configuration file to make lvmconfig/lvm2-activation-generator happy
environment.etc."lvm/lvm.conf".text = "config {}";
environment.etc."lvm/lvm.conf".text = lib.mkBefore "config {}";
}
(mkIf cfg.enable {
systemd.tmpfiles.packages = [ cfg.package.out ];
@@ -59,6 +59,8 @@ in
systemd.packages = [ cfg.package ];
services.udev.packages = [ cfg.package.out ];
environment.etc."lvm/lvm.conf".text =
"global/lvresize_fs_helper_executable = ${pkgs.lvm2.scripts}/libexec/lvresize_fs_helper";
})
(mkIf config.boot.initrd.services.lvm.enable {
# We need lvm2 for the device-mapper rules
@@ -71,9 +73,7 @@ in
systemd.sockets."dm-event".wantedBy = [ "sockets.target" ];
systemd.services."lvm2-monitor".wantedBy = [ "sysinit.target" ];
environment.etc."lvm/lvm.conf".text = ''
dmeventd/executable = "${cfg.package}/bin/dmeventd"
'';
environment.etc."lvm/lvm.conf".text = "dmeventd/executable = ${cfg.package}/bin/dmeventd";
services.lvm.package = mkDefault pkgs.lvm2_dmeventd;
})
(mkIf cfg.boot.thin.enable {
+1 -1
View File
@@ -202,7 +202,7 @@ stdenv.mkDerivation rec {
moveToOutput bin/lvmdump $scripts
moveToOutput bin/lvm_import_vdo $scripts
moveToOutput bin/lvmpersist $scripts
moveToOutput libexec/lvresize_fs_helper $scripts/lib
moveToOutput libexec/lvresize_fs_helper $scripts
''
+ lib.optionalString (!enableCmdlib) ''
moveToOutput lib/libdevmapper.so $lib