aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh')
-rwxr-xr-xsys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh30
1 files changed, 8 insertions, 22 deletions
diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh
index a524c4b17ae5..b4ac18e5ea25 100755
--- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh
+++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_replace/replace_prop_ashift.ksh
@@ -7,7 +7,7 @@
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
+# or https://opensource.org/licenses/CDDL-1.0.
# See the License for the specific language governing permissions
# and limitations under the License.
#
@@ -34,17 +34,15 @@
#
# STRATEGY:
# 1. Create a pool with default values.
-# 2. Verify 'zpool replace' uses the ashift pool property value when
-# replacing an existing device.
-# 3. Verify the default ashift value can still be overridden by manually
-# specifying '-o ashift=<n>' from the command line.
+# 2. Override the pool ashift property.
+# 3. Verify 'zpool replace' works.
#
verify_runnable "global"
function cleanup
{
- log_must set_tunable64 VDEV_FILE_PHYSICAL_ASHIFT $orig_ashift
+ log_must set_tunable32 VDEV_FILE_PHYSICAL_ASHIFT $orig_ashift
poolexists $TESTPOOL1 && destroy_pool $TESTPOOL1
rm -f $disk1 $disk2
}
@@ -63,7 +61,7 @@ orig_ashift=$(get_tunable VDEV_FILE_PHYSICAL_ASHIFT)
# the ashift using the -o ashift property should still
# be honored.
#
-log_must set_tunable64 VDEV_FILE_PHYSICAL_ASHIFT 16
+log_must set_tunable32 VDEV_FILE_PHYSICAL_ASHIFT 16
typeset ashifts=("9" "10" "11" "12" "13" "14" "15" "16")
for ashift in ${ashifts[@]}
@@ -72,21 +70,9 @@ do
do
log_must zpool create -o ashift=$ashift $TESTPOOL1 $disk1
log_must zpool set ashift=$pprop $TESTPOOL1
- # ashift_of(replacing_disk) <= ashift_of(existing_vdev)
- if [[ $pprop -le $ashift ]]
- then
- log_must zpool replace $TESTPOOL1 $disk1 $disk2
- wait_replacing $TESTPOOL1
- log_must verify_ashift $disk2 $ashift
- else
- # cannot replace if pool prop ashift > vdev ashift
- log_mustnot zpool replace $TESTPOOL1 $disk1 $disk2
- # verify we can override the pool prop value manually
- log_must zpool replace -o ashift=$ashift $TESTPOOL1 \
- $disk1 $disk2
- wait_replacing $TESTPOOL1
- log_must verify_ashift $disk2 $ashift
- fi
+ log_must zpool replace $TESTPOOL1 $disk1 $disk2
+ wait_replacing $TESTPOOL1
+ log_must verify_ashift $disk2 $ashift
# clean things for the next run
log_must zpool destroy $TESTPOOL1
log_must zpool labelclear $disk1