From 55213d114c5dc9dd05377424ab8d1ed06097f8e7 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Wed, 25 Oct 2023 13:55:00 +0100 Subject: [PATCH] ts-host-install,preseed_create: Do lvm vgextend at install time MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When there's more than one disk, like the "pinot?" machine, the name assigned to e.g. "sda" may change after a reboot, at least when installing Debian Bookworm, which is using Linux 6.1. I believe Linux probes disk controller in parallel and assign "sda" to the first controller to respond, or something like that, so disk aren't assigned a name in a predictable order. So, instead of extending lvm volume group to a new disk on reboot, do that at install time when we know that lvm is on sda. Alternatively, we could try to set "d-i partman-auto/disk" with a list of all disk, but that would mean knowing all the disk before starting the machine. This new shell script in /lib/partman/finish.d/ should work in all debian, so replace the script in ts-host-install by this new one. Signed-off-by: Anthony PERARD Acked-by: Roger Pau Monné --- Osstest/Debian.pm | 21 +++++++++++++++++++++ ts-host-install | 9 --------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 98b2fc8..14ec229 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -1312,6 +1312,27 @@ echo === set +e ls -l /dev/sd* true +END + + # Extend lvm vg to other disks + preseed_hook_installscript($ho, $sfx, + '/lib/partman/finish.d', '99extend-vg', <