mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
zdb and inuse tests don't pass with real disks
Due to zpool create auto-partioning in Linux (i.e. sdb1), certain utilities need to use the parition (sdb1) while others use the whole disk name (sdb). Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Paul Zuchowski <pzuchowski@datto.com> Closes #6939 Closes #7261
This commit is contained in:
committed by
Brian Behlendorf
parent
0e85048f53
commit
8e5d14844d
@@ -423,3 +423,19 @@ function get_debug_device
|
||||
{
|
||||
lsscsi | nawk '/scsi_debug/ {print $6; exit}' | cut -d / -f3
|
||||
}
|
||||
|
||||
#
|
||||
# Get actual devices used by the pool (i.e. linux sdb1 not sdb).
|
||||
#
|
||||
function get_pool_devices #testpool #devdir
|
||||
{
|
||||
typeset testpool=$1
|
||||
typeset devdir=$2
|
||||
typeset out=""
|
||||
|
||||
if is_linux; then
|
||||
out=$(zpool status -P $testpool |grep ${devdir} | awk '{print $1}')
|
||||
out=$(echo $out | sed -e "s|${devdir}/||g" | tr '\n' ' ')
|
||||
fi
|
||||
echo $out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user