diff --git a/cmd/vdev_id/vdev_id b/cmd/vdev_id/vdev_id index ab9d7326fc..8cc4399a56 100755 --- a/cmd/vdev_id/vdev_id +++ b/cmd/vdev_id/vdev_id @@ -375,7 +375,7 @@ sas_handler() { i=$((i + 1)) done - PHY=$(ls -d "$port_dir"/phy* 2>/dev/null | head -1 | awk -F: '{print $NF}') + PHY=$(ls -vd "$port_dir"/phy* 2>/dev/null | head -1 | awk -F: '{print $NF}') if [ -z "$PHY" ] ; then PHY=0 fi