From 063ae64af3d2784581dc4ea054a5019ac5cb1173 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Tue, 2 Jul 2019 16:44:31 +0200 Subject: [PATCH] clear zpool labels on selected disks' partitions along with `pvremove -ff` and writing zeroes to the first 16M of all partitions, which belong to disks selected in the installer run `zpool labelclear`. This prevents a failure to boot after installation, if the disks were previously also used as a zpool called rpool, but in a different configuration (e.g. installing a raidzX first and then changing to raid10). --- proxinstall | 1 + 1 file changed, 1 insertion(+) diff --git a/proxinstall b/proxinstall index e6a29b3..5f4544a 100755 --- a/proxinstall +++ b/proxinstall @@ -900,6 +900,7 @@ my $clean_disk = sub { next if $part eq $disk; next if $part !~ /^\Q$disk\E/; eval { syscmd("pvremove -ff -y $part"); }; + eval { syscmd("zpool labelclear -f $part"); }; eval { syscmd("dd if=/dev/zero of=$part bs=1M count=16"); }; } }; -- 2.39.2