On 2/18/20 5:55 PM, Aaron Lauterer wrote:
in some situations it is possible, that a disk does not have a
/dev/disk/by-id path, mainly AFAICT inside VMs with virtio disks.
Commit e1b490865f750e08f6c9c6b7e162e7def9dcc411 forgot to handle this
situation which resultet in a failed installation.
Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com>
---
thanks @stoiko for helping me debugging this.
tested with ZFS (3 disks, raidz1) and ext4 in UEFI and BIOS
mode.
proxinstall | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxinstall b/proxinstall
index c9d17f1..a87f1c7 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1357,7 +1357,7 @@ sub extract_data {
foreach my $hd (@$devlist) {
my $devname = @$hd[1];
- my $by_id = find_stable_path ("/dev/disk/by-id", $devname);
+ my $by_id = find_stable_path ("/dev/disk/by-id", $devname) ||
$devname;
IMHO it feels a bit strange to assign $devname to the $by_id variable.
Wouldn't it be nicer to instead do the replace below only conditionally?
$vdev =~ s/ $devname/ $by_id/;
}
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel