README
1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26 # ident "@(#)README 1.4 09/01/15 SMI"
27 #
28
29 DESCRIPTION
30 ===========
31 The LSI MegaCli tool is a command line interface application for MegaRAID
32 SAS controllers. You can use this utility to configure, monitor, and
33 maintain MegaRAID SAS controllers and the devices connected to them.
34
35 megacli is a test suite for mega_sas driver regression testing. It uses
36 the LSI MegaCli tool to verify:
37
38 - mega_sas driver support the LSI MegaRAID SAS 1078 based controllers
39 working on Solaris platform.
40
41 - mega_sas driver support the LSI MegaCli tool running on Solaris platform.
42
43
44 PREREQUISITES
45 ============
46 1. One LSI MegaRAID SAS 1078 based controller as the testing target.
47 2. One hard disk drive attached to the LSI MegaRAID SAS 1078 controller
48 and doesn't configured in a volume. You need to attach 8 such disk
49 drives if you want to run all the test cases.
50 3. For SNV users, use SNV_88 or above. For S10 Updates users, use
51 S10U6_02 or above as the base OS.
52 4. CTI-TET lite harness SUNWstc-tetlite. Refer to the following section
53 for instructions on how to get and install the CTI-TET package.
54 5. MegaCli binary. Refer to the following section on how to get and
55 install the MegaCli binary.
56
57
58 CTI-TET PACKAGE INSTALLATION
59 ============================
60 As root do the following:
61 1. Download SUNWstc-tetlite-YYYMMDD.i386.tar.bz2 from
62 http://dlc.sun.com/osol/test/downloads/current/
63 2. bzcat SUNWstc-tetlite-YYYYMMDD.i386.tar.bz2 | tar -xvf -
64 3. pkgadd -d ./packages/i386/
65
66
67 MEGACLI TOOL INSTALLATION
68 =========================
69 Download MegaCli tool archive from:
70 http://tinyurl.com/megacli-solaris
71
72 After downloading the archive, run the following commands (as root) to
73 install the binary:
74
75 1. unzip 2.00.15_Solaris_MegaCLI.zip
76 2. cp MegaCli /usr/bin
77 3. chmod +x /usr/bin/MegaCli
78
79
80 TEST SUITE INSTALLATION
81 =======================
82 You can install the test suite on the system under testing, or at a
83 network location which is accessible by the system under test.
84
85 As root do the following:
86
87 I: Based on megacli package
88 1. get megacli package SUNWstc-storage-megacli
89 2. pkgadd -d . SUNWstc-storage-megacli
90
91 II: Based on megacli source code
92 1. get megacli source code and put it into /export/STC (example location)
93 2. export TET_ROOT=/opt/SUNWstc-tetlite
94 3. export CTI_ROOT=/opt/SUNWstc-tetlite/contrib/ctitools
95 4. export TET_SUITE_ROOT=/export/STC/usr/src/suites
96 5. cd $TET_SUITE_ROOT/storage/megacli
97 6. /usr/ccs/bin/make
98
99
100 TEST SUITE CONFIGURATION
101 ========================
102 As root do the following:
103 1. Set the following environment variables
104
105 Using megacli pakcage:
106 export TET_ROOT=/opt/SUNWstc-tetlite
107 export CTI_ROOT=$TET_ROOT/contrib/ctitools
108 export PATH=$PATH:$CTI_ROOT/bin
109 export TET_SUITE_ROOT=/opt/SUNWstc-storage-megacli
110
111 Using megacli source code:
112 export TET_ROOT=/opt/SUNWstc-tetlite
113 export CTI_ROOT=$TET_ROOT/contrib/ctitools
114 export PATH=$PATH:$CTI_ROOT/bin
115 export TET_SUITE_ROOT=/export/STC/usr/src/suites
116
117 2. To configure the test suite
118
119 # run_test -v ADAPTER=1 storage/megacli configure
120
121 Note: You can get the ADAPTER number by running "MegaCli -AdpAllInfo -aALL".
122
123 Warning: the execution of this test suite will destroy all data on the
124 disks used for testing. Make sure the disks available for the testing
125 adapter do not have any useful data.
126
127 Other configurable variables that can be set in the configuration line:
128
129 DEBUG - [ TRUE || FALSE ] default FALSE
130
131 Following is an example to enable DEBUG:
132 # run_test -v ADAPTER=1 -v DEBUG=TRUE storage/megacli configure
133
134 CFGCLEAR - [ TRUE || FALSE] default FALSE
135
136 Following is an example to enable CFGCLEAR:
137 # run_test -v ADAPTER=1 -v DEBUG=TRUE storage/megacli configure
138
139 Warning: the enable of CFGCLEAR option will destroy all configuration on
140 testing controller. Make sure the testing controller do not have any useful
141 configuration, especially there should not have root file system located
142 on this controller.
143
144
145 TEST SUITE EXECUTION
146 ====================
147 The test suite must be executed as root.
148
149 If you haven't done this at configuration phase, set the environment
150 variables as following:
151
152 For user using megacli pakcage:
153 export TET_ROOT=/opt/SUNWstc-tetlite
154 export CTI_ROOT=$TET_ROOT/contrib/ctitools
155 export PATH=$PATH:$CTI_ROOT/bin
156 export TET_SUITE_ROOT=/opt/SUNWstc-storage-megacli
157 For user using megacli source code:
158 export TET_ROOT=/opt/SUNWstc-tetlite
159 export CTI_ROOT=$TET_ROOT/contrib/ctitools
160 export PATH=$PATH:$CTI_ROOT/bin
161 export TET_SUITE_ROOT=/export/STC/usr/src/suites
162
163 To run the entire test suite do the following:
164
165 # run_test storage/megacli
166
167 To execute individual scenario (basic raid0 raid1 raid5 raid6 raid10
168 raid50 raid60):
169
170 run_test storage/megacli <scenario>
171
172 # run_test storage/megacli raid0
173
174 To execute Test Purpose within a scenario:
175
176 run_test storage/megacli cmd/<test case dir>:<test purpose number>
177
178 # run_test storage/megacli cmd/raid0:1
179
180 Note: You can define customized test scenarios by adding entries to
181 the test scenario file: $TET_SUITE_ROOT/storage/megacli/tet_scen.
182
183 For how to edit the test scenario file, refer to the TET user guide at:
184 http://tetworks.opengroup.org/tet/
185
186
187 TEST SUITE UNCONFIGURE
188 ======================
189
190 # run_test storage/megacli unconfigure
191
192
193 TEST SUITE BUILDING
194 ===================
195 Test suite build does not need to be run as root.
196
197 1. Get megacli source code and put it into /export/STC (example)
198
199 2. Set the environment variables
200 user$ export TET_ROOT=/opt/SUNWstc-tetlite
201 user$ export CTI_ROOT=/opt/SUNWstc-tetlite/contrib/ctitools
202 user$ export TET_SUITE_ROOT=/export/STC/usr/src/suites
203
204 3. cd $TET_SUITE_ROOT/storage/megacli
205
206 4. Build code
207 user$ /usr/ccs/bin/make
208 user$ /usr/ccs/bin/make install
209 user$ /usr/ccs/bin/make package
210
211 5. Build clean
212 user$ /usr/ccs/bin/make clean
213 user$ /usr/ccs/bin/make clobber
214