Operating System - Linux
1753455 Members
6248 Online
108794 Solutions
New Discussion юеВ

System reboot stop at kernel panic - after restore from clone image

 
SOLVED
Go to solution
yyghp
Super Advisor

System reboot stop at kernel panic - after restore from clone image

I have a critical Linux box running RHEL4 on Dell PowerEdge 1850. I was asked to clone the whole system to another Dell server ( Dell PowerEdge 2950 ).
I knew clone Linux between dissimilar hardware could be difficult, however, due to the complexity of the existing server, installing OS then software on the new box(PE2950) would be almost impossible to ensure they are identical. So, I used Acronis True Image to create an image from the PE1850, and restore it to the PE2950.

The grub looked fine, the new system picked the first kernel and continue booting, however, I got kernel panic right after that.
Details are as follows:
...
No volume groups found
Volume group "VolGroup00" not found
ERROR: /bin/lvm exited abnormally! (pid 529)
mount: error 6 mounting ext3
mount: error 2 mounting none
switchroot:mount failed: 22
umount /initrd/dev failed: 2
kernel panic - not syncing: Attempted to kill init!


I booted the system with the Redhat installation CD and went into the "linux rescue" mode, then "chroot /mnt/sysimage", I could see all the data/files.

This is from the source linux box:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
269G 67G 189G 27% /
/dev/sda1 289M 31M 244M 12% /boot
none 1014M 0 1014M 0% /dev/shm

# fdisk -l
Disk /dev/sda: 293.3 GB, 293391564800 bytes
255 heads, 63 sectors/track, 35669 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 38 305203+ 83 Linux
/dev/sda2 39 35669 286206007+ 8e Linux LVM


That is, most data/files are on LVM, and the backup and restore of LVM looked successful, since I could mount it and browse files on the new box.

Because I "clone" the whole partitions, all the files on two systems should be identical.

The PE1850(source) has one Logical drive on top of hardware RAID, same as PE2950(destination), although physical disk numbers are different, which should not have any impact.


I found another post had same error message as mine:
http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1187094
However, the situations are totally different. I didn't do any change to the kernel(I clone disk), so, it shouldn't be a kernel issue like Gary had.


How to fix such LVM problem?
I appreciate any answers or suggestions.
Thank you!
5 REPLIES 5
Ivan Krastev
Honored Contributor
Solution

Re: System reboot stop at kernel panic - after restore from clone image

Perhaps VolGroup00 information contains different disk name. Can you try in rescue mode after chroot:

vgimport VolGroup00 /dev/sda2

If it's necessary first export it.

regards,
ivan
yyghp
Super Advisor

Re: System reboot stop at kernel panic - after restore from clone image

How can I check the current VolGroup00 information? How can I see the current disk name with VolGroup00?

Thanks Ivan.
Ivan Krastev
Honored Contributor

Re: System reboot stop at kernel panic - after restore from clone image

Look into /etc/lvm/*

cache/.cache
backup/VolGroup00


regards,
ivan
yyghp
Super Advisor

Re: System reboot stop at kernel panic - after restore from clone image

Hi Ivan,

I checked thos files you mentioned, I got this from "/etc/lvm/backup/VolGroup00":

cat /etc/lvm/backup/VolGroup00:
...
VolGroup00 {
id = "......................." (long id string)

physical_volumes {

pv0 {
id = "........................"
...
}
}

logical_volumes {

LogVol00 {
id = "........................"
...
}

LogVol01 {
id = "........................"
...
}
}
}


So, it looks like the LVM config keeps the original machines config for PV0 and LVs, since I did the clone the whole disk. That may be the reason why the

LVM on the new machine has been screwed up ( please correct me if I was wrong. )
But how to fix this? I am not familiar with LVM. I think I need to do what you said "vgexport" and "vgimport". Could you please guide me in detail?

BTW, since the PV and LVs config is wrong, why could I still mount it and browse data/files after I boot from rescue CD?

I also took a look at "/etc/lvm/cache/.cache", no clue which field/item I should pay attention, please advise.

Thank you!
Ivan Krastev
Honored Contributor

Re: System reboot stop at kernel panic - after restore from clone image

Booting from rescue cd - this cd contains kernel with all of drivers, required to repair the system. That's the reason to see all filesystems and LVM volumes/groups.

For vgimport/vgexport commands I will recomend you first to take a short info about LVM and it's usage. This looks very good for me - http://www.howtoforge.com/linux_lvm
Play some time with LVM groups/logical volumes/PV linsk and after that test it in safe environment.

Copy and paste commands from forums or from google answers will not solve your problem at all the times. It is better to know (or to have an idea) what are you doing at the moments.


regards,
ivan