Description of problem: When triggering a kernel crash, kdump fails to find my logical volumes and then doesn't save the crashdump. Version-Release number of selected component (if applicable): kernel 2.6.18-8.1.15.el5 kexec-tools-1.101-164.el5 lvm2-2.02.16-3.el5 How reproducible: 100% Steps to Reproduce: 1. install a rhel5 system with all filesystems on lvm, using the follwing anaconda script: clearpart --all --initlabel part /boot --fstype ext3 --size=128 part pv.100000 --size=0 --grow volgroup rootvg --pesize=32768 pv.100000 logvol /var --fstype ext3 --name=varlv --vgname=rootvg --size=3072 logvol swap --fstype swap --name=swaplv --vgname=rootvg --size=2048 logvol / --fstype ext3 --name=rootlv --vgname=rootvg --size=5120 logvol /local --fstype ext3 --name=locallv --vgname=rootvg --size=1024 2. configure kdump to default to shell 3. crash it with echo c > /proc/sysrq-trigger Actual results: Fails to get a dump because during kdump initialization it can't find /dev/mapper/-varlv, /dev/mapper/-swaplv, /dev/mapper/-rootlv. Expected results: It should find /dev/mapper/rootvg-varlv, /dev/mapper/rootvg-swaplv, etc.. and give me a crash dump. Additional info: I checked the "init" script in the kdump initrd, and found the following section which seems to contain the bug: for i in `lvm lvs | awk '{ if (NR > 1) print $1}'` # loops over the following LV's: crashlv locallv projects rootlv swaplv varlv machete. do VGRP=`lvm lvs | grep $i | cut -d" " -f4` Ouch! it's cut'ing on number of spaces. Only one of my LV's has long enough names to only have 3 spaces in the output before the VG-name: # for i in crashlv locallv machete projects rootlv swaplv varlv ; do lvm lvs | grep $i ; done crashlv rootvg -wi-ao 4.00G locallv rootvg -wi-ao 1.00G machete rootvg -wi-ao 9.78G projects rootvg -wi-ao 19.53G # This is my only match! rootlv rootvg -wi-ao 5.00G swaplv rootvg -wi-ao 2.00G varlv rootvg -wi-ao 3.00G A much better command for finding the VG-name would be: VGRP=`lvm lvs | grep $i | awk '{print $2}'` # for i in crashlv locallv machete projects rootlv swaplv varlv ; do lvm lvs | grep $i | cut -d" " -f4 ; done rootvg # for i in crashlv locallv machete projects rootlv swaplv varlv ; do lvm lvs | grep $i | awk '{print $2}' ; done rootvg rootvg rootvg rootvg rootvg rootvg rootvg
Created attachment 244531 [details] use awk instead of cut to find volume group
seems good. Thanks!
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.
This request was previously evaluated by Red Hat Product Management for inclusion in the current Red Hat Enterprise Linux release, but Red Hat was unable to resolve it in time. This request will be reviewed for a future Red Hat Enterprise Linux release.
*** Bug 401711 has been marked as a duplicate of this bug. ***
Created attachment 298373 [details] omnibus patch This patch is the fix for both bz 360111 and 401711
This RFE has been reviewed during the RHEL RFE review with Red Hat product management. This request has been *tentatively* approved for inclusion in the next update. This decision is not final and still pends further technical review and scoping by Red Hat development engineering.
fixed in 1.102pre-22.el5
Where can I get 1.102pre-22.el5, and is it safe to use on production systems? Manually fixing this on many servers is getting tedious... so I'd much rather use this package if it's relatively safe.
Its not slated to be released until 5.3, so we won't support it yet on productions systems. If its important for you to have though, you can just rebuild the -21 rpm from 5.2 with this patch included and run that on your systems until then
Created attachment 322294 [details] patch to correct multispace parsing error Additional patch to test multispace parsing errors. Please test and confirm that it fixes the problem. Thanks!
Confirm it solves the problem in comment #13.
Thanks Cai!. Comitted in -49.el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-0105.html