currently only the first vdev of a ZFS rpool gets created with the stable /dev/by-id paths, all later vdevs (in a RAID0 or RAID10 setup) are left as sdX.
By iterating over all disks in the pool and replacing their occurence with their by-id path we get consistent and recommended names for all vdevs. Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com> --- proxinstall | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/proxinstall b/proxinstall index 7873ace..b531619 100755 --- a/proxinstall +++ b/proxinstall @@ -1354,6 +1354,13 @@ sub extract_data { $vdev =~ s/ $devname/ $osdev/; } + foreach my $hd (@$devlist) { + my $devname = @$hd[1]; + my $by_id = find_stable_path ("/dev/disk/by-id", $devname); + + $vdev =~ s/ $devname/ $by_id/; + } + zfs_create_rpool($vdev); } else { -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel