1. February 2015

How to configure a Software Raid with XenServer 6.5

A quick Tutorial how to configure a Software Raid with XenServer 6.5

even Citrix does not support a Software Raid with XenServer anymore i would assume that there a a few how are running their lab server with XenServer by using a Software Raid. And since the old Tutorials how to configure a Software Raid with XenServer 6.2 won´t apply to XenServer 6.5 i wrote down the necessary steps. I assume you have a clean XenServer 6.5 installation and you also didn´t create any SR while installing. Let´s start :)

sgdisk –zap-all /dev/sdb
sgdisk –mbrtogpt –clear /dev/sdb
sgdisk -R/dev/sdb /dev/sda #
sgdisk –typecode=1:fd00 /dev/sdb
sgdisk –typecode=2:fd00 /dev/sdb
sgdisk –typecode=3:fd00 /dev/sdb
modprobe md_mod
mdadm –create /dev/md0 –level=1 –raid-devices=2 –metadata=0.90 /dev/sdb1 missing
mdadm –create /dev/md1 –level=1 –raid-devices=2 –metadata=0.90 /dev/sdb2 missing
mdadm –create /dev/md2 –level=1 –raid-devices=2 –metadata=0.90 /dev/sdb3 missing
mkfs.ext3 /dev/md0
mount /dev/md0 /mnt
cp -xR –preserve=all / /mnt
sed -i ‘s/LABEL=[a-zA-Z\-]*/\/dev\/md0/’ /mnt/etc/fstab
mount –bind /dev /mnt/dev
mount -t sysfs none /mnt/sys
mount -t proc none /mnt/proc
chroot /mnt /sbin/extlinux –install /boot
dd if=/mnt/usr/share/syslinux/gptmbr.bin of=/dev/sdb
chroot /mnt
mdadm –detail –scan > /mnt/etc/mdadm.conf
mkinitrd -v -f –theme=/usr/share/splash –without-multipath /boot/initrd-`uname -r`.img `uname -r`
sed -i ‘s/LABEL=[a-zA-Z\-]*/\/dev\/md0/’ /mnt/boot/extlinux.conf
cd /mnt && extlinux –raid -i boot/
sgdisk /dev/sdb –attributes=1:set:2
cd && umount /dev/md0
sync
reboot

Make sure to boot from sdb now!

sgdisk -R/dev/sda /dev/sdb
sgdisk /dev/sda –attributes=1:set:2
mdadm -a /dev/md0 /dev/sda1
mdadm -a /dev/md1 /dev/sda2
mdadm -a /dev/md2 /dev/sda3

You can watch the build process with the following command: watch “mdadm –detail /dev/md* | grep rebuild”

 

About Jens

My name is Jens Trendelkamp. I currently work as an IT Consultant at sepago GmbH. My fields of specialty are Application Delivery, SBC\VDI Solutions and Enterprise Mobility based on Products from Microsoft and Citrix.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close