Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/cddl/zfs/include/libtest.kshlib
Show First 20 Lines • Show All 1,850 Lines • ▼ Show 20 Lines | |||||
function cleanup_devices #vdevs | function cleanup_devices #vdevs | ||||
{ | { | ||||
for device in $@; do | for device in $@; do | ||||
# Labelclear must happen first, otherwise it may interfere | # Labelclear must happen first, otherwise it may interfere | ||||
# with the teardown/setup of GPT labels. | # with the teardown/setup of GPT labels. | ||||
$ZPOOL labelclear -f $device | $ZPOOL labelclear -f $device | ||||
# Only wipe partition tables for arguments that are disks, | # Only wipe partition tables for arguments that are disks, | ||||
# as opposed to slices (which are valid arguments here). | # as opposed to slices (which are valid arguments here). | ||||
if camcontrol inquiry $device >/dev/null 2>&1; then | if geom disk list | grep -qx "Geom name: ${device#/dev/}"; then | ||||
wipe_partition_table $device | wipe_partition_table $device | ||||
fi | fi | ||||
done | done | ||||
return 0 | return 0 | ||||
} | } | ||||
# | # | ||||
# Verify the rsh connectivity to each remote host in RHOSTS. | # Verify the rsh connectivity to each remote host in RHOSTS. | ||||
▲ Show 20 Lines • Show All 1,610 Lines • Show Last 20 Lines |