[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Migrate to kernel 2.6 and lvm2 with root fs on lvm1

I've written earlier on the same subject but never got it resolved so I'm
going to give it another go since my desktop constantly stalls on me with
my 2.4 kernel.  I'm now running MDK 10.0 with
kernel24-tmp-2.4.25-2.tmp.1mdk rpm package from Thomas Backlund.  This
kernel seems to get me a bit further then my previous attempts since it
boots a dm enabled kernel (I don't know which lvm I'm running 1 or 2
though, I'm assuming 1 because it tells me it shuts down lvm1 when i halt
my system). Now according to the LVM2 faq I am supposed to edit the lvm
start sequence in my startup script. I assume that the startup script being
reffered to is /etc/rc.sysinit and currently looks like this:

# 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="/sbin/lvm2 vgmknodes"
        _vgchange_cmd="/sbin/lvm2 vgchange -a y"

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
        _vgchange_cmd="/sbin/lvm1-vgchange -a y"
    elif [ -e /proc/lvm -a -x /sbin/vgchange ]; then
        _vgscan_cmd="/sbin/vgscan"              will read
'_vgscan_cmd="/sbin/devmap_mknod.sh; /sbin/vgscan" after edit.
        _vgchange_cmd="/sbin/vgchange -a y"

if [ -n "${_vgscan_cmd}" ]; then
    action "Setting up Logical Volume Management:" ${_vgscan_cmd} &&

Let me know if the edit is correct so I don't hose my system.

Now after this I reboot the system and should be running lvm2 and can then
reboot into Backlund's kernel-tmp-2.6.4-1.tmb.5.mdk-1-1mdk right ?
Do I have to create a new initrd image ?
Do I understand the process correctly or am I about to mess everything up ?
Please let me know.

-Kjartan Reynir Hauksson


Kjartan Reynir Hauksson
Sími: 569-6027/863-5912
e-mail: krh os is


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]