[Pkg-zfsonlinux-devel] Bug#990745: better nvme device detection in cron scripts

M. Zhou lumin at debian.org
Tue Jul 6 05:18:29 BST 2021


Source: zfs-linux
Version: 2.0.3-9
Severity: normal
Tags: patch

Credit: Miao Wang

get_transp(){
local dev="$1"
local par_dev="$dev"
local pd
while true; do
  pd=$(lsblk -dnr -o PKNAME "$par_dev")
  if [ "$?" -ne 0 ]; then
    return $?
  fi
  if [ -z "$pd" ]; then
    break
  else
    par_dev="/dev/$pd"
  fi
done
lsblk -dnr -o TRAN "$par_dev"
}



More information about the Pkg-zfsonlinux-devel mailing list