Bug 246226

Summary: mkinitrd does not include LVM tools if the rootfs is referenced by "LABEL=" in fstab
Product: Red Hat Enterprise Linux 4 Reporter: Daniel Challen <daniel.challen>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 4.5CC: jgranado, tao
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-24 13:09:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
shell session illustrating the problem
none
tarfile with writeup txt, example fstabs, modified mkinitrd, diffs
none
patch for /sbin/mkinitrd none

Description Daniel Challen 2007-06-29 11:58:11 UTC
Description of problem:
My ext3 rootfs is on a LV. I have labeled the rootfs "/" and changed the fstab
to read
LABEL=/ / ext3 defaults 1 1
After up2dateing to the latest kernel (kernel-smp-2.6.9-55.0.2.EL) and rebooting
to it I see a kernel panic as it cannot mount the rootfs. Looking at the output
I see no reference to LVM being started. If I reboot using an older kernel I can
manually run mkinitrd against the newer kernel (or indeed any installed kernel)
again and see that it fails to include LVM components. If I change fstab back to
reference the LV device and rerun mkinitrd it does include LVM components.

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

How reproducible:
every time.

Steps to Reproduce:
1. Install RHEL4, accepting disk and FS layout defaults (i.e. a simple LVM layout)
2. Apply a label to the rootfs, edit /etc/fstab to reference the label 
3. Install a new kernel, or mkinitrd against an existing one
4. Reboot

Actual results:
mkinitrd does not include LVM tools in the initrd

Expected results:
mkinitrd should include LVM tools in the initrd if the rootfs is on a LV

Additional info:

Comment 1 Daniel Challen 2007-06-29 11:58:11 UTC
Created attachment 158201 [details]
shell session illustrating the problem

Comment 2 Daniel Challen 2007-06-29 12:02:31 UTC
I recognise that using FS labels in conjunction with LVM is a rare case (LVM
having its own mechanisms (UUIDs) to handle the movement of physical disks to
different symbolic names), and the problem is easily avoided.

Comment 3 Rubin Simons 2008-04-23 14:29:48 UTC
I can confirm this bug still exists in RHEL 4 ES U5. I ran into it last week;
specify root as "LABEL=/" in /etc/fstab; watch mkinitrd skip lvm-specific steps
like copying {lvm.static, lvm.conf} and including more than only the dm-mod
module. It seems to me that bugs #209473, #214184, #214184, #294051, #327181 and
#426671 are related to this (not sure if they're strictly dupes). 


Comment 4 Rubin Simons 2008-04-23 14:33:11 UTC
(In reply to comment #3)
> I can confirm this bug still exists in RHEL 4 ES U5. I ran into it last week;
> specify root as "LABEL=/" in /etc/fstab; watch mkinitrd skip lvm-specific steps
> like copying {lvm.static, lvm.conf} and including more than only the dm-mod
> module. It seems to me that bugs #209473, #214184, #214184, #294051, #327181 and
> #426671 are related to this (not sure if they're strictly dupes). 
> 

Oops, also #212124. 

Comment 5 Owen LaGarde 2008-05-15 06:44:18 UTC
I did this write-up mainly because after a little digging it looks like the
problem is fairly easy to fix -- making it all the more annoying that it exists
at all -- you can demonstrate the pivotal behavior with 4 keystrokes on the end
of mkinitrd line 913.  ;-)

*ahem*

Attached is "mkinitrd.bugzilla_246226.tar.gz", containing:

   -rw-r----- 1 root root  1125 May 14 21:12 fstab.rootdev-by-DEVICE
   -rw-r----- 1 root root  1125 May 14 21:11 fstab.rootdev-by-LABEL
   -rw-r----- 1 root root  2497 May 15 01:23 mkininrd.issue.txt
   -rw-r----- 1 root root  2615 May 14 23:29 mkinitrd.diff-c
   -rwxr----- 1 root root 39109 May 15 01:33 mkinitrd.new
   -rwx------ 1 root root   325 May 14 23:29 run

... two fstabs for use with mkinitrd --fstab, one with a tranditional root
device and one with a LABEL= device, plus the writeup txt, a 'diff -c' showing
what's different between the stock mkinitrd and mkinitrd.new, plus a 'run'
script to demonstrate more easily what's happenning.

Comment 6 Owen LaGarde 2008-05-15 06:45:28 UTC
Created attachment 305443 [details]
tarfile with writeup txt, example fstabs, modified mkinitrd, diffs

Comment 7 Owen LaGarde 2008-05-15 19:51:35 UTC
Support ticket 1827712 created for this issue;  this problem breaks our
backup/restore and disaster recovery procedure, which is much harder to modify
than a shell script (read:  I suspect the fix is a minor patch to the mkinitrd
script itself).

Comment 8 Jeff Bastian 2008-05-22 13:51:57 UTC
Created attachment 306381 [details]
patch for /sbin/mkinitrd

Comment 9 RHEL Program Management 2008-09-05 17:15:24 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 11 RHEL Program Management 2008-09-24 13:09:05 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.