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