Merge pull request #67684 from indiscipline/minio
nixos/minio: allow multiple data directories for erasure coding
This commit is contained in:
commit
4c87cb87a2
@ -669,6 +669,12 @@ environment.systemPackages = [
|
|||||||
Environment variables can be set using <option>environment.variables</option>.
|
Environment variables can be set using <option>environment.variables</option>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<option>services.minio.dataDir</option> changed type to a list of paths, required for specifiyng multiple data directories for using with erasure coding.
|
||||||
|
Currently, the service doesn't enforce nor checks the correct number of paths to correspond to minio requirements.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
@ -18,9 +18,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
dataDir = mkOption {
|
dataDir = mkOption {
|
||||||
default = "/var/lib/minio/data";
|
default = [ "/var/lib/minio/data" ];
|
||||||
type = types.path;
|
type = types.listOf types.path;
|
||||||
description = "The data directory, for storing the objects.";
|
description = "The list of data directories for storing the objects. Use one path for regular operation and the minimum of 4 endpoints for Erasure Code mode.";
|
||||||
};
|
};
|
||||||
|
|
||||||
configDir = mkOption {
|
configDir = mkOption {
|
||||||
@ -74,15 +74,14 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d '${cfg.configDir}' - minio minio - -"
|
"d '${cfg.configDir}' - minio minio - -"
|
||||||
"d '${cfg.dataDir}' - minio minio - -"
|
] ++ (map (x: "d '" + x + "' - minio minio - - ") cfg.dataDir);
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.minio = {
|
systemd.services.minio = {
|
||||||
description = "Minio Object Storage";
|
description = "Minio Object Storage";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --config-dir=${cfg.configDir} ${cfg.dataDir}";
|
ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --config-dir=${cfg.configDir} ${toString cfg.dataDir}";
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "minio";
|
User = "minio";
|
||||||
Group = "minio";
|
Group = "minio";
|
||||||
|
Loading…
Reference in New Issue
Block a user