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.ivanov@proxmox.com>
$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 {