3ware 9690SA SAS/SATA RAID Software User Guide Addendum for FreeBSD

3ware® SAS/SATA RAID Software User Guide Addendum
for FreeBSD
Supports the 9690SA Models
PN 720-0179-00 February 2008
©2004-2008 Applied Micro Circuits Corporation (AMCC). All rights reserved. This publication may be copied or reproduced for reference purposes only. All other purposes require the express written consent of AMCC, 215 Moffett Park Drive, Sunnyvale, CA 94089. AMCC shall not be responsible or liable for, and shall be held harmless against, any and all damages, claims, and/or disputes that arise from the copying or reproduction of this publication.
Trademarks
3ware®, Escalade®, 3DM®, and TwinStor® are all registered trademarks of AMCC. The 3ware logo, 3BM, Multi-Lane, StorSave, StorSwitch, StreamFusion, and R5 Fusion are all trademarks of AMCC. PowerPC and the PowerPC logo are trademarks of International Business Machines Corporation. Linux® is a registered trademark of Linus Torvalds in the United States, other countries, or both. Windows® is a registered trademark of Microsoft Corporation in the United States and other countries. Firefox® is a registered trademark of the Mozilla Foundation. PCI Express® is a registered trademark of PCI-SIG®. All other trademarks herein are property of their respective owners.
Disclaimer
While every attempt is made to make this document as accurate as possible, AMCC assumes no responsibility for errors or omissions in this document, nor does AMCC make any commitment to update the information contained herein.
3ware® SAS/SATA RAID Software User Guide Addendum for FreeBSD
This document is an addendum to the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
It provides information about support for FreeBSD under version 9.5.0.1 of the 3ware RAID controller software.
For general information about using the 3ware RAID controller management software (3BM and 3DM), see the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
For information on installing your 3ware RAID controller card, see the Installation Guide for your 3ware RAID controller model. If you do not have the copy that came with your controller, electronic versions are available on the 3ware website at http://www.3ware.com/support/userdocs.asp.
This document includes these topics:
“Driver Installation Under FreeBSD” on page 1
“Updating Drivers under FreeBSD” on page 6
“Updating the Firmware Under FreeBSD” on page 9
“Installing 3ware RAID Controller Management Software for FreeBSD”
on page 10
“Uninstalling 3DM 2 on FreeBSD” on page 12
“Starting the 3DM 2 Daemon under FreeBSD” on page 12

Driver Installation Under FreeBSD

Notes: If you use FreeBSD 6.3 or later you do not need to install drivers, as driver
support up through the 3ware 9690SA RAID controller is built into the kernel. If you need to do an update to your drivers, see “Updating the Kernel with the New
Driver Source” on page 6. For a complete list of supported versions of FreeBSD and 3ware RAID controllers,
see http://www.3ware.com/support/OS-support.asp.
www.3ware.com 1
Driver Installation Under FreeBSD
This section provides details about how to install the driver for your 3ware RAID controller under FreeBSD and make the units available if you use a version prior to 6.3 and later than 5.0.
If the units you have created will be your boot device, you will install the
driver for the controller as you install FreeBSD.
If the operating system is already installed on a unit connected to another
controller or to the motherboard, you will start FreeBSD and then install the driver.
This section includes these topics:
Obtaining 3ware FreeBSD Drivers
Creating A FreeBSD Driver Diskette
Installing the Kernel Driver Module while Installing FreeBSD 6.2 on a
Unit Managed by a 3ware RAID Controller
Installing the 3ware Kernel Driver on a FreeBSD System that Boots from
a Different Device

Obtaining 3ware FreeBSD Drivers

