diff --git a/ops/nixos/lib/blade.nix b/ops/nixos/lib/blade.nix index 275994daa1..2f5d358a15 100644 --- a/ops/nixos/lib/blade.nix +++ b/ops/nixos/lib/blade.nix @@ -75,6 +75,19 @@ in { mgr.enable = config.services.ceph.mon.enable; rgw.enable = true; }; + systemd.services.ceph-osd-lvm-activate = lib.mkIf config.services.ceph.osd.enable { + enable = true; + description = "Ceph OSD pre-start"; + before = [ "network-online.target" "ceph-osd.target" ]; + wantedBy = [ "ceph-osd.target" ]; + + path = [ pkgs.lvm2.bin pkgs.util-linux pkgs.coreutils ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.ceph.out}/bin/ceph-volume lvm activate --all --no-systemd"; + }; + }; virtualisation.libvirtd = { enable = true;