xref: /freebsd/share/man/man4/mrsas.4 (revision 5e3190f700637fcfc1a52daeaa4a031fdd2557c7)
1.\" Copyright (c) 2014 LSI Corp
2.\" All rights reserved.
3.\" Author: Kashyap Desai
4.\" Support: freebsdraid@lsi.com
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the <ORGANIZATION> nor the names of its
15.\"    contributors may be used to endorse or promote products derived
16.\"    from this software without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19.\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22.\" COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29.\" POSSIBILITY OF SUCH DAMAGE.
30.\"
31.\" The views and conclusions contained in the software and documentation
32.\" are those of the authors and should not be interpreted as representing
33.\" official policies, either expressed or implied, of the FreeBSD Project.
34.\"
35.Dd February 4, 2021
36.Dt MRSAS 4
37.Os
38.Sh NAME
39.Nm mrsas
40.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver"
41.Sh SYNOPSIS
42To compile this driver into the kernel,
43place the following lines in your
44kernel configuration file:
45.Bd -ragged -offset indent
46.Cd "device pci"
47.Cd "device mrsas"
48.Ed
49.Pp
50Alternatively, to load the driver as a
51module at boot time, place the following line in
52.Xr loader.conf 5 :
53.Bd -literal -offset indent
54mrsas_load="YES"
55.Ed
56.Sh DESCRIPTION
57The
58.Nm
59driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express
60SAS/SATA RAID controllers.
61See the
62.Nm HARDWARE
63section for the supported devices list.
64A disk (virtual disk/physical disk) attached to the
65.Nm
66driver will be visible to the user through
67.Xr camcontrol 8
68as
69.Pa /dev/da?
70device nodes.
71A simple management interface is also provided on a per-controller basis via the
72.Pa /dev/mrsas?
73device node.
74.Pp
75The
76.Nm
77name is derived from the phrase "MegaRAID SAS HBA", which is
78substantially different than the old "MegaRAID" Driver
79.Xr mfi 4
80which does not connect targets
81to the
82.Xr cam 4
83layer and thus requires a new driver which attaches targets to the
84.Xr cam 4
85layer.
86Older MegaRAID controllers are supported by
87.Xr mfi 4
88and will not work with
89.Nm ,
90but both the
91.Xr mfi 4
92and
93.Nm
94drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of
95controllers.
96.Pp
97The
98.Xr device.hints 5
99option is provided to tune the
100.Nm
101driver's behavior for LSI MegaRAID SAS 2208/2308/3008/3108 controllers.
102By default, the
103.Xr mfi 4
104driver will detect these controllers.
105See the
106.Nm PRIORITY
107section to know more about driver priority for MR-Fusion devices.
108.Pp
109.Nm
110will provide a priority of (-30) (between
111.Dv BUS_PROBE_DEFAULT
112and
113.Dv BUS_PROBE_LOW_PRIORITY )
114at probe call for device id's 0x005B, 0x005D, and
1150x005F so that
116.Nm
117does not take control of these devices without user intervention.
118.Pp
119Solid-state drives (SSD) get ATA TRIM support with
120.Nm
121if underlying adapter allows it.
122This may require configuring SSD as Non-RAID drive
123rather then JBOD virtual mode.
124.Sh HARDWARE
125The
126.Nm
127driver supports the following hardware:
128.Pp
129[ Thunderbolt 6Gb/s MR controller ]
130.Bl -bullet -compact
131.It
132LSI MegaRAID SAS 9265
133.It
134LSI MegaRAID SAS 9266
135.It
136LSI MegaRAID SAS 9267
137.It
138LSI MegaRAID SAS 9270
139.It
140LSI MegaRAID SAS 9271
141.It
142LSI MegaRAID SAS 9272
143.It
144LSI MegaRAID SAS 9285
145.It
146LSI MegaRAID SAS 9286
147.It
148DELL PERC H810
149.It
150DELL PERC H710/P
151.El
152.Pp
153[ Invader/Fury 12Gb/s MR controller ]
154.Bl -bullet -compact
155.It
156LSI MegaRAID SAS 9380
157.It
158LSI MegaRAID SAS 9361
159.It
160LSI MegaRAID SAS 9341
161.It
162DELL PERC H830
163.It
164DELL PERC H730/P
165.It
166DELL PERC H330
167.El
168.Sh CONFIGURATION
169To disable Online Controller Reset(OCR) for a specific
170.Nm
171driver instance, set the
172following tunable value in
173.Xr loader.conf 5 :
174.Bd -literal -offset indent
175dev.mrsas.X.disable_ocr=1
176.Ed
177.Pp
178where X is the adapter number.
179.Pp
180To change the I/O timeout value for a specific
181.Nm
182driver instance, set the following tunable value in
183.Xr loader.conf 5 :
184.Bd -literal -offset indent
185dev.mrsas.X.mrsas_io_timeout=NNNNNN
186.Ed
187.Pp
188where NNNNNN is the timeout value in milli-seconds.
189.Pp
190To change the firmware fault check timer value for a specific
191.Nm
192driver instance, set the following tunable value in
193.Xr loader.conf 5 :
194.Bd -literal -offset indent
195dev.mrsas.X.mrsas_fw_fault_check_delay=NN
196.Ed
197.Pp
198where NN is the fault check delay value in seconds.
199.Pp
200The current number of active I/O commands is shown in the
201.Va dev.mrsas.X.fw_outstanding
202.Xr sysctl 8
203variable.
204.Sh DEBUGGING
205To enable debugging prints from the
206.Nm
207driver, set the
208.Va hw.mrsas.X.debug_level
209variable, where X is the adapter number, either in
210.Xr loader.conf 5
211or via
212.Xr sysctl 8 .
213The following bits have the described effects:
214.Bl -tag -width indent -offset indent
215.It 0x01
216Enable informational prints.
217.It 0x02
218Enable tracing prints.
219.It 0x04
220Enable prints for driver faults.
221.It 0x08
222Enable prints for OCR and I/O timeout.
223.It 0x10
224Enable prints for AEN events.
225.El
226.Sh PRIORITY
227The
228.Nm
229driver will always set a default (-30) priority in the PCI subsystem for
230selection of MR-Fusion cards.
231(It is between
232.Dv BUS_PROBE_DEFAULT
233and
234.Dv BUS_PROBE_LOW_PRIORITY ) .
235MR-Fusion Controllers include all cards with the
236Device IDs -
2370x005B,
2380x005D,
2390x005F.
240.Pp
241The
242.Xr mfi 4
243driver will set a priority of either
244.Dv BUS_PROBE_DEFAULT
245or
246.Dv BUS_PROBE_LOW_PRIORITY
247(depending on the device.hints setting) in the PCI
248subsystem for selection of MR-Fusion cards.
249With the above design in place, the
250.Xr mfi 4
251driver will attach to a MR-Fusion card given that it has a higher priority than
252.Nm .
253.Pp
254Using
255.Pa /boot/device.hints
256(as mentioned below), the user can provide a preference
257for the
258.Nm
259driver to detect a MR-Fusion card instead of the
260.Xr mfi 4
261driver.
262.Bd -ragged -offset indent
263.Cd hw.mfi.mrsas_enable="1"
264.Ed
265.Pp
266At boot time, the
267.Xr mfi 4
268driver will get priority to detect MR-Fusion controllers by default.
269Before
270changing this default driver selection policy, LSI advises users to understand
271how the driver selection policy works.
272LSI's policy is to provide priority to
273the
274.Xr mfi 4
275driver to detect MR-Fusion cards, but allow for the ability to choose the
276.Nm
277driver to detect MR-Fusion cards.
278.Pp
279LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the
280older
281.Xr mfi 4
282driver and do not want to switch to
283.Nm .
284For those customers who are using a MR-Fusion controller for the first time, LSI
285recommends using the
286.Nm
287driver and setting hw.mfi.mrsas_enable="1".
288.Pp
289Changing the default behavior is well tested under most conditions, but
290unexpected behavior may pop up if more complex and unrealistic operations are
291executed by switching between the
292.Xr mfi 4
293and
294.Nm
295drivers for MR-Fusion.
296Switching drivers is designed to happen only one time.
297Although multiple
298switching is possible, it is not recommended.
299The user should decide from
300.Nm Start of Day
301which driver they want to use for the MR-Fusion card.
302.Pp
303The user may see different device names when switching from
304.Xr mfi 4
305to
306.Nm .
307This behavior is
308.Nm Functions As Designed
309and the user needs to change the
310.Xr fstab 5
311entry manually if they are doing any experiments with
312.Xr mfi 4
313and
314.Nm
315interoperability.
316.Sh FILES
317.Bl -tag -width ".Pa /dev/mrsas?" -compact
318.It Pa /dev/da?
319array/logical disk interface
320.It Pa /dev/mrsas?
321management interface
322.El
323.Sh SEE ALSO
324.Xr cam 4 ,
325.Xr mfi 4 ,
326.Xr pci 4 ,
327.Xr device.hints 5 ,
328.Xr camcontrol 8
329.Sh HISTORY
330The
331.Nm
332driver first appeared in
333.Fx 10.1 .
334.Bd -ragged
335.Cd "mfi Driver:"
336.Xr mfi 4
337is the old
338.Fx
339driver which started with support for Gen-1 Controllers and
340was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F).
341.Ed
342.Bd -ragged
343.Cd "mrsas Driver:"
344.Nm
345is the new driver reworked by LSI which supports Thunderbolt and onward
346products.
347The SAS+SATA RAID controller with device id 0x005b is referred to as
348the Thunderbolt controller throughout this man page.
349.Ed
350.Bd -ragged
351.Nm cam aware HBA drivers:
352.Fx
353has a
354.Xr cam 4
355layer which attaches storage devices and provides a common access mechanism to
356storage controllers and attached devices.
357The
358.Nm
359driver is
360.Xr cam 4
361aware and devices associated with
362.Nm
363can be seen using
364.Xr camcontrol 8 .
365The
366.Xr mfi 4
367driver does not understand the
368.Xr cam 4
369layer and it directly associates storage disks to the block layer.
370.Pp
371.Nm Thunderbolt Controller:
372This is the 6Gb/s MegaRAID HBA card which has device id 0x005B.
373.Pp
374.Nm Invader Controller:
375This is 12Gb/s MegaRAID HBA card which has device id 0x005D.
376.Pp
377.Nm Fury Controller:
378This is the 12Gb/s MegaRAID HBA card which has device id 0x005F.
379.Ed
380.Sh AUTHORS
381The
382.Nm
383driver and this manual page were written by
384.An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com .
385.Sh TODO
386The driver does not support alias for device name (it is required when the user
387switches between two drivers and does not want to edit
388.Pa /etc/fstab
389manually).
390.Pp
391The
392.Nm
393driver exposes devices as
394.Pa /dev/da? ,
395whereas
396.Xr mfi 4
397exposes devices as
398.Pa /dev/mfid? .
399.Pp
400.Nm
401does not support the Linux Emulator interface.
402.Pp
403.Nm
404will not work with
405.Xr mfiutil 8 .
406