From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 3/3] fix #6285: install: always set up zfs modprobe configuration
Date: Fri, 4 Apr 2025 14:46:48 +0200 [thread overview]
Message-ID: <20250404124651.1283950-4-c.heiss@proxmox.com> (raw)
In-Reply-To: <20250404124651.1283950-1-c.heiss@proxmox.com>
Fixes #6285 [0].
Came up a few times now in the forum (most recently [0], german) and is
a potential source of confusion for users, if the file does not exist on
(new) installations.
It makes indeed sense to just unconditionally write to
/etc/modprobe.d/zfs.conf. Often users create a separate ZFS pool after
installation, on separate disks, where it still makes sense to have a
more sensible zfs_arc_max default, at least on PVE.
It has been also exposed for all products, with sensible defaults each,
for some time now [1][2].
[0] https://bugzilla.proxmox.com/show_bug.cgi?id=6285
[1] https://forum.proxmox.com/threads/ram-auslastung-nimmt-%C3%BCber-die-zeit-drastisch-zu.164527/#post-760989
[2] https://git.proxmox.com/?p=pve-installer.git;a=commitdiff;h=a42a9db20976fbc0abb35d53416cee926b6efafe
[3] https://git.proxmox.com/?p=pve-installer.git;a=commitdiff;h=8772ebc35a7f43b97f5433c4d328ea784eaf902c
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Proxmox/Install.pm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm
index 57fd899..2e9b131 100644
--- a/Proxmox/Install.pm
+++ b/Proxmox/Install.pm
@@ -340,9 +340,7 @@ my sub zfs_setup_module_conf {
my $arc_max_mib = Proxmox::Install::Config::get_zfs_opt('arc_max');
my $arc_max = Proxmox::Install::RunEnv::clamp_zfs_arc_max($arc_max_mib) * 1024 * 1024;
- if ($arc_max > 0) {
- file_write_all("$targetdir/etc/modprobe.d/zfs.conf", "options zfs zfs_arc_max=$arc_max\n")
- }
+ file_write_all("$targetdir/etc/modprobe.d/zfs.conf", "options zfs zfs_arc_max=$arc_max\n");
}
sub get_btrfs_raid_setup {
@@ -1329,10 +1327,13 @@ _EOD
file_write_all("$targetdir/etc/default/grub.d/zfs.cfg", $zfs_snippet);
file_write_all("$targetdir/etc/kernel/cmdline", "root=ZFS=$zfs_pool_name/ROOT/$zfs_root_volume_name boot=zfs $target_cmdline\n");
-
- zfs_setup_module_conf($targetdir);
}
+ # Always write zfs module parameter - even if the user did not select ZFS-on-root.
+ # It still makes sense to provide a sensible default for zfs_arc_max, in case a
+ # separate zfs pool is created afterwards.
+ zfs_setup_module_conf($targetdir);
+
diversion_remove($targetdir, "/usr/sbin/update-grub");
diversion_remove($targetdir, "/usr/sbin/update-initramfs");
--
2.48.1
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-04-04 12:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 12:46 [pve-devel] [PATCH installer 0/3] fix #6285: " Christoph Heiss
2025-04-04 12:46 ` [pve-devel] [PATCH installer 1/3] run env: always return proper value for default zfs max arc size Christoph Heiss
2025-04-04 12:46 ` [pve-devel] [PATCH installer 2/3] tui: bootdisk: " Christoph Heiss
2025-04-04 12:46 ` Christoph Heiss [this message]
2025-04-04 13:01 ` [pve-devel] applied-series: [PATCH installer 0/3] fix #6285: always set up zfs modprobe configuration Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250404124651.1283950-4-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.