How to remove sw raid for VMware Converter to work

VMWare converter is very powerful tool to provide physical to virtual conversion. It’s quite easy to make P2V of Windows base servers. The last versions of VMware Converter claim to support P2V of Linux based servers. This is true, but there are limits. Linux server running sw raid (mdadm) is one of them.

Here is breif HOWTO:

  • stop all important services
  • disable these services
  • break the mirror
  • strip mdadm info from the disk
  • change the partition type from fd (Linux raid auto) to 83 (Linux)
  • chroot into single disk instance
  • rename mdadm.conf
  • edit fstab to replace root mountpoint to /dev/sdX
  • config the grub to point to /dev/sdX
  • build new initrd
  • poweroff source server
  • remove the proper disk
  • boot up with one disk only

These are the steps we performed on SUSE 10 server:

sles10:~ # service oracle-xe stop
...
sles10:~ # chkconfig oracle-xe off
...
sles10:~ # mdadm --fail /dev/md0 /dev/sdb1
sles10:~ # mdadm --remove /dev/md0 /dev/sdb1
sles10:~ # mdadm --zero-superblock /dev/sdb1
sles10:~ # fdisk /dev/sdb
sles10:~ # mount /dev/sdb1 /mnt/
sles10:~ # mv /etc/mdadm.conf{,.old}
sles10:~ # chroot /mnt/
sles10:/# vim /etc/fstab
sles10:/# vim boot/grub/menu.lst
sles10:/# mkinitrd
sles10:~ # poweroff
This entry was posted in vmware. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Ranju
    Posted 26 September 2011 at 7:15 | Permalink

    I ran into this issue couple of days back when I was trying to convert a Linux Debian (Lenny) which had a software RAID on it. I did cold cloning and it worked, but I ended up with 2 hard drives. How difficult is it to break the mirror after conversion? I am not overly familiar with Linux so any guidance would be appreciated.

    Cheers,

    Ranju

  2. David Hrbáč
    Posted 27 September 2011 at 8:45 | Permalink

    Ranju,
    It is the very same as on physical. Delete one of virtual disks, and go ahead to destroy SW raid. Remember to create snapshot first…
    Regards,
    David

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">