Bug 606584 - Function resolve_dm_name is not present in /etc/rc.d/init.d/functions
Function resolve_dm_name is not present in /etc/rc.d/init.d/functions
Status: CLOSED DUPLICATE of bug 604055
Product: Fedora
Classification: Fedora
Component: kexec-tools (Show other bugs)
13
All Linux
low Severity high
: ---
: ---
Assigned To: Neil Horman
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-21 22:23 EDT by Rene Jr Purcell
Modified: 2010-07-01 14:53 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-01 14:53:27 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 Rene Jr Purcell 2010-06-21 22:23:16 EDT
Description of problem:
I folowed the howto here (http://fedoraproject.org/wiki/Kernel/kdump) on how to activate kdump to diagnose kernel panic. When I rebooted I found out that kdump service was unable to start. here's the output.
No kdump initial ramdisk found.                            [WARNING]
Rebuilding /boot/initrd-2.6.33.5-124.fc13.i686.PAEkdump.img
/sbin/mkdumprd: line 786: resolve_dm_name: command not found
/sbin/mkdumprd: line 786: resolve_dm_name: command not found
/sbin/mkdumprd: line 786: resolve_dm_name: command not found
No module raid5 found for kernel 2.6.33.5-124.fc13.i686.PAE, aborting.
Failed to run mkdumprd

I talked with some folks on freenode wich lead me to add this code coming from RHEL to /etc/rc.d/init.d/functions :

# find the working name for a running dm device with the same table as one
# that dmraid would create
resolve_dm_name() {
(
    name="$1"

    line=$(/sbin/dmraid -ay -t --ignorelocking | \
        egrep -iv "no block devices found|No RAID disks" | \
        awk -F ':' "{ if (\$1 ~ /^$name$/) { print \$2; }}")
    for x in $line ; do
        if [[ "$x" =~ "^/dev/" ]] ; then
            majmin=$(get_numeric_dev dec $x)
            line=$(echo "$line" | sed -e "s,$x\( \|$\),$majmin\1,g")
        fi
    done
    line=$(echo "$line" | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//' \
               -e 's/ core [12] [[:digit:]]\+ / core [12] [[:digit:]]\\+ /')
    /sbin/dmsetup table | \
        sed -n -e "s/.*\(no block devices found\|No devices found\).*//" \
               -e "s/\(^[^:]\+\): $line\( \+$\|$\)/\1/p"
) 2>/dev/null
}

This doesn't fix my kdump problem, but it seems to fix the /sbin/mkdumprd: line 786: resolve_dm_name: command not found.


I don't know exactly where I can report bug to kdump, but there's definitly something missing for kdump to work with raid5 on Fedora13.

# lsmod |grep raid
raid1                  16661  1 
raid456                54229  1 
async_raid6_recov       4352  1 raid456
async_pq                3423  2 raid456,async_raid6_recov
raid6_pq               78424  2 async_raid6_recov,async_pq
async_xor               2641  3 raid456,async_raid6_recov,async_pq
async_memcpy            1464  2 raid456,async_raid6_recov
async_tx                1981  5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy

# cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] [raid1] 
md1 : active raid1 sda1[0] sdb1[1]
      262132 blocks super 1.0 [2/2] [UU]
      
md0 : active raid5 sda2[0] sdd1[4] sdc1[2] sdb2[1]
      731801088 blocks super 1.1 level 5, 512k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 1/2 pages [4KB], 65536KB chunk

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_rp4-LV_root
                       15G  4.8G  8.6G  36% /
tmpfs                1007M  420K 1007M   1% /dev/shm
/dev/md1              248M   40M  196M  17% /boot
/dev/mapper/vg_rp4-LV_home
                      671G  290G  347G  46% /home

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

# uname -r
2.6.33.5-124.fc13.i686.PAE
# cat /etc/redhat-release 
Fedora release 13 (Goddard)
# rpm -qa |grep initscript
initscripts-9.12-1.fc13.i686


How reproducible:
You probably need to have a Raid5 on your computer.
Follow the procedure to install and enable kdump (http://fedoraproject.org/wiki/Kernel/kdump) reboot and try to start the kdump service.

Steps to Reproduce:
1. Install a Fedora 13 with raid5 something like I pasted before
2. yum install --enablerepo=fedora-debuginfo --enablerepo=updates-debuginfo kexec-tools crash kernel-debuginfo
3. add crashkernel=128M to the kernel line in /etc/grub.conf
4. Reboot
5. Try to start the kdump service, look at the output.
  
Actual results:
No kdump initial ramdisk found.                            [WARNING]
Rebuilding /boot/initrd-2.6.33.5-124.fc13.i686.PAEkdump.img
/sbin/mkdumprd: line 786: resolve_dm_name: command not found
/sbin/mkdumprd: line 786: resolve_dm_name: command not found
/sbin/mkdumprd: line 786: resolve_dm_name: command not found
No module raid5 found for kernel 2.6.33.5-124.fc13.i686.PAE, aborting.
Failed to run mkdumprd


Expected results:
Don't know exactly but I should probably work, this is a fresh install.
Comment 1 CAI Qian 2010-06-21 23:30:47 EDT
You should try - kexec-tools-2.0.0-33.fc14 which should have the fix already -
bug 597588.
Comment 2 Neil Horman 2010-07-01 14:53:27 EDT

*** This bug has been marked as a duplicate of bug 604055 ***

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