1045dab06f
Grepping `mount` output for /dev/sdX does not guarantee the device has no mountpoints. If /dev/sdX happens to have an LVM built on top, then it could be /dev/mapper/something that appears in `mount`. Fix this by checking mountpoints of /dev/sdX and all its children as reported by `lsblk`. Change-Id: Id2fa6939645584d009bc87c7341a97f6948ebde9 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/434209 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>