[pve-devel] [PATCH installer] fix behavior if zfs disks have no by-id path
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Feb 19 07:47:53 CET 2020
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.
>
can this happen at all for real devices? And which "virtio" devices are you
talking about, as "virtio-blk" isn't supported and "virtio-scsi" works here.
The fallback looks always OK to do, but still some rationale would be
good, for future decision making ;-)
> Commit e1b490865f750e08f6c9c6b7e162e7def9dcc411 forgot to handle this
> situation which resultet in a failed installation.
>
> Signed-off-by: Aaron Lauterer <a.lauterer at 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;
>
> $vdev =~ s/ $devname/ $by_id/;
> }
>
More information about the pve-devel
mailing list