Hi,
I have installed Linux Mandrake 10.0 with a 2.6.3 kernel on an AMD Athlon XP 2400+ with 512MB Ram and 4 SATA Disks of 160GB.
Now Ive created a software Raid-5 array with this 4 disks and within that raid array ive maid an LVM. Everything seems to work OK but now comes the problem.
I think that its my boot and halt init script that is wrong. It does boot and everything seems to go okay but it doesnt create the /proc/lvm file and during boot it sais it cant closedown the lvm propperly and it gives me a fatal error. I have copied and pasted my boot/haltscripts under here. I hope somebody can help me solving this.
Boot script (/etc/rc.d/rc.sysinit):
Code:
# LVM initialization
if [ -f /etc/lvm/lvm.conf -a -x /sbin/lvm2 ]; then
grep -q -s 'device-mapper' /proc/devices /proc/misc || modprobe dm-mod >/dev/null 2>&1
if grep -q -s 'device-mapper' /proc/devices /proc/misc; then
if [ -c /dev/.devfsd ]; then
_vgscan_cmd=/bin/true
else
_vgscan_cmd="/sbin/lvm2 vgmknodes"
fi
_vgchange_cmd="/sbin/lvm2 vgchange -a y"
fi
fi
if [ -z "${_vgscan_cmd}" -a -f /etc/lvmtab ] ; then
[ -e /proc/lvm ] || modprobe lvm-mod >/dev/null 2>&1
if [ -e /proc/lvm -a -x /sbin/lvm1-vgchange ]; then
_vgscan_cmd="/sbin/lvm1-vgscan"
_vgchange_cmd="/sbin/lvm1-vgchange -a y"
elif [ -e /proc/lvm -a -x /sbin/vgchange ]; then
_vgscan_cmd="/sbin/vgscan"
_vgchange_cmd="/sbin/vgchange -a y"
fi
fi
if [ -n "${_vgscan_cmd}" ]; then
action "Setting up Logical Volume Management:" ${_vgscan_cmd} && ${_vgchange_cmd}
fi
Halt Script (/etc/rc.d/init.d/halt):
Code:
if [ -f /etc/lvm/lvm.conf -a -x /sbin/lvm2 ]; then
if grep -q -s 'device-mapper' /proc/devices; then
_vgchange_cmd="/sbin/lvm2 vgchange -a n"
fi
fi
if [ -z "${_vgscan_cmd}" -a -f /etc/lvmtab -a -e /proc/lvm ] ; then
if [ -x /sbin/lvm1-vgchange ]; then
_vgchange_cmd="/sbin/lvm1-vgchange -a n"
elif [ -x /sbin/vgchange ]; then
_vgchange_cmd="/sbin/vgchange -a n"
fi
fi
if [ -n "${_vgchange_cmd}" ]; then
runcmd "Shutting down LVM:" ${_vgchange_cmd}
fi
Thanks in advance,
Koen van Blijderveen
EDIT: LVM Version: 2.00.08