My attempt to understand dmraid

Sean Bruno sean.bruno at dsl-only.net
Sat Nov 10 03:02:19 UTC 2007


On Mon, 2007-10-22 at 12:16 +0200, Heinz Mauelshagen wrote:
> On Thu, Oct 11, 2007 at 10:57:39AM -0700, Sean Bruno wrote:
> > I am trying to delve into dmraid/device-mapper and learn how the magic
> > happens and I came up with what I think is the "way it works."  Please
> > critique and correct me where I am wrong or over-simplify the operation
> > of the current dmraid architecture as it is used under Fedora/redhat
> > systems.
> > 
> > Assumptions:
> >   dmraid compatible device(sil3118)
> >   Hard Drives of equal size(SATA in my case)
> >   Installation of Fedora Core 7(x86_64)
> > 
> > 1.
> > The initial setup occurs on the RAID controller where I selected RAID1
> > with my two disks.  This initialized the drives for use with
> > dmraid/device-mapper by placing the SiL metadata on the drives and set
> > them to a initialized state.
> 
> Well, it just puts vendor specific metedata on the drives making up
> a RAID set. Vendors typically ship M$ drivers and a managent tool to use
> such ATARAID sets on Windows.
> 
> > 
> > 2.
> > The system boots off the first hard drive(sda) and loads the kernel from
> > there.
> 
> As part of the initrd actions, a mirrored mapping gets activated for
> your RAID1 set.
> 
> > 
> > 3.
> > Booting Fedora Core 7, /etc/rc.sysinit loads the fake RAID1 module
> > "dm-mirror".  This actually works with the software RAID code in md to
> > manage the RAID1.
> 
> No need for MD. dm-mirror is a selve-contained device-mapper mirroring
> implementation.
> 
I thought(from reading the code), that dm-mirror is a module that uses
MD functions(it's built on top of the s/w raid code).

> > The system then detects that the drives are a RAID1
> > set by invoking '/sbin/dmraid  -ay -i -p -t' This detects the RAID1 set
> > and creates /dev/mapper/silXXXXXXX through the device-mapper libraries.
> 
> Like I said, activation happens in the initrd.
> 
Specifically, I was looking at the redhat startup script /etc/rc.sysinit.  Is this how the system figures out that there's a RAID device to deal with?


Sean




More information about the Ataraid-list mailing list