I knew I'd forget something in the first version of this script.
It turns out what I forgot was partition handling, this commit
ensures duplicate entries are not created in the zdev.conf file.
This previously could occur due to partition entires in the by-path
directory. This is not needed the existing udev rules will ensure
the partitions are created in /dev/disk/zpool/.
The zpool_layout command is designed to automatically scan the
udev /dev/disk/by-path directory and generate a /etc/zfs/zdev.conf
file. It does this by enumerating the disks attached to the
specified buses/ports and sequentially mapping them to short
<channel><rank> names in /dev/disk/zpool/. This tool should only
be run after all the available disks have been discovered. And
the resulting config file does not need to be regenerated unless
your backend configuration changes.