ZTS: zpool offline requires whole disk name
When used with non-loop devices, zdb_004_pos fails because the disk argument provided is the partition rather than the expected whole disk name. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Signed-off-by: John Kennedy <john.kennedy@delphix.com> Closes #9876
This commit is contained in:
parent
20ea8540a6
commit
0d37c2bb2e
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 by Lawrence Livermore National Security, LLC.
|
# Copyright (c) 2017 by Lawrence Livermore National Security, LLC.
|
||||||
|
# Copyright (c) 2020 by Delphix. All rights reserved.
|
||||||
#
|
#
|
||||||
|
|
||||||
. $STF_SUITE/include/libtest.shlib
|
. $STF_SUITE/include/libtest.shlib
|
||||||
|
@ -54,12 +55,13 @@ fi
|
||||||
verify_runnable "global"
|
verify_runnable "global"
|
||||||
verify_disk_count "$DISKS" 2
|
verify_disk_count "$DISKS" 2
|
||||||
set -A DISK $DISKS
|
set -A DISK $DISKS
|
||||||
|
WHOLE_DISK=${DISK[0]}
|
||||||
|
|
||||||
default_mirror_setup_noexit $DISKS
|
default_mirror_setup_noexit $DISKS
|
||||||
DEVS=$(get_pool_devices ${TESTPOOL} ${DEV_RDSKDIR})
|
DEVS=$(get_pool_devices ${TESTPOOL} ${DEV_RDSKDIR})
|
||||||
[[ -n $DEVS ]] && set -A DISK $DEVS
|
[[ -n $DEVS ]] && set -A DISK $DEVS
|
||||||
|
|
||||||
log_must zpool offline $TESTPOOL ${DISK[0]}
|
log_must zpool offline $TESTPOOL $WHOLE_DISK
|
||||||
log_must dd if=/dev/urandom of=$TESTDIR/testfile bs=1K count=2
|
log_must dd if=/dev/urandom of=$TESTDIR/testfile bs=1K count=2
|
||||||
log_must zpool export $TESTPOOL
|
log_must zpool export $TESTPOOL
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue