LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 07-07-2004, 06:04 AM   #1
kvanblijderveen
LQ Newbie
 
Registered: Jul 2004
Posts: 1

Rep: Reputation: 0
Exclamation LVM Bootscript Problems


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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems mounting LVM-partition RacerDude Fedora 1 11-22-2005 11:04 AM
lvm anyone? puffinman Linux - Software 2 06-26-2005 11:07 AM
Creating bootscript rael_kid Linux - Newbie 6 03-26-2005 01:47 PM
lvm Ammad Linux - General 2 02-22-2005 08:19 PM
LVM problems, device-mapper missing dworkin Linux - Newbie 3 03-22-2004 04:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration