]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/zfs/zpool/create/mirror.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / zfs / zpool / create / mirror.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 dir=`dirname $0`
5 . ${dir}/../../misc.sh
6
7 echo "1..22"
8
9 disks_create 6
10 names_create 1
11
12 expect_fl ${ZPOOL} create ${name0} mirror ${disk0}
13
14 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1}
15 expect_ok ${ZPOOL} status -x ${name0}
16 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
17 exp=`(
18   echo "  pool: ${name0}"
19   echo " state: ONLINE"
20   echo " scrub: none requested"
21   echo "config:"
22   echo "        NAME          STATE   READ WRITE CKSUM"
23   echo "        ${name0}      ONLINE     0     0     0"
24   echo "          mirror      ONLINE     0     0     0"
25   echo "            ${disk0}  ONLINE     0     0     0"
26   echo "            ${disk1}  ONLINE     0     0     0"
27   echo "errors: No known data errors"
28 )`
29 expect "${exp}" ${ZPOOL} status ${name0}
30 expect_ok ${ZPOOL} destroy ${name0}
31 expect_fl ${ZPOOL} status -x ${name0}
32 expect_fl ${ZPOOL} destroy ${name0}
33
34 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
35 expect_ok ${ZPOOL} status -x ${name0}
36 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
37 exp=`(
38   echo "  pool: ${name0}"
39   echo " state: ONLINE"
40   echo " scrub: none requested"
41   echo "config:"
42   echo "        NAME          STATE   READ WRITE CKSUM"
43   echo "        ${name0}      ONLINE     0     0     0"
44   echo "          mirror      ONLINE     0     0     0"
45   echo "            ${disk0}  ONLINE     0     0     0"
46   echo "            ${disk1}  ONLINE     0     0     0"
47   echo "            ${disk2}  ONLINE     0     0     0"
48   echo "            ${disk3}  ONLINE     0     0     0"
49   echo "            ${disk4}  ONLINE     0     0     0"
50   echo "errors: No known data errors"
51 )`
52 expect "${exp}" ${ZPOOL} status ${name0}
53 expect_ok ${ZPOOL} destroy ${name0}
54 expect_fl ${ZPOOL} status -x ${name0}
55 expect_fl ${ZPOOL} destroy ${name0}
56
57 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} mirror ${disk2} ${disk3} mirror ${disk4} ${disk5}
58 expect_ok ${ZPOOL} status -x ${name0}
59 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
60 exp=`(
61   echo "  pool: ${name0}"
62   echo " state: ONLINE"
63   echo " scrub: none requested"
64   echo "config:"
65   echo "        NAME          STATE   READ WRITE CKSUM"
66   echo "        ${name0}      ONLINE     0     0     0"
67   echo "          mirror      ONLINE     0     0     0"
68   echo "            ${disk0}  ONLINE     0     0     0"
69   echo "            ${disk1}  ONLINE     0     0     0"
70   echo "          mirror      ONLINE     0     0     0"
71   echo "            ${disk2}  ONLINE     0     0     0"
72   echo "            ${disk3}  ONLINE     0     0     0"
73   echo "          mirror      ONLINE     0     0     0"
74   echo "            ${disk4}  ONLINE     0     0     0"
75   echo "            ${disk5}  ONLINE     0     0     0"
76   echo "errors: No known data errors"
77 )`
78 expect "${exp}" ${ZPOOL} status ${name0}
79 expect_ok ${ZPOOL} destroy ${name0}
80 expect_fl ${ZPOOL} status -x ${name0}
81 expect_fl ${ZPOOL} destroy ${name0}
82
83 disks_destroy