]>
git.proxmox.com Git - mirror_zfs.git/blob - tests/zfs-tests/tests/functional/online_offline/online_offline_003_neg.ksh
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
29 # Copyright (c) 2013, 2015 by Delphix. All rights reserved.
32 .
$STF_SUITE/include
/libtest.shlib
36 # Offlining disks in a non-redundant pool should fail.
39 # 1. Create a multidisk stripe and start some random I/O
40 # 2. zpool offline should fail on each disk.
43 verify_runnable
"global"
47 if poolexists
$TESTPOOL1; then
48 destroy_pool
$TESTPOOL1
51 $KILL $killpid >/dev
/null
2>&1
52 [[ -e $TESTDIR ]] && log_must
$RM -rf $TESTDIR/*
55 log_assert
"Offlining disks in a non-redundant pool should fail."
61 $MKFILE $MINVDEVSIZE $TESTDIR/$TESTFILE1.
$i
62 specials_list
="$specials_list $TESTDIR/$TESTFILE1.$i"
66 create_pool
$TESTPOOL1 $specials_list
67 log_must
$ZFS create
$TESTPOOL1/$TESTFS1
68 log_must
$ZFS set mountpoint
=$TESTDIR1 $TESTPOOL1/$TESTFS1
70 $FILE_TRUNC -f $
((64 * 1024 * 1024)) -b 8192 -c 0 -r $TESTDIR/$TESTFILE1 &
74 log_mustnot
$ZPOOL offline
$TESTPOOL1 ${disk[$i]}
75 check_state
$TESTPOOL1 ${disk[$i]} "online"
78 log_must
$KILL $killpid