3ware drivers can be compiled from source files into the kernel as built-in drivers or can be modules that are loaded by the operating system. Both source files and modules are available from 3ware, but modules with current controller drivers are only available for FreeBSD 5.5 and FreeBSD 6.2.
You can obtain the 3ware RAID controller driver for FreeBSD from one of these two sources:
3ware software CD-ROM. This CD includes: Compiled and tested kernel driver modules for FreeBSD 5.5 and
FreeBSD 6.2, located at:
FreeBSD 6.2 32bit: packages/drivers/freebsd/6.2/x86 FreeBSD 6.2 64bit: packages/drivers/freebsd/6.2/x86_64
FreeBSD 5.5 32bit: packages/drivers/freebsd/5.5/x86
FreeBSD 5.5 64bit: packages/drivers/freebsd/5.5/x86_64
Driver source files for FreeBSD 5.x, 6.x, and 7.x, located at:
FreeBSD 5.x: packages/drivers/freebsd/src/5.x FreeBSD 6.x: packages/drivers/freebsd/src/6.x
FreeBSD 7.x: packages/drivers/freebsd/src/7.x
3ware web site. You can download the latest compiled and tested driver
modules and driver source files for FreeBSD from the 3ware web site at
http://www.3ware.com/support/index.asp.
2 3ware SAS/SATA RAID Software User Guide Addendum for FreeBSD, Version 9.5.0.1
Driver Installation Under FreeBSD

Creating A FreeBSD Driver Diskette

You will need a driver diskette if you are going to be installing FreeBSD on a unit or drive managed by a 3ware RAID controller card which will become the boot unit and for which your version of FreeBSD does not have a built-in driver.
To create a driver diskette
1 Insert a blank floppy diskette and the 3ware software CD-ROM into a
FreeBSD installed system.
2 Create a mount point for the floppy.
mkdir /floppy
3 Format the floppy.
newfs /dev/fd0 (assuming fd0 is the floppy disk drive)
4 Mount the floppy drive.
mount -t ufs /dev/fd0 /floppy
5 Mount the 3ware software CD-ROM.
mount -t cd9660 /dev/acd0 /cdrom (assuming acd0 is the CD-
ROM drive).
6 Copy the appropriate module from the 3ware CD-ROM to the floppy . For
example:
cp /cdrom/packages/drivers/freebsd/6.2/x86_64/twa.ko /floppy
www.3ware.com 3
Driver Installation Under FreeBSD

Installing the Kernel Driver Module while Installing FreeBSD on a Unit Managed by a 3ware RAID Controller

Use this procedure if your boot unit is going to be managed by the 3ware RAID controller.
It describes how to load the FreeBSD 6.2 or FreeBSD 5.5 kernel driver module to enable boot device support and how to then compile the current drivers into the kernel from source files.
Note: This procedure is specific to FreeBSD 6.2 and FreeBSD 5.5 as it requires a
compiled module. For versions of FreeBSD for which a compiled module is not supplied by 3ware it will be necessary to compile your own module from source files. See “Compiling and Loading the Driver as a Module using kldload” on page 7.
FreeBSD 6.3 and later versions have built-in driver support for 3ware RAID controller models 9500S, 9550SX, 9590SE, 9650SE, and 9690SA. FreeBSD 6.2 supports 9500S, 9550SX, and 9590SE, but not 9650SE and 9690SA. For a complete list of supported versions of FreeBSD and 3ware RAID controllers, see
http://www.3ware.com/support/OS-support.asp.
1 Disconnect all SCSI, ATA, and SAS devices in the system, except the CD
or DVD and the ones connected to the 3ware RAID controller.
2 Create the RAID units on the 3ware RAID controller using 3BM. For
details on how to create and order units, see "Creating a Unit through 3BM " and "Ordering Units in 3BM" on pages 91 and 95 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
3 Copy the appropriate kernel driver module twa.ko from 3ware CD to a
floppy . See “Obtaining 3ware FreeBSD Drivers” on page 2 and “Creating A FreeBSD Driver Diskette” on page 3 in this document for details.
4 Remove the floppy and boot the system from the FreeBSD installation
CD. 5 Insert the floppy containing twa.ko module into floppy drive. 6 At the FreeBSD boot menu, select 6 "Escape to loader prompt." 7 At the loader prompt, load twa.ko from the floppy drive by using
load disk0:twa.ko” (assuming disk0 is the floppy drive).
“ 8 Remove the floppy and then boot by typing "
boot".
9 Install the FreeBSD OS, remove the FreeBSD installation CD, and reboot
again. 10 At the FreeBSD boot menu, select 6 "Escape to loader prompt."
4 3ware SAS/SATA RAID Software User Guide Addendum for FreeBSD, Version 9.5.0.1
Driver Installation Under FreeBSD
11 At the loader prompt, load twa.ko from the floppy using "load
disk0:twa.ko
" (assuming disk0 is the floppy drive). 12 Remove the floppy and then boot by typing "boot". 13 Once the system boots up, replace the twa driver sources at
/sys/dev/twa and /sys/modules/twa with the new sources and
build the kernel with the new driver sources. See “Updating the Kernel with the New Driver Source” on page 6 for more details.
14 Reboot your system.

