Bug 457216 - mkinitrd bugs when multipath is activate for boot on SAN
mkinitrd bugs when multipath is activate for boot on SAN
Status: CLOSED DUPLICATE of bug 503567
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mkinitrd (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Peter Jones
: OtherQA
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-30 05:57 EDT by Jean-Francois Lassignardie
Modified: 2010-11-09 08:25 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-24 12:12:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jean-Francois Lassignardie 2008-07-30 05:57:00 EDT
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 13:51:10 EST
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 Product and Program Management 2010-07-01 23:29:11 EDT
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 09:51:41 EDT
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 09:56:23 EDT
It is OK for me
Comment 5 Peter Jones 2010-09-24 12:12:17 EDT

*** 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.