1#!/bin/sh 2 3dir=`dirname $0` 4. ${dir}/../../misc.sh 5 6echo "1..31" 7 8disks_create 4 128M 9names_create 1 10 11expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 12expect_ok ${ZPOOL} offline ${name0} ${disk0} 13sum0_before=`calcsum ${fdisk0}` 14sum1_before=`calcsum ${fdisk1}` 15${ZFS} snapshot ${name0}@test 16sum0_after=`calcsum ${fdisk0}` 17sum1_after=`calcsum ${fdisk1}` 18expect_ok test "${sum0_before}" = "${sum0_after}" 19expect_fl test "${sum1_before}" = "${sum1_after}" 20expect_ok ${ZPOOL} destroy ${name0} 21expect_fl ${ZPOOL} status -x ${name0} 22 23expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} ${disk2} ${disk3} 24expect_ok ${ZPOOL} offline ${name0} ${disk1} 25add_msg="# TODO Sun CR 6328632, Lustre bug 16878" 26expect_ok ${ZPOOL} offline ${name0} ${disk3} 27add_msg="" 28sum0_before=`calcsum ${fdisk0}` 29sum1_before=`calcsum ${fdisk1}` 30sum2_before=`calcsum ${fdisk2}` 31sum3_before=`calcsum ${fdisk3}` 32${ZFS} snapshot ${name0}@test 33sum0_after=`calcsum ${fdisk0}` 34sum1_after=`calcsum ${fdisk1}` 35sum2_after=`calcsum ${fdisk2}` 36sum3_after=`calcsum ${fdisk3}` 37expect_fl test "${sum0_before}" = "${sum0_after}" 38expect_ok test "${sum1_before}" = "${sum1_after}" 39expect_fl test "${sum2_before}" = "${sum2_after}" 40add_msg="# TODO Sun CR 6328632, Lustre bug 16878" 41expect_ok test "${sum3_before}" = "${sum3_after}" 42add_msg="" 43expect_ok ${ZPOOL} destroy ${name0} 44expect_fl ${ZPOOL} status -x ${name0} 45 46expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${disk0} ${disk1} ${disk2} 47expect_ok ${ZPOOL} offline ${name0} ${disk1} 48sum0_before=`calcsum ${fdisk0}` 49sum1_before=`calcsum ${fdisk1}` 50sum2_before=`calcsum ${fdisk2}` 51${ZFS} snapshot ${name0}@test 52sum0_after=`calcsum ${fdisk0}` 53sum1_after=`calcsum ${fdisk1}` 54sum2_after=`calcsum ${fdisk2}` 55expect_fl test "${sum0_before}" = "${sum0_after}" 56expect_ok test "${sum1_before}" = "${sum1_after}" 57expect_fl test "${sum2_before}" = "${sum2_after}" 58expect_ok ${ZPOOL} destroy ${name0} 59expect_fl ${ZPOOL} status -x ${name0} 60 61expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 62expect_ok ${ZPOOL} offline ${name0} ${disk1} 63add_msg="# TODO Sun CR 6328632, Lustre bug 16878" 64expect_ok ${ZPOOL} offline ${name0} ${disk3} 65add_msg="" 66sum0_before=`calcsum ${fdisk0}` 67sum1_before=`calcsum ${fdisk1}` 68sum2_before=`calcsum ${fdisk2}` 69sum3_before=`calcsum ${fdisk3}` 70${ZFS} snapshot ${name0}@test 71sum0_after=`calcsum ${fdisk0}` 72sum1_after=`calcsum ${fdisk1}` 73sum2_after=`calcsum ${fdisk2}` 74sum3_after=`calcsum ${fdisk3}` 75expect_fl test "${sum0_before}" = "${sum0_after}" 76expect_ok test "${sum1_before}" = "${sum1_after}" 77expect_fl test "${sum2_before}" = "${sum2_after}" 78add_msg="# TODO Sun CR 6328632, Lustre bug 16878" 79expect_ok test "${sum3_before}" = "${sum3_after}" 80add_msg="" 81expect_ok ${ZPOOL} destroy ${name0} 82expect_fl ${ZPOOL} status -x ${name0} 83 84disks_destroy 85