Installing the 3ware Kernel Driver on a FreeBSD System that Boots from a Different Device

Use the steps in this section if FreeBSD boots from a different device and y ou will be using the unit on your 3ware RAID controller for secondary storage.
When you use the unit managed by the 3ware RAID controller for secondary storage, you do not need to use a driver diskette for driver installation.
Tip: Install FreeBSD on the drive attached to the mother board before installing the
3ware RAID controller. This avoids the possibility of installing to the wrong drive or unit.
1 Get the latest driver source files for your version of FreeBSD. See
“Obtaining 3ware FreeBSD Drivers” on page 2. 2 Make sure the 3ware RAID controller is not yet installed in the system. 3 Install FreeBSD on a disk attached to the motherboard.
Be sure to install the full FreeBSD source. 4 Once FreeBSD is installed, power down the system and install the 3ware
RAID controller. For assistance, see the installation guide that came with
the controller. 5 Create the RAID unit or units on drives attached to the 3ware RAID
controller using 3BM. For details on how to create and order units, see
"Creating a Unit through 3BM" on page 91of the 3ware SAS/SATA RAID
Software User Guide, Version 9.5. 6 Boot to FreeBSD. 7 Follow the instructions in “Updating the Kernel with the New Driver
Source” on page 6 to update the kernel.
www.3ware.com 5

Updating Drivers under FreeBSD

Updating Drivers under FreeBSD
Drivers can be updated either from source files or with driver modules. Using source files, you can compile drivers into the kernel or you can create
modules for versions of FreeBSD for which 3ware does not supply modules. In addition, there may be new modules included with future updates from
3ware. See http://www.3ware.com/support/index.asp. This section includes these topics:
Updating the Kernel with the New Driver Source
Updating the 3ware Kernel Driver Module Under FreeBSD
Compiling and Loading the Driver as a Module using kldload

Updating the Kernel with the New Driver Source

You will need to update the kernel from source files if you did not upgrade to FreeBSD 6.3 or if a new version of the 3ware drivers is released.
To obtain source files, see “Obtaining 3ware FreeBSD Drivers” on page 2. 1Unpack
/sys/dev/twa and the Makefile to /sys/modules/twa.
twa.tgz. Then copy the *.c and *.h files to
2Go to /usr/src/sys/i386/conf or /usr/src/sys/amd64/conf,
depending on whether you have a 32-bit or 64-bit version of FreeBSD.
a Open your current configuration file: (GENERIC, SMP, or PAE or
custom config), with vi or other editor. Make sure “
Device twa # 3ware 9000 series” is not
commented out. b Save changes. c Run command
config <config_name> specifying your
configuration file: (GENERIC, SMP, PAE, or your custom config),
followed by:
cd ../compile/<config_name>
make clean
make cleandepend
make depend
make
make install
4 Reboot your system.
When the system reboots, the new kernel driver module will load automatically.
6 3ware SAS/SATA RAID Software User Guide Addendum for FreeBSD, Version 9.5.0.1
Updating Drivers under FreeBSD

Updating the 3ware Kernel Driver Module Under FreeBSD

