Koozali.org: home of the SME Server

Migrating from failed IDE disk to SATA disk (with RAID)

Offline EnglishRob

  • *
  • 13
  • +0/-0
Migrating from failed IDE disk to SATA disk (with RAID)
« on: May 06, 2009, 04:15:26 PM »
Hi folks,

I'm wondering if someone can possibly help?

I've got a server running SME Server 7.3 which has got two drives, an 80GB IDE drive as HDA (which it boots from) and a 250GB SATA drive which is part of the raid array.

Basically the 80GB drive has failed so I have removed this drive.  I've tried booting from the 250GB drive and it starts to boot (loads grub, goes on to load kernel etc) but then it comes up with the following message:

md : md1 stopped
mdadm: no devices found for /dev/md1
md: md2 stopped
mdadm: no devices found for /dev/md2

...and further on down it comes up with:
 
Volume group "main" not found

Then the kernel panics.

Now I've tried booting from the install CD in rescue mode and I have altered /etc/mdadm.conf so it is configured as follows:

DEVICE partitions
ARRAY /dev/md2  device=/dev/sda2
ARRAY /dev/md1 device=/dev/sda1

I still can't get it to boot though.

I just wondered if anyone knew how I could resolve this so I can get the server to boot?

Otherwise, is it possible to backup the data on the server and transfer it to a new install without having to go through reinstalling things like eGroupware etc?

Ta,

Rob

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #1 on: May 06, 2009, 04:58:46 PM »
I've got a server running SME Server 7.3 which has got two drives, an 80GB IDE drive as HDA (which it boots from) and a 250GB SATA drive which is part of the raid array.

Which is part of which raid array?

How was the above system created?

SME base configuration only supports systems with one or more identical drives.

Offline EnglishRob

  • *
  • 13
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #2 on: May 06, 2009, 05:19:14 PM »
Basically the server was originally built on a machine which only had IDE connections.  It was installed on a single 80GB drive.

