[pve-devel] [PATCH installer v2 3/4] fix #1410: zfs: create /var/lib/vz as separate dataset
Stoiko Ivanov
s.ivanov at proxmox.com
Thu Nov 16 17:37:58 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.
moved the creation of the root-dataset above the creation of
rpool/data, so that the pve-specifics can remain in one if block.
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
Proxmox/Install.pm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index c868992..48c157a 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -182,13 +182,15 @@ sub zfs_create_rpool {
syscmd("zfs create $pool_name/ROOT") == 0 || die "unable to create zfs $pool_name/ROOT volume\n";
+ syscmd("zfs create $pool_name/ROOT/$root_volume_name") == 0 ||
+ die "unable to create zfs $pool_name/ROOT/$root_volume_name volume\n";
+
if ($iso_env->{product} eq 'pve') {
syscmd("zfs create $pool_name/data") == 0 || die "unable to create zfs $pool_name/data 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";
}
- syscmd("zfs create $pool_name/ROOT/$root_volume_name") == 0 ||
- die "unable to create zfs $pool_name/ROOT/$root_volume_name 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