<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.16">
<TITLE>RE: [dm-devel] Issue in Root partition from SAN as device-mapper-multipath device</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">We are trying to get the root partition in a multipath device from a SAN, in RHEL 4 U4 Beta. For this we have done the following things:</FONT></P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">1. We set up a boot from SAN environment, with 3 partitions(/boot, /, swap respectively) from a LUN on the SAN.</FONT>

<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">2. Without DM multipath, in GRUB.conf we had the parameter as root=/dev/sda2, and it worked fine as expected</FONT>

<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">3. We want to set the / partition as a DM multipath device, and we repackaged the initrd with the following as we felt these are required by DM multipath to work at boot time:</FONT></P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">3.1 modules in lib:</FONT><I> <FONT SIZE=2 FACE="Arial">dm-multipath.ko, multipath.ko, dm-round-robin.ko, dm-zero.ko, dm-mod.ko</FONT></I>

<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">3.2 binaries in sbin (all static binaries):</FONT><I> <FONT SIZE=2 FACE="Arial">dmsetup, multipath, kpartx</FONT></I>

<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">3.2 config files in etc:</FONT><I> <FONT SIZE=2 FACE="Arial">multipath.conf, scsi_id.config, 40-multipath.rules</FONT></I>

<BR><FONT SIZE=2 FACE="Arial">4. Our modified  init script in initrd looks as ;</FONT><I></I>

<BR><I><FONT SIZE=2 FACE="Arial">………</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo "Loading jbd.ko module"</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">insmod /lib/jbd.ko</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo "Loading ext3.ko module"</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">insmod /lib/ext3.ko</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">/sbin/udevstart</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo "Loading DM Module"</FONT></I>

<BR><I><B><FONT SIZE=2 FACE="Arial">insmod /lib/dm-mod.ko</FONT></B></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo "Loading DM Multipath Module"</FONT></I>

<BR><I><B><FONT SIZE=2 FACE="Arial">insmod /lib/dm-multipath.ko</FONT></B></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo "Execution multipath binary with v0"</FONT></I>

<BR><I><B><FONT SIZE=2 FACE="Arial">/sbin/multipath -v 0</FONT></B></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo "Execution dmsetup"</FONT></I>

<BR><I><B><FONT SIZE=2 FACE="Arial">/sbin/dmsetup ls --target multipath --exec "/sbin/kpartx -a"</FONT></B></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo Creating root device</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">mkrootdev /dev/root</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">umount /sys</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo Mounting root filesystem</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">mount -o defaults --ro -t ext3 /dev/root /sysroot</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">mount -t tmpfs --bind /dev /sysroot/dev</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">echo Switching to new root</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">switchroot /sysroot</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">umount /initrd/dev</FONT></I>

<BR><FONT SIZE=2 FACE="Arial">5. Having the UUID returned by scsi_id for the root Lun is,</FONT><I> <FONT SIZE=2 FACE="Arial">3600508b400102be10000100023750000,</FONT></I> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">in GRUB.conf, we changed the parameter as root=/dev/mapper/</FONT><I><FONT SIZE=2 FACE="Arial">3600508b400102be10000100023750000p2</FONT></I><FONT COLOR="#0000FF" SIZE=2 FACE="Arial"></FONT> </P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">6. rebooted the host, and it gave the following error.</FONT>

<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">"No devices found"</FONT>

<BR><FONT SIZE=2 FACE="Arial">"mount: error  mounting ext3"</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">The reason behind this is as you know, No DM multipath device has been created under /dev/mapper/ for root partition from the Lun, its unable to mount the root '/' file system.</FONT></P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Can anyone help us by letting us know that, what are we missing in our approach to create the DM multipath mapped devices for the root partition diuring boot?</FONT></P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Thanks for your valuable inputs.</FONT>
</P>

<P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Regards,</FONT>

<BR><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">Anbu</FONT>
</P>

</BODY>
</HTML>