<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=windows-1252"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#000000" text="#ffffff">
What does it say when you run dmraid -ay from the prompt?  Is the
mapper device module loaded at that point?<br>
<br>
I wrote up a howto for ubuntu at
<a class="moz-txt-link-freetext" href="https://wiki.ubuntu.com/FakeRaidHowto">https://wiki.ubuntu.com/FakeRaidHowto</a>.  You might want to take a look
at that, but the idea is that I simply added a script to the proper
location that directs mkinitramfs to include dmraid in the image and
run it after loading the mapper module.  <br>
<br>
Andre Hasekamp wrote:
<blockquote cite="mid437770FA.909@netscape.net" type="cite">Hi,
  <br>
  <br>
This must be a straightforward one for all you people booting from a
disk array with the support of
  <br>
dmraid.
  <br>
  <br>
The issue is simply this. When I do:
  <br>
  <br>
dmraid -ay
  <br>
dmraid -sa
  <br>
  <br>
in a running non-RAID system, everything is fine, the second command
shows my RAID set is active.
  <br>
Now, when I give the same 2 commands in init on initrd, my RAID set is
not active (or, dmraid -si
  <br>
then indeed shows that my RAID set is not active).
  <br>
  <br>
Hopefully someone can give me a tip that helps me get dmraid started on
initrd.
  <br>
  <br>
Next follows a detailed description of my environment. Detailed,
because after what I've been
  <br>
through until now, it can only be the "little" things that make the
"big" difference.
  <br>
  <br>
Since I stumble over this problem for a while now, I can say that I
tried with different SuSe Linux
  <br>
distributions and with different dmraid versions. At the moment I use
SuSe 10.0 (kernel 2.6.13.15-
  <br>
smp) and dmraid 1.0.0.rc9. My RAID controller is a Promise FastTrak
S150 TX4 with 2 SATA disks
  <br>
connected to it in RAID 0 mode. The dmraid device name for the FastTrak
controller becomes
  <br>
pdc_dbhbgbjdgi.
  <br>
  <br>
Eventually, of course, I'm trying to do something like Lin, Weichuan
described in the thread "How-to
  <br>
for dmraid OS drive(s)?" in this discussion group. This thread had been
started on 2005-08-22.
  <br>
  <br>
So, first I made a static link of dmraid and tested it in the running
system where I set PATH="", to
  <br>
make sure I used the right dmraid.
  <br>
  <br>
Then I see that everyone modifies mkinitrd. Unfortunately for this
problem, mkinitrd is different for
  <br>
different distributions, so I cannot simply adopt what others in this
discussion group publish. To keep
  <br>
things as simple as possible, I decided to go "back to the basics" and
I simply unzipped and un-cpio-
  <br>
ed the SuSe initrd and modified that one. By now (version 10.0) SuSe
has had good reasons
  <br>
(probably in the context of migrating to udev) to replace "linuxrc" by
"init", but for this description, we
  <br>
can consider them to be one and the same thing.
  <br>
  <br>
Still, after writing the previous paragraph, it is my feeling that this
is the first and I'm afraid only
  <br>
discussion group to try and not the SuSe discussion groups. In the SuSe
discussion groups, they only
  <br>
discuss software RAID whenever they use RAID. So far I have not seen
any reference to dmraid.
  <br>
  <br>
My addition to init on initrd consists of the following statements:
  <br>
  <br>
echo "Creating dmraid control device"
  <br>
# Create /dev/mapper like in /sbin/devmap_mknod.sh
  <br>
mkdir -p –mode=755 /dev/mapper
  <br>
# Create /dev/mapper/control like in /sbin/devmap_mknod.sh
  <br>
# with the same numbers I always see in my running system
  <br>
mknod –mode=600 /dev/mapper/control c 10 63
  <br>
echo "Activating RAID sets"
  <br>
# Saw that someone else used –ignorelocking. Not documented in dmraid
-h.
  <br>
# Eventually added –ignorelocking.
  <br>
dmraid -ay –ignorelocking
  <br>
echo "dmraid shows active RAID sets"
  <br>
dmraid -sa
  <br>
echo "dmraid shows inactive RAID sets"
  <br>
dmraid -si
  <br>
  <br>
These statements are added as late as possible in the init script
(after "udevstart", after modprobe
  <br>
sata_promise and after modprobe reiserfs(probably not necessary)), but
just before the script starts
  <br>
to discover the root device.
  <br>
  <br>
Then I cpio and gzip the initrd and copy it with an appropriate name to
/boot.
  <br>
  <br>
The relevant entry of /boot/grub/menu.lst looks as follows:
  <br>
  <br>
###Don't change this comment - YaST2 identifier: Original name:
dmraid###
  <br>
title SUSE LINUX 10.0 dmraid
  <br>
root (hd0,0)
  <br>
kernel /vmlinuz root=/dev/mapper/pdc_dbhbgbjdgi8 vga=0x31a selinux=0
  <br>
resume=/dev/mapper/pdc_dbhbgbjdgi9 splash=silent showopts
  <br>
initrd /initrd-2.6.13-15-smp-dmraid
  <br>
  <br>
So, in the step-by-step approach, this is the "intermediate" situation
where /boot is still on the non-
  <br>
RAID disk and the root (/) is on the RAID system.
  <br>
  <br>
/boot/grub/device.map looks as follows:
  <br>
  <br>
(fd0) /dev/fd0
  <br>
(hd1) /dev/sda
  <br>
(hd2) /dev/sdb
  <br>
(hd0) /dev/hda
  <br>
  <br>
And then I boot. The last things I see on screen during booting, using
this initrd are the echos and
  <br>
messages from dmraid and finally, not surprising because the dmraid set
is not active:
  <br>
  <br>
Waiting for device /dev/mapper/pdc_dbhbgbjdgi8 to appear:
............... not found – exiting to /bin/sh
  <br>
  <br>
Following this exit, you still have limited shell functionality (those
functions which are on initrd). No ls.
  <br>
So, what I do to check:
  <br>
  <br>
cd /dev/mapper
  <br>
mknod control ... (the node is already there)
  <br>
rm pdc* (response: no such file or directory)
  <br>
  <br>
So the dmraid control device is there. The pdc devices are not there,
but we knew that already from
  <br>
dmraid -si. Doing dmraid -ay at this stage also does not help, the RAID
set will not activate.
  <br>
  <br>
Before considering more drastic measures, I thought I'd try this
discussion group.
  <br>
  <br>
  <br>
_______________________________________________
  <br>
Ataraid-list mailing list
  <br>
<a class="moz-txt-link-abbreviated" href="mailto:Ataraid-list@redhat.com">Ataraid-list@redhat.com</a>
  <br>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/ataraid-list">https://www.redhat.com/mailman/listinfo/ataraid-list</a>
  <br>
  <br>
</blockquote>
<br>
</body>
</html>