[pve-devel] [PATCH installer] fix behavior if zfs disks have no by-id path

Stoiko Ivanov s.ivanov at proxmox.com
Wed Feb 19 12:24:09 CET 2020


After a (not so) short detour into debian policy and the current state of
policy-rc.d usage:

Thanks for tracking this down so fast (and sorry for introducing the
regression in the first place).
The patch definitely makes sense - and works in my few tests:

Reviewed-By: Stoiko Ivanov <s.ivanov at proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov at proxmox.com>

On Wed, 19 Feb 2020 07:47:53 +0100
Thomas Lamprecht <t.lamprecht at proxmox.com> wrote:

> 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.
Why are virtio-blk not supported? (a test vm boots up just fine (with the
patch))

I think the issue occurs as well when trying to install PVE on a VMWare
guest (with SCSI/default disks instead of SATA) [0]

The issue at hand happens because udev does not create the /dev/disk/by-id
symlink in '/lib/udev/rules.d/60-persistent-storage.rules', since it does
not have a serial-number for the device (which in the virtio-blk case is
in turn maybe caused by qemu-server not adding one to the commandline).

Not sure about happing for real devices (but from a quick glance those
would need to lack many usually available information in their kernel
interface (wwid, serial))

[0]
https://forum.proxmox.com/threads/not-install-promox-6-1-zfs-0-04-disk-vmware-15-pro.65269/#post-294718


> 
> 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/;
> >  	    }
> >   
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 




More information about the pve-devel mailing list