DDF Fake RAID

From Linux Raid Wiki
(Difference between revisions)
Jump to: navigation, search
Line 27: Line 27:
 
=== Creating the driver disk image ===
 
=== Creating the driver disk image ===
  
Download the latest RPMs for '''mdadm''' and '''dracut''' from the [http://download.opensuse.org/repositories/home:/mwilck:/mdadm-DDF:/EL6/RedHat_RHEL-6/ openSUSE Build Service] to some directory on your system. The following procedure creates a driver disk for both 32bit and 64bit; it assumes that all RPMs have been downloaded to /tmp/rpms. It can be run on any Linux system, but be sure that '''createrepo''' on your system is compatible with RHEL6 (to be sure, run the following commands on a RHEL6/CentOS6 system).
+
Download the latest RPMs for '''mdadm''' and '''dracut''' from the [http://download.opensuse.org/repositories/home:/mwilck:/mdadm-DDF:/EL6/RedHat_RHEL-6/ openSUSE Build Service] to some directory on your system. The following procedure creates a driver disk for both 32bit and 64bit; it assumes that all RPMs have been downloaded to /tmp/rpms. It can be run on any Linux system, but be sure that <tt>createrepo</tt> on your system is compatible with RHEL6 (to be sure, run the following commands on a RHEL6/CentOS6 system).
  
 
  RPMS=/tmp/rpms
 
  RPMS=/tmp/rpms
Line 37: Line 37:
 
  echo "Driver Update Disk version 3" >dud/rhdd3
 
  echo "Driver Update Disk version 3" >dud/rhdd3
 
  mkisofs -J -r -V OEMDRV -o dud.iso dud
 
  mkisofs -J -r -V OEMDRV -o dud.iso dud
 +
 +
The resulting image can be burnt to a CD, copied to an USB stick, or placed e.g. on a HTTP server. See [https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/chap-Updating_drivers_during_installation_on_Intel_and_AMD_systems.html the Red Hat documentation] for details.
 +
 +
=== Creating the anaconda updates image ===
 +
 +
[[File:Updates.tar.gz]] contains a skeleton directory with anaconda updates (python code and udev rules) which are necessary to change anaconda's logic such that mdadm rather than dmraid will be used to access the DDF disks. Unpack the contents of [[File:Updates.tar.gz]] and '''copy the mdadm and mdmon binaries for your architecture''' into the <tt>updates/</tt> directory. Here is the procedure for x86_64:
 +
 +
tar xfvz Updates.tar.gz  # this will create the updates/ folder
 +
# extract the mdadm and mdmon binaries for x86_64 from the RPM and copy them to updates/
 +
mkdir tmp
 +
(cd tmp; rpm2cpio $RPMS/mdadm*x86_64.rpm | cpio -idm)
 +
cp -a tmp/sbin/{mdadm,mdmon} updates/
 +
 +
There are several methods to provde the contents of the <tt>updates</tt> directory during installation:
 +
 +
# This creates a updates.img file to put on a network server
 +
(cd updates; find . | cpio -c -o) | gzip -c >updates.img
 +
# This creates a updates ISO image to be used in a CD-ROM drive
 +
mkisofs -J -r -V UPDATES -o updates.iso updates
 +
 +
The CD-ROM drive method will only work if your system has a second drive or if the installation itself is done from a network server (not from CD/DVD), because otherwise the installation media will be locked in DVD drive when you try to access the updates.
 +
You can also use a floppy or USB disk, see [http://fedoraproject.org/wiki/Anaconda/Updates the Fedora Wiki] for details.
 +
 +
=== Starting the installation ===
 +
 +
You need to activate the driver disk and the updates disk using the <tt>dd</tt> and <tt>updates</tt> boot options. Consult the Red Hat documentation for details.

Revision as of 22:43, 21 August 2013

Contents

Enabling MD RAID on DDF Fake / BIOS RAID systems

The terms "Fake RAID" or "BIOS RAID" denote systems with no RAID controller, but with a simple BIOS that is able to do basic RAID operations on an array of disks. For the actual runtime RAID implementation, this RAID solution relies on a OS driver. On Windows this will usually be a driver from the RAID vendor. On Linux, the MD RAID stack can be used as a fully featured, well tested and stable RAID stack - if mdadm understands the meta data used by the vendor. Linux has another tool as well, dmraid, which uses the kernel device mapper to access the data on the RAID arrays, but doesn't qualify as a fully featured RAID solution to the same extent as MD/mdadm. The advantage of dmraid over mdadm is that it understands many more meta data formats. As of 2013, most distributions use dmraid to access fake RAID in any format except the Intel IMSM (also "ISW", "Matrix") format.

One meta data format commonly found on modern RAID systems (real as well as "fake" RAID) is the SNIA DDF format. Both mdadm and dmraid have supported it for some time. This page is about tweaking Linux distributions to use mdadm rather than dmraid for DDF.

General Requirements

In order to run a DDF disk array with MD, your distribution needs

  1. a recent version of mdadm. As of 2013/08, I recommend a pre-release of mdadm 3.3. DDF support in mdadm has seen a lot of fixes and improvements in 3.3;
  2. udev rules that support invoking mdadm (rather than dmraid) when disks with DDF meta data are detected;
  3. support for mdadm on DDF in initial RAM disk, i.e. in tools like mkinitrd or dracut;
  4. support for mdadm on DDF in the OS installer.

The last requirement is optional, but not having it means to have to modify the system after installation to use mdadm instead of dmraid, and that is an expert task.

mdadm on DDF fake RAID for various distributions

This is work in progress. I will describe the installation procedure for some distributions, hoping that users of other distributions will follow up.

RHEL 6 / CentOS 6

This description is not complete yet!!!

For installation of RHEL6 or Centos6, you will need to create a driver disk (which will provide the updated packages, not actual drivers) and a anaconda updates disk (which contains some changes for anaconda, the RHEL/CentOS installation program). There is a repository of the required RPM packages on the openSUSE Build Service.

Creating the driver disk image

Download the latest RPMs for mdadm and dracut from the openSUSE Build Service to some directory on your system. The following procedure creates a driver disk for both 32bit and 64bit; it assumes that all RPMs have been downloaded to /tmp/rpms. It can be run on any Linux system, but be sure that createrepo on your system is compatible with RHEL6 (to be sure, run the following commands on a RHEL6/CentOS6 system).

RPMS=/tmp/rpms
mkdir -p dud/rpms/{i386,x86_64}
cp $RPMS/*i686.rpm $RPMS/*.noarch.rpm dud/rpms/i386
cp $RPMS/*x86_64.rpm $RPMS/*.noarch.rpm dud/rpms/x86_64
(cd dud/rpms/i386; createrepo .) 
(cd dud/rpms/x86_64; createrepo .)
echo "Driver Update Disk version 3" >dud/rhdd3
mkisofs -J -r -V OEMDRV -o dud.iso dud

The resulting image can be burnt to a CD, copied to an USB stick, or placed e.g. on a HTTP server. See the Red Hat documentation for details.

Creating the anaconda updates image

File:Updates.tar.gz contains a skeleton directory with anaconda updates (python code and udev rules) which are necessary to change anaconda's logic such that mdadm rather than dmraid will be used to access the DDF disks. Unpack the contents of File:Updates.tar.gz and copy the mdadm and mdmon binaries for your architecture into the updates/ directory. Here is the procedure for x86_64:

tar xfvz Updates.tar.gz  # this will create the updates/ folder
# extract the mdadm and mdmon binaries for x86_64 from the RPM and copy them to updates/
mkdir tmp
(cd tmp; rpm2cpio $RPMS/mdadm*x86_64.rpm | cpio -idm)
cp -a tmp/sbin/{mdadm,mdmon} updates/

There are several methods to provde the contents of the updates directory during installation:

# This creates a updates.img file to put on a network server
(cd updates; find . | cpio -c -o) | gzip -c >updates.img
# This creates a updates ISO image to be used in a CD-ROM drive
mkisofs -J -r -V UPDATES -o updates.iso updates

The CD-ROM drive method will only work if your system has a second drive or if the installation itself is done from a network server (not from CD/DVD), because otherwise the installation media will be locked in DVD drive when you try to access the updates. You can also use a floppy or USB disk, see the Fedora Wiki for details.

Starting the installation

You need to activate the driver disk and the updates disk using the dd and updates boot options. Consult the Red Hat documentation for details.

Personal tools