The following steps describe how to update the 3ware driver with a kernel driver module under FreeBSD.
Backup your original driver before updating in case you need to revert back to it. However, you will not be able to revert back to the original driver if you are booting from that unit.
To update the 3ware kernel driver module under FreeBSD
1 Download and extract the driver, as described under “Downloading the
Driver and Firmware” on page 158 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
2 Backup any critical data prior to updating the 3ware driver. 3 Change the directory to the location with the extracted driver. 4 Copy the driver into
/boot/kernel.
Make sure the module version matches the FreeBSD version. If the versions don’t match there could be a kernel panic.
5 Load the driver.
kldload twa.ko
If units are present, you should see unit information in the system log (usually, /var/log/messages).
6 If you wish to load the driver automatically every time the system is
rebooted,
/boot/loader.conf
add the line 'twa_load="YES"' to the file

Compiling and Loading the Driver as a Module using kldload

If you want to use a driver module and 3ware does not supply one for your version of FreeBSD, use the following procedure. If you just want to install a 3ware-supplied module, see “Updating the 3ware Kernel Driver Module Under FreeBSD”.
Note: You can only use kldload to load the driver as a module if your boot drive is
attached to the mother board and is not managed by the 3ware RAID controller.
www.3ware.com 7
Updating Drivers under FreeBSD
To compile the driver as a module
1 Boot to FreeBSD. 2 Download and extract the driver, as described under “Downloading the
Driver and Firmware” on page 158 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
3Unpack
/sys/dev/twa and the Makefile to /sys/modules/twa.
4 Build the
cd /sys/modules/twa make
twa.tgz. Then copy the *.c and *.h files to
twa.ko module
The twa.ko module is created in /sys/modules/twa
To load the driver as a module
1 In the current configuration file under
/usr/src/sys/amd64/conf comment out the entry: "Device twa # 3ware 9000 series
". This will unlink the old driver once you rebuild
/usr/src/sys/i386/conf or
the kernel.
2 Rebuild the kernel.
Run command
config <config_name> specifying your configuration
file: (GENERIC, SMP, PAE, or your custom config), followed by:
cd ../compile/<config_name>
make clean
make cleandepend
make depend
make
make install
3 Reboot to FreeBSD. 4 Load the kernel driver module
cd /sys/modules/twa kldload ./twa.ko
5 If you wish to load the driver automatically every time the system boots:
acopy twa.ko into the boot folder
cp /sys/modules/twa/twa.ko /boot/kernel/twa.ko
(backup the old module if you wish to revert back) b
add the line 'twa_load="YES"' to the file
/boot/loader.conf
8 3ware SAS/SATA RAID Software User Guide Addendum for FreeBSD, Version 9.5.0.1

Updating the Firmware Under FreeBSD

Updating the Firmware Under FreeBSD
The following steps describe how to update the firmware under FreeBSD using the utility tw_update.
You can also update the firmware through 3DM. For details, see “Updating the Firmware Through 3DM 2” on page 159 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5. The PROM images that are installed when you update the firmware include any 3BM and BBU firmware updates.
Note: The tw_update utility will only be available for a limited time because
tw_update is being replaced by the firmware update feature in 3DM and CLI.
To update the firmware under FreeBSD
1 Download and extract the firmware, as described under “Downloading
the Driver and Firmware” on page 158 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
2 Backup any critical data prior to updating the 3ware firmware. 3 Change the directory to the location with the extracted files, which
include
tw_update.
4 Run the tw_update utility:
./tw_update fw=/mnt/fw/9xxxSA/prom0008.img
The utility shows the version of the driver and firmware included in the utility, the versions currently installed on your controller, and recommends whether to upgrade the firmware or not.
Warning: We strongly recommend backing up your data before updating the firmware. Updating the firmware can render the device driver and/or management tools incompatible. It is recommended to have a copy of current firmware image for rollbacks.
Examining compatibility data from firmware image and /c0 ...
New-Firmware Current-Firmware Current-Driver Current-API
---------------------------------------------------------------------­FE9X 3.0x.xx.xxx FE9X 3.0x.xx.xxx 2.xx.xx.xxx 2.xx.xx.xxx
Both API and Driver are compatible with the new firmware. Recommendation: proceed to update.
Given the above recommendation... Do you want to continue? Y|N [N]: y
5 If the firmware is newer and the recommendation is to proceed, type Y
and press Enter.
Downloading the firmware from file /mnt/fw/9xxxSA/
prom0008.img
... Done.
The new image will take effect after reboot.
www.3ware.com 9

