Re: My attempt to understand dmraid

Heinz Mauelshagen <[email protected]>
Newsgroups gmane.linux.ataraid
Message-ID <[email protected]>
On Fri, Nov 09, 2007 at 07:02:19PM -0800, Sean Bruno wrote:
> 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).

No, it's a distinct device-mapper RAID1 implementation.

> 
> > > 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?

The dmraid call in rc.sysinit would activate any additional ATARAID sets,
which haven't been activated before in the initrd.

Heinz

> 
> 
> Sean

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Storage Development                               56242 Marienrachdorf
                                                  Germany
[email protected]                            PHONE +49  171 7803392
                                                  FAX   +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.