]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/zfs/zpool/create/disks.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / zfs / zpool / create / disks.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 dir=`dirname $0`
5 . ${dir}/../../misc.sh
6
7 echo "1..14"
8
9 disks_create 5
10 names_create 1
11
12 expect_ok ${ZPOOL} create ${name0} ${disk0}
13 expect_ok ${ZPOOL} status -x ${name0}
14 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
15 exp=`(
16   echo "  pool: ${name0}"
17   echo " state: ONLINE"
18   echo " scrub: none requested"
19   echo "config:"
20   echo "        NAME        STATE   READ WRITE CKSUM"
21   echo "        ${name0}    ONLINE     0     0     0"
22   echo "          ${disk0}  ONLINE     0     0     0"
23   echo "errors: No known data errors"
24 )`
25 expect "${exp}" ${ZPOOL} status ${name0}
26 expect_ok ${ZPOOL} destroy ${name0}
27 expect_fl ${ZPOOL} status -x ${name0}
28 expect_fl ${ZPOOL} destroy ${name0}
29
30 expect_ok ${ZPOOL} create ${name0} ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
31 expect_ok ${ZPOOL} status -x ${name0}
32 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
33 exp=`(
34   echo "  pool: ${name0}"
35   echo " state: ONLINE"
36   echo " scrub: none requested"
37   echo "config:"
38   echo "        NAME        STATE   READ WRITE CKSUM"
39   echo "        ${name0}    ONLINE     0     0     0"
40   echo "          ${disk0}  ONLINE     0     0     0"
41   echo "          ${disk1}  ONLINE     0     0     0"
42   echo "          ${disk2}  ONLINE     0     0     0"
43   echo "          ${disk3}  ONLINE     0     0     0"
44   echo "          ${disk4}  ONLINE     0     0     0"
45   echo "errors: No known data errors"
46 )`
47 expect "${exp}" ${ZPOOL} status ${name0}
48 expect_ok ${ZPOOL} destroy ${name0}
49 expect_fl ${ZPOOL} status -x ${name0}
50 expect_fl ${ZPOOL} destroy ${name0}
51
52 disks_destroy