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

View File

@ -16,6 +16,6 @@ in
# allow static ipv4 for containers # allow static ipv4 for containers
networking.firewall.extraCommands = '' 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 = { virtualisation = {
lxd = { lxd = {
preseed = { preseed = {
networks = [ networks = [
lxd_profiles.default.network lxd_profiles.default.network
]; ];
@ -17,9 +17,7 @@ in
lxd_profiles.default.profile lxd_profiles.default.profile
]; ];
storage_pools = [ storage_pools = lxd_profiles.default.storage_pools;
lxd_profiles.default.storage_pool
];
}; };
}; };
}; };

View File

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