changed fs of lxc to btrfs

This commit is contained in:
Sam 2024-06-29 22:18:42 +01:00
parent 017dba3475
commit 6d41b7dea9
4 changed files with 15 additions and 20 deletions

View File

@ -57,11 +57,6 @@
"com.sun:auto-snapshot:daily" = "true";
"volblocksize" = "8k";
};
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/postgres";
};
};
test = {
type = "zfs_volume";
@ -70,11 +65,6 @@
"com.sun:auto-snapshot:daily" = "true";
"volblocksize" = "8k";
};
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/test";
};
};
};
};

View File

@ -16,6 +16,6 @@ in
# allow static ipv4 for containers
networking.firewall.extraCommands = ''
iptables -a input -i ${lxd_profiles.default.network.name} -m comment --comment "lxd rule for ${lxd_profiles.default.network.name}" -j accept
iptables -A INPUT -i ${lxd_profiles.default.network.name} -m comment --comment "lxd rule for ${lxd_profiles.default.network.name}" -j ACCEPT
'';
}

View File

@ -8,7 +8,7 @@ in
{
virtualisation = {
lxd = {
preseed = {
preseed = {
networks = [
lxd_profiles.default.network
];
@ -17,9 +17,7 @@ in
lxd_profiles.default.profile
];
storage_pools = [
lxd_profiles.default.storage_pool
];
storage_pools = lxd_profiles.default.storage_pools;
};
};
};

View File

@ -9,11 +9,18 @@
};
};
storage_pool = {
name = "postgres";
driver = "disk";
config.source = "/mnt/postgres";
};
storage_pools = [
{
name = "postgres";
driver = "btrfs";
config.source = "/dev/zd0";
}
{
name = "test";
driver = "btrfs";
config.source = "/dev/zd16";
}
];
profile = {
name = "default";