Bug 457216 - mkinitrd bugs when multipath is activate for boot on SAN
Summary: mkinitrd bugs when multipath is activate for boot on SAN
Keywords:
Status: CLOSED DUPLICATE of bug 503567
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mkinitrd
Version: 5.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Peter Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-30 09:57 UTC by Jean-Francois Lassignardie
Modified: 2010-11-09 13:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-24 16:12:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jean-Francois Lassignardie 2008-07-30 09:57:00 UTC
Description of problem:

In the script mkinitrd, the variable rootdev is overwritten when the multipath
is activated that leads to have the wrong rootdev to create the line  "mkrootdev
-t ext3 -o defaults,ro /dev/sdc" instead of mkrootdev -t ext3 -o defaults,ro
/dev/VolGroup00/LogVol01"

In the mkinitrd line 1135

       if [ "${withmpath}" -eq "1" ]; then
           for rootdev in ${rootdevs} ; do     <==  Overwrite the rootdev variable
               disk=$(find_dm_in_sysblock ${rootdev} | sed -e 's,^/sys,,') 
               wwid=$(/sbin/scsi_id -g -u -s ${disk})
               if [ -z "${wwid}" ]; then
                   # Could be EMC unit requiring special option
                   wwid=$(/sbin/scsi_id -g -ppre-spc3-83 -u -s ${disk})
               fi
               if [ -n "${wwid}" ]; then
                   case " ${root_wwids} " in
                       *" ${wwid} "*) continue ;;
                       *) root_wwids="${root_wwids} ${wwid}" ;;
                   esac
               fi
           done
           if [ -n "$root_wwids" ]; then
               use_multipath=1
           fi
       fi


Version-Release number of selected component (if applicable):

mkinitrd-5.1.19.6-28

How reproducible:

when multipath is activated for boot on SAN

Steps to Reproduce:
1.

~/mkinitrd -f initrd-2.6.18-92.1.6.el5.img 2.6.18-92.1.6.el5
  
Actual results:
The system can't boot with the initrd generated by this script

Expected results:

Boot the system on SAN with the correct initrd

Additional info:

In the mkinitrd line 1135
rename the variable rootdev by rootdev1 in the following line solve this problem

       if [ "${withmpath}" -eq "1" ]; then
           for rootdev1 in ${rootdevs} ; do     <==  Overwrite the rootdev variable
               disk=$(find_dm_in_sysblock ${rootdev1} | sed -e 's,^/sys,,') 
               wwid=$(/sbin/scsi_id -g -u -s ${disk})
               if [ -z "${wwid}" ]; then
                   # Could be EMC unit requiring special option
                   wwid=$(/sbin/scsi_id -g -ppre-spc3-83 -u -s ${disk})
               fi
               if [ -n "${wwid}" ]; then
                   case " ${root_wwids} " in
                       *" ${wwid} "*) continue ;;
                       *) root_wwids="${root_wwids} ${wwid}" ;;
                   esac
               fi
           done
           if [ -n "$root_wwids" ]; then
               use_multipath=1
           fi
       fi

Comment 1 Adam 2010-02-25 18:51:10 UTC
Confirmed this in RHEL 5.3 (Tikanga).  My system here is doing the same thing; each time I run mkinitrd on my system it sets the "mkrootdev..." line to use sd[a|b|c|d] instead of the correct MPATH variable.  The 'resume' line gets set properly with the multipath listed, but not the mkrootdev line.

Making the simple change that Jean-Francois in the mkinitrd script causes mkinitrd to create an initrd file with the correct 'mkrootdev...' line in it using the multipathed root.

Comment 2 RHEL Program Management 2010-07-02 03:29:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 3 Alexander Todorov 2010-07-13 13:51:41 UTC
Jean and Adam,
Red Hat QE may not be able to test this particular setup. Are you willing to test if this feature is fixed and provide feedback during RHEL 5.6 test campaign (i.e. when we release a Beta or a snapshot)?

Comment 4 Jean-Francois Lassignardie 2010-07-13 13:56:23 UTC
It is OK for me

Comment 5 Peter Jones 2010-09-24 16:12:17 UTC

*** This bug has been marked as a duplicate of bug 503567 ***


Note You need to log in before you can comment on or make changes to this bug.