Bug 246226 - mkinitrd does not include LVM tools if the rootfs is referenced by "LABEL=" in fstab
mkinitrd does not include LVM tools if the rootfs is referenced by "LABEL=" i...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd (Show other bugs)
4.5
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Peter Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-29 07:58 EDT by Daniel Challen
Modified: 2010-10-22 11:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-24 09:09:05 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)
shell session illustrating the problem (5.77 KB, text/plain)
2007-06-29 07:58 EDT, Daniel Challen
no flags Details
tarfile with writeup txt, example fstabs, modified mkinitrd, diffs (13.24 KB, application/x-gzip)
2008-05-15 02:45 EDT, Owen LaGarde
no flags Details
patch for /sbin/mkinitrd (1000 bytes, patch)
2008-05-22 09:51 EDT, Jeff Bastian
no flags Details | Diff

  None (edit)
Description Daniel Challen 2007-06-29 07:58:11 EDT
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 07:58:11 EDT
Created attachment 158201 [details]
shell session illustrating the problem
Comment 2 Daniel Challen 2007-06-29 08:02:31 EDT
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 10:29:48 EDT
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 10:33:11 EDT
(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 02:44:18 EDT
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 02:45:28 EDT
Created attachment 305443 [details]
tarfile with writeup txt, example fstabs, modified mkinitrd, diffs
Comment 7 Owen LaGarde 2008-05-15 15:51:35 EDT
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 09:51:57 EDT
Created attachment 306381 [details]
patch for /sbin/mkinitrd
Comment 9 RHEL Product and Program Management 2008-09-05 13:15:24 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 11 RHEL Product and Program Management 2008-09-24 09:09:05 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

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