From 259657983581ce11ca6b478b60e86f721e845734 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 13 Feb 2021 16:29:18 +0000 Subject: [PATCH] lib/blade: add a ceph-osd-lvm-activate to prep the OSDs --- ops/nixos/lib/blade.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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;