A while later the server was migrated to a newer machine (basically the hard disk was transferred over) and then a 250GB SATA drive was added and the drives were mirrored (so the 250GB drive was a mirror of the 80GB drive).  So I guess there should be one raid array (it's using Software RAID), although it comes up as two devices /dev/md1 which I believe is the /boot partition and /dev/md2 which I believe is /

As the 80GB drive failed I removed this, so I guess now there is a broken raid array in the server, the problem is I can't figure out how to tell the machine to look at /dev/sda instead of /dev/hda.  It boots the kernel okay but fails on finding /dev/md1 and /dev/md2.

Rob

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #3 on: May 06, 2009, 06:29:31 PM »
A while later the server was migrated to a newer machine (basically the hard disk was transferred over) and then a 250GB SATA drive was added

how did you add the sata hd to the array? manually? via console?

Ciao
Stefano

Offline EnglishRob

  • *
  • 13
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #4 on: May 06, 2009, 06:46:44 PM »
Ahh right, I added it using the admin console (logged in at the console as admin and chose the option to add the free drive to the array).

Rob

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #5 on: May 06, 2009, 07:09:03 PM »
As the 80GB drive failed I removed this, so I guess now there is a broken raid array in the server, the problem is I can't figure out how to tell the machine to look at /dev/sda instead of /dev/hda.

You'd need to build a new initrd file to do that. Doing an upgrade from CDROM will probably do that for you. You can also do it manually by booting from the CD in rescue mode and running a few commands.

First thing I would do is check that you can boot the CD in rescue mode and access your file systems on that drive.

You'll probably find that you only have a <80GB file system on that SATA drive.



Offline EnglishRob

  • *
  • 13
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #6 on: May 06, 2009, 07:22:28 PM »
Thanks for the info.

Would I be able to re-create the initrd file using the command:

mkinitramfs /boot/initrd-file.img kernel-version

(of course I'd replace the kernel version with the running kernel).

Luckily I can boot from the rescue CD and chroot into the installation so the data appears intact.

I'll try and give it a go tomorrow (too tired to look at it tonight) and report back how I get on.

Thanks for the advice guys.

Rob

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #7 on: May 06, 2009, 07:32:23 PM »
Would I be able to re-create the initrd file using the command:

mkinitramfs /boot/initrd-file.img kernel-version

Close. The command is mkinitrd. From the rescue CD, you'd do: 'chroot /mnt/sysimage' first.

The mkinitrd command might only work correctly (i.e. build an initrd which will boot your system) if the appropriate 'alias scsi_hostadapter' exists in /etc/modprobe.conf. It's usually put there by anaconda during install/upgrade.

Offline EnglishRob

  • *
  • 13
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #8 on: May 06, 2009, 08:17:22 PM »
Actually, thinking about it, the server was originally installed on a different motherboard which doesn't have SATA on it.  I presume Anaconda actually writes the modprobe.conf on it's first installation only?

That might explain why it won't work.  I presume once the server has booted up past the initrd then it would load any other modules?

I presume that it worked when I booted from the IDE drive originally on the newer motherboard because the kernel has IDE support built in?

Thanks for the pointers, it gives me something to go on.  I've found another IDE drive (actually identical to the faulty one) but I presume unless I can actually boot the system I won't be able to put it in the raid array and have it rebuild?

Rob

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #9 on: May 06, 2009, 08:24:41 PM »
I presume Anaconda actually writes the modprobe.conf on it's first installation only?

I believe it updates the information during upgrades as well.

Quote
I presume that it worked when I booted from the IDE drive originally on the newer motherboard because the kernel has IDE support built in?

You've made a statement here, but end it with a question mark. I assume you mean to make a statement, and then ask "Correct?". My response is "yes".

You don't need an updated modprobe.conf to build an initrd containing the correct drivers. If you know what drivers you need (and booting the CD in rescue mode should identify them) then you can name the modules on the command line when running mkinitrd. Google should find an exact recipe for you.

Hire me if you need more advice. Bye.



Offline EnglishRob

  • *
  • 13
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #10 on: May 06, 2009, 08:36:27 PM »
Yeah sorry, was busy typing that whilst cooking dinner.

Thanks for the advice, I'll do a bit of searching on Google with regards to mkinitrd.

Rob

Offline MSmith

  • *
  • 675
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #11 on: May 06, 2009, 11:42:25 PM »
Use a "livecd" to see if you can access your ibays, email etc., back up what you want over your network, then try to "upgrade" from a 7.4 CD.  That might straighten the machine out.  Of course, you'll still only be using 80 gigs of your 250.
...

Offline p-jones

  • *
  • 594
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #12 on: May 07, 2009, 01:17:51 AM »
Quote
I just wondered if anyone knew how I could resolve this so I can get the server to boot?

On a totally different approach, I played with an almost identical scenario only a couple of weeks ago. I ended up going to one of the local component importers and got myself a "double ended" IDE to SATA converter.

Cost me $14 ($US7), it worked a treat and saved me hours of time.

From here you have many options. For me, I created another mirror drive and stuck it on the shelf for safety. I eneded up doing a backup - rebuild-restore however I only had a couple of contribs to add.

My point being that I got myself to a place of safety quickly, easily and cheaply before moving on. I dont believe you are at that point yet.
...

Offline EnglishRob

  • *
  • 13
  • +0/-0
Re: Migrating from failed IDE disk to SATA disk (with RAID)
« Reply #13 on: May 13, 2009, 04:54:01 PM »
Hi folks,

Well it's all working now, thanks ever so much for the advice.  I've only just had chance to look at it now.

Turns out adding

alias scsi_hostadapter sata_sil to modprobe.conf and re-creating the initial ram disk did the trick.

I'll have a look at your suggestion too p-jones.  I've seen adapters that would allow me to connect IDE disks to an SATA controller but I didn't realise there was an adaptor to go the other way around (connect an SATA disk to an IDE controller).  I guess the other option would be to put in a PCI SATA controller and that way it can be moved along with the discs in the event of a motherboard failure (although I guess it's also handy in this case to have a spare too).

Rob

Rob