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’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
@ -14,7 +14,7 @@
|
|||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.zfs.forceImportRoot = false;
|
||||
boot.zfs.extraPools = [ "fast01" "medium01" "work01" "small01" ];
|
||||
boot.zfs.extraPools = [ "fast01" "work01" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
|
|
|
@ -3,11 +3,16 @@ _:
|
|||
let
|
||||
host = "s3.dgnum.eu";
|
||||
webHost = "cdn.dgnum.eu";
|
||||
|
||||
data_dir = "/data/slow/garage/data";
|
||||
metadata_dir = "/data/fast/garage/meta";
|
||||
in {
|
||||
services.garage = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
inherit data_dir metadata_dir;
|
||||
|
||||
replication_mode = "none";
|
||||
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 = {
|
||||
${host} = {
|
||||
enableACME = true;
|
||||
|
|
Loading…
Reference in a new issue