Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: smithfarm on May 20, 2008, 09:02:42 PM

Title: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: smithfarm on May 20, 2008, 09:02:42 PM
I'm trying to migrate an existing SME Server 7.3 installation from IDE RAID to SATA RAID. I'm getting a kernel panic when the kernel tries to run the executable file "init" in the initrd. It can't find /dev/md1 and /dev/md2, even though they're right there on /dev/sda and /dev/sdb. It seems like its hardcoded to look for them on hda/hdb.

Anyone experienced a similar problem?

Thanks,
Nathan Cutler
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: byte on May 20, 2008, 09:14:00 PM
It seems like its hardcoded to look for them on hda/hdb.

That's correct as you had IDE RAID and SATA RAID are on completely different channels, I would make sure I had a backup then insert the SME Server 7.3 CD boot from the cd and when you get to the stage of "searching for existing installation" I would choose to "Upgrade existing installation"
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: smithfarm on May 20, 2008, 09:22:57 PM
Do you think that would work when the existing installation is already 7.3? Judging strictly from the version number, there's nothing to upgrade (at most it could rewrite the existing 7.3 installation with a new one).
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: smithfarm on May 20, 2008, 11:14:24 PM
I asked my colleague and he confirmed that he already tried "Upgrade existing installation" - it didn't help.

I tracked down the problem. At least on my test machine, when I added "ahci.ko" to the initrd, it booted right up. I made liberal use of the following HOWTO in the process:

http://www.howtoforge.com/recover_data_from_raid_lvm_partitions

[[So many thanks and kudos to Till Brehm - I've been working on this problem for days. Till's HOWTO was a major breakthrough for me]]

So, problem solved - almost. The test machine has different hardware than the server so I can't be sure adding ahcpi.ko will get the server to boot. It may well need some other module. I'm going to try it on the server tomorrow and I'll report back to the group.
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: CharlieBrady on May 21, 2008, 04:14:37 AM
I'm trying to migrate an existing SME Server 7.3 installation from IDE RAID to SATA RAID.

You haven't said exactly how you are trying to do that. Someone might be able to point out where you are going wrong if you describe what you have done.
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: smithfarm on May 21, 2008, 11:05:51 AM
Thanks. Here's what we did. I know, it's probably not "the right way" to do this, but it seemed like a good idea at the time...

We had SME Server 7.3 running on an older machine with 2x IDE drives.
Wanted to upgrade (migrate) to new hardware with 2x SATA drives.
Transferred one of the IDE drives (hda) from the old box to the new one.
Manually created partitions on sda and sdb to match those on hda
Booted up the new box from hda
mdadm --add /dev/md1 /dev/sda1
mdadm --add /dev/md2 /dev/sda2
Waited 2 hours for arrays to resync.
At this point we had RAID1 arrays consisting of hda and sda
mdadm --add /dev/md1 /dev/sdb1
mdadm --add /dev/md2 /dev/sdb2
After this sdb showed up in the arrays as a spare
Shutdown, remove hda
Power up
kernel panic
Then we tried booting from the CD and Upgrade existing installation, to no avail.

That's when I installed SME on the test machine and started to hack the initrd, etc.

Any ideas are welcome. If there's a way to avoid restoring from backup, we'd like to do that.

Thanks,
Nathan
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: Stefano on May 21, 2008, 11:19:23 AM
Hi..

if you are moving to new hw, you have at least 2 options:
- use affa
- use the CopyFromDisk method

I've tested both of them.. they worked fine

please search on the forums and in the wiki

HTH
Stefano
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: janet on May 21, 2008, 05:36:26 PM
smithfarm

I would suggest the Upgrade from Disk method.
Follow these steps carefully, and yes it does support sme7.3 to sme 7.3 restores.

http://wiki.contribs.org/UpgradeDisk
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: CharlieBrady on May 21, 2008, 05:49:27 PM
Any ideas are welcome. If there's a way to avoid restoring from backup, we'd like to do that.

It sounds to me that you are on the right track. You should be able to boot from CD using "sme rescue". Then "chroot /mnt/sysimage", then rebuild the initrd. You may also need to update /boot/grub/device.map, and maybe re-install grub.
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: smithfarm on May 21, 2008, 10:53:01 PM
Yes, we booted the CD into rescue mode several times we rebuilt the initrd using a regular "mkinitrd" command. It falls into kernel panic every time. Is there some other, SME-specific, way to rebuild the initrd? For some reason, when it builds the initrd, it doesn't include the ahci.ko module. On my test machine, that was the missing link. I'm still waiting for my colleague to try it on the actual server itself.

