Installing the Promise SX4000 RAID Controller on Redhat 9

Update: While I’ve run this controller for the past two-and-a-half years, I can’t recommend it. The drivers are rather flaky and unsupported. Some poor souls have managed to get it working with the 2.6 kernel, but I get the feeling that it is rather unreliable. For instance, if one drive fails, it tends to bring down the entire kernel. What’s the point of the redundancy at that point? This is a C- product for Linux. Buy a 3Ware controller or use software RAID and LVM instead.

The day has finally arived when you cobble together 1 TB of disks into
a RAID 5 machine for $750. For the price of a single U320 hard drive, you
can now assemble an entire array of 250 GB hard disks. This task
is not for the faint of heart. You have to first navigate the
trials of minimally maintained drivers and a cadre of installation
snafus to enjoy the benefits of a commodity RAID 5 array on
your Linux machine.

Gathering the Components

  • 4 x Maxtor 250GB/7200RPM/8MB (Fry’s) $144.99 = $579.96
  • Promise SX4000 RAID Controller (mwave.com) = $141.00
  • Shipping and Tax = $40
  • Total $760.96

Compiling the Driver



trogdor> wget http://majestic.lugh.de/~fs/promise/sx4000_v2.zip   --14:08:59--  

http://majestic.lugh.de/%7Efs/promise/sx4000_v2.zip

           => `sx4000_v2.zip.1'
Resolving majestic.lugh.de... done.
Connecting to majestic.lugh.de[195.158.42.199]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 418,587 [application/zip]

100%[=========================================>] 418,587       74.91K/s    ETA 00:00

14:09:05 (74.91 KB/s) - `sx4000_v2.zip.1' saved [418587/418587] 


trogdor> unzip sx4000_v2.zip
Archive:  ../sx4000_v2.zip
   creating: FastTrak-partial-b24/

  inflating: FastTrak-partial-b24/ata.h  
  inflating: FastTrak-partial-b24/cam.h  
  inflating: FastTrak-partial-b24/cam_con.h  
  inflating: FastTrak-partial-b24/cam_def.h  
  inflating: FastTrak-partial-b24/cam_export.h  
  inflating: FastTrak-partial-b24/cam_macr.h  

  inflating: FastTrak-partial-b24/cam_patch.h  
  inflating: FastTrak-partial-b24/cam_var.h  
   creating: FastTrak-partial-b24/engine/
  inflating: FastTrak-partial-b24/engine/ata-3.h  
  inflating: FastTrak-partial-b24/engine/buf.h  
  inflating: FastTrak-partial-b24/engine/buf_ioct.h  

  inflating: FastTrak-partial-b24/engine/code.h  
  inflating: FastTrak-partial-b24/engine/constant.h  
  inflating: FastTrak-partial-b24/engine/debug.h  
  inflating: FastTrak-partial-b24/engine/enginehs.h  
  inflating: FastTrak-partial-b24/engine/export.h  
  inflating: FastTrak-partial-b24/engine/global.h  

  inflating: FastTrak-partial-b24/engine/macro.h  
  inflating: FastTrak-partial-b24/engine/oem.h  
  inflating: FastTrak-partial-b24/engine/pbmtypes.h  
  inflating: FastTrak-partial-b24/engine/scsi-3.h  
  inflating: FastTrak-partial-b24/engine/struct.h  
  inflating: FastTrak-partial-b24/fasttrak.c  

  inflating: FastTrak-partial-b24/fasttrak.h  
  inflating: FastTrak-partial-b24/ftlib.channel.o  
  inflating: FastTrak-partial-b24/ftlib.hpq.o  
  inflating: FastTrak-partial-b24/ftlib.nec.o  
  inflating: FastTrak-partial-b24/ftlog.c  
  inflating: FastTrak-partial-b24/global.h  

  inflating: FastTrak-partial-b24/isr.c  
  inflating: FastTrak-partial-b24/linuxdef.h  
  inflating: FastTrak-partial-b24/Makefile  
  inflating: FastTrak-partial-b24/os.c  
  inflating: FastTrak-partial-b24/pti_st.h  
  inflating: FastTrak-partial-b24/pti_stdev.h  

  inflating: FastTrak-partial-b24/wrapper.c  
  inflating: FastTrak-partial-b24/wrapper.h  
  inflating: PSC B24 readme.txt      


trogdor> cd FastTrak-partial-b24
trogdor> gmake

cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory
cat: /lib/modules/2.4.20-28.9/build//.config: No such file or directory

