forked from DGNum/infrastructure
feat(storage01): Update zpool configuration
Use only one pool for slow storage Setup garage to use the available pools
This commit is contained in:
parent
a49774b6a6
commit
0441ebe4ae
2 changed files with 18 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
boot.zfs.forceImportRoot = false;
|
boot.zfs.forceImportRoot = false;
|
||||||
boot.zfs.extraPools = [ "fast01" "medium01" "work01" "small01" ];
|
boot.zfs.extraPools = [ "fast01" "work01" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
|
|
|
@ -3,11 +3,16 @@ _:
|
||||||
let
|
let
|
||||||
host = "s3.dgnum.eu";
|
host = "s3.dgnum.eu";
|
||||||
webHost = "cdn.dgnum.eu";
|
webHost = "cdn.dgnum.eu";
|
||||||
|
|
||||||
|
data_dir = "/data/slow/garage/data";
|
||||||
|
metadata_dir = "/data/fast/garage/meta";
|
||||||
in {
|
in {
|
||||||
services.garage = {
|
services.garage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
inherit data_dir metadata_dir;
|
||||||
|
|
||||||
replication_mode = "none";
|
replication_mode = "none";
|
||||||
compression_level = 7;
|
compression_level = 7;
|
||||||
|
|
||||||
|
@ -37,6 +42,17 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.garage.serviceConfig = {
|
||||||
|
User = "garage";
|
||||||
|
ReadWriteDirectories = [ data_dir metadata_dir ];
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.garage = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "garage";
|
||||||
|
};
|
||||||
|
users.groups.garage = { };
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
${host} = {
|
${host} = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
Loading…
Reference in a new issue