Thanks for the link to Upgrade from Disk. Will definitely do that if, for some reason, we can't get the right modules into the initrd. But we want to minimize server downtime and my colleague is afraid he would have to use a USB drive and it would take forever.
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: CharlieBrady on May 21, 2008, 11:08:01 PM
Yes, we booted the CD into rescue mode several times we rebuilt the initrd using a regular "mkinitrd" command. It falls into kernel panic every time. Is there some other, SME-specific, way to rebuild the initrd? For some reason, when it builds the initrd, it doesn't include the ahci.ko module.

If it needs the ahci module, and doesn't include it, you can tell it to. Just read the manpage and google and you'll find the right mkintrd command to use.

There isn't any SME specific way of doing it. The initrd in SME server is just made as a side effect of installing the kernel rpm, and the RedHat scripts work out what hardware support is needed. I'd guess that because you haven't used the RedHat/CentOS/SME server installer to configure things then the script is not guessing correctly.
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: SuperGrover on December 07, 2010, 07:34:17 PM
In THIS POST (http://forums.contribs.org/index.php/topic,46531.msg230915.html#msg230915), slords describes a way it should work when upgrading from PATA (IDE) to SATA. I didn't check it, but it looks like a much better option to try than I had to do (affa, re-install rpm's etc....)

Grtz
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: MSmith on December 16, 2010, 03:19:27 AM
Since you have two machines, Affa is *highly* recommended.  Quick and easy.  Full method described here:

http://wiki.contribs.org/Moving_SME_to_new_Hardware

Resolves all the issues you're describing.

Why are you sticking with 7.3 and not upgrading to 7.5.1?
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: purvis on December 16, 2010, 04:10:23 PM
Did i miss something. Can you take one of the ide from the current system and place it the second system the boot the new system. If it runs correctly without another drive then shutudown add a sata drive, reboot, sync up to have a raid1 then stutdown, remove the ide drive while at the same time add the second sata drive that is exactly like the first sata drive, reboot, sync the new sata drive to get raid1, reboot again for good measure, the expland your volume on the new stat drive to the desired size. 
If you do not need the full new sata drives data size limits that which are most likely much larger than the previous, consider only explanding the size to either 70 percent of the sata drives size or even smaller if you now have a huge hard dive.

I expanded a physical 1.5tb sata drive to its limits. Now i wish i had only expanded the drive to 750gigbytes.  Previously i had only 320gigbyte drives that where formated to there actual size.
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: cactus on December 17, 2010, 12:38:38 PM
If you do not need the full new sata drives data size limits that which are most likely much larger than the previous, consider only explanding the size to either 70 percent of the sata drives size or even smaller if you now have a huge hard dive.
Why, what is the use of not assigning all space you have? IMHO this will lead to issues in the future as you will need to grow the disk if the capacity is reached anyway.

I expanded a physical 1.5tb sata drive to its limits. Now i wish i had only expanded the drive to 750gigbytes.  Previously i had only 320gigbyte drives that where formated to there actual size.
Why, can you motivate this?
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: purvis on December 17, 2010, 11:10:06 PM
Quote
If you do not need the full new sata drives data size limits
Because.
1 In the the future, you might want to replace drives in the computer with newer faster drives that may only come in smaller drive sizes such as solid state drives.
2 In test i have run, the first 50 to 70 percentage of a drive far out perform the last 30 percentage of a drive of a drive.
3 By not having such large drive space on business server, it will force you to place other data not necessary to be on the server on some other kind of media, making it easier to manage the server.  If you could move large amounts of data to and from a drive fast there would be no problem, but a large amount of space on a server will temp you into placing data on the server that is maybe more likely than not better achieved else where.
4 Smaller drives usually cost less and it should be easier price wise to justify in stock piling a few in case of drive problems.
5 You can expand the drive later if really necessary.
6 If you want to reduce the data partition of large drive that once held large amounts of data and now has much less, you will not be able to do that, unless you can somehow defragment the drive.

This is all for reasons of data management and time management,  and not because sme server cannot handle large drives.
 

 
 
Title: Re: Migrating SME Server 7.3 from IDE RAID to SATA RAID - kernel panic
Post by: janet on December 18, 2010, 12:30:45 AM
purvis

You can easily downsize your drives by doing a backup, and then do a restore to a machine with smaller drives (assuming they are big enough to handle the actual amount of data installed).

Those other reasons seem to complicate data management & only introduce complexities. Just about any size drive is relativly cheap these days, there is little cost difference between smaller and larger drives.
Your server, your choice.