Search:  
Gentoo Wiki

Mylex_DAC960_RAID_controller

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related

This article describes setup and configuration of DAC960-based Mylex RAID-controllers with kernel 2.6. For a list of supported hardware see the file README.DAC960 (http://glide.stanford.edu/lxr/source/Documentation/README.DAC960?v=linux-2.6.10) in the kernel sources.

Contents

Controller setup

Depending on firmware-version and controller-features, Mylex controllers have a BIOS or a BIOS plus an additional firmware-tool to set up, configure and troubleshoot disks and/or arrays. Take a break here and go read README.DAC960 to understand the controllers and its drivers features and how to handle them.

System start

During POST, BIOS version and controller information is shown, together with the prompt "Press <ALT-M> for BIOS options". In this BIOS however only few things can be configured, like "BIOS on/off" or selecting 8GB BIOS Geometry.

Firmware with integrated RAID-Tool

Depending on the controller model, another prompt is shown: "Press <ALT-R> for RAID Configuration options" (Models DAC960PD und DAC960PDU for example). Here the actual RAID-configuration can be made, and settings can be saved to disk to be loaded and restored in emergencies. Believe me, you will want to save your config once your arrays and disks are set up! ;)

Firmware without RAID-Tool

If the controller does not have RAID-Tools integrated into its firmware (older controllers and those with only one flash-chip in the two sockets between I/O-shield and PCI-connector, f.e. DAC960LB-models), the external program DACCF.EXE has to be used to create and manage arrays.

Support and downloads are available from the LSI-website (LSI has bought Mylex). Under "downloads" select your product ("AcceleRAID xxx" or "DAC960xx" f.e.), get the current DACCF.EXE, save it to a bootable DOS-floppy, boot it and run DACCF.EXE. The tool provides the same functions as the integrated tool of the other/newer controllers.

Firmware-versions

A word on firmware-versions: The mentioned controllers with only one flash chip are limited to 2.xx firmware, 3.xx firmware only works on "2-flash-controllers", in any case read the README files included with LSI/Mylex firmware downloads!

Snippet from the 3.52-0-2 README.TXT as an example:

"This firmware code is for DACPU / DACPD / DACP-MY4 models
(has 2 EEPROM chips) controller ONLY. DO NOT USE on model
DAC-PL or in any OEM version of the  controllers."
These flash utilities will not work with -MY3 model controllers.
A -MY3 controller has version 2.x firmware and with only 1 EEPROM
chip.

Additionally, 3.xx versions are divided into those requiring XBDA-capable motherboards and those not needing XBDA.

Generally it is absolutely not advisable to flash Compaq, Siemens (FSI) and other OEM-controllers with a Mylex/LSI-firmware.

You have to check the number of flash chips on your DAC960 very carefully. The flash software will attempt to flash the 3.xx firmware on a card with only one flash chip if you tell it to do so, but flashing a 3.xx firmware in a one chip DAC960 will render the DAC960 unusable.

Setting up partitions

Per system drive up to 7 partitions are usable. This rather low number must be taken into consideration early when planning the array - and of course when partitioning.

If more partitions are needed, maybe for large applications, more system drives have to be used. fdisk will not prevent you from creating partition 8 (c0d0p8) - but there will be no device file to handle it - the partition and its disk space will be unusable.

Counting starts at 0 for controllers (c) and system disks (d), whereas it starts at 1 for prtitions (p):

/dev/rd/c0d0   - controller 1, drive 1
/dev/rd/c0d0p1 - controller 1, drive 1, partition 1
...
/dev/rd/c0d0p4 - controller 1, drive 1, partition 4
..
/dev/rd/c1d1p7 - controller 2, drive 2, partition 7

/etc/fstab may look like follows::

/dev/rd/c0d0p1          /boot           ext3            noatime         0 2
/dev/rd/c0d0p4          /               ext3            noatime         0 1
/dev/rd/c0d0p2          none            swap            sw              0 0
/dev/rd/c0d0p3          /var/log        ext3            noatime         0 2

Kernel configuration and compiling

Kernel with devfs

genkernel --menuconfig all

Choose the following options:

Device Driver
  Devices
    <*> Mylex DAC960/DAC1100 PCI RAID Controller support
 
File Systems
 Pseudo Filesystems
  [*] /dev file system support (OBSOLUTE)
  [*]   Automatically mount at boot

Kernel with udev

genkernel --udev --menuconfig all

The --udev parameter ensures that udev-support is added to the initrd.

Activate Mylex drivers and disable devfs. Choose the following options:

Device Driver
  Devices
    <*> Mylex DAC960/DAC1100 PCI RAID Controller support
 
File Systems
 Pseudo Filesystems
 
File Systems
 Pseudo Filesystems
  [ ] /dev file system support (OBSOLUTE)
  [ ]   Automatically mount at boot

A little bit of information about udev:

