[pve-devel] [PATCH installer 3/4] fix #1410: zfs: create /var/lib/vz as separate dataset

Stoiko Ivanov s.ivanov at proxmox.com
Thu Nov 16 16:00:40 CET 2023


this enables the users to set reservations on / separate from
/var/lib/vz - where backups, ISOs, and other data might fill the
complete pool.

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 Proxmox/Install.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index c868992..a96249e 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -189,6 +189,9 @@ sub zfs_create_rpool {
     syscmd("zfs create $pool_name/ROOT/$root_volume_name")  == 0 ||
 	die "unable to create zfs $pool_name/ROOT/$root_volume_name volume\n";
 
+    syscmd("zfs create -p $pool_name/ROOT/$root_volume_name/var/lib/vz")  == 0 ||
+	die "unable to create zfs $pool_name/ROOT/$root_volume_name/var/lib/vz volume\n";
+
     # default to `relatime` on, fast enough for the installer and production
     syscmd("zfs set atime=on relatime=on $pool_name") == 0 || die "unable to set zfs properties\n";
 
-- 
2.39.2






More information about the pve-devel mailing list