Installing 3ware RAID Controller Management Software for FreeBSD

Installing 3ware RAID Controller Management Software for FreeBSD
3ware RAID controller management software includes 3DM 2, CLI (Command Line Interface), tw_update (update utility), and the 3ware HTML Bookshelf.
Note: FreeBSD 5.x does not support the Java-based installer used by AMCC. In
order to use the 3ware management software, 3DM and CLI need to be installed manually. See “Installing Software on FreeBSD 5.x” on page 11
This section includes these topics:
Installing Software on FreeBSD 6.x and later from a Graphical Interface
Installing Software on FreeBSD 6.x and later from the Command Line
Installing Software on FreeBSD 5.x
For more information, see Appendix B, page 277 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5.

Installing Software on FreeBSD 6.x and later from a Graphical Interface

1 Insert the 3ware Software CD into your CD-ROM or DVD drive. 2 Manually mount the CD by typing:
mount -t cd9660 /dev/acd0 /mnt (assuming acd0 is the CD-ROM
drive).
3 Start autorun by typing:
/mnt/autorun
4 Follow the instructions on-screen. For complete details, see Appendix B,
page 277 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
10 3ware SAS/SATA RAID Software User Guide Addendum for FreeBSD, Version 9.5.0.1
Installing 3ware RAID Controller Management Software for FreeBSD

Installing Software on FreeBSD 6.x and later from the Command Line

The following steps describe how to install software on FreeBSD from the command line, using a console application.
To install software on FreeBSD from the command line
1 Navigate to the folder containing the installer for your operating system
and processor type (x86 or x64). It will be one of the following:
/packages/installer/freebsd/x86 /packages/installer/freebsd/x86_64
2Type:
./ [name of install file] -console
and press Enter. The install file name will be one of the following, depending on your
processor type.
./setupFreeBSD_x86.sh -console ./setupFreeBSD_x64.sh -console
3 After you press Enter, the application starts in text mode. 4 Respond to each screen as it walks you through the installation process.
The Console installation screens mirror those that display using the GUI installer. For specific information about the screens, see Appendix B, page 277 in the 3ware SAS/SATA RAID Software User Guide, Version 9.5.
To navigate in text mode, type: 1 for Next 2 for Previous 3 to Cancel 5 to Redisplay 0 to Continue Installing

Installing Software on FreeBSD 5.x

FreeBSD 5.x does not support the Java-based installer used by AMCC. In order to use the 3ware management software, 3DM and CLI need to be installed manually.
To manually install CLI under FreeBSD 5.x
1 Mount the 3ware CD-ROM
mount /cdrom
www.3ware.com 11

Uninstalling 3DM 2 on FreeBSD

2 Copy the CLI utility to the destination directory. The path will be one of
the following, depending on your processor type:
cp -R /cdrom/packages/cli/freebsd/x86/tw_cli /usr/local/bin cp -R /cdrom/packages/cli/freebsd/x86_64/tw_cli /usr/local/bin
To manually install 3DM under FreeBSD 5.x
For instructions for manually installing 3DM, see the knowledgebase article
http://www.3ware.com/KB/article.aspx?id=15283
Uninstalling 3DM 2 on FreeBSD
The following steps describe how to uninstall software on FreeBSD from the command line. If you do not use the assume you want GUI mode. You must be root or superuser.
To uninstall 3DM 2 for FreeBSD
-console option, the installer will
1 Navigate to the directory where you installed the software. The default
directory is /opt/AMCC.
2 Change to the subdirectory “ 3Type
./uninstaller.sh -console and press Enter.
4 Follow the prompts to remove the installed components.
_uninst”.

Starting the 3DM 2 Daemon under FreeBSD

3DM 2 should start automatically after installation and upon bootup. If it does not, use the steps below to start it.
To start the 3DM 2 daemon manually: 1 Login as root on the machine on which 3DM is installed 2Type:
/etc/rc.d/tdm2 start and press Enter.
12 3ware SAS/SATA RAID Software User Guide Addendum for FreeBSD, Version 9.5.0.1
Loading...