<!DOCTYPE ARTICLE PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<article>
<articleinfo>
<title>How to install 3dm and 3ware 6400 card on your e-smith server in a RAID5 configuration</title>
<author>
        <firstname>Eric</firstname>
        <surname>Womack</surname>
        <affiliation><orgname>Las Vegas Data LLC</orgname></affiliation>
</author>
</articleinfo>
<para>
This procedure has been tested on systems running e-smith server 4.1.2. It <emphasis>should</emphasis> work on all other versions of e-smith as well.
</para>
<warning>
<para>
Do not try to install e-smith on to the 6800 series.  The auto-partition portion of the install is incompatible with this card.
</para>
</warning>
<sect1>
<title>Introduction</title>
<para>
 This document explains how to setup a RAID5 array and install e-smith using the 3ware 6400 RAID card, then installing the 3dm RAID montioring software.
</para>
<para>
Special thanks go to Glenn Hudson, the programmer of the script and whose instructions this document was drawn from.
</para>
</sect1>
<sect1>
<title>Hardware</title>
<sect2>
<title>Firmware</title>
<para>
Download the following from 3ware's site to a local workstation that will be connected to the e-smith server:
</para>
<orderedlist>
<listitem>
<para>
Latest Firmware Update
<ulink url="http://www.3ware.com/support/3warednload_6000_driver.asp">http://www.3ware.com/support/3warednload_6000_driver.asp</ulink>
</para>
</listitem>
<listitem>
<para>
RedHat 7 Driver
<ulink url="http://www.3ware.com/support/3warednload_6000_driver.asp">http://www.3ware.com/support/3warednload_6000_driver.asp</ulink>
</para>
</listitem>
<listitem>
<para>
Latest version of 3dm. (The version on the CD does not properly handle a RAID 5 configuration.)
<ulink url="http://www.3ware.com/support/3warednload_3dm_driver.asp">http://www.3ware.com/support/3warednload_3dm_driver.asp</ulink>
</para>
</listitem>
<listitem>
<para>
You will also need the custom 3dm install script for e-smith.
<ulink url="http://www.e-smith.org/docs/howto/contrib/install.3dm">http://www.e-smith.org/docs/howto/contrib/install.3dm</ulink>
This is a must to have everything work properly when using RAID5 and highly recommended for other raid modes as well.
</para>
</listitem>
<listitem>
<para>
Finally, you must have a DOS/W95-8 boot disk.  If you don't have a boot disk handy, you can download an image from:
<ulink url="http://www.bootdisk.com">http://www.bootdisk.com</ulink>
</para>
</listitem>
</orderedlist>
<para>
Extract the files from the firmware update and copy to the boot disk. Insert the boot disk into the machine with the 3ware card and reboot.  Following the on-screen directions, install the new bios firmware.  The original <filename>3w-xxxx.o</filename> driver module supplied with e-smith will work fine to get you going even with the new RAID5 firmware so don't worry. You will update to the new driver module later after installing e-smith.
</para>
<para>
After the update is complete, remove the disk and reboot.  Hit <filename>ALT-3</filename> when prompted to enter the 3ware bios.  Select the drives you wish to use in the array, the select "Create Array".  Under type, change to RAID5. Verify your selection, then hit <filename>F8</filename> and answer <filename>Y</filename> to confirm your changes.  The array will now start to build itself and show a process indicator. You may insert your boot media at this time as the machine will automatically reboot itself when complete.
</para>
</sect2>
</sect1>
<sect1>
<title>Software</title>
<sect2>
<title>e-smith Install</title>
<para>
Install e-smith 4.1.x as usual and configure for your purposes. At this point you need only a minimal configuration as this is all you need for setting up the 3ware driver.  Configure enough to have the local workstation be able to connect to it along with enabling all the SSH options. ( Don't setup an entire production system yet!!!)  Using the local workstation, extract the files from the RedHat 7 driver file. Copy the resulting folder, the custom script and the 3dm software (<filename>3dm-lnx.tgz</filename>) to the Admin's Home directory, using either an FTP upload or Network Neighborhood (My Network Places in Windows2000) and browsing to the Admin's Home directory).
</para>
</sect2>
<sect2>
<title>Driver Update</title>
<para>
Using the SSH client of your choice on the local workstation, log into the server as root and create a temporary working directory as <filename>/tmp/3dm</filename> for copying the downloaded files and running the installation script with the following command:
</para>
<para>
<programlisting>

mkdir /tmp/3dm

</programlisting>
</para>
<para>
Now copy all the files from the Admin's Home directory to this folder.
</para>
<para>
<programlisting>

cp /home/e-smith/files/users/admin/home/* /tmp/3dm

</programlisting>
</para>
<para>
Copy over the original 3ware driver module in <filename>/lib/modules/2/2/16-22/scsi</filename> directory with the new RAID5 enabled driver module <filename>3w-xxxx.o</filename>.
</para>
<para>
<programlisting>

cp /tmp/3dm/RH7/3w.xxxx.o /lib/modules/2.2.16-22/scsi/
cp /tmp/3dm/RH7/3w.xxxx.smp /lib/modules/2.2.16-22smp/scsi/3w.xxxx.o

</programlisting>
</para>
<para>
Change the ownership and permissions to match those of all other modules in the directory.
</para>
<para>
<programlisting>

chmod 644 /lib/modules/2.2.16-22/scsi/3w.xxxx.o
chmod 644 /lib/modules/2.2.16-22smp/scsi/3w.xxxx.o

</programlisting>
</para>
<para>
Re-boot at this point to make sure the server boots with the new RAID5 driver installed.
</para>
</sect2>
<sect2>
<title>3dm Install</title>
<para>
Now for the setup of the 3ware "3dm" daemon to allow Web based RAID administration at <filename>http://server_ip_address:979/</filename>
</para>
<note>
<para>
Must use the IP address and not the host's name for 3DM to work
</para>
</note>
<para>
Change the custom install script to allow it to execute and run it.
<programlisting>

chmod 755 /tmp/3dm/install.3dm
/tmp/3dm/install.3dm

</programlisting>
</para>
<warning>
<para>
Use the modified script for e-smith running in RunLevel7... Do Not Use Original
</para>
</warning>
<para>
Follow the on screen directions to setup the new daemon. Pay particular attention to the question of whether you installed the driver via and RPM. Be sure to answer NO to this question.  Also, watch for the port number question and enter 979.  The 3dmd daemon should report starting properly by displaying [OK] ... if not check the installation.  If all went well... delete all files in the <filename>/tmp/3dm</filename> directory and remove <filename>/tmp/3dm</filename> by typing :
</para>
<programlisting>

del /tmp/3dm/*
rmdir /tmp/3dm

</programlisting>
<para>
Reboot the server and look for the 3dm daemon to start correctly and all should be fine.  Using your local workstation, you can now check the status of your array with any browser at <filename>http://server_ip_address:979</filename>.
</para>
</sect2>
</sect1>
<sect1>
<title>Tape Drives</title>
<para>
On most systems, ATAPI tape drives will work without any change as SCSI  emulation is enabled on all systems except those which already have a real SCSI host adapter (3ware appears as one).  However, on systems which contains a SCSI controller and will utilize an IDE tape drive you must make the appropriate changes to the e-smith configuration scripts. You can do so simply by typing the following commands :
</para>
<programlisting>

/sbin/e-smith/db configuration setprop backup Device /dev/nht0
/sbin/e-smith/signal-event conf-backup

</programlisting>
<para>
These changes will configure to e-smith server to dynamically load the 
<filename>ide-tape.o</filename> module rather than the 
<filename>ide-scsi.o</filename> scsi emulation module when a
backup occurs either manually or by a cron job setup through the
e-smith web manager. Now all relevant tape drive commands will use
<filename>/dev/nht0</filename> instead of <filename>/dev/nst0</filename>.
Now apply all the updated RPM's to get the system up to date with
security and bug fixes. At the very least, you must update the
e-smith-backup RPM to insure proper tape backups.  </para> 

<para>
Server should now be ready for normal use!!!  
</para> 
<para> If you have
comments or suggestions about this document, please send them to 
<ulink url="mailto:eric@lasvegasdata.com">eric@lasvegasdata.com</ulink> 
</para>
</sect1> 
</article>

