auto start osd

code from https://wiki.nixos.org/wiki/Ceph
cephiroth-v3
Lzebulon 2026-01-31 13:51:25 +01:00
parent 929b5935c2
commit 342cd2abc6
No known key found for this signature in database
GPG Key ID: D6CDAB8050CBBE7D
1 changed files with 18 additions and 0 deletions

View File

@ -55,5 +55,23 @@
}; };
}; };
# automaticaly start osd when we restart the server
systemd.services.ceph-mesh = {
enable = true;
description = "Ceph OSD Bindings";
unitConfig = {
After = "local-fs.target";
Wants = "local-fs.target";
};
serviceConfig = {
Type = "oneshot";
KillMode = "none";
Environment = "CEPH_VOLUME_TIMEOUT=10000 PATH=$PATH:/run/current-system/sw/bin/";
ExecStart = "/bin/sh -c 'timeout $CEPH_VOLUME_TIMEOUT /run/current-system/sw/bin/ceph-volume lvm activate --all --no-systemd'";
TimeoutSec = 0;
};
wantedBy = ["multi-user.target"];
};
environment.systemPackages = [ pkgs.ceph pkgs.smartmontools ]; environment.systemPackages = [ pkgs.ceph pkgs.smartmontools ];
} }