git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/minio: allow multiple data directories for erasure coding
commit9ffc4ad790dbbfcb0ac061d650c1df943b9e084d authorIndiscipline <elephanttalk@protonmail.com> dateSat 10 Apr 2021, 14:42 (6 years ago) parentc32ba28
2 files changed+11−6
nixos/doc/manual/release-notes/rl-2105.xml+6 nixos/modules/services/web-servers/minio.nix+5−6
nixos/doc/manual/release-notes/rl-2105.xml+6
@@ -658,6 +658,12 @@ environment.systemPackages = [
658658 Environment variables can be set using <option>environment.variables</option>.
659659 </para>
660660 </listitem>
661+ <listitem>
662+ <para>
663+ <option>services.minio.dataDir</option> changed type to a list of paths, required for specifiyng multiple data directories for using with erasure coding.
664+ Currently, the service doesn't enforce nor checks the correct number of paths to correspond to minio requirements.
665+ </para>
666+ </listitem>
661667 </itemizedlist>
662668 </section>
663669
nixos/modules/services/web-servers/minio.nix+5−6
@@ -18,9 +18,9 @@ in
1818 };
1919
2020 dataDir = mkOption {
21− default = "/var/lib/minio/data";
22− type = types.path;
23− description = "The data directory, for storing the objects.";
21+ default = [ "/var/lib/minio/data" ];
22+ type = types.listOf types.path;
23+ 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.";
2424 };
2525
2626 configDir = mkOption {
@@ -74,15 +74,14 @@ in
7474 config = mkIf cfg.enable {
7575 systemd.tmpfiles.rules = [
7676 "d '${cfg.configDir}' - minio minio - -"
77− "d '${cfg.dataDir}' - minio minio - -"
78− ];
77+ ] ++ (map (x: "d '" + x + "' - minio minio - - ") cfg.dataDir);
7978
8079 systemd.services.minio = {
8180 description = "Minio Object Storage";
8281 after = [ "network.target" ];
8382 wantedBy = [ "multi-user.target" ];
8483 serviceConfig = {
85− ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --config-dir=${cfg.configDir} ${cfg.dataDir}";
84+ ExecStart = "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --config-dir=${cfg.configDir} ${toString cfg.dataDir}";
8685 Type = "simple";
8786 User = "minio";
8887 Group = "minio";