CentOS box no boot after P2V (MDRAID)

Discussions about using Linux guests in VirtualBox.
Post Reply
mops
Posts: 5
Joined: 9. Jun 2011, 06:24
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: win2k8

CentOS box no boot after P2V (MDRAID)

Post by mops »

Hi.

I'm trying to virtual a physical Centos 5.6 machine (web server). It is running software raid (mdraid). I do realize that it is recommended to disable software raid before visualizing but this is not possible - this is a critical production server.

I did the following (essentially following the p2v guide here)
1. Booted the server using linux SystemRescueCD and made images of two partitions / and /boot - these were in /dev/md1 amd /dev/md2 respectively.
2. I have created a linux guest on latest virtualbox (4.2 something), gave it one SATA HDD controller and one virtual HDD.
3. booted linux guest with sysrescuecd, created partitions and restored images into /dev/sda3 and /dev/sda1
4. configured fstab and grub as per guide.

When I start linux guest it boots to the point where it says something slong the lines "cant mount root filesystem /dev/md1 not found -> kernel panic". I cant even boot into maintenance or emergency mode.

I understand that what is happening is that it is still expecting software raid array to be present, but there isn't one any more. I searched / and /boot and there are no any other references to /dev/mdx other than the ones I have disabled or changed to /dev/sdax already. When i boot sysrescue cd, I can mount the partitions that I have restored /dev/sdax and I can see all the files just fine.

Any idea how to go about fixing this ? I was even thinking an around way of setting up brand new CentOS and then conparing differences but there surly must be a better way ?

Thanks in advance,
Matt.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS box no boot after P2V (MDRAID)

Post by Perryg »

Does centos support blkid?
I (don't actually use it enough to know for sure but I believe it does). if so this might work around the /dev/md1 /dev/sd1 issue.
mops
Posts: 5
Joined: 9. Jun 2011, 06:24
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: win2k8

Re: CentOS box no boot after P2V (MDRAID)

Post by mops »

I think yes ?

I'm not sure what blkid is.
I also forgot to mention i think LVM is also being used (not sure whether that is changing things)

There's a config file /etc/blkid/blkid.tab
It has software raid definition in it, including references to /dev/sdax, sdbx, mdx with UIDS, DEVNO's and partition types.
I'll read up on that.

Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: CentOS box no boot after P2V (MDRAID)

Post by Perryg »

Yeah you should do some reading. From the sounds of it VirtualBox is not your nemesis but your guest configuration.
mops
Posts: 5
Joined: 9. Jun 2011, 06:24
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: win2k8

Re: CentOS box no boot after P2V (MDRAID)

Post by mops »

Howdy.

I have resolved the issue by performing a centos upgrade.
Just downloaded network install iso for the later version. Went through upgrade process during which kernel was regenerated, I selected to reinstall and recreate grub. Afterwards everything worked ok.

The issue was related to the fact that kernel has some settings pre-configure in it, so it really had to be recompiled to align the settings for vbox (i.e. remove mdraid and change root to /dev/sda3)

Thanks.
Matt.
Post Reply