mala...@us.ibm.com wrote:
> Hi all,
> 
>       I am trying to install RHEL5.3 on an iSCSI disk with two paths.
> I booted with "mapth" option but the installer picked up only a single
> path. Is this the expected behavior when I use "iBFT"?
> 
> The install went fine on a single path. I was trying to convert the
> single path to multi-path by running "mkinitrd". RHEL was unable to boot
> (panics) with the new "initrd" image.  The only difference between the
> old initrd image and the new one is that the old initrd image was using
> iBFT method and the new image was trying to use the values from the
> existing session(s) at "initrd" creation time. For some reason the
> latter method doesn't work. Is this a known bug?
> 
> I also tried installing SLES10 and SLES11. I believe they recommend
> installing on a single path and then converting to multipath. I have
> found that SLES11's initrd image can only find one path even after
> including "multipath" support into the initrd image. It creates a
> dm-multipath device with a single path and later converts to
> dm-multipath device with two paths later when it runs scripts in
> /etc/init.d. SLES10's behavior might be same, but I didn't analyse. Does
> anyone know if SLES11's initrd image can find more than one iSCSI path?
> 
Yes, I do :-)

I have patched the SUSE initrd to activate all network interfaces which
are configured via ifup in the running system.

You'd need the attached patch to /lib/mkinitrd to achieve this.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                   zSeries & Storage
h...@suse.de                          +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

diff --git a/scripts/boot-network.sh b/scripts/boot-network.sh
index ac771e0..5c1bfad 100644
--- a/scripts/boot-network.sh
+++ b/scripts/boot-network.sh
@@ -4,7 +4,7 @@
 # dhcpcd reqires the af_packet module
 #%modules: af_packet $bonding_module
 #%udevmodules: $drvlink
-#%if: "$interface" -o "$dhcp" -o "$ip" -o "$nfsaddrs"
+#%if: "$interface" -o "$dhcp" -o "$ip" -o "$nfsaddrs" -o "$drvlink"
 #
 ##### network initialization
 ##
@@ -148,5 +148,12 @@ elif [ "$nettype" = "static" ]; then
     INTERFACE="${ip%%:*}"
   fi
   echo 'hosts: files dns' > /etc/nsswitch.conf
+elif [ "$nettype" = "ifup" ] ; then
+    for i in /etc/sysconfig/network/ifcfg-* ; do
+	interface=${i##*/ifcfg-}
+	[ -d /sys/class/net/$interface/device ] || continue
+	[ "$interface" = "lo" ] && continue
+	ifup $interface
+    done
 fi
 
diff --git a/scripts/setup-network.sh b/scripts/setup-network.sh
index 031774c..b212f2b 100644
--- a/scripts/setup-network.sh
+++ b/scripts/setup-network.sh
@@ -159,13 +159,17 @@ get_network_module()
     echo "$drvlink"
 }
 
-if [ -z "$interface" ] ; then
-    for addfeature in $ADDITIONAL_FEATURES; do
-        if [ "$addfeature" = "network" ]; then
+for addfeature in $ADDITIONAL_FEATURES; do
+    if [ "$addfeature" = "network" ]; then
+	if [ -z "$interface" ] ; then
             interface=default
         fi
-    done
-fi
+    fi
+    if [ "$addfeature" = "ifup" ] ; then
+	nettype=ifup
+	interface=
+    fi
+done
 
 ip=
 interface=${interface#/dev/}
@@ -215,6 +219,21 @@ if [ -n "$interface" ] ; then
     fi
 fi
 
+# Copy ifcfg settings
+if [ "$nettype" = "ifup" ] ; then
+    mkdir -p $tmp_mnt/etc/sysconfig
+    cp -rp /etc/sysconfig/network $tmp_mnt/etc/sysconfig
+    for i in /etc/sysconfig/network/ifcfg-*; do
+	interface=${i##*/ifcfg-}
+	if [ -d /sys/class/net/$interface/device ] ; then
+	    mod=$(get_network_module $interface)
+	    drvlink="$drvlink $mod"
+	    verbose "[NETWORK]\t$interface ($nettype)"
+	fi
+    done
+    interface=
+fi
+
 # Copy the /etc/resolv.conf when the IP is static
 if [ "$interface" -a "$nettype" = "static" -a -f /etc/resolv.conf ] ; then
     verbose "[NETWORK]\tUsing /etc/resolv.conf from the system in the initrd"
@@ -236,6 +255,14 @@ mkdir -p $tmp_mnt/var/run
 cp_bin /lib/mkinitrd/bin/ipconfig.sh $tmp_mnt/bin/ipconfig
 if [ -f /etc/udev/rules.d/70-persistent-net.rules ] ; then
     cp /etc/udev/rules.d/70-persistent-net.rules $tmp_mnt/etc/udev/rules.d
+    if [ "$nettype" = "ifup" ] ; then
+	cp /etc/udev/rules.d/77-network.rules $tmp_mnt/etc/udev/rules.d
+	cp_bin /sbin/ifup $tmp_mnt/sbin/ifup
+	cp_bin /bin/awk $tmp_mnt/bin/awk
+	cp_bin /bin/grep $tmp_mnt/bin/grep
+	cp_bin /bin/logger $tmp_mnt/bin/logger
+	cp_bin /bin/touch $tmp_mnt/bin/touch
+    fi
 fi
 
 [ "$interface" ] && verbose "[NETWORK]\t$interface ($nettype)"
diff --git a/scripts/setup-prepare.sh b/scripts/setup-prepare.sh
index a4886e2..c6cfe0e 100644
--- a/scripts/setup-prepare.sh
+++ b/scripts/setup-prepare.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 #%stage: setup
-#%param_f: "Features to be enabled when generating initrd.\nAvailable features are:\niscsi, md, mpath, lvm, lvm2, evms" "\"feature list\"" ADDITIONAL_FEATURES
+#%param_f: "Features to be enabled when generating initrd.\nAvailable features are:\niscsi, md, mpath, lvm, lvm2, ifup" "\"feature list\"" ADDITIONAL_FEATURES
 #%param_k: "List of kernel images for which initrd files are created. Defaults to all kernels found in /boot." "\"kernel list\"" kernel_images
 #%param_i: "List of file names for the initrd; position have match to \"kernel list\". Defaults to all kernels found in /boot." "\"initrd list\"" initrd_images
 #%param_l: "mkinitrd directory. Defaults to /lib/mkinitrd." "\"lib_dir\"" INITRD_PATH

Reply via email to