Bug 203398

Summary: lvs from mkinitrd segfaults leaving partial initrd file
Product: [Fedora] Fedora Reporter: Robert Peterson <rpeterso>
Component: lvm2Assignee: Alasdair Kergon <agk>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: agk, dwysocha, jbrassow, mattdm, mbroz
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: FC6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-24 10:38:25 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:

Description Robert Peterson 2006-08-21 18:06:58 UTC
Description of problem:
On the Smoke cluster in the Minneapolis lab, if I do
mkinitrd, lvs will segfault and die silently, leaving
me with a partial initrd file.  

I have to do two things to get it to work:

1. I have to patch /sbin/mkinitd like this:
465c465
<     local vg=`lvs --noheadings -o vg_name $1 2>/dev/null`
---
>     local vg=`lvm.static lvs --noheadings -o vg_name $1 2>/dev/null`
2. I have to change locking_type = 1 in /etc/lvm/lvm.conf

Doing those two things allows mkinitrd to work.
Either one alone is not enough.  In other words, changing
locking_type = 1 will not make mkinitrd work properly, and
using lvm.static to execute lvs will still not work if 
locking_type = 2.

How reproducible:
Always.

Steps to Reproduce:
1. Grab the latest kernel.org kernel
2. make menuconfig
3. make
4. make modules
5. make modules_install
6. Edit /etc/lvm/lvm.conf and change locking_type = 2
   and add the appropriate locking library.
7. make install (this does a mkinitrd and leaves you with a partial)

Once you have a kernel image:
rm /boot/initrd-2.6.18-rc4.img
mkinitrd /boot/initrd-2.6.18-rc4.img 2.6.18-rc4

Actual results:
The initrd file in /boot is 1.4MB and does not boot.

Expected results:
The initrd file in /boot should be 2.1MB and should boot.

Additional info:
I was compiling the latest git tree for gfs2 at the time.
All of the machines in the smoke cluster do the same thing,
and they're all FC6test1 with recent updates.
The cluster consists of: camel, merit, winston, kool, salem.

Comment 2 Alasdair Kergon 2006-09-01 15:06:11 UTC
Was the cluster active when you ran mkinitrd?

Comment 4 Matthew Miller 2007-04-06 18:13:02 UTC
Fedora Core 5 and Fedora Core 6 are, as we're sure you've noticed, no longer
test releases. We're cleaning up the bug database and making sure important bug
reports filed against these test releases don't get lost. It would be helpful if
you could test this issue with a released version of Fedora or with the latest
development / test release. Thanks for your help and for your patience.

[This is a bulk message for all open FC5/FC6 test release bugs. I'm adding
myself to the CC list for each bug, so I'll see any comments you make after this
and do my best to make sure every issue gets proper attention.]


Comment 5 Robert Peterson 2007-04-16 14:28:34 UTC
I haven't seen this problem for a several months now.  I just verified 
that it doesn't recreate anymore on an FC6 "Gold" system, so I'm closing 
as CurrentRelease.