What is UDEV?
 
In a nutshell UDEV is an replacement of DEVFS in user-space using sysfs
and /sbin/hotplug. It will create and destroy /dev entries based on the current   
system configuration. It does this by watching the /sbin/hotplug events on the 
system, and reading information about these events from sysfs.
 
Udev works entirely in user-space, using /sbin/hotplug calls that the kernel 
makes whenever a device is added or removed from the kernel. All naming policy, 
and permission control is done in user-space.
 
http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ

Boot parameters

The following grub-related paragraphs are by an unknown person and originated on the German DAC960 Wiki-page. The author sais he's still testing.

Grub for kernel with devfs

Edit grub.conf like:

title  Kernel with Mylex drivers (devfs)
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r5 root=/dev/ram0 real_root=/dev/rd/host0/target0/part5 init=/linuxrc ramdisk_size=8192 
initrd /initrd-2.6.11-gentoo-r5

Hier noch kurz den Aufbau von real_root erklären.

/dev/rd/host0/target0/disc  (the volume) 
/dev/rd/host0/target0/part1  (partition) 
/dev/rd/host0/target0/part2  (partition) 
/dev/rd/host0/target0/part3  (partition)

Grub for kernel with udev

(Achtung: bin hier grad' noch am Testen)

Edit grub.conf like:

title  Kernel with Mylex drivers (devfs)
root (hd0,0)
kernel /kernel-2.6.11-gentoo-r5 root=/dev/ram0 real_root=/dev/disc0/part5  init=/linuxrc ramdisk_size=8192 udev
initrd /initrd-2.6.11-gentoo-r5
disc0/disc (Disk)
disc0/part1 (1st partition)
disc0/part2 (2nd partition)
disc0/part3 (3rd partition)

LILO

There are multipe ways to access the drives:

In /etc/lilo.conf the boot= - parameter may cause problems. If, for example, you have a RAID5-array as "controller #1, disc #1" and the root-partition is partition #4:

# c<ontroller>0d<rive>0
boot = /dev/rd/c0d0
...
# c<ontroller>0d<rive>0p<artition>4
root = /dev/rd/c0d0p4

Depending on kernel-, LILO- and controller-version some LILOs find the partition at root=/dev/rc/c0d0p3, some don't. If the kernel panics on boot, it may eventually help to call the devices with major and minor numbers. Major for the first Mylex-Controller is 48 (hex 30): Controller #1, disk #1: Major 48 (=hex 30), Minor 00 (=hex 00)), controller #1, disk #1, partition #4: Major 48 (=hex 30), Minor 04 (=hex 04))

# 30;00
boot = 3000
...
# 30;04
root = 3004

Reboot/Halt

If the controller complains about inconsistent System Drives or an unrecoverable mirror race after reboot/halt, it may help to do an additional sync just before halt or reboot:

Change /etc/init.d/reboot.sh to:

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
echo "flush-cache" > /proc/rd/c0/user_command # Flush cache to disk
/sbin/reboot -idp
# hmm, if the above failed, that's kind of odd ...
# so let's force a reboot
/sbin/reboot -f

Change /etc/init.d/shutdown.sh to:

# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
echo "flush-cache" > /proc/rd/c0/user_command # Flush cache to disk
/sbin/halt -ihdp
# hmm, if the above failed, that's kind of odd ...
# so let's force a halt
/sbin/halt -f

In both files

/bin/sync

is added right before the final command is executed, the controller writes the content of its cache to disk, just before power-off.

Alternatively, add the mentioned line to /etc/conf.d/local.stop, so it doesn't get overwritten when updating the baselayout package:

# /etc/conf.d/local.stop
# This is a good place to unload any misc.
# programs you started above.
# For example, if you are using OSS and have
# "/usr/local/bin/soundon" above, put
# "/usr/local/bin/soundoff" here.
echo "flush-cache" > /proc/rd/c0/user_command # Flush cache to disk

Sources and Links

http://glide.stanford.edu/lxr/source/Documentation/README.DAC960?v=linux-2.6.10

http://manuals.fujitsu-siemens.com/serverbooks/content/unix/linux/info/readme.htm

http://manuals.fujitsu-siemens.com/serverbooks/content/unix/linux/info/readme.htm#IIONE

http://forums.gentoo.org/viewtopic-t-146244-highlight-mylex.html

http://portal.suse.de/sdb/de/1999/04/mylex_dac960.html

http://home.arcor.de/thomas.litsch/s-mylex.htm

http://www.raidcenter.de/viewtopic.php?t=81&view=next&sid=110d63a7d11870a2045ae003e3f7d427

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286809

http://osx.freshmeat.net/projects/mylexui/

http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html

Retrieved from "http://www.gentoo-wiki.info/Mylex_DAC960_RAID_controller"

Last modified: Sun, 31 Aug 2008 08:16:00 +0000 Hits: 14,999