I've narrowed it down to the lvm2 script that is supposed to activate the lvm. But it doesn't.
Here's the script:
Code: Select all
#!/bin/sh
PREREQ="mdadm mdrun multipath"
prereqs()
{
echo "$PREREQ"
}
case $1 in
# get pre-requisites
prereqs)
prereqs
exit 0
;;
esac
activate_vg()
{
local dev="$1"
# Make sure that we have a non-empty argument
if [ -z "$dev" ]; then
echo dev is empty
return 1
fi
echo $dev
# Take care of lilo boot arg, risky activating of all vg
case "$dev" in
fe[0-9]*)
lvm vgchange -aly --ignorelockingfailure
echo whatever1
exit 0
;;
# FIXME: check major
/dev/root)
lvm vgchange -aly --ignorelockingfailure
echo whatever2
exit 0
;;
esac
# Make sure that we have a d-m path
dev="${dev#/dev/mapper/}"
echo "dev is $dev and arg 1 is $1"
if [ "$dev" = "$1" ]; then
echo "returning 1"
return 1
fi
eval $(dmsetup splitname --nameprefixes --noheadings --rows "$dev")
echo "$DM_VG_NAME"
echo "$DM_LV_NAME"
if [ "$DM_VG_NAME" ] && [ "$DM_LV_NAME" ]; then
lvm lvchange -aly --ignorelockingfailure "$DM_VG_NAME/$DM_LV_NAME"
rc=$?
if [ $rc = 5 ]; then
echo "Unable to find LVM volume $DM_VG_NAME/$DM_LV_NAME"
fi
fi
}
if [ ! -e /sbin/lvm ]; then
echo "no /sbin/lvm"
exit 0
fi
echo modprobing dm-mod
modprobe -q dm-mod
activate_vg "$ROOT"
activate_vg "$resume"
exit 0
Code: Select all
dev="${dev#/dev/mapper/}"Code: Select all
if [ "$dev" = "$1" ]So the syntax of
Code: Select all
dev="${dev#/dev/mapper/}"I think it's supposed to concatenate /dev/mapper to $dev, but the result is only $dev but $dev is the same as $1 so the subsequent activateion of the volume never gets called.
Is it that busybox behaves differently than other shells or what is going on here?
Regards
Aydan