/bin/sh: line 1: [: too many arguments
/bin/sh: line 1: [: too many arguments
kernel version: 2.4.20-28.9smp
2.4.20-28.9BOOT
2.4.20-28.9bigmem
2.4.20-28.9
gcc -c -O2 -fomit-frame-pointer -D__KERNEL__ -DMODULE -D__LINUX__ -Wall -Wstrict-prototypes -fno-strict-aliasing -Wno-unused -pipe -DXH_BSL -D_PBM_
-DENABLE_PRIVATE_DEBUGGING -D_SUPPORTENCLOSURE_ -I/lib/modules/2.4.20-28.9/build/include -I/lib/modules/2.4.20-28.9/build/drivers/scsi -march=i386
-mpreferred-stack-boundary=2 -DMODVERSION -include /lib/modules/2.4.20-28.9/build/include/linux/modversions.h -o wrapper.o wrapper.c
/bin/sh: line 1: [: too many arguments
kernel version: 2.4.20-28.9smp

2.4.20-28.9BOOT
2.4.20-28.9bigmem
2.4.20-28.9
gcc -c -O2 -fomit-frame-pointer -D__KERNEL__ -DMODULE -D__LINUX__ -Wall -Wstrict-prototypes -fno-strict-aliasing -Wno-unused -pipe -DXH_BSL -D_PBM_
-DENABLE_PRIVATE_DEBUGGING -D_SUPPORTENCLOSURE_ -I/lib/modules/2.4.20-28.9/build/include -I/lib/modules/2.4.20-28.9/build/drivers/scsi -march=i386
-mpreferred-stack-boundary=2 -DMODVERSION -include /lib/modules/2.4.20-28.9/build/include/linux/modversions.h -o fasttrak.o fasttrak.c
fasttrak.c: In function `ptisx_detect':
fasttrak.c:1677: warning: implicit declaration of function `InitEnclosure'
/bin/sh: line 1: [: too many arguments
kernel version: 2.4.20-28.9smp
2.4.20-28.9BOOT

2.4.20-28.9bigmem
2.4.20-28.9
gcc -c -O2 -fomit-frame-pointer -D__KERNEL__ -DMODULE -D__LINUX__ -Wall -Wstrict-prototypes -fno-strict-aliasing -Wno-unused -pipe -DXH_BSL -D_PBM_
-DENABLE_PRIVATE_DEBUGGING -D_SUPPORTENCLOSURE_ -I/lib/modules/2.4.20-28.9/build/include -I/lib/modules/2.4.20-28.9/build/drivers/scsi -march=i386
-mpreferred-stack-boundary=2 -DMODVERSION -include /lib/modules/2.4.20-28.9/build/include/linux/modversions.h -o os.o os.c
/bin/sh: line 1: [: too many arguments
kernel version: 2.4.20-28.9smp
2.4.20-28.9BOOT
2.4.20-28.9bigmem
2.4.20-28.9
gcc -c -O2 -fomit-frame-pointer -D__KERNEL__ -DMODULE -D__LINUX__ -Wall -Wstrict-prototypes -fno-strict-aliasing -Wno-unused -pipe -DXH_BSL -D_PBM_
-DENABLE_PRIVATE_DEBUGGING -D_SUPPORTENCLOSURE_ -I/lib/modules/2.4.20-28.9/build/include -I/lib/modules/2.4.20-28.9/build/drivers/scsi -march=i386
-mpreferred-stack-boundary=2 -DMODVERSION -include /lib/modules/2.4.20-28.9/build/include/linux/modversions.h -o isr.o isr.c

/bin/sh: line 1: [: too many arguments
kernel version: 2.4.20-28.9smp
2.4.20-28.9BOOT
2.4.20-28.9bigmem
2.4.20-28.9
gcc -c -O2 -fomit-frame-pointer -D__KERNEL__ -DMODULE -D__LINUX__ -Wall -Wstrict-prototypes -fno-strict-aliasing -Wno-unused -pipe -DXH_BSL -D_PBM_
-DENABLE_PRIVATE_DEBUGGING -D_SUPPORTENCLOSURE_ -I/lib/modules/2.4.20-28.9/build/include -I/lib/modules/2.4.20-28.9/build/drivers/scsi -march=i386
-mpreferred-stack-boundary=2 -DMODVERSION -include /lib/modules/2.4.20-28.9/build/include/linux/modversions.h -o ftlog.o ftlog.c
ld -r -o FastTrak.o ftlib.channel.o wrapper.o fasttrak.o os.o isr.o ftlog.o

Problems

When I first attempted the install with the original June drivers, it failed miserably.
My daft engineering analyis of the problem was that I updated the kernel rpm (like Redhat told
me to), but didn't upgrade the source RPM (due to laziness). The Makefile uses uname to determine
the kernel version. So, it goes looking for the correct kernel source (which I didn't have),
and then fails miserably. Easy enough, I just went to the Redhat Updates directory at
mirror.hiwaay.net
to find the kernel source RPM that I was missing (hiwaay.net is wicked fast here). I found that Redhat released yet
ANOTHER kernel update. So, I just did the updated the kernel and the kernel-source like so:


trogdor> mkdir new_kernel
trogdor> cd new_kernel
trogdor> wget http://mirror.hiwaay.net/redhat/redhat/linux/updates/9/en/os/i386/kernel-2.4.20-28.9.i386.rpm

trogdor> wget http://mirror.hiwaay.net/redhat/redhat/linux/updates/9/en/os/i386/kernel-source-2.4.20-28.9.i386.rpm
trogdor> sudo rpm -Uvh kernel*.rpm
trogdor> cd ..; rm -Rf new_kernel


Another problem I had is that the June 16 version of the drivers would _not_ compile.
The _v2 drivers did compile on the new kernel on Redhat 9 with the new kernel and kernel-source in place though. 

Yet _another_ problem that I had was that drivers were packed as .zip.  Why? Dear God Why?  I'll probably create an RPM
that does all of this nonsense stuff properly (*cough* isn't that what Promise is supposed to do?)
Oh, and how lame is it that they have a floppy disk image on their stupid install cd?  Why even offer Linux support
if you're going to be half-assed about it?  At least there was some kind of leak of the driver code so that it
could be minimally maintained by some hacker in Germany.  

OK, here's a little helping hint for everyone.  Don't put spaces in filenames on Linux systems, and package
with tar _NOT_ zip.  And when you package, make sure all of the files extract to a single directory.  See ESR's
Art of Unix Programming for clarification and/or enlightenment.



trogdor> mkdir fasttrak
trogdor> cd fasttrak
trogdor> wget http://majestic.lugh.de/~fs/promise/sx4000_v2.zip   --14:08:59--  

http://majestic.lugh.de/%7Efs/promise/sx4000_v2.zip

           => `sx4000_v2.zip.1'
Resolving majestic.lugh.de... done.
Connecting to majestic.lugh.de[195.158.42.199]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 418,587 [application/zip]

100%[=========================================>] 418,587       74.91K/s    ETA 00:00


trogdor> unzip sx4000_v2.zip
...
trogdor> mv FastTrak-partial-b24 fastrak-module
trogdor> mv PSC\ B24\ readme.txt fasttrak-module/readme.txt
trogdor> tar -cjf fasttrak.tar.bz2 fasttrak-module/

How hard was that? Again, I shouldn’t have to do it, Promise should have. Then, the driver maintainer
should have. You can download my proper source package that unpacks to a single directory here:

Installing the Driver


trogdor> sudo modprobe -a scsi_mod
trogdor> sudo insmod FastTrak.o

trogdor> sudo tail /var/log/messages
Jan 16 00:23:26 homestar kernel: Promise FastTrak SX4000 Linux Driver Version 1.01.00.24 (9.Oct.2003)
Jan 16 00:23:26 homestar kernel: FastTrak: Installed FastTrak SX4000 Local DIMM - 256MB
Jan 16 00:23:27 homestar kernel: scsi0 : FastTrak SX4000
Jan 16 00:23:27 homestar kernel:   Vendor: Promise   Model: 4 Disk RAID5      Rev: 1.10
Jan 16 00:23:27 homestar kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02

Creating, Formatting, and Mounting the Filesystem


trogdor> sudo sfdisk /dev/sda
trogdor> sudo /sbin/mkfs -t ext3 /dev/sda1
trogdor> sudo mkdir /raid
trogdor> sudo mount /dev/sda1 /raid

trogdor> df -B G -h 
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda3              37G  6.1G   29G  18% /
/dev/hda1              99M   11M   83M  12% /boot
/dev/hdc1             113G   80G   28G  75% /home/jperrie
/dev/hdd1             113G   11G   97G  11% /local
/dev/sda1             691G   67G  589G  11% /raid
//yellowdart/d$       115G   78G   38G  68% /mnt/ddrive
//yellowdart/g$        75G   19G   57G  25% /mnt/gdrive
//yellowdart/h$       2.0G  1.8G  247M  88% /mnt/hdrive
//yellowdart/i$       2.0G  818M  1.2G  41% /mnt/idrive
//yellowdart/j$        54G   44G  9.7G  82% /mnt/jdrive
//yellowdart/k$        25G   19G  6.4G  75% /mnt/kdrive
//yellowdart/c$       2.0G  1.5G  537M  74% /mnt/cdrive

Setting Up Samba

You need to add the entry for the newly mounted raid partition to your
smb.conf.


trogdor> vi /etc/samba/smb.conf

[raid]
   comment = RAID5
   path = /raid
   public = yes

   writable = yes
   printable = no

Then you get to restart the samba service.


trogdor> sudo service smb restart
Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]

After you do that, then you can mount it on your Windows 2000 box.

Comments

Leave a response

Comments